/* ==========================================================================
   KRISID — LIGHT THEME
   --------------------------------------------------------------------------
   Load this AFTER style.css and the whole site flips to light:

     <link rel="stylesheet" href="assets/css/style.css">
     <link rel="stylesheet" href="assets/css/style-light.css">

   Most of the work is a palette remap, because the base stylesheet is built
   on CSS variables. The rest handles things that cannot be expressed as a
   variable: the ambient background, translucent surfaces, the glow effects,
   the SVG colours hard-coded inline, and the logo (light backgrounds need
   the original navy mark, not the brightened one).
   ========================================================================== */

:root {
  /* Surfaces, coolest to warmest */
  --navy-900: #f4f7fb;   /* page background            */
  --navy-850: #ffffff;   /* raised surfaces, footer    */
  --navy-800: #ffffff;   /* diagram node fill          */
  --navy-700: #eef3f9;
  --navy-600: #e2eaf4;

  /* Brand — the logo navy works unchanged on light */
  --brand: #1e3a8f;
  --brand-light: #2451b5;
  --accent: #0f7391;         /* darkened for contrast on white */
  --accent-bright: #0b6079;  /* link and heading accent — 6.8:1 on the page bg */
  --accent-glow: rgba(15, 115, 145, 0.20);

  /* Text */
  --text: #0f1c33;
  --text-muted: #46566e;
  --text-dim: #5d6e86;   /* 4.9:1 on white — the dark theme's dim tone was too pale here */

  /* Lines and fills */
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --border: rgba(15, 28, 51, 0.11);
  --border-strong: rgba(30, 58, 143, 0.26);
}

/* ---------- Ambient background ---------- */
body { background: var(--navy-900); }

body::before {
  background:
    radial-gradient(760px 520px at 12% -6%, rgba(36, 81, 181, 0.10), transparent 62%),
    radial-gradient(620px 460px at 88% 4%, rgba(15, 115, 145, 0.09), transparent 60%),
    radial-gradient(900px 620px at 50% 108%, rgba(30, 58, 143, 0.07), transparent 65%);
}

body::after {
  background-image:
    linear-gradient(rgba(15, 28, 51, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 28, 51, 0.032) 1px, transparent 1px);
}

/* ---------- Navigation ---------- */
.nav {
  background: rgba(244, 247, 251, 0.82);
  border-bottom-color: rgba(15, 28, 51, 0.10);
}
.nav-links a:hover { color: var(--brand); background: rgba(15, 28, 51, 0.05); }
.nav-links a.active { color: var(--accent-bright); }
.nav-toggle span { background: var(--text); }

/* ---------- Logo ---------- */
/* The bright mark was generated for dark backgrounds. Swap in the navy one. */
.brand-logo { content: url("../img/krisid-mark-dark.png"); }
.brand-wordmark { content: url("../img/krisid-wordmark-dark.png"); }
.brand:hover .brand-wordmark { filter: none; opacity: .78; }
.brand:hover .brand-logo { filter: none; opacity: .8; }

/* ---------- Type ----------
   The base stylesheet sets colour: #fff on a number of specific headings.
   Every one of them has to be restated here or it renders white on white. */
