/* Nedim Shoes design tokens. Source of truth: docs/design-system.md.
   Measured from the HTML/CSS of spykercars.com, 2026-11-17
   (docs/references/color-thief-spyker-2026-11-17/html-colour-inventory.md). */
:root {
  /* Core */
  --color-bg: #FFFFFF;
  --color-ink: #0A0A0A;            /* body text default */
  --color-heading: #101010;
  --color-body: rgba(16, 16, 16, 0.8);
  --color-black: #000000;          /* solid buttons, icons, dark footer */
  --color-on-dark: #FFFFFF;
  --color-selection: #1D1D1B;

  /* Accent (owner, 2026-11-24; see design-system.md §Colour). Used only where the owner names it. */
  --color-accent: #CE0000;

  /* Greys */
  --color-surface: #F0F0F0;
  --color-surface-alt: #F5F5F5;
  --color-panel: #FDFEFE;
  --color-divider: #B2B2B2;
  --color-border-soft: #E5E7EB;
  --color-input-border: #99A1AF;
  --color-text-grey: #A7A9AC;

  /* Transparency ladders */
  --color-text-secondary: rgba(0, 0, 0, 0.55);   /* 4.74:1 on white, AA; owner 2026-11-29 "A" (was 0.5, 3.95:1) */
  --color-line: rgba(0, 0, 0, 0.10);
  --color-scrim: rgba(0, 0, 0, 0.35);      /* measured 0.30-0.40 */
  --color-on-dark-secondary: rgba(255, 255, 255, 0.8);
  --color-glass: rgba(255, 255, 255, 0.25); /* measured 0.20-0.35 */

  /* Spacing scale, 4 px base. Measured from spykercars.com + pensatori-irrazionali.com,
     2026-11-18 (docs/references/spacing-2026-11-18/report.html). Nothing off this list. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 144px;
  --space-11: 256px;

  /* Layout (phone values; desktop overrides below) */
  --gutter: var(--space-5);              /* 24 phone, 48 desktop */
  --section: var(--space-7);             /* 48 phone, 96 desktop: within a chapter */
  --chapter: var(--space-9);             /* 96 phone, 144 desktop: between chapters */
  --chapter-long: var(--space-10);       /* 144 phone, 256 desktop: the longest pause */
  --grid-columns: 1;
  --grid-gap: var(--space-4);            /* 16 phone, 24 desktop */
  --content-max: 1440px;
  --text-column: 100%;                   /* clamp(33rem, 40vw, 39rem) on desktop */

  /* Type. Measured from spykercars.com + pensatori-irrazionali.com, 2026-11-19, carried to Switzer
     (docs/references/type-2026-11-19/). Sizes are the clamp() values of
     docs/design/type-guideline/guideline.md §1 and §3: linear from 390 to 1440, no breakpoint.
     Owner chose every recommended option, 2026-11-19. Weight is 400 unless a -weight token says otherwise.
     Fluid line heights use the same 390 -> 1440 interpolation; rem so they scale with the size. */
  --font-sans: "Switzer", "Switzer Fallback", "Switzer Fallback Roboto", Arial, sans-serif;
  --font-script: "Babylonica", cursive;   /* only where the owner names it */

  --type-display: clamp(3rem, 1.3286rem + 6.8571vw, 7.5rem);      /* 48 -> 120 */
  --type-display-line-height: 1.1;
  --type-display-tracking: -0.03em;

  --type-h1: clamp(2rem, 1.4429rem + 2.2857vw, 3.5rem);            /* 32 -> 56 */
  --type-h1-line-height: 1.1;
  --type-h1-tracking: -0.02em;

  --type-h2: clamp(1.5rem, 1.175rem + 1.3333vw, 2.375rem);         /* 24 -> 38 */
  --type-h2-line-height: 1.1;
  --type-h2-tracking: -0.01em;

  --type-lead: clamp(1.25rem, 1.0179rem + 0.9524vw, 1.875rem);     /* 20 -> 30 */
  --type-lead-line-height: clamp(1.75rem, 1.4714rem + 1.1429vw, 2.5rem); /* 28 -> 40 px */
  --type-lead-tracking: -0.01em;

  --type-title: 1.25rem;                                           /* 20 */
  --type-title-line-height: 1.75rem;                               /* 28 px */
  --type-title-tracking: -0.01em;

  --type-body: clamp(1rem, 0.9536rem + 0.1905vw, 1.125rem);        /* 16 -> 18 */
  --type-body-line-height: clamp(1.5rem, 1.4071rem + 0.381vw, 1.75rem); /* 24 -> 28 px */
  --type-body-tracking: -0.01em;

  --type-small: 0.875rem;                                          /* 14 */
  --type-small-line-height: 1.25rem;                               /* 20 px */
  --type-small-tracking: 0;

  --type-caption: 0.75rem;                                         /* 12, --color-text-secondary */
  --type-caption-line-height: 1.25rem;                             /* 20 px */
  --type-caption-tracking: -0.01em;

  --type-label: 0.75rem;                                           /* 12, capitals via CSS */
  --type-label-line-height: 1rem;                                  /* 16 px */
  --type-label-tracking: 0.06em;

  --type-button: 0.875rem;                                         /* 14, capitals via CSS */
  --type-button-line-height: 1rem;                                 /* 16 px */
  --type-button-tracking: 0.06em;
  --type-button-weight: 500;

  --type-legal: 0.75rem;                                           /* 12, --color-text-secondary */
  --type-legal-line-height: 1.25rem;                               /* 20 px */
  --type-legal-tracking: 0;

  /* Babylonica (guideline §3). Tracking 0 always, minimum 40 px, one use per screen. */
  --type-script-word: clamp(6rem, 2.2857rem + 15.2381vw, 16rem);   /* A: 96 -> 256, one word */
  --type-script-word-line-height: 1;
  --type-script-accent: clamp(2.5rem, 1.9429rem + 2.2857vw, 4rem); /* B: 40 -> 64, lower-case phrase */
  --type-script-accent-line-height: 1;                             /* single line */
  --type-script-accent-line-height-wrap: 1.3;                      /* if the phrase wraps */
  --type-script-tracking: 0;
}

