/* Design tokens — theoberton.com. Every value used in the site comes from here. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist";
  src: url("/assets/fonts/geist-latin-ext-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-ext-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  /* Colour — taken from the Cargo site. Contrast ratios are against --color-bg unless stated. */
  --color-bg: #ffffff;
  --color-surface: #f9f9f9;
  --color-ink: #262626;          /* 15.1:1 */
  --color-ink-strong: #1a1a1a;   /* text on --color-accent: 5.2:1 */
  --color-ink-muted: #595959;    /* 7.0:1 */
  --color-line: #d6d6d6;
  --color-accent: #ff4a14;       /* sun, squares, fills; as text only >= 24px (3.4:1) */
  --color-accent-text: #d63500;  /* orange text < 24px and primary buttons (4.8:1 with white) */
  --color-accent-hover: #b82d00;
  --color-cream: #fff6e8;        /* text on any orange: 4.7:1 on --color-accent-text, 3.1:1 on --color-accent (>= 24px only) */
  --color-cream-muted: #c9c2b8;  /* secondary text on --color-ink: 8.4:1 */
  --color-on-accent: var(--color-cream);
  --color-selection: #ffd2c2;

  /* Type */
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;

  --text-display: clamp(4.5rem, 14vw, 15rem);
  --text-h1: clamp(2.5rem, 6vw, 4.5rem);
  --text-h2: clamp(1.75rem, 3vw, 2.5rem);
  --text-h3: 1.25rem;
  --text-lead: clamp(1.1875rem, 1.6vw, 1.375rem);
  --text-body: 1.0625rem;
  --text-small: 0.875rem;
  --text-label: 0.8125rem;
  --text-price: 2rem;

  --leading-display: 0.9;
  --leading-tight: 1.05;
  --leading-snug: 1.3;
  --leading-body: 1.55;

  --tracking-display: -0.04em;
  --tracking-h1: -0.03em;
  --tracking-h2: -0.02em;
  --tracking-h3: -0.01em;
  --tracking-label: 0.02em;

  /* Space — 4/8 scale */
  --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: 128px;

  --gutter: 16px;
  --section: var(--space-9);
  --grid-gap: var(--space-5);
  --bar-h: 56px;
  --header-h: 68px;             /* 12px offset + floating bar */
  --max-w: 1440px;
  --measure: 62ch;
  --square: 8px;                 /* the ■ marker */
  --target: 44px;                /* minimum touch target */

  --radius: 0;
  --focus-ring: 2px solid var(--color-ink);
  --focus-offset: 3px;

  /* Motion */
  --dur-fast: 150ms;
  --dur-base: 240ms;
  --dur-hero: 300ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quad: cubic-bezier(0.5, 1, 0.89, 1);
  --dur-reveal: 800ms;
  --dur-sunrise: 2400ms;
  --stagger: 90ms;

  /* Layers */
  --z-header: 10;
  --z-menu: 20;
  --z-skip: 30;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}
@media (min-width: 1024px) {
  :root {
    --section: var(--space-10);
    --grid-gap: var(--space-6);
  }
}
@media (min-width: 1280px) {
  :root {
    --gutter: 32px;
  }
}
