/* ═══════════════════════════════════════════════
   Zest Design System — Theme Tokens
   Light mode: /design-system-light.html
   Dark mode:  /design-system.html (Orașul Paralel)

   2026 refresh — P1: OKLCH token migration.
   Values are OKLCH (warm neutrals + refined honey gold + larger radii +
   soft real shadows). Token NAMES are unchanged so all components keep working.

   ONE ACCENT PER THEME (DESIGN.md § Colors): blue in light, gold in dark, never both
   on a screen. Components read --text-accent / --surface-accent / --focus-* /
   --op-border-active / --op-shadow-glow-accent. A raw --op-gold renders gold on paper
   and a raw --op-blue renders blue at night; keep those for illustration and the
   --op-info status.

   Deferred to later phases (intentionally NOT changed here):
     · surfaces go solid / glass reservation                → P3
     · glass blur 20→15 + saturate                          → P3 (tokens added below, unused)
     · typography faces + de-uppercase                      → P2 (font SIZES untouched here)
     · --color-neutral-* utility scale warming              → deferred (Tailwind utility scale)
     · retiring --op-shadow-glow-* + repointing consumers   → P3 (kept defined here)
   ═══════════════════════════════════════════════ */

:root {
    /* ── Core palette (light — warm paper setting) ── */
    --op-blue: oklch(0.52 0.110 235);
    --op-gold: oklch(0.74 0.150 72);
    --op-midnight: oklch(0.26 0.020 60);
    --op-card-bg: oklch(0.99 0.004 85 / 0.85);
    --op-white: oklch(0.965 0.008 85);
    --op-dim: oklch(0.42 0.018 60);

    /* ── Semantic colors (light — AAA contrast on paper) ── */
    --op-success: oklch(0.48 0.090 175);
    --op-warning: oklch(0.52 0.120 55);
    --op-danger: oklch(0.48 0.170 27);
    --op-info: var(--op-blue);
    --op-neutral: oklch(0.26 0.020 60 / 0.12);
    /* Filled rating stars only: the one sanctioned hue beside the accent (DESIGN.md § Colors).
       Deep ochre on paper, 3.4:1, so a star passes the 3:1 non-text minimum. */
    --op-rating-star: oklch(0.62 0.140 70);

    /* ── Borders (light — blue tint, accent unchanged in P1) ── */
    --op-border-default: oklch(0.52 0.110 235 / 0.18);
    --op-border-hover: oklch(0.52 0.110 235 / 0.45);
    --op-border-active: var(--op-blue);

    /* ── Shadows (light — soft & real, not glow) ── */
    --op-shadow-elevated: 0 1px 2px oklch(0 0 0 / 0.06), 0 8px 28px oklch(0.40 0.05 60 / 0.10);
    --op-shadow-hover: 0 2px 6px oklch(0 0 0 / 0.08), 0 16px 48px oklch(0.40 0.05 60 / 0.14);
    --op-shadow-card: var(--op-shadow-elevated);
    --op-shadow-float: var(--op-shadow-hover);
    /* P3: neon glow retired — these now read as soft directional accent shadows */
    --op-shadow-glow-gold: 0 6px 20px oklch(0.74 0.150 72 / 0.14);
    --op-shadow-glow-blue: 0 6px 20px oklch(0.52 0.110 235 / 0.12);
    --op-shadow-glow-accent: 0 6px 20px oklch(0.52 0.110 235 / 0.12);

    /* ── Glass (light) — P3 liquid-glass ── */
    --op-glass-blur: blur(15px);            /* down from 20: sharper text, passes a11y */
    --op-glass-sat: 170%;                   /* saturate() kills the muddy-blur look */
    --op-glass-bg: oklch(0.99 0.004 85 / 0.72);
    /* Behind a modal: midnight at 45%, no blur, so never more than two glass layers. */
    --scrim: oklch(0.26 0.020 60 / 0.45);
    --glass-edge: oklch(0.99 0.010 90 / 0.55);  /* specular top highlight */

    /* ── Motion ── */
    --op-ease-spring: cubic-bezier(0.32, 0.72, 0, 1);

    /* ── Gradients ── */
    --op-shimmer: linear-gradient(90deg, color-mix(in oklch, var(--surface-accent) 55%, var(--op-midnight)), var(--surface-accent));
    --op-divider: linear-gradient(90deg, transparent, oklch(0.52 0.110 235 / 0.25), transparent);

    /* ── Radii (2026: larger, softer) ── */
    --op-radius-sm: 8px;
    --op-radius-md: 12px;
    --op-radius-lg: 16px;
    --op-radius-xl: 24px;
    --op-radius-pill: 999px;

    /* ── Typography sizes (untouched in P1; faces/scale change in P2) ── */
    --op-font-display: clamp(2rem, 5.5vw, 4rem);
    --op-font-h1: clamp(1.8rem, 4vw, 3rem);
    --op-font-h2: 1.15rem;
    --op-font-h3: 1rem;
    --op-font-body-lg: 1.05rem;   /* lede — one step above body */
    --op-font-body: 0.93rem;
    --op-font-small: 0.82rem;
    --op-font-caption: 0.78rem;
    --op-font-overline: 0.7rem;
    --op-font-micro: 0.65rem;

    /* ── Semantic surface tokens (light — translucency kept; solid in P3) ── */
    --surface-primary: var(--op-white);
    --surface-card: oklch(0.99 0.004 85 / 0.85);
    --surface-card-flat: oklch(0.99 0.004 85 / 0.5);
    --surface-elevated: oklch(0.97 0.006 85 / 0.95);
    --surface-hover: oklch(0.52 0.110 235 / 0.06);
    --surface-hover-accent: oklch(0.52 0.110 235 / 0.06);
    --surface-accent: var(--op-blue);
    --surface-input: oklch(0.995 0.003 85);
    --surface-solid: oklch(0.97 0.006 85);   /* opaque fallback for reduced-transparency */

    /* ── Semantic text tokens (light) ── */
    --text-primary: var(--op-midnight);
    --text-secondary: oklch(0.42 0.018 60);
    --text-muted: oklch(0.56 0.016 60);
    --text-accent: var(--op-blue);
    /* The accent on a surface that stays dark in both themes (photo scrims, video, the scanner):
       brightened, not a different hue. Light takes the dark theme's blue. */
    --accent-on-dark: oklch(0.72 0.095 235);
    --text-on-accent: oklch(0.99 0.004 85);

    /* The avatar with no photo: a warm gradient under dark initials (5.5:1 at its darkest end),
       the same in both themes, so :root.dark leaves it alone. */
    --avatar-fallback-bg: linear-gradient(135deg, oklch(0.82 0.10 60), oklch(0.70 0.12 20));
    --avatar-fallback-fg: oklch(0.26 0.020 60);

    /* ── Semantic border tokens (light) ── */
    --border-default: var(--op-border-default);
    --border-hover: var(--op-border-hover);
    --border-active: var(--op-border-active);

    /* ── Focus tokens (light — blue) ── */
    --focus-ring: oklch(0.52 0.110 235 / 0.15);
    --focus-border: var(--op-blue);
    --focus-shadow: 0 0 0 3px oklch(0.52 0.110 235 / 0.15);
}

