/* -------------------- Wallop font face -------------------- */
@font-face {
  font-family: 'Wallop-Regular-TRIAL';
  src: url('../fonts/MierA-Book.woff2') format('woff2'),
       url('../fonts/MierA-Book.woff') format('woff');
  font-style: normal;
  font-display: swap;
}

/* Make all UI elements inherit the site font */
html, body, input, button, textarea, select {
  font-family: 'Wallop-Regular-TRIAL', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Optional: crisp text rendering; allow synthetic bold since no 700 file */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis-weight: auto;
}

/* -------------------- Root variables (global layout settings) -------------------- */
:root {
  --grid-columns: 14;
  --grid-gap: 8px;
  --page-margin: 8px;

  /* Colors & type */
  --paper: #f7f7f7;
  --text: #282828;
  --highlight: #349bff;

  --font-family: 'Wallop-Regular-TRIAL', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-size-base: 17px; /* single type size */
  --line-height: 1.2;     /* global line height */
}

/* -------------------- Base -------------------- */
* { box-sizing: border-box; }

html {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);/* use global line height */
  color: var(--text);
  background: var(--paper);
}

body {
  margin: var(--page-margin);     /* 8px on all sides */
  min-height: 100dvh;             /* body remains native scroller */
  cursor: none;
}

.count-value-stack {
  position: relative;
  display: inline-grid;
  justify-items: end;
  align-items: end;
  overflow: hidden;
  line-height: 1;
  min-height: 1em;
  text-align: inherit;
  vertical-align: baseline;
}

.count-value {
  grid-area: 1 / 1;
  transform: translate3d(0, 0, 0);
  transition: transform 760ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
  text-align: inherit;
}

.count-value--entering {
  transform: translate3d(0, 115%, 0);
}

.count-value--active {
  transform: translate3d(0, 0, 0);
}

.count-value--leaving {
  transform: translate3d(0, -115%, 0);
}

body.is-system-cursor {
  cursor: auto;
}

body.is-system-cursor #custom-cursor {
  opacity: 0;
}

#custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 90px;
  height: 90px;
  pointer-events: none;
  background: url('../svg/cursor-chevron.svg') no-repeat center / contain;
  transform: translate3d(-200px, -200px, 0) rotate(0deg);
  transform-origin: 78px 45px;
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 9999;
}

#custom-cursor.is-visible {
  opacity: 1;
}

#custom-cursor.is-visible.is-dim {
  opacity: 0.5;
}

@media (pointer: coarse) {
  body { cursor: auto; }
  #custom-cursor { display: none; }
}

/* -------------------- Links -------------------- */
a { color: inherit; text-decoration: none; }

/* -------------------- Buttons (generic UI) -------------------- */
.btn {
  appearance: none;
  border: none;
  border-radius: 0;            /* sharp edges */
  padding: .5rem .75rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  cursor: pointer;
  font-family: inherit;        /* ensure Wallop everywhere */
  line-height: var(--line-height);
}
.btn:hover { background: rgba(255,255,255,.25); }

/* -------------------- Optional: hide native scrollbars -------------------- */
body.hide-scrollbar {
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE 10+ */
}
