/* ==================================================================
   JOOCOO — themes
   Each theme is a set of CSS variables on [data-theme="name"].
   Pick the live theme in private/config.php ('theme' => 'navy').
   To add a theme: copy a block, rename it, and add the key to
   JC_THEMES in private/bootstrap.php.
   ================================================================== */

/* ---------- Shared defaults (derived from each theme's core colours) ---------- */
[data-theme] {
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: var(--font-body);
    --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-btn: 999px;

    --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
    --accent-text: var(--accent);
    --grad: linear-gradient(100deg, var(--accent), var(--accent-2));
    --link: var(--accent-text);

    --hero-bg: var(--bg);
    --hero-bg-solid: var(--bg);
    --header-bg: color-mix(in srgb, var(--bg) 82%, transparent);
    --header-border: var(--border);

    --shadow: 0 18px 40px -18px rgba(15, 23, 42, .22);
    --card-shadow: 0 1px 2px rgba(15, 23, 42, .04);

    --illo-soft-base: color-mix(in srgb, var(--accent) 9%, var(--bg));
    --illo-line: color-mix(in srgb, var(--text) 10%, var(--surface));
    --illo-dots: color-mix(in srgb, var(--accent) 35%, transparent);
    --illo-net:  color-mix(in srgb, var(--text) 35%, transparent);
    --illo-ink:  var(--text);

    --success: #15803d;
    --danger:  #dc2626;
}
/* Older browsers without color-mix() (Safari < 16.2, Chrome < 111, Firefox < 113):
   simple fallbacks. Placed before the themes so their own values still win. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    [data-theme] {
        --accent-soft: rgba(127, 127, 127, .14);
        --header-bg: var(--bg);
        --illo-soft-base: var(--surface-2);
        --illo-line: var(--border);
        --illo-dots: var(--border);
        --illo-net: var(--muted);
    }
}

/* Text-coloured accents use --accent-text for readable contrast */
.kicker, .step-num, .card-icon, .link-arrow, .eyebrow { color: var(--accent-text); }
.step-num, .card-icon { background: var(--accent-soft); }

/* =========================================================
   1. NAVY — deep navy + bright accent
   ========================================================= */