/* ═══════════════════════════════════════════════
   DARK MODE — Orașul Paralel overrides (hero theme)
   Warm blue-midnight base; refined honey gold.
   ═══════════════════════════════════════════════ */
:root.dark {
    /* Tailwind neutral-* color scale — left as hex in P1 (utility scale) */
    --color-neutral-50: #E8F0F5;
    --color-neutral-100: #D0E0EA;
    --color-neutral-200: #B8CCD8;
    --color-neutral-300: #8AA0B0;
    --color-neutral-400: #5D7A8E;
    --color-neutral-500: #3E5A6E;
    --color-neutral-600: #274254;
    --color-neutral-700: #16303F;
    --color-neutral-800: #0C1E2C;
    --color-neutral-900: #06101A;
    --color-neutral-950: #030A12;

    /* Core palette overrides */
    --op-blue: oklch(0.72 0.095 235);
    --op-gold: oklch(0.81 0.155 78);   /* dark honey — a touch brighter than light */
    --op-midnight: oklch(0.17 0.018 255);
    --op-card-bg: oklch(0.215 0.020 255 / 0.75);
    --op-white: oklch(0.96 0.010 90);
    --op-dim: oklch(0.80 0.014 90);

    /* Semantic colors */
    --op-success: oklch(0.72 0.120 165);
    /* Amber, not gold: hue 52 against gold's 78. A caution must not look like the one primary
       action on the surface, and gold is that action's colour. */
    --op-warning: oklch(0.76 0.130 52);
    --op-danger: oklch(0.68 0.170 25);
    --op-rating-star: oklch(0.82 0.150 80);
    --op-info: var(--op-blue);
    --op-neutral: oklch(0.96 0.010 90 / 0.45);

    /* Borders (neutral white-alpha; gold accent border kept on --active) */
    --op-border-default: oklch(0.96 0.010 90 / 0.10);
    --op-border-hover: oklch(0.96 0.010 90 / 0.18);
    --op-border-active: oklch(0.81 0.155 78 / 0.55);

    /* Shadows (soft & real, not glow) */
    --op-shadow-elevated: 0 1px 2px oklch(0 0 0 / 0.25), 0 8px 28px oklch(0 0 0 / 0.28);
    --op-shadow-hover: 0 2px 6px oklch(0 0 0 / 0.30), 0 16px 48px oklch(0 0 0 / 0.40);
    --op-shadow-card: var(--op-shadow-elevated);
    --op-shadow-float: var(--op-shadow-hover);
    /* P3: neon glow retired — soft directional accent shadows */
    --op-shadow-glow-gold: 0 6px 24px oklch(0.81 0.155 78 / 0.20);
    --op-shadow-glow-blue: 0 6px 24px oklch(0.72 0.095 235 / 0.16);
    --op-shadow-glow-accent: 0 6px 24px oklch(0.81 0.155 78 / 0.20);

    /* Glass — P3 liquid-glass */
    --op-glass-bg: oklch(0.215 0.020 255 / 0.62);
    --scrim: oklch(0.10 0.015 255 / 0.60);
    --glass-edge: oklch(0.99 0.010 90 / 0.16);

    /* Gradients */
    --op-divider: linear-gradient(90deg, transparent, oklch(0.72 0.095 235 / 0.25), transparent);

    /* Surfaces (translucency kept; solid in P3) */
    --surface-primary: var(--op-midnight);
    --surface-card: var(--op-card-bg);
    --surface-card-flat: oklch(0.215 0.020 255 / 0.5);
    --surface-elevated: oklch(0.255 0.022 255 / 0.88);
    --surface-hover: oklch(0.96 0.010 90 / 0.08);
    --surface-hover-accent: oklch(0.81 0.155 78 / 0.10);
    --surface-accent: var(--op-gold);
    --surface-input: oklch(0.215 0.020 255 / 0.85);
    --surface-solid: oklch(0.225 0.020 255);   /* opaque fallback for reduced-transparency */

    /* Text */
    --text-primary: var(--op-white);
    --text-secondary: oklch(0.80 0.014 90);
    --text-muted: oklch(0.63 0.014 90);
    --text-accent: var(--op-gold);
    --accent-on-dark: var(--op-gold);
    --text-on-accent: var(--op-midnight);

    /* Borders */
    --border-default: var(--op-border-default);
    --border-hover: var(--op-border-hover);
    --border-active: var(--op-border-active);

    /* Focus — gold in dark mode */
    --focus-ring: oklch(0.81 0.155 78 / 0.10);
    --focus-border: var(--op-gold);
    --focus-shadow: 0 0 0 3px oklch(0.81 0.155 78 / 0.10);
}
