/*
 * F10P design tokens — hand-authored CSS custom properties.
 *
 * This is the ENTIRE styling system: no Tailwind, no Sass, no build step.
 * Values are seeded from the reference Next.js app's design language. Light is
 * the default; the dark block flips a handful of surface/ink tokens to match
 * the OS preference. Reference these via var(--token) everywhere — never
 * hard-code a colour or spacing value in a component.
 */

:root {
  /* Default theme is light; native controls (scrollbars, file inputs) follow.
     The theme is Auto by default and follows prefers-color-scheme below; an
     explicit Light/Dark choice sets <html data-theme> to override the OS. */
  color-scheme: light;

  /* Surfaces & ink */
  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --ink: #111111;
  --ink-muted: #666666;
  --border: #e5e5e5;
  --border-subtle: #f1f5f9;


  /* Brand & state */
  --accent: #111111;        /* neutral primary actions read as near-black */
  --accent-ink: #ffffff;    /* text on top of --accent */
  --accent-hover: #333333;
  /* Signature featured accent — the original's cyan. CONSTANT across light/dark
     (it is the visual heartbeat: hero CTA, featured badges, writer role labels). */
  --accent-brand: #00b5ff;
  --accent-brand-ink: #ffffff;
  --accent-brand-hover: #0098d4;
  /* Premium/Pro accent (constant across themes). */
  --gold: #d97706;
  --gold-bg: #fffbeb;
  --success: #10b981;
  --error: #ef4444;
  --star: #f5a623;          /* ★ rating glyph (amber, brighter than --gold) */

  /* Typography */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  /* Editorial serif — the original's signature for marquee headlines (used
     italic for script/blog titles, page heroes, marketing display + pull-quotes).
     Web-safe stack, matching the reference's "Times New Roman, serif". */
  --font-serif: "Times New Roman", Times, Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --text-xs: 0.78rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.5rem;
  --text-3xl: 3rem;         /* hero titles */
  --leading-tight: 1.1;
  --leading-normal: 1.55;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;

  /* Radius & shadow */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-hero: 24px;      /* hero banner + large feature cards */
  --radius-pill: 999px;     /* pill buttons, genre chips, badges */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 24px -8px rgba(0, 0, 0, 0.18);
  /* One focus ring for every focusable control. */
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent-brand) 35%, transparent);

  /* Layout & motion */
  --container: 1200px;
  --transition: 0.18s ease;
  --transition-slow: 0.4s ease;
  --cover-ratio: 2 / 3;     /* tall poster proportion for script covers */
}

/* AUTO (the default): follow the OS. ``:not([data-theme="light"])`` lets a user's
   explicit Light choice stand even when the OS prefers dark. Forced Light needs no
   rule of its own — the base :root above is already light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0a0a;
    --surface: #171717;
    --surface-2: #1f1f1f;
    --ink: #ededed;
    --ink-muted: #a1a1aa;
    --border: #262626;
    --border-subtle: #222222;
    --accent: #ffffff;

    --accent-ink: #111111;
    --accent-hover: #e5e5e5;
    --gold-bg: #2a2008;
    /* --accent-brand / --gold stay constant by design (see above). */
  }
}

/* EXPLICIT DARK override — beats the OS in both directions. KEEP THESE VALUES IN
   SYNC with the @media block above (no build step to dedupe them for us). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --ink: #ededed;
  --ink-muted: #a1a1aa;
  --border: #262626;
  --border-subtle: #222222;
  --accent: #ffffff;

  --accent-ink: #111111;
  --accent-hover: #e5e5e5;
  --gold-bg: #2a2008;
}
