/* ==========================================================================
   GRAN PRIX — base.css
   Tokens, font, reset, typography, layout primitives, buttons.
   --------------------------------------------------------------------------
   Design principles
   1. Black and white first. The identity is monochrome; the ice accent
      only marks state (active, live, selected).
   2. Width is the expressive axis. Archivo's wdth axis (62–125) carries
      the brand: expanded for statements, condensed for data.
   3. Photography and spacing do the work. No decorative gradients,
      no racing clichés.
   ========================================================================== */

/* ---------- Font ---------- */
@font-face {
  font-family: "Archivo";
  src: url('../fonts/archivo-var.woff2') format('woff2-variations'), url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  /* Colour */
  --c-black: #000000;      /* page, matches the logo */
  --c-graphite: #111214;   /* raised surfaces */
  --c-gunmetal: #1b1d20;   /* cards, inputs */
  --c-steel: #2b2e32;      /* borders on hover, idle data */
  --c-fog: #9aa0a6;        /* secondary text (≥ 7:1 on black) */
  --c-mist: #c9cdd1;       /* tertiary emphasis */
  --c-white: #f1f2f3;      /* primary text */
  --c-ice: #bfd8e6;        /* the only accent: state */
  --c-ice-dim: rgba(191, 216, 230, .5);
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .22);
  --scrim: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.2) 55%, rgba(0,0,0,.92) 100%);

  /* Type */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-mega: clamp(3.1rem, 8.6vw, 9.5rem);
  --fs-display: clamp(2.6rem, 6.8vw, 7rem);
  --fs-h2: clamp(2rem, 4.2vw, 4rem);
  --fs-h3: clamp(1.3rem, 1.9vw, 1.75rem);
  --fs-lead: clamp(1.075rem, 1.35vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-label: .75rem;

  /* Space & layout */
  --container: 1440px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 8.5vw, 8.5rem);
  --header-h: 76px;

  /* Shape — radius follows hierarchy, not one value everywhere */
  --r-card: 20px;   /* cards (from the concept) */
  --r-inner: 14px;  /* media inside cards */
  --r-chip: 6px;    /* tags, data */
  --r-pill: 999px;  /* buttons, controls */

  /* Motion */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 180ms;
  --t-med: 420ms;
  --t-slow: 900ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-stretch: 100%;
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: var(--c-ice); color: var(--c-black); }

:focus-visible {
  outline: 2px solid var(--c-ice);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 1rem; top: -100px; z-index: 200;
  background: var(--c-white); color: var(--c-black); padding: .75rem 1rem; border-radius: var(--r-chip);
  font-weight: 600;
}
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .6); }
.section--line { border-top: 1px solid var(--line); }

/* Background guide lines — carried over from the concept's dashed columns */
.guides { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.guides .container { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.guides i { border-left: 1px dashed rgba(255,255,255,.045); }
.guides i:last-child { position: absolute; right: var(--gutter); top: 0; bottom: 0; }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
.mega, .display, .h2, .hero__title {
  font-weight: 780;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.012em;
  font-stretch: 118%;
  text-wrap: balance;
}
.mega    { font-size: var(--fs-mega); }
.display { font-size: var(--fs-display); }
.h2      { font-size: var(--fs-h2); line-height: .94; }
.h3 {
  font-size: var(--fs-h3);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.01em;
  font-stretch: 104%;
  text-wrap: balance;
}
.lead { font-size: var(--fs-lead); line-height: 1.5; max-width: 34em; text-wrap: pretty; }
.statement {
  font-size: clamp(1.6rem, 3.1vw, 3rem);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-stretch: 100%;
  max-width: 24em;
  text-wrap: pretty;
}
.label, .meta-row, .chip, .week__label, .dfield__label, .specs dt {
  font-size: var(--fs-label);
  font-weight: 620;
  font-stretch: 78%;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.muted, .tone-fog { color: var(--c-fog); }
.num { font-variant-numeric: tabular-nums; }
p { text-wrap: pretty; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 36em; color: var(--c-mist); }

/* The "stretch" reveal: headings arrive condensed and expand to full width.
   It is the one orchestrated motion of the brand — used only on headings. */
.js .stretch { font-stretch: 70%; opacity: 0; transition: font-stretch 1.1s var(--ease), opacity .6s var(--ease); }
.js .stretch.is-in { font-stretch: 118%; opacity: 1; }
.js .h3.stretch.is-in { font-stretch: 104%; }

/* Placeholder data slots: visibly not-real, so they are never mistaken for facts */
.ph {
  color: var(--c-ice);
  font-stretch: 84%;
  letter-spacing: .02em;
  text-decoration: underline dotted rgba(191,216,230,.55);
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}
.h2 .ph, .display .ph, .mega .ph, .hero__title .ph { white-space: normal; text-decoration-thickness: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--c-white); --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .8em 1.5em;
  border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: .8125rem; font-weight: 680; font-stretch: 92%;
  letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(.98); }
.btn--light { --btn-bg: var(--c-white); --btn-fg: var(--c-black); --btn-bd: var(--c-white); }
.btn--light:hover { --btn-bg: #fff; --btn-bd: #fff; }
.btn--ice { --btn-bg: var(--c-ice); --btn-fg: var(--c-black); --btn-bd: var(--c-ice); }
.btn--ice:hover { --btn-bg: #d7e7f0; }
.btn--outline:hover { --btn-bd: var(--c-white); }
.btn--sm { min-height: 40px; padding: .55em 1.1em; font-size: .75rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.icon { width: 20px; height: 20px; flex: none; }
.icon.flip { transform: scaleX(-1); }
.icon-btn {
  display: inline-grid; place-items: center; grid-auto-flow: column; gap: .4rem;
  min-width: 44px; height: 44px; padding-inline: .6rem;
  border-radius: var(--r-pill); color: var(--c-white);
  transition: background var(--t-fast);
}
.icon-btn:hover { background: rgba(255,255,255,.08); }
.round-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: var(--c-white); color: var(--c-black);
  transition: transform var(--t-med) var(--ease), background var(--t-fast);
}
.round-btn--line { background: transparent; color: var(--c-white); border: 1px solid var(--line-strong); }
.round-btn--line:hover { border-color: var(--c-white); }
.round-btn--line:disabled { opacity: .3; cursor: default; }
.link-btn { text-decoration: underline; text-underline-offset: .2em; }
.kbd {
  font-size: .6875rem; font-stretch: 80%; color: var(--c-fog);
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 .35em; line-height: 1.5;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .stretch { font-stretch: 118%; opacity: 1; }
}
