/* Studalo: design tokens.
   The ONLY file allowed to hold raw values. Components use var(--…).
   Color is OKLCH. Budget 60-30-10: 60 paper · 30 surface + ink · 10 accent.
   Light mode only (locked). Contrast checked (WCAG 2): text ≥ 4.5:1, icons, borders, focus ≥ 3:1. */

:root {
  color-scheme: light;

  /* ── Color ─────────────────────────────────────── */
  --paper:        oklch(0.966 0.004 70);     /* 60 · page: warm near-white */
  --surface:      oklch(1 0 0);              /* 30 · cards, sheets, lists: white */
  --sunk:         oklch(0.948 0.006 70);     /* inputs, secondary buttons, docks */
  --line:         oklch(0.905 0.008 70);     /* dividers (decorative) */
  --line-strong:  oklch(0.62 0.01 70);       /* control borders · 3.3:1 on paper */
  --edge:         oklch(0.25 0.02 279 / 0.06); /* hairline on raised cards */
  --ink:          oklch(0.25 0.02 279);      /* 30 · text, icons (Latte text) · 14.5:1 */
  --ink-2:        oklch(0.527 0.02 279);     /* secondary text · 4.6:1 on sunk */
  --accent:       oklch(0.555 0.25 297);     /* 10 · Catppuccin Mauve: primary action, progress, focus */
  --accent-press: oklch(0.505 0.25 297);     /* accent while pressed */
  --accent-tint:  oklch(0.94 0.045 297);     /* selected rows, chips */
  --accent-text:  oklch(0.545 0.25 297);     /* accent as text · 4.7:1 on tint */
  --on-accent:    oklch(1 0 0);              /* text on accent · 5.4:1 */
  --brand-deep:   oklch(0.36 0.15 297);      /* logo only: the lower half of the S */
  --brand-pale:   oklch(0.85 0.08 297);      /* logo only: the upper half of the S on Mauve */
  --good:         oklch(0.54 0.12 155);    /* correct, known */
  --good-text:    oklch(0.47 0.11 155);    /* good as small text on its own tint · 4.5:1+ */
  --again:        oklch(0.52 0.115 65);    /* missed: amber, never red */
  --again-tint:   oklch(0.93 0.05 75);
  --danger:       oklch(0.55 0.19 27);     /* delete only */
  --streak:       oklch(0.70 0.19 42);     /* streak flame: outer */
  --streak-mid:   oklch(0.80 0.16 62);     /* streak flame: middle */
  --streak-light: oklch(0.94 0.09 95);     /* streak flame: core */

  /* Avatar palette: Catppuccin Latte accents. Generated avatars only, never UI. */
  --av-1: oklch(0.714 0.105 33.1);   --av-2: oklch(0.686 0.126 20.9);  --av-3: oklch(0.726 0.174 338.4);
  --av-4: oklch(0.555 0.25 297);     --av-5: oklch(0.625 0.197 20.3); --av-6: oklch(0.692 0.204 42.4);
  --av-7: oklch(0.714 0.149 67.8);   --av-8: oklch(0.625 0.177 140.4); --av-9: oklch(0.602 0.098 201.1);
  --av-10: oklch(0.682 0.145 235.4); --av-11: oklch(0.648 0.107 212.9); --av-12: oklch(0.559 0.226 262.1);
  --av-13: oklch(0.664 0.175 273.1);
  /* Google's brand colors for the "Continue with Google" button only (light theme: white fill, #747775 stroke, #1F1F1F text).
     The multicolor G lives in design/google-g.svg and is never recolored. */
  --google-line:  oklch(0.566 0.0047 157.1);
  --google-ink:   oklch(0.2393 0 0);
  --scrim:        oklch(0.2 0.02 279 / 0.32);
  --bar:          oklch(0.966 0.004 70 / 0.8); /* translucent nav material */
  --blur-bar:     20px;                        /* blur behind translucent bars */

  --shadow-low:   0 1px 2px oklch(0.25 0.02 279 / 0.05), 0 2px 8px oklch(0.25 0.02 279 / 0.04); /* cards, lists, chips */
  --shadow-card:  0 1px 2px oklch(0.25 0.02 279 / 0.06), 0 8px 24px oklch(0.25 0.02 279 / 0.07);
  --shadow-float: 0 2px 6px oklch(0.25 0.02 279 / 0.08), 0 20px 48px oklch(0.25 0.02 279 / 0.14);

  /* ── Type ──────────────────────────────────────── */
  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-caption:  0.75rem;   --lh-caption:  1rem;      --tr-caption:  0.01em;
  --fs-footnote: 0.8125rem; --lh-footnote: 1.125rem;  --tr-footnote: 0.005em;
  --fs-callout:  0.9375rem; --lh-callout:  1.25rem;   --tr-callout:  0;
  --fs-body:     1rem;      --lh-body:     1.5rem;    --tr-body:     0;
  --fs-headline: 1.0625rem; --lh-headline: 1.5rem;    --tr-headline: -0.005em;
  --fs-title-3:  1.25rem;   --lh-title-3:  1.625rem;  --tr-title-3:  -0.01em;
  --fs-title-2:  1.5rem;    --lh-title-2:  1.875rem;  --tr-title-2:  -0.015em;
  --fs-title-1:  2rem;      --lh-title-1:  2.375rem;  --tr-title-1:  -0.02em;
  --fs-display:  2.75rem;   --lh-display:  2.875rem;  --tr-display:  -0.03em;
  --fs-card:     clamp(1.375rem, 1rem + 1.6vw, 2.25rem); /* flashcard text */
  /* Landing page and the login page's brand side only: big, tight headlines */
  --fs-hero:     clamp(2.75rem, 1.4rem + 5.6vw, 5.75rem);   --lh-hero:   1;     --tr-hero:   -0.045em;
  --fs-hero-2:   clamp(2rem, 1.2rem + 3vw, 3.5rem);         --lh-hero-2: 1.06;  --tr-hero-2: -0.035em;

  --w-regular: 400;
  --w-medium:  500;
  --w-semi:    600;
  --w-bold:    700;

  /* ── Space (4px base) ──────────────────────────── */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px; --s-32: 128px; /* landing page sections */

  /* ── Radius · concentric ───────────────────────── */
  /* Nested corners: inner = outer − padding. Use .nest (kit.css). */
  --r-sheet:   28px;  /* bottom sheets, modals */
  --r-card:    22px;  /* flashcards, hero cards, docks */
  --r-group:   16px;  /* list groups, tiles */
  --r-control: 12px;  /* buttons, inputs */
  --r-chip:    8px;   /* small badges */
  --r-pill:    999px; /* toggles, progress, segmented */
  --r-min:     4px;   /* floor for computed inner radii */

  /* ── Sizes ─────────────────────────────────────── */
  --hit:        44px;  /* minimum touch target */
  --hit-lg:     52px;  /* primary actions on phones */
  --tabbar-h:   56px;
  /* Largest bottom inset the browser will use (Chrome 135+). 36px fallback = iOS portrait max, per Chrome's edge-to-edge guide.
     Fixed bottom bars pad by this (stable) and move by the live inset, so nothing reflows as browser bars slide. */
  --safe-b-max: env(safe-area-max-inset-bottom, 36px);
  --sidebar-w:  248px;
  --content-max: 960px;
  --study-max:   640px;
  --page-max:    1160px; /* landing page */
  --text-max:    65ch;

  /* ── Motion · snappy ───────────────────────────── */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);   /* enter, respond */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* move on screen, flip */
  --ease-sheet:  cubic-bezier(0.32, 0.72, 0, 1);   /* sheets, drawers */
  --dur-press:  100ms;  /* press feedback */
  --dur-fast:   160ms;  /* hover, small popovers, exits */
  --dur-base:   220ms;  /* enters, list changes */
  --dur-flip:   260ms;  /* flashcard flip */
  --dur-sheet:  280ms;  /* sheet enter */
  /* Landing page only (DESIGN.md 7.11): showing what Studalo does, seen once per visit. Never in the app. */
  --dur-reveal: 640ms;  /* headings and pictures arriving */
  --dur-show:   900ms;  /* a picture acting out what it shows (a line drawing in, a card swiping away) */
  --ease-pop:   cubic-bezier(0.34, 1.56, 0.64, 1); /* a small overshoot for things that pop in */
  --press-scale: 0.97;

  --z-bar: 10; --z-sheet: 30; --z-toast: 40;
}