/* Layout ranges (design-system.md > Responsive, owner 2026-11-20): phone < 768, tablet 768-1023,
   desktop >= 1024. The block below is the desktop step.
   Flow (owner 2026-11-29, breakpoint B, "1B 2B 3B 4走"): phone flow is
   (max-width: 47.99rem), (max-width: 56.25rem) and (pointer: coarse),
   (max-height: 31.25rem) and (pointer: coarse)  - the last clause catches large phones held sideways.
   Script publishes it as PHONE_Q and
   sets <html data-flow>; CSS reads the attribute. The media rule just below is the only no-script
   fallback and the only place that width is written. Pattern: docs/design/phone-mode/. */
:root { --flow-pin: 1; }
html[data-flow="phone"] { --flow-pin: 0; }
@media (max-width: 47.99rem), (max-width: 56.25rem) and (pointer: coarse), (max-height: 31.25rem) and (pointer: coarse) {
  html:not([data-flow]) { --flow-pin: 0; }
}

/* Tablet step, 48rem (768): owner 2026-11-20, 4A "tablet sections use the desktop values", gutter stays 24. */
@media (min-width: 48rem) {
  :root {
    --section: var(--space-9);
    --chapter: var(--space-10);
    --chapter-long: var(--space-11);
    --grid-columns: 6;
    --grid-gap: var(--space-5);
    --text-column: clamp(33rem, 40vw, 39rem);
  }
}

/* Desktop step, 64rem (1024). */
@media (min-width: 64rem) {
  :root {
    --gutter: var(--space-7);
    --section: var(--space-9);
    --chapter: var(--space-10);
    --chapter-long: var(--space-11);
    --grid-columns: 12;
    --grid-gap: var(--space-5);
    --text-column: clamp(33rem, 40vw, 39rem);
  }
}

/* Type: font loading. Both faces self-hosted from our own domain (owner, 2026-11-19).
   PLACEHOLDER PATHS: the /fonts/ files are not downloaded yet. They are added once the site project
   exists. Switzer: the official WOFF2 files from the Fontshare download (Fonts/WEB/fonts/), unmodified,
   never subset, converted or renamed (ITF Free Font License 2.0, guideline §4a). File names to be
   confirmed against the download. Babylonica: SIL OFL 1.1. */
@font-face {
  font-family: "Switzer";
  src: url("/fonts/Switzer-Regular.woff2") format("woff2");   /* placeholder path */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/fonts/Switzer-Medium.woff2") format("woff2");    /* placeholder path */
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/fonts/Switzer-Bold.woff2") format("woff2");      /* placeholder path */
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Babylonica";
  src: url("/fonts/Babylonica-Regular.woff2") format("woff2"); /* placeholder path */
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks (guideline §4c): copy Switzer's vertical metrics (0.98 / 0.25 / 0.09)
   so a swap moves neither the baseline nor the line breaks. Arial matches Switzer's Turkish width;
   Roboto (Android) is 1.1 % narrower. */
@font-face {
  font-family: "Switzer Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 100%;
  ascent-override: 98%;
  descent-override: 25%;
  line-gap-override: 9%;
}
@font-face {
  font-family: "Switzer Fallback Roboto";
  src: local("Roboto");
  size-adjust: 101.1%;
  ascent-override: 96.9%;
  descent-override: 24.7%;
  line-gap-override: 8.9%;
}
