/* median.bechou.dev — Lapa Ninja x Split-Stage Editorial Design Tokens
 * Self-hosted SIL OFL Fonts: Bricolage Grotesque (Display) + Be Vietnam Pro (Body/UI)
 * Palette: Green-black and bone (Warm Alabaster Daylight + Deep Evergreen-Obsidian Midnight)
 */
@import url("./fonts.css");

:root {
  /* Strict 5-step type scale (nothing below 14px, body at 17px, exactly 5 sizes across the whole page) */
  --step-small: 0.875rem;
  --step-body: 1.0625rem;
  --step-lead: 1.3125rem;
  --step-head: clamp(1.85rem, 2.2vw + 0.9rem, 2.75rem);
  --step-display: clamp(2.35rem, 4.1vw + 0.85rem, 4.25rem);

  --font-display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;

  /* Frame & rhythm — one equal pair of outer margins across the whole page */
  --container: 90rem;
  --gutter: clamp(20px, 3.2vw, 48px);
  --section-gap: clamp(4.5rem, 8.5vw, 8rem);

  /* Consistent architectural square corners (buttons, fields, media) */
  --radius: 0px;
  --radius-field: 2px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-micro: 150ms;
  --dur-short: 280ms;
  --dur-med: 520ms;

  /* Default: Cool Mineral Stone (Daylight Editorial — Sandbar / Enclose inspired) */
  --bg: #f1f3f1;
  --surface: #e4e8e5;
  --surface-2: #f7f9f8;
  --ink: #141b18;
  --muted: #3d4843;
  --accent: #136c5b;
  --accent-hover: #0d5446;
  --accent-soft: #d7e8e3;
  --accent-ink: #f4f7f6;
  --signal: #945d00;
  --signal-soft: #eee6d3;
  --danger: #b53028;
  --danger-soft: #f4dedc;
  --field-border: #c2c9c4;
  --field-border-strong: #87918c;

  /* Contrasting inverted field (B2B wholesale & editorial accents) */
  --field-inv: #161c1a;
  --field-inv-surface: #1f2725;
  --field-inv-ink: #edf1ef;
  --field-inv-muted: #b3bcb7;
  --field-inv-accent: #9fc7b8;
  --field-inv-accent-hover: #b6d6ca;
  --field-inv-accent-ink: #111715;

  /* Legacy aliases for seamless subpage compatibility */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --text-xs: var(--step-small);
  --text-sm: var(--step-small);
  --text-md: var(--step-body);
  --text-lg: var(--step-lead);
  --text-display: var(--step-display);
  --text-section: var(--step-head);
  --text-title: clamp(1.2rem, 0.7vw + 1rem, 1.5rem);
  --text-lead: var(--step-lead);
  --radius-sm: var(--radius-field);
  --radius-card: var(--radius);
  --radius-pill: var(--radius);
  --color-paper: var(--bg);
  --color-paper-2: var(--surface);
  --color-paper-3: var(--surface-2);
  --color-ink: var(--ink);
  --color-ink-2: var(--ink);
  --color-muted: var(--muted);
  --color-rule: var(--field-border);
  --color-rule-strong: var(--field-border-strong);
  --color-accent: var(--accent);
  --color-accent-2: var(--accent-hover);
  --color-accent-soft: var(--accent-soft);
  --color-accent-ink: var(--accent-ink);
  --color-focus: var(--accent);
  --color-signal: var(--signal);
  --color-signal-soft: var(--signal-soft);
  --color-danger: var(--danger);
  --color-danger-soft: var(--danger-soft);
}

/* Midnight Cockpit (Dealt "Green-black and bone" palette — Polar / Infinite Machine inspired) */
html[data-theme="dark"] {
  --bg: #161c1a;
  --surface: #1f2725;
  --surface-2: #27312e;
  --ink: #edf1ef;
  --muted: #a6b0ab;
  --accent: #9fc7b8;
  --accent-hover: #b6d6ca;
  --accent-soft: #22322d;
  --accent-ink: #111715;
  --signal: #e3b353;
  --signal-soft: #2e291c;
  --danger: #eb7a70;
  --danger-soft: #311f1e;
  --field-border: #333e3a;
  --field-border-strong: #5c6a64;

  /* Inverted field in Midnight mode -> Cool Mineral Stone Sheet! */
  --field-inv: #edf1ef;
  --field-inv-surface: #dde3e0;
  --field-inv-ink: #141b18;
  --field-inv-muted: #3d4843;
  --field-inv-accent: #136c5b;
  --field-inv-accent-hover: #0d5446;
  --field-inv-accent-ink: #f4f7f6;
}

@media (max-width: 48rem) {
  :root {
    --gutter: 20px;
    --section-gap: clamp(3.5rem, 10vw, 5rem);
  }
}
