/* Equa design tokens
   Golden ratio ladder: base 16px, ×/÷ φ (1.618). Half steps use √φ (1.272).
   Every size and space in the site comes from here. */

:root {
  color-scheme: dark;
  --phi: 1.618;

  /* Color */
  --ink-0: #060606;
  --ink-1: #0d0d0d;
  --ink-2: #161616;
  --cream: #f2ede4;
  --cream-2: rgba(242, 237, 228, 0.62);
  --cream-3: rgba(242, 237, 228, 0.38);
  --cream-4: rgba(242, 237, 228, 0.12);
  --line: rgba(242, 237, 228, 0.09);

  /* Coin lines (coin lab v3). Two intensities carry depth: high edges bright,
     deep edges dim. No fills other than the page ink. */
  --coin-hi: rgba(242, 237, 228, 0.84);
  --coin-lo: rgba(242, 237, 228, 0.4);
  /* Blue is reserved for the brandmark: logo bar, travelling bar, "=". Nothing else. */
  --blue: #0b22fa;

  /* Type ladder (px values noted) */
  --fs-eyebrow: 0.786rem;  /* 12.6  step -1/2 */
  --fs-body: 1rem;         /* 16    step 0 */
  --fs-lead: 1.272rem;     /* 20.4  step +1/2 */
  --fs-h4: 1.618rem;       /* 25.9  step 1 */
  --fs-h4h: 2.058rem;      /* 32.9  step 1 1/2 */
  --fs-h3: 2.618rem;       /* 41.9  step 2 */
  --fs-h2: 4.236rem;       /* 67.8  step 3 */
  --fs-h1: 6.854rem;       /* 109.7 step 4 */
  --fs-display: 11.09rem;  /* 177.5 step 5 */

  /* Fluid headings, kept restrained (round 1 feedback):
     hero lands on step 2 on phones, step 3 from ~1130 wide.
     scene headings run step 1 1/2 to step 2. */
  --fs-hero: clamp(var(--fs-h3), 6vw, var(--fs-h2));
  --fs-scene: clamp(var(--fs-h4h), 3.7vw, var(--fs-h3));

  /* Spacing ladder */
  --sp-1: 0.236rem;  /* 3.8 */
  --sp-2: 0.382rem;  /* 6.1 */
  --sp-3: 0.618rem;  /* 9.9 */
  --sp-4: 1rem;      /* 16 */
  --sp-5: 1.618rem;  /* 25.9 */
  --sp-6: 2.618rem;  /* 41.9 */
  --sp-7: 4.236rem;  /* 67.8 */
  --sp-8: 6.854rem;  /* 109.7 */
  --sp-9: 11.09rem;  /* 177.5 */

  /* Page gutter: step 4 on phones, step 7 on desktop */
  --gutter: clamp(var(--sp-4), 4.7vw, var(--sp-7));

  /* Widths (φ ladder). Content sits in one centred column. */
  --w-page: 59.747rem;   /* 956   step 8 1/2 */
  --w-text: 29.03rem;    /* 464.5 step 7 */
  --sz-coin: var(--sp-9);          /* 177.4 step 5, coin slot on desktop */
  --sz-coin-sm: var(--sp-8);       /* 109.7 step 4, coin slot on phones */
  /* Side padding that centres a full-bleed block on --w-page */
  --pad-x: max(var(--gutter), calc((100% - var(--w-page)) / 2));

  /* Line heights */
  --lh-display: 0.88;
  --lh-head: 1.04;
  --lh-body: 1.618;

  /* Brand bar
     Logo lockup: 25.9 × 9.9  (φ² : 1, matches the cap)
     UI dash:     41.9 × 3.8  (eyebrows, rails) */
  --mark-w: var(--sp-5);
  --mark-h: var(--sp-3);
  --bar-w: var(--sp-6);
  --bar-h: var(--sp-1);

  /* Radius */
  --r-1: 0.382rem;
  --r-2: 0.618rem;
  --r-3: 1rem;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --t-1: 0.236s;
  --t-2: 0.382s;
  --t-3: 0.618s;
  --t-4: 1s;
  --t-5: 1.618s;

  --font-sans: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Swap illustration: dimensions composed from the same spacing ladder. */
  --rule: 0.0625rem;
  --swap-muted: rgba(242, 237, 228, 0.69);
  --swap-rule: rgba(242, 237, 228, 0.22);
  --swap-stage-h: calc(var(--sp-9) * 2 + var(--sp-8) + var(--sp-7));
  --swap-stage-h-phone: calc(var(--sp-9) * 3 + var(--sp-8));
  --swap-panel-w: calc(var(--sp-9) * 2 + var(--sp-5));
  --swap-panel-h: calc(var(--sp-9) * 2 + var(--sp-7) + var(--sp-2));
  --swap-head-h: calc(var(--sp-6) + var(--sp-4));
  --swap-row-h: calc(var(--sp-7) + var(--sp-5));
  --swap-sell-y: calc(var(--swap-head-h) + var(--sp-4) + var(--sp-1));
  --swap-buy-y: calc(var(--swap-sell-y) + var(--swap-row-h) + var(--sp-4));
  --swap-route-y: calc(var(--swap-buy-y) + var(--swap-row-h) + var(--sp-4));
  --swap-route-h: var(--sp-7);
  --swap-action-y: calc(var(--swap-route-y) + var(--swap-route-h) + var(--sp-3));
  --swap-token: calc(var(--sp-6) + var(--sp-4));
  --swap-token-phone: calc(var(--sp-5) * 2);
  --swap-chevron-edge: var(--sp-3);
  --swap-chevron-size: var(--sp-3);
  --swap-chevron-gap: var(--sp-2);
  --swap-token-inset: calc(var(--swap-chevron-edge) + var(--swap-chevron-size) + var(--swap-chevron-gap));
  --swap-detail: calc(var(--fs-eyebrow) / 1.272);
  --swap-micro: calc(var(--fs-eyebrow) / var(--phi));
}

@media (max-width: 860px) {
  :root { --swap-chevron-size: var(--sp-2); }
}
