/* Bestnames.io design tokens (spec B.1), self-hosted faces and metric-matched fallbacks (spec C). */

:root {
  color-scheme: dark;

  /* ---------- Color: one dark world ---------- */
  --ink-0: #07080A;            /* page canvas */
  --ink-1: #0D0F12;            /* raised: desktop modal, FAQ open row, footer */
  --ink-2: #15181C;            /* mobile sheet, pressed states, skip link */
  --text-1: #ECEAE4;           /* headings, names, primary text */
  --text-2: #A6A9AF;           /* body, leads, answers */
  --text-3: #7E8288;           /* mono captions/metadata only, >= 12px */
  --accent: #9ED8EA;           /* "glacier": allowlisted selectors only (B.3) */
  --on-accent: #07080A;        /* text on accent fills */
  --rule: #1E1F20;             /* decorative hairline (non-text) */
  --rule-2: #303131;           /* stronger decorative divider (non-text) */
  --edge: #6E6E6C;             /* interactive component boundaries */
  --select: #21414C;           /* ::selection background */
  --scrim: rgba(7, 8, 10, 0.72);
  --nav-bg: rgba(7, 8, 10, 0.82);
  --nav-bg-solid: rgba(7, 8, 10, 0.96);
  --light: #0E161B;            /* hero radial light peak */
  --dot-rgb: 236, 234, 228;    /* lattice dot color (= text-1) */
  --dot-rest-a: 0.14;          /* lattice dot alpha at rest */
  --dot-lit-a: 0.88;           /* printed glyph dot alpha */
  --dot-safe: 0.35;            /* lattice alpha multiplier behind text */

  /* ---------- Type families ---------- */
  --font-serif: "Instrument Serif", "Instrument Serif Fallback", Georgia, "Times New Roman", serif;
  --font-sans: "Inter Tight", "Inter Tight Fallback", Arial, Helvetica, sans-serif;
  --font-mono: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, Menlo, Consolas, monospace;

  /* ---------- Fluid type scale (320px -> 1440px) ---------- */
  /* Hero H1 and lot names are sized by container units (see E.2, E.6); these are fallbacks. */
  --fs-display: clamp(2.125rem, 0.375rem + 8.75vw, 6.5rem);
  --fs-lot: clamp(3.5rem, 0.5rem + 19vw, 16.5rem);
  --fs-final: clamp(2.5rem, 1rem + 6vw, 7rem);
  --fs-h2: clamp(2.25rem, 1.6rem + 3.2vw, 4.5rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.9vw, 2rem);
  --fs-index: clamp(1.5rem, 1.35rem + 0.5vw, 1.75rem);
  --fs-lead: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-button: 0.9375rem;
  --fs-mono: 0.75rem;          /* 12px: every mono string a user must read */
  --fs-mono-s: 0.6875rem;      /* 11px: decorative/aria-hidden only (gauge scale) */

  --lh-display: 0.95;
  --lh-lot: 0.86;
  --lh-h2: 1.02;
  --lh-h3: 1.15;
  --lh-lead: 1.5;
  --lh-body: 1.6;
  --lh-mono: 1.4;

  --tr-display: -0.025em;
  --tr-lot: -0.035em;
  --tr-h2: -0.02em;
  --tr-h3: -0.01em;
  --tr-body: -0.005em;
  --tr-mono: 0.12em;
  --tr-button: 0.01em;

  --measure: 54ch;
  --measure-lead: 46ch;

  /* ---------- Spacing (4px base) ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px; --s-11: 192px; --s-12: 256px;
  --section-y: clamp(5rem, 2.75rem + 6vw, 9rem);
  --lot-y: clamp(4rem, 2rem + 6.5vw, 9rem);

  /* ---------- Layout (mobile-first; overridden below) ---------- */
  --cols: 4;
  --gutter: 16px;
  --margin: 20px;
  --maxw: 1440px;
  --nav-h: 56px;
  --field-h: clamp(200px, 34svh, 400px);   /* stacked hero field height */
  --field-pull: 40px;                       /* stacked copy rises into the field's faded foot */
  --P: 8px;                                 /* lattice pitch (must match hero.js) */
  --dot-r-rest: 0.7px;
  --dot-r-lit: 1.1px;

  /* ---------- Radii ---------- */
  --r-0: 0;
  --r-1: 2px;                  /* buttons, close button, chips */
  --r-2: 4px;                  /* desktop modal */
  --r-sheet: 16px 16px 0 0;    /* mobile bottom sheet */

  /* ---------- Motion ---------- */
  --t-micro: 180ms;
  --t-short: 240ms;
  --t-base: 400ms;
  --t-reveal: 800ms;
  --t-title: 900ms;
  --t-lot: 1100ms;
  --t-sheet: 380ms;
  --t-copy-timer: 2400ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);

  /* ---------- Z-index (dialogs use the top layer, no z-index) ---------- */
  --z-field: 0;
  --z-content: 2;
  --z-pause: 3;
  --z-nav: 40;
  --z-pill: 45;
  --z-skip: 60;
}

@media (min-width: 700px) {
  :root {
    --cols: 8; --gutter: 20px; --margin: 40px;
    --P: 10px; --dot-r-rest: 0.75px; --dot-r-lit: 1.2px;
  }
}
@media (min-width: 1100px) {
  :root {
    --cols: 12; --gutter: 24px; --margin: clamp(48px, 5vw, 80px);
    --nav-h: 72px;
    --P: 12px; --dot-r-rest: 0.8px; --dot-r-lit: 1.3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :root {
    --t-micro: 0ms; --t-short: 0ms; --t-base: 150ms; --t-reveal: 150ms;
    --t-title: 150ms; --t-lot: 150ms; --t-sheet: 150ms;
  }
}
/* Stacked hero field on landscape tablets and short screens: the CTA and the row of names stay in view.
   (site.css sets a lower height for landscape phones after these.) */
@media (min-width: 700px) and (max-width: 1099.98px) and (orientation: landscape) {
  :root { --field-h: clamp(208px, 30svh, 300px); }
}
@media (max-width: 1099.98px) and (max-height: 640px) {
  :root { --field-h: clamp(192px, 33svh, 240px); }
}

/* ---------- Self-hosted faces (latin subset, SIL OFL) ---------- */
@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-normal.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: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-italic.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: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/inter-tight-latin-wght-normal.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: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.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;
}

/* ---------- Metric-matched fallbacks (generated by `npm run metrics`; do not edit by hand) ---------- */
@font-face { font-family: "Instrument Serif Fallback"; src: local("Georgia"), local("Times New Roman");
  size-adjust: 76.49%; ascent-override: 129.43%; descent-override: 40.53%; line-gap-override: 0.00%; }
@font-face { font-family: "Inter Tight Fallback"; src: local("Arial"), local("Arimo"), local("Liberation Sans"), local("Roboto");
  size-adjust: 96.39%; ascent-override: 100.51%; descent-override: 25.03%; line-gap-override: 0.00%; }
@font-face { font-family: "JetBrains Mono Fallback"; src: local("Courier New"), local("Cousine"), local("Liberation Mono");
  size-adjust: 99.98%; ascent-override: 102.02%; descent-override: 30.00%; line-gap-override: 0.00%; }
