/* TOKENS: every design value lives here as a CSS variable.
   Change a value once, the whole site follows. */

@font-face { font-family: "Syne"; src: url("../assets/fonts/syne.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* Fonts: Fraunces = wordmark only, Syne = titles + nav, DM Sans = body */
  --font-wordmark: "Fraunces", Georgia, serif;
  --font-title: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Raw palette (proposal, final shades get locked in Figma) */
  --black: #07070F; /* deep blue-black, not flat #000 */
  --white: #F4F4EC;
  --navy: #191265;
  --pale: #EBEBDF;
  --electric: #3B2BFF;
  --grain-blue: #4B43D6;
  --red: #C8102E; /* wordmark full stop ONLY */

  /* Learning page blues (grainy gradient style) */
  --cobalt: #2A3CB8;      /* toned down from #1F3BFF */
  --cobalt-deep: #0C1560; /* toned down from #0A1A8C */
  --near-white: #F4F4EC;
  /* Film grain: a small SVG noise tile, repeated. A real file, because the CSP in vercel.json blocks data: images. */
  --grain-image: url("../assets/img/grain-site.svg");
  --grain-opacity: 0.08;

  /* Learning flip card (Figma frame 09). Pale = --pale, ink = --navy. */
  --flip-cobalt: #3A3AE0;
  --flip-deep: #0E0A4A;
  --flip-glow-violet: #5B3FD6;
  --flip-glow-pink: #B77BD9;
  /* Highlighter on the Personal fact line */
  --marker: #F5D90A;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* Learning hero + section orbs: soft blurred light, fading into black */
  --orbs: radial-gradient(ellipse 60% 75% at 12% 8%, color-mix(in srgb, var(--cobalt) 62%, transparent), transparent 70%),
          radial-gradient(ellipse 55% 65% at 92% 100%, color-mix(in srgb, var(--cobalt-deep) 80%, transparent), transparent 72%),
          radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--near-white) 12%, transparent), transparent 38%);

  /* Type scale */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-title: clamp(2.25rem, 6vw, 4.5rem);   /* page + section titles: 56 to 72px on desktop */
  --text-card-title: clamp(1.25rem, 1.6vw, 1.5rem); /* card titles: 20 to 24px */
  --text-label: 0.75rem;

  /* Weights: SemiBold for all Syne, Regular for DM Sans */
  --weight-title: 600;
  --weight-display: 400;  /* thin, airy big headlines on Learning */
  --weight-body: 400;
  --tracking-label: 0.18em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2.5rem;
  --space-7: 4rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  /* The one card system */
  --radius-card: 20px;
  --tilt-card: -1.2deg;
  --shadow-card: 0 18px 40px -12px color-mix(in srgb, var(--black) 55%, transparent),
                 0 2px 6px color-mix(in srgb, var(--black) 30%, transparent);

  /* Glass (unmute button, nav panel) */
  --glass-bg: color-mix(in srgb, var(--white) 14%, transparent);
  --glass-border: color-mix(in srgb, var(--white) 35%, transparent);
  --glass-blur: 14px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
  --dur-slow: 700ms;

  --nav-height: 64px;
}

/* Chapter colours: each page sets <body data-chapter="..."> and the variables swap. */
body[data-chapter="learning"]  { --bg: var(--black);    --ink: var(--white);  --glow: var(--grain-blue); --card-bg: var(--cobalt-deep);  --card-ink: var(--white); --card-edge: var(--cobalt); }
body[data-chapter="building"]  { --bg: var(--white);    --ink: var(--navy);   --glow: var(--electric);   --card-bg: var(--navy);   --card-ink: var(--white); --card-edge: var(--navy); }
body[data-chapter="sharing"]   { --bg: var(--pale);     --ink: var(--navy);   --glow: var(--electric);   --card-bg: var(--navy);   --card-ink: var(--pale); --card-edge: var(--navy); }
body[data-chapter="community"] { --bg: var(--electric); --ink: var(--white);  --glow: var(--white);      --card-bg: var(--white);  --card-ink: var(--navy); --card-edge: var(--electric); }

@media (max-width: 600px) { :root { --nav-height: 52px; } }

/* YouTube cue: used only for the hover / press state of the video cards on Building */
:root { --yt-red: #FF0000; --yt-red-press: #CC0000; }
