/* ==========================================================================
   Design tokens — the single source of truth.
   Never hardcode a color, size, space, radius, or duration anywhere else.
   ========================================================================== */

:root {
  /* ---------- Color ---------------------------------------------------- */

  /* surfaces */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-subtle: #f4f4f5;

  /* text */
  --color-text: #18181b;
  --color-text-muted: #52525b;
  --color-text-subtle: #a1a1aa;

  /* lines */
  --color-border: #e4e4e7;
  --color-border-strong: #d4d4d8;

  /* accent — vivid blue. Used for the wordmark, nav hover/active, and as a
     full surface color on the footer. Tune this one value to reshade the site. */
  --color-accent: #2417e5;
  --color-accent-hover: #1a0fc4;

  /* on-accent — text and icons sitting on --color-accent surfaces */
  --color-on-accent: #ffffff;
  --color-on-accent-muted: #c7c2f7;

  --color-focus: var(--color-accent);

  /* ---------- Typography ------------------------------------------------ */

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Type scale — every step is a whole number of pixels at the default 16px
     root. Written in rem so the site still scales if a visitor raises their
     browser font size; the px equivalent is in the comment. */
  --text-xs: 0.75rem;    /* 12 — eyebrows, "CLICK TO BREW" */
  --text-sm: 0.875rem;   /* 14 — wordmark, clock, captions, meta */
  --text-base: 1rem;     /* 16 — body, nav links */
  --text-lg: 1.125rem;   /* 18 — lead paragraph */
  --text-xl: 1.25rem;    /* 20 — card titles, h4 */
  --text-2xl: 1.5rem;    /* 24 — h3 */

  /* Headings scale with the viewport. Endpoints are whole pixels; the
     interpolated values in between are necessarily fractional. */
  --text-3xl: clamp(24px, 1.25rem + 1.2vw, 32px);   /* h2  24 → 32 */
  --text-4xl: clamp(28px, 1.375rem + 1.8vw, 40px);  /* hero sentence  28 → 40 */
  --text-5xl: clamp(32px, 1.5rem + 2.4vw, 48px);    /* h1  32 → 48 */
  --text-6xl: clamp(40px, 1.75rem + 4vw, 64px);     /* display 40 → 64 */

  /* Icon sizes. Named by pixel value rather than t-shirt size, so a token can
     never quietly come to mean something different. Fixed px so a glyph never
     lands on a fractional pixel and blurs.

     Four steps, each with one job. Before adding a fifth, check whether an
     existing step works — icon sizes multiply faster than any other token.
       14  matched to 14px text           → clock
       16  matched to 16px text; default  → .icon fallback
       20  larger than its surroundings   → menu toggle, footer social, coffee
       24  standalone, no text beside it  → coming soon page social links */
  --icon-14: 14px;
  --icon-16: 16px;
  --icon-20: 20px;
  --icon-24: 24px;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;
  --tracking-normal: 0;
  --tracking-wide: 0.08em;   /* uppercase wordmark + eyebrow labels */

  /* ---------- Spacing --------------------------------------------------- */

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* The one vertical rhythm token for major blocks, site-wide — home page
     sections and case study pages both. 32 → 96px. */
  --section-y: clamp(var(--space-6), 4.5vw, var(--space-9));

  /* Negative --space-2. Icon-only links carry --space-2 of padding for their hit
     area, and that padding sits inside whatever gap or edge is next to the row —
     so the row reads inset from a container edge, or further from the element
     above it than the gap says. This pulls it back by the padding, on whichever
     side needs it. A value, stated — not --space-2 negated inline. */
  --inset-icon-row: -0.5rem;

  /* Container side padding. Fluid rather than stepped: fixed steps jumped
     visibly when the window crossed a breakpoint. Interpolates 16 → 48 between
     roughly 400px and 1200px wide, then holds at 48. */
  --gutter: clamp(var(--space-4), 4vw, var(--space-7));

  /* ---------- Layout ---------------------------------------------------- */

  /* 1728px is the full logical width of a 16" MacBook Pro at its default
     scaling, so the page runs edge-to-edge (minus --gutter) on that screen and
     only starts leaving margins on a wider external monitor. */
  --container-max: 1728px;
  --prose-max: 720px;

  --header-h: 76px;
  --header-h-mobile: 64px;

  /* Where content must start to clear the sticky header, with breathing room —
     used by scroll-padding and by the sticky case-study nav. Stated, not
     --header-h plus a space step: if the header's height changes, this changes
     with it, and one number is easier to check than an expression.
     Currently --header-h (76) + a little under --space-6. */
  --below-header: 108px;

  /* the small coffee image above the hero sentence — a fixed square rather than
     a fluid width, so it reads as a mark rather than an illustration */
  --hero-mark: 96px;

  /* case study anchor-nav column. Fixed rather than fractional so the body
     column's left edge sits at the same place on every case study, whatever
     the longest nav label happens to be. */
  --case-nav-w: 224px;

  /* Ceiling on the case study hero image, so the title and the role/timeline
     meta row stay on screen with it instead of being pushed below the fold.
     55% leaves room for the 76px header, the section padding, and both of those
     rows at 1280x720 — the shortest laptop viewport in normal use. 60% fits the
     taller screens but overflows that one.
     svh not vh: on mobile Safari vh means the viewport with the browser UI
     hidden, so a vh-sized element is taller than what you can actually see. */
  --case-hero-max-h: 55svh;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.05);
  --shadow-md: 0 4px 12px rgb(24 24 27 / 0.08);
  --shadow-lg: 0 12px 32px rgb(24 24 27 / 0.1);

  --z-nav: 100;
  --z-menu: 200;
  /* above the mobile menu — the skip link has to stay reachable while it's open */
  --z-skip: 300;

  /* ---------- Motion ---------------------------------------------------- */

  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 500ms;

  /* --ease-out is a sharp decelerate: most of the distance is covered in the
     first few frames. Good for reveals, too abrupt for small hover moves. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  /* gentle, evenly-paced — for hover lifts and other short transforms */
  --ease-soft: cubic-bezier(0.32, 0.72, 0, 1);
}