[data-theme="navy"] {
    --bg: #f7f9fc;
    --bg-alt: #eef2f9;
    --surface: #ffffff;
    --surface-2: #f1f5fb;
    --text: #0b1b3a;
    --heading: #0b1b3a;
    --muted: #4a5875;
    --border: #dde4f0;

    --accent: #1ec8f5;
    --accent-2: #3b82f6;
    --on-accent: #04122b;
    --accent-text: #026a9e;
    --accent-soft: rgba(30, 200, 245, .13);

    --hero-bg:
        radial-gradient(900px 500px at 85% 10%, rgba(30, 200, 245, .22), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(59, 130, 246, .25), transparent 60%),
        #0b1b3a;
    --hero-bg-solid: #0b1b3a;
    --hero-text: #e6edf9;
    --hero-heading: #ffffff;
    --hero-muted: #b3c1dc;
    --hero-rule: rgba(255, 255, 255, .18);
    --hero-ghost-text: #ffffff;
    --hero-ghost-border: rgba(255, 255, 255, .3);
    --hero-ghost-hover: rgba(255, 255, 255, .08);
    --hero-illo-soft: rgba(255, 255, 255, .06);
    --eyebrow-text: #8fe3fa;
    --eyebrow-bg: rgba(30, 200, 245, .12);
    --eyebrow-border: rgba(30, 200, 245, .28);

    --header-bg: rgba(11, 27, 58, .92);
    --header-border: rgba(255, 255, 255, .08);
    --header-text: #ffffff;
    --header-muted: #b3c1dc;
    --menu-bg: #0b1b3a;

    --footer-bg: #0b1b3a;
    --footer-text: #93a3c4;
    --footer-heading: #ffffff;

    --btn-shadow: 0 10px 24px -10px rgba(30, 200, 245, .7);
    --illo-net: rgba(148, 163, 184, .6);
}
[data-theme="navy"] .hero .eyebrow { color: var(--eyebrow-text); }
@media (max-width: 860px) {
    [data-theme="navy"] .nav-menu a:not(.btn) { color: #e6edf9; border-color: rgba(255,255,255,.1); }
}

/* =========================================================
   2. MONO — mostly white, black type, one subtle accent
   ========================================================= */
[data-theme="mono"] {
    --bg: #ffffff;
    --bg-alt: #f6f6f5;
    --surface: #ffffff;
    --surface-2: #f4f4f3;
    --text: #0a0a0a;
    --heading: #0a0a0a;
    --muted: #55555a;
    --border: #e6e6e4;

    --accent: #0a0a0a;          /* buttons & UI in black */
    --accent-2: #3e7c74;        /* the one subtle accent colour */
    --on-accent: #ffffff;
    --accent-text: #356b64;
    --accent-soft: rgba(62, 124, 116, .1);
    --grad: linear-gradient(100deg, #0a0a0a 10%, #3e7c74);

    --radius: 10px;
    --radius-sm: 8px;
    --radius-btn: 8px;
    --head-tracking: -0.035em;

    --shadow: 0 16px 40px -20px rgba(0, 0, 0, .18);
    --card-shadow: none;
    --card-hover-border: #0a0a0a;
    --faq-open-border: #0a0a0a;

    --illo-soft-base: #f2f2f0;
    --illo-dots: #d4d4d1;
    --illo-net: #a3a3a3;
}
[data-theme="mono"] .eyebrow .dot { box-shadow: none; }

/* =========================================================
   3. MIDNIGHT AI — dark, violet → cyan glow
   ========================================================= */
[data-theme="midnight"] {
    --bg: #070912;
    --bg-alt: #0b0f1e;
    --surface: #10152a;
    --surface-2: #161c35;
    --text: #e6e9f5;
    --heading: #ffffff;
    --muted: #9ba4c2;
    --border: #232a47;

    --accent: #8b5cf6;
    --accent-2: #22d3ee;
    --on-accent: #ffffff;
    --accent-text: #b8a1ff;
    --btn-bg: #7c3aed;           /* darker violet so white button text passes WCAG AA */
    --accent-soft: rgba(139, 92, 246, .16);

    --hero-bg:
        radial-gradient(800px 480px at 80% 0%, rgba(139, 92, 246, .32), transparent 60%),
        radial-gradient(700px 420px at 10% 100%, rgba(34, 211, 238, .18), transparent 60%),
        #070912;
    --hero-bg-solid: #070912;
    --hero-illo-soft: rgba(139, 92, 246, .1);
    --eyebrow-border: rgba(139, 92, 246, .35);

    --header-bg: rgba(7, 9, 18, .8);
    --shadow: 0 24px 50px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(139, 92, 246, .08);
    --card-shadow: none;
    --card-hover-border: rgba(139, 92, 246, .55);
    --btn-shadow: 0 10px 30px -10px rgba(139, 92, 246, .8);
    --input-bg: #0b0f1e;

    --illo-line: #2a3152;
    --illo-ink: #05070e;
    --illo-net: rgba(155, 164, 194, .45);
    --success: #4ade80;
    --danger: #f87171;
}

/* =========================================================
   4. TERMINAL — developer / gaming, dark with phosphor green
   ========================================================= */
[data-theme="terminal"] {
    --font-head: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    --head-weight: 700;
    --head-tracking: -0.03em;

    --bg: #0d1117;
    --bg-alt: #0a0d12;
    --surface: #121821;
    --surface-2: #18202b;
    --text: #d6dee8;
    --heading: #f0f6fc;
    --muted: #8b98a8;
    --border: #232d3a;

    --accent: #3ddc84;
    --accent-2: #f5c542;
    --on-accent: #04140a;
    --accent-text: #3ddc84;
    --accent-soft: rgba(61, 220, 132, .12);

    --radius: 8px;
    --radius-sm: 6px;
    --radius-btn: 6px;

    --hero-bg:
        linear-gradient(rgba(61, 220, 132, .05) 1px, transparent 1px) 0 0 / 100% 28px,
        radial-gradient(600px 400px at 85% 20%, rgba(61, 220, 132, .14), transparent 60%),
        #0d1117;
    --hero-bg-solid: #0d1117;
    --hero-illo-soft: rgba(61, 220, 132, .06);

    --header-bg: rgba(13, 17, 23, .85);
    --shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);
    --card-shadow: none;
    --card-hover-border: rgba(61, 220, 132, .5);
    --input-bg: #0a0d12;

    --illo-line: #263140;
    --illo-ink: #05080c;
    --illo-net: rgba(139, 152, 168, .5);
    --success: #3ddc84;
    --danger: #ff6b6b;
}
[data-theme="terminal"] .kicker::before { content: "// "; opacity: .6; }
[data-theme="terminal"] h1 .grad::after { content: "_"; color: var(--accent); -webkit-text-fill-color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================
   5. RESEARCH LAB — clean white with scientific teal
   ========================================================= */
[data-theme="lab"] {
    --bg: #fbfdfd;
    --bg-alt: #eff6f6;
    --surface: #ffffff;
    --surface-2: #f1f8f8;
    --text: #0f2a2e;
    --heading: #0b2226;
    --muted: #4c6568;
    --border: #d8e7e8;

    --accent: #0e9f90;
    --accent-2: #2563eb;
    --on-accent: #ffffff;
    --accent-text: #0a7c70;
    --btn-bg: #0b7a6f;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-btn: 10px;

    --hero-bg:
        radial-gradient(circle at 1px 1px, rgba(14, 159, 144, .18) 1px, transparent 0) 0 0 / 22px 22px,
        linear-gradient(180deg, #eef8f7, #fbfdfd);
    --hero-bg-solid: #e3f3f1;
}

/* =========================================================
   6. ARCADE — gaming, deep purple with neon pink & yellow
   ========================================================= */
[data-theme="arcade"] {
    --head-weight: 850;
    --bg: #120a24;
    --bg-alt: #170d2e;
    --surface: #1c1237;
    --surface-2: #241846;
    --text: #f1eaff;
    --heading: #ffffff;
    --muted: #b7a9d8;
    --border: #34255e;

    --accent: #ff3ea5;
    --accent-2: #ffd23f;
    --on-accent: #ffffff;
    --accent-text: #ff7cc4;
    --btn-bg: #d1157a;
    --accent-soft: rgba(255, 62, 165, .15);

    --radius: 20px;
    --radius-sm: 14px;

    --hero-bg:
        radial-gradient(700px 420px at 90% 10%, rgba(255, 62, 165, .3), transparent 60%),
        radial-gradient(600px 400px at 0% 100%, rgba(255, 210, 63, .14), transparent 60%),
        #120a24;
    --hero-bg-solid: #120a24;
    --hero-illo-soft: rgba(255, 62, 165, .09);

    --header-bg: rgba(18, 10, 36, .82);
    --shadow: 0 22px 50px -20px rgba(0, 0, 0, .7);
    --card-shadow: none;
    --card-hover-border: rgba(255, 62, 165, .6);
    --btn-shadow: 0 8px 0 -2px #a3176a, 0 14px 30px -10px rgba(255, 62, 165, .8);
    --input-bg: #160c2c;

    --illo-line: #3a2a66;
    --illo-ink: #0a0516;
    --illo-net: rgba(183, 169, 216, .45);
    --success: #4ade80;
    --danger: #ff6b8a;
}

/* =========================================================
   7. SAGE — calm, earthy, trustworthy (serif headings)
   ========================================================= */
[data-theme="sage"] {
    --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --head-weight: 600;
    --head-tracking: -0.01em;

    --bg: #f7f6f1;
    --bg-alt: #eeede4;
    --surface: #fffefa;
    --surface-2: #f2f1e8;
    --text: #1f2a22;
    --heading: #18221b;
    --muted: #59655a;
    --border: #e0dfd2;

    --accent: #3f6b4e;
    --accent-2: #c48a3a;
    --on-accent: #ffffff;

    --radius: 16px;
    --radius-sm: 10px;
    --radius-btn: 10px;

    --hero-bg: linear-gradient(160deg, #eef0e6 0%, #f7f6f1 60%);
    --hero-bg-solid: #e7eadd;
    --illo-ink: #26352b;
}

/* =========================================================
   8. SUNRISE — warm & friendly, great for local businesses
   ========================================================= */
[data-theme="sunrise"] {
    --head-weight: 800;
    --bg: #fffaf5;
    --bg-alt: #fff0e4;
    --surface: #ffffff;
    --surface-2: #fff5ec;
    --text: #2b1a12;
    --heading: #24140d;
    --muted: #6b5446;
    --border: #f1ded0;

    --accent: #f0592a;
    --accent-2: #ffb020;
    --on-accent: #ffffff;
    --accent-text: #c2410c;
    --btn-bg: #c2410c;

    --radius: 24px;
    --radius-sm: 16px;

    --hero-bg:
        radial-gradient(700px 420px at 90% 0%, rgba(255, 176, 32, .28), transparent 60%),
        radial-gradient(600px 400px at 0% 100%, rgba(240, 89, 42, .14), transparent 60%),
        #fffaf5;
    --hero-bg-solid: #ffe4cc;
    --btn-shadow: 0 10px 24px -10px rgba(240, 89, 42, .7);
    --shadow: 0 20px 40px -20px rgba(120, 50, 10, .25);
}

/* =========================================================
   9. CORPORATE SLATE — professional grey & royal blue
   ========================================================= */
[data-theme="slate"] {
    --bg: #ffffff;
    --bg-alt: #f3f5f8;
    --surface: #ffffff;
    --surface-2: #f3f5f8;
    --text: #0f172a;
    --heading: #0b1222;
    --muted: #4b5568;
    --border: #e2e7ef;

    --accent: #2453d6;
    --accent-2: #0ea5e9;
    --on-accent: #ffffff;

    --radius: 10px;
    --radius-sm: 8px;
    --radius-btn: 8px;

    --hero-bg: linear-gradient(180deg, #f1f4f9 0%, #ffffff 100%);
    --hero-bg-solid: #e6ebf3;
    --header-bg: rgba(255, 255, 255, .92);
    --card-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

/* =========================================================
   10. AURORA — deep teal night with lime & aqua glow
   ========================================================= */
[data-theme="aurora"] {
    --bg: #04161a;
    --bg-alt: #061e23;
    --surface: #0a272e;
    --surface-2: #0e3139;
    --text: #e2f5f2;
    --heading: #ffffff;
    --muted: #98bfba;
    --border: #164048;

    --accent: #a3e635;
    --accent-2: #2dd4bf;
    --on-accent: #0b1a03;
    --accent-text: #b9f05a;
    --accent-soft: rgba(163, 230, 53, .13);

    --hero-bg:
        radial-gradient(900px 400px at 70% -10%, rgba(45, 212, 191, .28), transparent 60%),
        radial-gradient(700px 380px at 20% 0%, rgba(163, 230, 53, .16), transparent 60%),
        #04161a;
    --hero-bg-solid: #04161a;
    --hero-illo-soft: rgba(45, 212, 191, .08);

    --header-bg: rgba(4, 22, 26, .82);
    --shadow: 0 22px 50px -20px rgba(0, 0, 0, .75);
    --card-shadow: none;
    --card-hover-border: rgba(163, 230, 53, .5);
    --input-bg: #051b20;

    --illo-line: #1b4a53;
    --illo-ink: #021013;
    --illo-net: rgba(152, 191, 186, .45);
    --success: #a3e635;
    --danger: #fb7185;
}
