/* Design tokens: every design setting for the site, in one file.

   The look: a dark garage in black, deep red, and chrome, taken from the
   logo. Articles sit on warm, light "paper" so they are easy to read.
   Nothing else on the site sets a color, font, size, or space of its own;
   styles.css only reads the variables below. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* ---------- Color ----------
     Text pairs must pass 4.5:1 (3:1 for large text, buttons, focus rings). */
  --color-bg: #0e0f11; /* the garage */
  --color-surface: #191b1f; /* panels and raised areas */
  --color-text: #f3f0ea;
  --color-muted: #b4b6bb;
  --color-border-strong: #858990; /* input borders: 3:1 against the page */

  --color-accent: #bd1622; /* deep red, for buttons and gauge needles */
  --color-accent-hover: #98101a;
  --color-on-accent: #ffffff;
  --color-needle: #f0323f; /* a brighter red that shows on black dials */

  --color-paper: #f7f4ed; /* article background */
  --color-paper-deep: #ebe6da; /* notices, table headings */
  --color-ink: #1a1b1e; /* article text */
  --color-ink-muted: #585a60;
  --color-ink-border: #cfc8b9;
  --color-ink-link: #a0101b; /* links in articles */

  --color-focus: #ffd27a; /* headlight amber */
  --color-focus-ink: #1a1b1e; /* focus ring on paper */

  --color-header-bg: #0e0f11;
  --color-header-text: #f3f0ea;

  /* The headlights, smoke, and garage floor */
  --color-beam-core: #fffbea;
  --color-beam: rgb(255 214 130 / 0.75);
  --color-beam-soft: rgb(255 205 115 / 0.22);
  --color-wall: #2b2e34;
  --color-glow: rgb(189 22 34 / 0.34);
  --color-clear: transparent;

  --color-dial: #101114;
  --chrome: conic-gradient(from 20deg, #f5f6f7, #6f737a 12%, #d9dbdf 24%, #4d5057 38%, #eceef0 52%, #7a7e85 66%, #c9ccd1 80%, #555960 90%, #f5f6f7);
  --chrome-bar: linear-gradient(90deg, #4d5057, #eceef0 22%, #8c9097 48%, #f5f6f7 74%, #4d5057);

  /* ---------- Type ----------
     At most 2 families and 3 weights. Both fonts are free (OFL). */
  --font-display: "Archivo", system-ui, sans-serif;
  --font-text: "Source Sans 3", system-ui, sans-serif;

  --weight-regular: 400;
  --weight-medium: 600;
  --weight-bold: 600;
  --weight-display: 800; /* headings */

  /* Fluid scale, ratio 1.25 from an 18px body. Each step grows with the
     screen between the two sizes in its clamp(). */
  --text-sm: 1rem; /* 16px: dates, captions, footer */
  --text-base: clamp(1.125rem, 1.09rem + 0.16vw, 1.1875rem); /* 18 to 19px */
  --text-lg: clamp(1.1875rem, 1.11rem + 0.37vw, 1.40625rem); /* to 22.5px */
  --text-xl: clamp(1.375rem, 1.24rem + 0.65vw, 1.75rem); /* to 28px */
  --text-2xl: clamp(1.625rem, 1.42rem + 1vw, 2.1875rem); /* to 35px */
  --text-3xl: clamp(1.875rem, 1.56rem + 1.56vw, 2.75rem); /* to 44px */
  --text-4xl: clamp(2.125rem, 1.65rem + 2.36vw, 3.4375rem); /* to 55px */
  --text-5xl: clamp(2.5rem, 1.84rem + 3.28vw, 4.3125rem); /* to 69px */

  /* Article reading text: 20px on phones to 22px on big screens. */
  --text-read: clamp(1.25rem, 1.2rem + 0.2vw, 1.375rem);
  --leading-read: 1.6;
  --leading-heading: 1.15;
  --tracking-read: -0.015em;
  --read-gap: 1.1em;
  --read-section: clamp(2.75rem, 2.2rem + 2vw, 4rem);
  --read-media: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  --read-photo-max: 40rem; /* keeps tall photos on one screen */

  --leading-tight: 1.1; /* display headings */
  --leading-snug: 1.25; /* smaller headings */
  --leading-body: 1.65; /* body text */

  --tracking-display: -0.025em; /* large headings, slightly tighter */
  --word-space-display: 0.06em; /* keeps tight headings easy to read */

  --measure: 68ch; /* longest comfortable line of body text */

  /* ---------- Space (8-point scale) ---------- */
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.5rem; /* 24px */
  --space-6: 2rem; /* 32px */
  --space-7: 3rem; /* 48px */
  --space-8: 4rem; /* 64px */
  --space-9: 6rem; /* 96px */
  --space-10: 8rem; /* 128px */

  /* Section padding: 64px on phones up to 128px on desktop. */
  --space-section: clamp(var(--space-8), 2.5rem + 7.5vw, var(--space-10));
  /* Page gutter: 24px on phones, 40px on desktop. */
  --gutter: clamp(var(--space-5), 1rem + 2vw, 2.5rem);

  /* ---------- Layout ---------- */
  --content-max: 80rem; /* widest content: 1280px */
  --content-read: 41rem; /* article text: about 65 letters a line */
  --content-article: 60rem; /* article title and main photo */
  --dial-phone: 7rem; /* gauges on phones */
  --ride-max: 66rem; /* the car on the home page */
  --search-max: 36rem;
  --story-min: 19rem;
  --logo-width: 5.5rem;
  --fuel-width: 6rem;
  --article-photo-max: 34rem;
  --photo-overlap: 7rem; /* how far the garage shows behind the main photo */
  --header-height: 4.5rem;
  --menu-width: 17rem; /* the drop-down menu on phones and small windows */
  --target-min: 2.75rem; /* 44px: main buttons and menu button */
  --field-height: 3.5rem;
  --target-small: 1.5rem; /* 24px: the smallest any tap target may be */

  --ratio-video: 16 / 9;
  --ratio-card: 3 / 2;

  /* ---------- Shape ---------- */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-button: var(--radius-sm);
  --radius-card: var(--radius-md);
  --radius-input: var(--radius-sm);
  --radius-image: var(--radius-md);

  --border-width: 1px;
  --border-width-strong: 2px;
  --focus-width: 3px;
  --focus-offset: 3px;

  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.08), 0 2px 4px rgb(0 0 0 / 0.06);

  /* ---------- Motion ----------
     150 to 250ms for feedback, 300 to 600ms for reveals. */
  --duration-fast: 200ms;
  --duration-slow: 450ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration-wake: 2600ms; /* the car wakes up, once */
  --duration-smoke: 4200ms;
}
