/* Skwirl design tokens. The single source of truth for colour, type, space, shape, depth and motion.
   Loaded by every page (index, owner console, connect, legal, guides). Rules and rationale: DESIGN.md.
   Use the semantic names (--surface, --text-muted, --space-4 ...) in components, never raw values.
   Illustration stages (the hero phone loop, phone frames) are drawn at fixed px and are exempt. */
:root {
  color-scheme: light;

  /* ---- Colour: brand world (light only) ---- */
  --bg: #f8f7ff;                 /* cool lavender-white ground */
  --surface: #ffffff;            /* cards, dialogs, inputs on tint */
  --surface-glass: rgb(255 255 255 / .86); /* cards that sit on the drifting orbs */
  --surface-sunk: #f1effb;       /* wells: inputs on white, code, tab tracks */
  --ink: #1d1b2e;                /* text, primary buttons */
  --muted: #5f5c75;              /* secondary text: AA on bg, white and every pastel */
  --line: #e6e3f4;               /* hairlines, input borders */
  --line-strong: #d3cfe6;        /* borders that must read as a control edge (3:1 on white) */
  --accent: #4f43a8;             /* interactive text, focus ring, selected marks */
  --on-ink: #ffffff;

  /* Pastels: one fixed tint per topic; never used for text */
  --lavender: #dcd8ff; --mint: #cdf3e1; --peach: #ffd8cb; --sky: #d6ebff; --butter: #fff0c4;
  --lavender-soft: #eeebfb;

  /* Semantic */
  --unused: var(--peach); --unused-ink: #8a3b1f;   /* the one brand-semantic colour: not used yet */
  --peach-ink: var(--unused-ink);
  --ok: #17603f; --ok-bg: var(--mint);
  --err: #a02d1a; --err-ink: #8c2415; --err-bg: #ffd5d0;
  --warn-bg: var(--butter); --info-bg: var(--sky);
  --dot: #e8590c;                /* attention dot on the Set up pill (non-text, 3.5:1) */

  /* Dark surfaces: Claude Code card, phone bezel */
  --night: #15131f; --night-line: #2b2838; --night-text: #eceaf8; --night-muted: #a9a5c4; --night-dim: #8d89a8;

  /* ---- Type ---- */
  --display: "Recursive", ui-rounded, system-ui, sans-serif;  /* Recursive Casual 800 only */
  --ui: "Rethink Sans", ui-sans-serif, -apple-system, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* One scale, ~1.2 ratio from a 16px body. Seven fixed steps for UI, two fluid steps for display. */
  --text-2xs: 12px;   /* tags, meta inside cards */
  --text-xs: 13px;    /* fine print, captions */
  --text-sm: 14px;    /* secondary UI, small buttons, chips */
  --text-md: 16px;    /* body, buttons, inputs (16 stops iOS zoom) */
  --text-lg: 18px;    /* lede, note lead */
  --text-xl: 22px;    /* card and group titles, h3 */
  --text-2xl: 28px;   /* dialog, sheet and app page titles */
  --text-3xl: clamp(30px, 4.2vw, 44px);  /* landing section heads */
  --text-hero: clamp(38px, 5.2vw, 68px); /* landing H1 only */
  --leading-tight: 1.06; --leading-snug: 1.25; --leading-body: 1.5;
  --tracking-display: -.02em;

  /* ---- Space: 4px base ---- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-7: 32px; --space-8: 40px; --space-9: 56px; --space-10: 72px; --space-11: 96px;
  --section-gap: clamp(72px, 9vw, 120px);   /* between landing sections */
  --gutter: clamp(18px, 4vw, 40px);         /* page side padding */

  /* ---- Layout ---- */
  --w-page: 1200px;   /* landing container */
  --w-app: 760px;     /* signed-in app column */
  --w-prose: 62ch;    /* reading measure */
  --w-dialog: 420px;

  /* ---- Shape ---- */
  --r-xs: 8px;    /* code, tiny tiles */
  --r-sm: 12px;   /* inner tiles, inputs that are not pills */
  --r-md: 16px;   /* callouts, list rows */
  --r-lg: 24px;   /* cards, groups */
  --r-xl: 32px;   /* dialogs, sheets, note hero */
  --r-pill: 999px;/* every button, chip and single-line input */

  /* ---- Depth: soft, tinted, low alpha. No borders on cards. ---- */
  --shadow-1: 0 1px 2px rgb(60 50 120 / .05), 0 6px 18px rgb(60 50 120 / .07);
  --shadow-2: 0 4px 10px rgb(60 50 120 / .08), 0 18px 40px rgb(60 50 120 / .12);
  --shadow-3: 0 2px 6px rgb(60 50 120 / .08), 0 24px 60px rgb(60 50 120 / .22);
  --shadow-ink: 0 10px 24px rgb(29 27 46 / .22);  /* hover on dark buttons, floating back pill */
  --scrim: rgb(29 24 64 / .4);

  /* ---- Motion: feedback, not decoration ---- */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 120ms;  /* press */
  --dur-2: 200ms;  /* hover, toggle, colour */
  --dur-3: 320ms;  /* enter: cards, sheets, dialogs */
  --dur-4: 600ms;  /* landing reveal only */
  --press: scale(.97);

  /* legacy aliases (kept so older rules and other branches still resolve) */
  --lift-1: var(--shadow-1); --lift-2: var(--shadow-2);
  --r-card: var(--r-lg); --r-input: var(--r-pill); --r-btn: var(--r-pill);
}