h1, h2, h3, h4 { color: var(--text); }
.card h3,
.prose h3,
.journey-step h3,
.empty-state h3,
.info-item h4,
.prose th { color: var(--text); }
.article-card h3 a { color: var(--text); }
.article-card h3 a:hover { color: var(--accent); }
.hero h1 .glow,
.tagline {
  background: linear-gradient(100deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow { background: rgba(15, 115, 145, 0.08); }
a:hover { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn-primary,
.nav-links .nav-cta a.btn,
.nav-links .nav-cta a.btn:hover {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 143, 0.22);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(30, 58, 143, 0.30); }
.btn-ghost {
  background: #fff;
  border-color: rgba(15, 28, 51, 0.16);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--brand); background: #fff; color: var(--brand); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15, 28, 51, 0.04);
}
.card:hover {
  background: #fff;
  border-color: var(--border-strong);
  box-shadow: 0 10px 28px rgba(15, 28, 51, 0.10);
}
.card h3 { color: var(--text); }

.card-icon {
  background: linear-gradient(135deg, rgba(36, 81, 181, .10), rgba(15, 115, 145, .10));
  border-color: rgba(30, 58, 143, 0.20);
  color: var(--accent);
}
.card-list li::before { background: var(--accent); }

/* ---------- Stats ---------- */
.stats { background: var(--border); }
.stat { background: #fff; }
.stat-num { color: var(--brand); }

/* ---------- Journey stepper ---------- */
.journey::before {
  background: linear-gradient(90deg,
    rgba(15, 115, 145, .12), rgba(15, 115, 145, .40), rgba(15, 115, 145, .12));
}
.journey::after { background: radial-gradient(closest-side, var(--accent), transparent); }
.journey-marker {
  background: #fff;
  border-color: rgba(30, 58, 143, 0.22);
  box-shadow: 0 1px 3px rgba(15, 28, 51, 0.06);
}
.journey-marker::before {
  background: radial-gradient(closest-side, rgba(15, 115, 145, 0.22), transparent 72%);
}
.journey-marker svg { stroke: var(--accent); }
.journey-marker::after { color: #fff; background: var(--accent); }
.journey-step:hover .journey-marker {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 115, 145, 0.20);
}
.journey-step h3 { color: var(--text); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(15, 115, 145, .09), transparent 70%),
    #fff;
  border-color: var(--border-strong);
  box-shadow: 0 2px 10px rgba(15, 28, 51, 0.05);
}

/* ---------- Footer ---------- */
.footer {
  background: #eaf0f7;
  border-top-color: var(--border);
}
.footer h4 { color: var(--text-dim); }
.footer li a { color: var(--text-muted); }
.footer li a:hover { color: var(--brand); }

/* ---------- Prose and papers ---------- */
.prose blockquote {
  background: #fff;
  border-left-color: var(--accent);
  box-shadow: 0 1px 2px rgba(15, 28, 51, 0.04);
}
.prose blockquote p { color: var(--text); }
.prose th { color: var(--text); }
.callout {
  background: rgba(15, 115, 145, 0.05);
  border-color: rgba(30, 58, 143, 0.22);
}
.callout h4 { color: var(--accent); }
.paper-toc { background: #fff; box-shadow: 0 1px 2px rgba(15, 28, 51, 0.04); }
.figure { background: #fff; box-shadow: 0 1px 3px rgba(15, 28, 51, 0.05); }
.empty-state { background: #fff; }
.tag { border-color: rgba(15, 28, 51, 0.16); }

/* ---------- Forms (retained for future use) ---------- */
.field input, .field select, .field textarea {
  background: #fff;
  border-color: rgba(15, 28, 51, 0.16);
}
.field input:focus, .field select:focus, .field textarea:focus {
  background: #fff;
  border-color: var(--accent);
}
.field select option { background: #fff; color: var(--text); }
.form-status { background: rgba(15, 115, 145, 0.07); color: var(--accent); }

/* ==========================================================================
   SVG — colours written inline in the markup need overriding here.
   Presentation attributes lose to CSS, so these all take effect.
   ========================================================================== */

/* hero pipeline */
.viz-logo-lt { display: none; }
.viz-logo-dk { display: block; }
.viz-chip { fill: #fff; stroke: rgba(30,58,143,.20); }
.viz-chip-accent { fill: rgba(15,115,145,.07); stroke: var(--accent); }
.viz-chip-icon { stroke: var(--accent); }
.viz-micro { fill: var(--text-dim); }
.viz-flow  { stroke: var(--accent); opacity: .8; }
.viz-ring  { stroke: var(--accent); opacity: .22; }
.viz-scanner { stroke: var(--accent); }
.viz-ticks { stroke: var(--accent); opacity: .3; }
.viz-badge { fill: rgba(15,115,145,.10); stroke: rgba(30,58,143,.24); }
.viz-badge-text { fill: var(--accent); }

.viz-pulse { stroke: var(--accent) !important; opacity: .5; }
#coreGlow stop:nth-child(1) { stop-color: #0f7391; stop-opacity: .22; }
#coreGlow stop:nth-child(2) { stop-color: #2451b5; stop-opacity: .08; }
#coreGlow stop:nth-child(3) { stop-color: #2451b5; stop-opacity: 0; }
#wireGrad stop { stop-color: #0f7391; }

/* about-page orbit */
#orbGlow stop:nth-child(1) { stop-color: #0f7391; stop-opacity: .18; }
#orbGlow stop:nth-child(2) { stop-color: #2451b5; stop-opacity: 0; }
.viz-orbit circle, .viz-orbit--rev circle { stroke: #2451b5 !important; opacity: .35; }
.viz-halo { fill: #0f7391 !important; opacity: .16; }

/* services delivery arc */
#arcSweep stop:nth-child(1) { stop-color: #0f7391; stop-opacity: 0; }
#arcSweep stop:nth-child(2) { stop-color: #0f7391; stop-opacity: .9; }
#arcSweep stop:nth-child(3) { stop-color: #0f7391; stop-opacity: 0; }
.viz-band rect[fill^="rgba(255"] { fill: rgba(15, 28, 51, 0.10) !important; }

/* framework diagram */
.fw-band { fill: rgba(15, 28, 51, 0.022); stroke: var(--border); }
.fw-box  { fill: #fff; stroke: rgba(30, 58, 143, 0.24); }
.fw-box-accent { fill: rgba(15, 115, 145, 0.07); stroke: var(--accent); }
.fw-title { fill: var(--accent); }
.fw-label { fill: var(--text); }
.fw-sub   { fill: var(--text-dim); }
.fw-arrow { stroke: var(--accent); opacity: .6; }
#fwHead path, #pdHead path { fill: #0f7391; }

/* shared diagram primitives */
.viz-node { fill: #fff; stroke: rgba(30, 58, 143, 0.24); }
.viz-node-accent { fill: rgba(15, 115, 145, 0.07); stroke: var(--accent); }
.viz-label { fill: var(--text); }
.viz-sub   { fill: var(--text-dim); }
.viz-wire  { stroke: var(--accent); opacity: .40; }
.viz-icon  { stroke: var(--accent); }
.viz-dot   { fill: var(--accent); }
.viz-aside { background: #fff; box-shadow: 0 1px 3px rgba(15, 28, 51, 0.05); }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; }
}
