/* ==========================================================================
   Unicorn Store — Reset, fonts, base
   ========================================================================== */

/* --- Self-hosted fonts (latin + latin-ext) ------------------------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/archivo-black-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/archivo-black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  /* Lenis drives scrolling; native smooth scroll would fight it. */
  scroll-behavior: auto;
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--u-ink);
  background: var(--u-paper);
  -webkit-font-smoothing: antialiased;
  /* Tilted cards and marquees overhang; clip rather than scroll. */
  overflow-x: clip;
}

img, picture, svg, video, canvas {
  display: block;
  max-width: 100%;
}

img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

p, h1, h2, h3, h4 { overflow-wrap: break-word; }

/* --- Type ----------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;            /* Archivo Black has one weight; 400 IS bold */
  line-height: var(--lh-head);
  letter-spacing: var(--track-display);
  text-transform: uppercase;
}

/* Card and panel titles stay sentence case — uppercase product names are
   hard to scan in a grid. */
.product-card__name,
.char-card__name,
.cat-tile__name { text-transform: none; }

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

strong, b { font-weight: 700; }

/* --- Focus ---------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--u-secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Keep focus visible even where the custom cursor hides the pointer. */
.u-skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -120%;
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--u-ink);
  color: var(--u-paper);
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 700;
  transition: translate var(--t-mid) var(--ease-out);
}
.u-skip-link:focus-visible { translate: -50% 0; }

/* --- Selection ------------------------------------------------------------ */

::selection { background: var(--u-accent); color: var(--u-ink); }

/* --- Scroll-driven reveal base --------------------------------------------
   Elements opt in with [data-reveal]. JS adds .is-ready to <html> once GSAP
   has taken ownership; until then nothing is hidden, so the page is fully
   readable with JS disabled or broken. */

html.is-ready [data-reveal] { opacity: 0; }

/* --- Reduced motion --------------------------------------------------------
   design.md §8: all animation respects prefers-reduced-motion. The JS layer
   checks the same query and never initialises Lenis, the preloader, the pin,
   the cursor, or WebGL — this block handles the pure-CSS remainder. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html.is-ready [data-reveal] { opacity: 1; }
}
