/* ============================================================================
   Cybersolar tokens.
   Two worlds, one system. Day is solarpunk (ink on sage paper, sun gold).
   Night is cyberpunk (luminous sodium and teal inks on teal-black paper).
   Roles (1-oct-2026): --sc-accent is the brand voice (gold by day, teal at
   night); --human is the warm voice of the person (gold by day, sodium at
   night); --signal is what runs alone; --action is the button.
   Every module reads these roles; nothing on the page hardcodes a colour.
   ========================================================================== */

:root {
  /* type: Petrona carries the voice, Geist carries prose and the file */
  --sc-font-display: "Petrona", "Iowan Old Style", Georgia, serif;
  --sc-font-text: "Geist", ui-sans-serif, system-ui, sans-serif;
  --sc-font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  /* one radius scale for the whole page: paper and instruments, not pills */
  --sc-r-sm: 3px;
  --sc-r-md: 6px;
  --sc-r-lg: 12px;

  /* layout */
  --rail-w: clamp(15rem, 16.5vw, 17.5rem);
  --chrome-h: 4.25rem;
  --content-l: calc(var(--rail-w) + clamp(2rem, 4vw, 4.5rem));
  --content-r: clamp(1.5rem, 4.5vw, 5rem);

  /* display ramp (tuned for Fraunces, kept for Petrona on 2-oct-2026) */
  --t-hero: clamp(3.2rem, 1.2rem + 4.6vw, 6.4rem);
  --t-h2: clamp(2.3rem, 1.3rem + 2.6vw, 4.1rem);
  --t-h3: clamp(1.45rem, 1.1rem + 0.9vw, 2rem);

  --theme-dur: 720ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ------------------------------------------------------------------ day -- */
:root[data-theme="day"] {
  color-scheme: light;

  --sc-canvas: #EDF0E2;
  --sc-surface: #F6F7EE;
  --sc-ink: #12261A;
  --sc-ink-soft: #4A5C4E;
  --sc-accent: #F0B23A;
  --sc-accent-ink: #12261A;

  --accent-deep: #8A5800;      /* accent as text or line on the paper */
  --human: #F0B23A;            /* the person's voice: criterio, hoy, sun */
  --human-deep: #8A5800;
  --human-ink: #12261A;
  --brand-teal: #0F7268;       /* the horizon of the mark, focus ring (5:1) */
  --action: #020F11;           /* buttons: the night's ground, on the day */
  --action-ink: #EDF0E2;
  --action-hover: #08191C;
  --focus: #0F7268;
  --signal: #2A7243;           /* status: "corre solo", done, running (4.9:1) */
  --leaf: #3E6B3A;             /* illustration secondary ink */
  --ground-2: #E4E9D6;         /* a deeper paper for alternating chapters */
  --ground-inv: #12261A;       /* the one inverted ground per theme */
  --ink-inv: #EDF0E2;
  --ink-inv-soft: #B9C7B3;
  --hatch: color-mix(in oklab, var(--sc-ink) 9%, transparent);
  --rule: color-mix(in oklab, var(--sc-ink) 14%, transparent);
  --rule-strong: color-mix(in oklab, var(--sc-ink) 28%, transparent);

  --sc-hairline: var(--rule);
  --sc-hairline-strong: var(--rule-strong);
  --sc-shadow-color: 100 28% 18%;
  --sc-edge: inset 0 1px 0 rgb(255 255 255 / 0.65);

  --grain-op: 0.05;
}

/* ---------------------------------------------------------------- night -- */
:root[data-theme="night"] {
  color-scheme: dark;

  --sc-canvas: #020F11;
  --sc-surface: #08191C;
  --sc-ink: #DDEBE6;
  --sc-ink-soft: #8FA8A2;
  --sc-accent: #3DE0C8;        /* teal: the brand at night */
  --sc-accent-ink: #061012;

  --accent-deep: #7FEBDB;
  --human: #FFB23E;            /* sodium: the person's voice at night */
  --human-deep: #FFC766;
  --human-ink: #061012;
  --brand-teal: #3DE0C8;
  --action: #3DE0C8;
  --action-ink: #061012;
  --action-hover: #7FEBDB;
  --focus: #3DE0C8;
  --signal: #3DE0C8;
  --leaf: #2E5A52;
  --ground-2: #051619;
  --ground-inv: #0C2327;
  --ink-inv: #DDEBE6;
  --ink-inv-soft: #8FA8A2;
  --hatch: color-mix(in oklab, var(--sc-ink) 8%, transparent);
  --rule: color-mix(in oklab, var(--sc-ink) 13%, transparent);
  --rule-strong: color-mix(in oklab, var(--sc-ink) 26%, transparent);

  --sc-hairline: var(--rule);
  --sc-hairline-strong: var(--rule-strong);
  --sc-shadow-color: 190 70% 1%;
  --sc-edge: inset 0 1px 0 color-mix(in oklab, var(--sc-ink) 9%, transparent);

  /* crisp at night */
  --grain-op: 0.07;
}

/* Registered so the display face can interpolate between worlds. */
