/* Raft design tokens
   Extracted from the Figma file "Raft - new" (Refine Liquid Design, node 8:1939)
   and the Figma Make prototype. Desktop values are the Figma sizes; the clamp()
   minimums are the prototype's mobile sizes. */

:root {
  /* ---- Fonts ---- */
  --font-sans: 'Instrument Sans', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* ---- Color: base ---- */
  --color-ink: #171916;          /* text on light (Figma "Primary" #181716 is the same ink) */
  --color-paper: #ffffff;
  --color-mist: #f4f4f4;
  --color-lime: #d7df58;
  --color-lilac: #b488f1;
  --color-night: #111210;
  --color-night-ink: #f4f3ed;

  /* ---- Color: project / media surfaces ---- */
  --color-legalon: #190025;
  --color-press-sand: #e8e5dc;
  --color-reel: #14271f;
  --color-reel-ink: #edf0d5;

  /* ---- Color: themeable (set per section by the scroll theme) ---- */
  --bg: var(--color-paper);
  --fg: var(--color-ink);
  --rule: color-mix(in srgb, var(--fg) 30%, transparent);   /* Figma "Bar border" / section stroke */
  --muted: color-mix(in srgb, var(--fg) 55%, transparent);  /* Figma "Subtle" #888 on white */

  /* ---- Spacing (Figma sds-size-space-*) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-40: 160px;
  --radius-media: 12px;     /* image / video corner radius */
  --gutter: 32px;           /* page side padding, all breakpoints */
  --col-gap: 32px;
  --tap: 44px;              /* minimum tap target */

  /* ---- Type scale: sizes ---- */
  --fs-giant-reel: clamp(140px, 25vw, 390px);
  --fs-giant-footer: clamp(140px, 32vw, 480px);
  --fs-giant-about: clamp(100px, 19vw, 280px);
  --fs-display: clamp(49px, 6.5vw, 109px);
  --fs-h2-xl: clamp(46px, 6.7vw, 94px);     /* Our latest & greatest */
  --fs-h2-cta: clamp(48px, 8vw, 118px);     /* Tell us about your business */
  --fs-h2-lg: clamp(40px, 5.7vw, 80px);     /* Brands we've taken from idea to launch */
  --fs-h2-md: clamp(36px, 4.8vw, 68px);     /* We design brands, websites and apps */
  --fs-statement: clamp(25px, 3vw, 40px);   /* About copy */
  --fs-quote: clamp(30px, 2.65vw, 48px);
  --fs-media: clamp(54px, 7vw, 110px);      /* press tile titles */
  --fs-client: clamp(24px, 3vw, 42px);
  --fs-action: 24px;                        /* 30px from the md breakpoint, see components */
  --fs-lead: 24px;
  --fs-body-lg: 20px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-label: 12px;
  --fs-logo: 18.705px;   /* Figma logo lockup: text 18.705px, icon 65.3x52.55, gap 12px, tracking 9px */
  --fs-nav: 18px;

  /* ---- Type scale: line height / tracking ---- */
  --lh-display: 1.02;
  --lh-h2: 1.04;
  --lh-h2-tight: .98;
  --lh-statement: 1.2;
  --lh-body: 1.6;
  --lh-giant: .8;
  --ls-display: -.065em;
  --ls-h2: -.05em;
  --ls-serif: -.03em;
  --ls-action: -.035em;
  --ls-statement: -.0385em;
  --ls-giant: -.04em;

  /* ---- Motion ---- */
  --ease-theme: 1000ms;
  --ease-ui: 300ms;
}

/* --rule and --muted must resolve against the body's --fg (set per section by the scroll theme).
   Declared only on :root they resolve against the default ink and stay dark on black sections. */
body {
  --rule: color-mix(in srgb, var(--fg) 30%, transparent);
  --muted: color-mix(in srgb, var(--fg) 55%, transparent);
}

@media (max-width: 49.99rem) {
  :root { --gutter: 24px; }   /* mobile side margin */
}

@media (min-width: 50rem) {
  :root { --fs-action: 30px; --fs-quote: clamp(30px, 2.65vw, 48px); }
}

/* ---- Page load: content fades in (header stays put). Opacity only, so fixed children are unaffected. ---- */
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
main, .page > section { animation: page-fade-in 1300ms cubic-bezier(.45, 0, .25, 1) 80ms both; }
@media (prefers-reduced-motion: reduce) { main, .page > section { animation: none; } }
