/* ==========================================================================
   EnerBlue · Light theme (opt-in)
   Applied via <html data-theme="light">; all tokens re-mapped, components
   get only the surface/border overrides they need.
   ========================================================================== */

html[data-theme="light"] {
  --bg: #f1f5fa;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f4fa;
  --panel-3: #e6edf7;
  --line: rgba(10, 37, 64, 0.14);
  --line-2: rgba(10, 37, 64, 0.24);
  --text: #0a2540;
  --text-2: #1f3247;
  --muted: #3f5268;
  --muted-2: #67788d;
  --blue: #1e6fd9;
  --blue-bright: #1358b8;
  --blue-soft: #1a63c4;
  --teal: #0c8f81;
  --amber: #b46f12;
  --plate: #ffffff;
  --plate-2: #eaf1fa;
  color-scheme: light;
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] ::selection {
  background: rgba(30, 111, 217, 0.2);
  color: #06203a;
}

/* ---------- texture ---------- */
html[data-theme="light"] .bp::before {
  background-image:
    linear-gradient(to right, rgba(10, 37, 64, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 37, 64, 0.055) 1px, transparent 1px);
}

/* ---------- header ---------- */
html[data-theme="light"] .site-header.is-stuck {
  background: rgba(244, 247, 251, 0.86);
  border-bottom-color: var(--line);
}
html[data-theme="light"] .brand .word b { color: #0a2540; }
html[data-theme="light"] .nav-links a { color: #33475f; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a[aria-current="page"] { color: #0a2540; }
html[data-theme="light"] .btn--ghost {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.18);
  color: #0a2540;
}
html[data-theme="light"] .btn--ghost:hover {
  border-color: rgba(10, 37, 64, 0.38);
  background: #f7fafd;
}
html[data-theme="light"] .btn--primary {
  background: #1e6fd9;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 10px 24px -16px rgba(30, 111, 217, 0.8);
}
html[data-theme="light"] .btn--primary:hover { background: #1663c7; }
html[data-theme="light"] .burger { border-color: rgba(10, 37, 64, 0.24); }
html[data-theme="light"] .burger span { background: #0a2540; }

/* ---------- hero ---------- */
html[data-theme="light"] .hero {
  background:
    radial-gradient(ellipse 60% 50% at 78% 8%, rgba(30, 111, 217, 0.13), transparent 62%),
    radial-gradient(ellipse 42% 42% at 6% 16%, rgba(12, 143, 129, 0.07), transparent 65%),
    linear-gradient(180deg, #ffffff, var(--bg) 72%);
}
html[data-theme="light"] .hero::after {
  opacity: 0.13;
  filter: grayscale(1) brightness(1.02) contrast(1.05);
}
html[data-theme="light"] .eyebrow {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.14);
  color: #4a5f78;
  box-shadow: 0 8px 24px -20px rgba(10, 37, 64, 0.5);
}
html[data-theme="light"] .hero h1 { color: #08203a; }
html[data-theme="light"] .hero h1 em { color: #1a63c4; }
html[data-theme="light"] .hero h1 em::after {
  background: linear-gradient(90deg, rgba(30, 111, 217, 0.18), rgba(30, 111, 217, 0.02));
}
html[data-theme="light"] .hero-sub { color: #33475f; }
html[data-theme="light"] .hero-sub strong { color: #0a2540; }
html[data-theme="light"] .hero-facts b { color: #0a2540; }

/* ---------- system map ---------- */
html[data-theme="light"] .system-map {
  background: linear-gradient(180deg, #ffffff, #f7fafd);
  border-color: rgba(10, 37, 64, 0.12);
  box-shadow: 0 40px 80px -56px rgba(10, 37, 64, 0.55);
}
html[data-theme="light"] .sm-layer {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.1);
}
html[data-theme="light"] .sm-node {
  background: #f5f8fc;
  border-color: rgba(10, 37, 64, 0.12);
  color: #33475f;
}
html[data-theme="light"] .sm-node.hot {
  background: rgba(30, 111, 217, 0.09);
  border-color: rgba(30, 111, 217, 0.4);
  color: #0a2540;
}
html[data-theme="light"] .flow {
  background: linear-gradient(to bottom, rgba(30, 111, 217, 0.12), rgba(30, 111, 217, 0.5), rgba(30, 111, 217, 0.12));
}

/* ---------- stats ---------- */
html[data-theme="light"] .stats {
  background: linear-gradient(180deg, rgba(30, 111, 217, 0.05), rgba(255, 255, 255, 0));
}
html[data-theme="light"] .stat b { color: #08203a; }
html[data-theme="light"] .stat b small { color: #1a63c4; }

/* ---------- product cards ---------- */
html[data-theme="light"] .pcard {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.1);
  box-shadow: 0 18px 40px -34px rgba(10, 37, 64, 0.5);
}
html[data-theme="light"] .pcard:hover {
  border-color: rgba(30, 111, 217, 0.45);
  background: linear-gradient(160deg, rgba(30, 111, 217, 0.05), #ffffff);
}
html[data-theme="light"] .pcard .cn { color: #0a2540; }
html[data-theme="light"] .pcard > .plate {
  background: linear-gradient(180deg, #f2f6fb, #e7eef8);
  border-bottom-color: rgba(10, 37, 64, 0.1);
}

html[data-theme="light"] .foundation { background: var(--line); }
html[data-theme="light"] .foundation > div { background: #ffffff; }
html[data-theme="light"] .foundation h4 { color: #0a2540; }

/* ---------- method steps ---------- */
html[data-theme="light"] .steps { background: var(--line); }
html[data-theme="light"] .step { background: #ffffff; }
html[data-theme="light"] .step:hover { background: #f5f9fe; }
html[data-theme="light"] .step h4 { color: #0a2540; }

/* ---------- cases ---------- */
html[data-theme="light"] .case {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.1);
  box-shadow: 0 20px 44px -38px rgba(10, 37, 64, 0.55);
}
html[data-theme="light"] .case:hover { border-color: rgba(30, 111, 217, 0.42); }
html[data-theme="light"] .case .media img {
  filter: grayscale(0.2) contrast(1.02) brightness(0.98);
}
html[data-theme="light"] .case .media::after {
  background:
    linear-gradient(to top, rgba(8, 20, 34, 0.72), rgba(8, 20, 34, 0) 58%),
    linear-gradient(120deg, rgba(30, 111, 217, 0.16), transparent 55%);
}
html[data-theme="light"] .case .metrics div { background: #f6f9fd; }
html[data-theme="light"] .case .metrics b { color: #0a2540; }
html[data-theme="light"] .case .go { color: #1a63c4; }
html[data-theme="light"] .case .media--data {
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(30, 111, 217, 0.16), transparent 70%),
    linear-gradient(160deg, #eef4fb, #e2ebf7);
}
html[data-theme="light"] .case .media--data::before {
  background-image:
    linear-gradient(to right, rgba(10, 37, 64, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 37, 64, 0.07) 1px, transparent 1px);
}
html[data-theme="light"] .case .media--data .dm b { color: #08203a; }
html[data-theme="light"] .case .media--data .dm b small { color: #1a63c4; }
html[data-theme="light"] .case .media--data .dm i { color: #6b7f95; }

/* ---------- tables ---------- */
html[data-theme="light"] .table-wrap { background: #ffffff; border-color: rgba(10, 37, 64, 0.1); }
html[data-theme="light"] table.data thead th {
  background: #f1f5fb;
  color: #5c6f86;
}
html[data-theme="light"] table.data tbody tr:hover { background: rgba(30, 111, 217, 0.045); }
html[data-theme="light"] table.data strong { color: #0a2540; }
html[data-theme="light"] table.data .up { color: #0c8f81; }
html[data-theme="light"] .spec-table th { background: #f6f9fd; }

/* ---------- index list ---------- */
html[data-theme="light"] .index-list { border-top-color: var(--line); }
html[data-theme="light"] .irow:hover { background: #ffffff; }
html[data-theme="light"] .irow h3 { color: #0a2540; }
html[data-theme="light"] .irow .st.on { color: #0c8f81; }
html[data-theme="light"] .irow .st.plan { color: #b46f12; }

/* ---------- frame / strip ---------- */
html[data-theme="light"] .frame {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.12);
  box-shadow: 0 40px 80px -60px rgba(10, 37, 64, 0.5);
}
html[data-theme="light"] .frame .bar { background: #f3f7fc; }
html[data-theme="light"] .strip { background: var(--line); }
html[data-theme="light"] .strip figure { background: #eef3fa; }
html[data-theme="light"] .strip img { filter: grayscale(0.15) brightness(1) contrast(1.02); }
html[data-theme="light"] .strip figcaption { color: rgba(255, 255, 255, 0.92); }

/* ---------- plates ---------- */
html[data-theme="light"] .plate {
  background: linear-gradient(180deg, #ffffff, #eaf1fa);
  border-color: rgba(10, 37, 64, 0.12);
}
html[data-theme="light"] .plate .cap { color: #6b7f95; }

/* ---------- timeline ---------- */
html[data-theme="light"] .tl-item::before { background: #ffffff; }
html[data-theme="light"] .tl-item h4 { color: #0a2540; }

/* ---------- people ---------- */
html[data-theme="light"] .people { background: var(--line); }
html[data-theme="light"] .person { background: #ffffff; }

/* ---------- CTA ---------- */
html[data-theme="light"] .cta {
  background:
    radial-gradient(ellipse 60% 120% at 50% 100%, rgba(30, 111, 217, 0.14), transparent 68%),
    linear-gradient(180deg, #ffffff, #eef4fb);
}
html[data-theme="light"] .cta::before {
  background-image:
    linear-gradient(to right, rgba(10, 37, 64, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 37, 64, 0.06) 1px, transparent 1px);
}
html[data-theme="light"] .cta h2 { color: #08203a; }

/* ---------- footer ---------- */
html[data-theme="light"] .site-footer {
  background: #ffffff;
  border-top-color: rgba(10, 37, 64, 0.12);
}
html[data-theme="light"] .footer-brand p,
html[data-theme="light"] .footer-col p { color: #5c6f86; }
html[data-theme="light"] .footer-col a { color: #33475f; }
html[data-theme="light"] .footer-col a:hover { color: #1a63c4; }
html[data-theme="light"] .footer-col h4 { color: #67788d; }
html[data-theme="light"] .footer-brand .mail { color: #1a63c4; }
html[data-theme="light"] .footer-bottom { border-top-color: rgba(10, 37, 64, 0.12); color: #67788d; }

/* ---------- page hero / case hero ---------- */
html[data-theme="light"] .page-hero {
  background:
    radial-gradient(ellipse 70% 90% at 82% 0%, rgba(30, 111, 217, 0.1), transparent 62%),
    linear-gradient(180deg, #ffffff, var(--bg) 78%);
}
html[data-theme="light"] .page-hero h1 { color: #08203a; }
html[data-theme="light"] .case-hero {
  background:
    radial-gradient(ellipse 60% 100% at 20% 0%, rgba(30, 111, 217, 0.1), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg) 80%);
}
html[data-theme="light"] .case-hero h1 { color: #08203a; }
html[data-theme="light"] .case-meta div { background: #ffffff; }
html[data-theme="light"] .case-meta dd { color: #0a2540; }
html[data-theme="light"] .kpi { background: #ffffff; }
html[data-theme="light"] .kpi b { color: #08203a; }
html[data-theme="light"] .kpi b small { color: #1a63c4; }

/* ---------- prose / callout ---------- */
html[data-theme="light"] .prose h2 { color: #08203a; }
html[data-theme="light"] .prose p,
html[data-theme="light"] .prose ul li { color: #33475f; }
html[data-theme="light"] .prose strong { color: #0a2540; }
html[data-theme="light"] .callout {
  background: linear-gradient(90deg, rgba(30, 111, 217, 0.08), rgba(30, 111, 217, 0.01));
}
html[data-theme="light"] .callout p { color: #33475f; }

/* ---------- contact / forms ---------- */
html[data-theme="light"] .contact-item a { color: #1a63c4; }
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.18);
  color: #0a2540;
}
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder { color: #9aa8ba; }
html[data-theme="light"] .field input:focus,
html[data-theme="light"] .field textarea:focus,
html[data-theme="light"] .field select:focus {
  border-color: #1e6fd9;
  background: #ffffff;
}
html[data-theme="light"] .filters button {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.14);
  color: #5c6f86;
}
html[data-theme="light"] .filters button:hover { color: #0a2540; border-color: rgba(10, 37, 64, 0.3); }
html[data-theme="light"] .filters button.is-on { background: #1e6fd9; border-color: #1e6fd9; color: #fff; }

/* ---------- pager ---------- */
html[data-theme="light"] .pager { border-top-color: var(--line); }
html[data-theme="light"] .pager a { color: #5c6f86; }
html[data-theme="light"] .pager a:hover { color: #1a63c4; }

/* ---------- theme toggle ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.34); }
.theme-toggle svg { width: 16px; height: 16px; }
html[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.18);
  color: #33475f;
}
html[data-theme="light"] .theme-toggle:hover { border-color: rgba(10, 37, 64, 0.36); color: #0a2540; }

/* the toggle shows the target theme's icon: dark page -> sun, light page -> moon */
.theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- misc light fixes ---------- */
html[data-theme="light"] .label { color: #1a63c4; }
html[data-theme="light"] .label::before { background: #1e6fd9; }
html[data-theme="light"] .hero-facts { border-top-color: var(--line); }
html[data-theme="light"] .page-hero { border-bottom-color: var(--line); }
html[data-theme="light"] .case-hero { border-bottom-color: var(--line); }
html[data-theme="light"] .note { color: #67788d; }
html[data-theme="light"] .mono { color: #67788d; }
html[data-theme="light"] .brand .word small { color: #67788d; }

@media (max-width: 860px) {
  html[data-theme="light"] .nav-links {
    background: rgba(244, 247, 251, 0.98);
    border-bottom-color: rgba(10, 37, 64, 0.12);
  }
  html[data-theme="light"] .nav-links a { border-bottom-color: rgba(10, 37, 64, 0.1); }
}

/* ---------- hardcoded white text that must flip in light mode ---------- */
html[data-theme="light"] .hero-sub strong { color: #08203a; }
html[data-theme="light"] .hero-facts b { color: #08203a; }
html[data-theme="light"] .page-hero-meta div b { color: #08203a; }
html[data-theme="light"] .ticks li b { color: #0a2540; }
html[data-theme="light"] .sm-layer .tier b { color: #08203a; }

/* ==========================================================================
   Light theme — v3 add-ons
   ========================================================================== */

/* brand */
html[data-theme="light"] .brand .word b { color: #0a2540; }
html[data-theme="light"] .brand .mark-tile {
  background: #ffffff;
  border-color: rgba(10, 37, 64, 0.14);
}
html[data-theme="light"] .brand:hover .mark-tile { border-color: rgba(30, 111, 217, 0.5); }
html[data-theme="light"] .brand .word small { color: #67788d; }

/* carousel */
html[data-theme="light"] .hero-carousel { background: #f1f5fa; }
html[data-theme="light"] .slide-bg {
  filter: grayscale(1) brightness(1.05) contrast(1.02);
  opacity: 0.16;
}
html[data-theme="light"] .slide::after {
  background:
    linear-gradient(90deg, rgba(241, 245, 250, 0.98) 0%, rgba(241, 245, 250, 0.92) 44%, rgba(241, 245, 250, 0.55) 100%),
    linear-gradient(0deg, rgba(241, 245, 250, 0.95), transparent 55%);
}
html[data-theme="light"] .slide h1 { color: #08203a; }
html[data-theme="light"] .slide p { color: #33475f; }
html[data-theme="light"] .slide-metrics { border-top-color: rgba(10, 37, 64, 0.14); }
html[data-theme="light"] .slide-metrics div b { color: #08203a; }
html[data-theme="light"] .slide-metrics div span { color: #67788d; }
html[data-theme="light"] .hero-dots button { background: rgba(10, 37, 64, 0.18); }
html[data-theme="light"] .hero-dots button.is-on { background: #1e6fd9; }
html[data-theme="light"] .hero-arrow {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(10, 37, 64, 0.18);
  color: #33475f;
}
html[data-theme="light"] .hero-arrow:hover { background: #fff; color: #0a2540; border-color: rgba(10, 37, 64, 0.36); }
html[data-theme="light"] .hero-counter { color: #67788d; }
html[data-theme="light"] .hero-counter b { color: #0a2540; }

/* business */
html[data-theme="light"] .biz { background: #ffffff; }
html[data-theme="light"] .biz:hover { background: #f6f9fd; }
html[data-theme="light"] .biz h3 { color: #08203a; }
html[data-theme="light"] .biz .en { color: #1a63c4; }
html[data-theme="light"] .biz .tags span { border-color: rgba(10, 37, 64, 0.14); color: #5c6f86; }
html[data-theme="light"] .biz .go { color: #1a63c4; }

/* topology */
html[data-theme="light"] .topo-wrap {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(30, 111, 217, 0.08), transparent 65%),
    linear-gradient(180deg, #ffffff, #eef4fb);
}
html[data-theme="light"] .tp-band { fill: rgba(10, 37, 64, 0.025); stroke: rgba(10, 37, 64, 0.14); }
html[data-theme="light"] .tp-band-label { fill: #5c6f86; }
html[data-theme="light"] .tp-head { fill: #08203a; }
html[data-theme="light"] .tp-sub { fill: #46596f; }
html[data-theme="light"] .tp-mono { fill: #67788d; }
html[data-theme="light"] .tp-box { fill: rgba(30, 111, 217, 0.08); stroke: rgba(30, 111, 217, 0.4); }
html[data-theme="light"] .tp-box-2 { fill: #ffffff; stroke: rgba(10, 37, 64, 0.16); }
html[data-theme="light"] .tp-box-3 { fill: rgba(12, 143, 129, 0.07); stroke: rgba(12, 143, 129, 0.35); }
html[data-theme="light"] .tp-node { fill: #33475f; }
html[data-theme="light"] .tp-node-small { fill: #5c6f86; }
html[data-theme="light"] .tp-link { stroke: rgba(30, 111, 217, 0.55); }
html[data-theme="light"] .tp-link-2 { stroke: rgba(12, 143, 129, 0.45); }
html[data-theme="light"] .tp-chip { fill: #ffffff; stroke: rgba(10, 37, 64, 0.16); }
html[data-theme="light"] .tp-chip-text { fill: #5c6f86; }
html[data-theme="light"] .tp-divider { stroke: rgba(10, 37, 64, 0.1); }

/* placeholder */
html[data-theme="light"] .ph {
  border-color: rgba(10, 37, 64, 0.24);
  background:
    repeating-linear-gradient(45deg, rgba(10, 37, 64, 0.03) 0 8px, transparent 8px 16px),
    rgba(10, 37, 64, 0.015);
}
html[data-theme="light"] .ph .ph-t { color: #33475f; }

/* docs */
html[data-theme="light"] .docs-side { background: #ffffff; border-color: rgba(10, 37, 64, 0.12); }
html[data-theme="light"] .docs-side button { color: #33475f; }
html[data-theme="light"] .docs-side button:hover { background: #f2f7fd; color: #0a2540; }
html[data-theme="light"] .docs-side button.is-on { background: rgba(30, 111, 217, 0.1); color: #0a2540; }
html[data-theme="light"] .docs-search input { background: #ffffff; border-color: rgba(10, 37, 64, 0.18); color: #0a2540; }
html[data-theme="light"] .doc { background: #ffffff; }
html[data-theme="light"] .doc:hover { background: #f6f9fd; }
html[data-theme="light"] .doc h3 { color: #08203a; }
html[data-theme="light"] .doc-list .empty { background: #ffffff; color: #5c6f86; }
html[data-theme="light"] .doc .act.is-disabled { color: #8494a8; }

/* assistant */
html[data-theme="light"] .ai-panel { background: #ffffff; border-color: rgba(10, 37, 64, 0.16); box-shadow: 0 40px 80px -34px rgba(10, 37, 64, 0.4); }
html[data-theme="light"] .ai-head { background: #f5f9fe; }
html[data-theme="light"] .msg.bot .bubble { background: #f2f7fd; border-color: rgba(10, 37, 64, 0.12); color: #33475f; }
html[data-theme="light"] .ai-chips button { border-color: rgba(10, 37, 64, 0.16); color: #33475f; background: #ffffff; }
html[data-theme="light"] .ai-chips button:hover { background: #f2f7fd; color: #0a2540; }
html[data-theme="light"] .ai-form { background: #f5f9fe; }
html[data-theme="light"] .ai-form input { background: #ffffff; border-color: rgba(10, 37, 64, 0.18); color: #0a2540; }
html[data-theme="light"] .ai-close { border-color: rgba(10, 37, 64, 0.16); color: #5c6f86; }
html[data-theme="light"] .notice { background: rgba(240, 179, 87, 0.1); border-color: rgba(180, 111, 18, 0.3); }


/* ---------- hero slides: 2-column layout text ---------- */
html[data-theme="light"] .slide h1,
html[data-theme="light"] .slide .slide-title { color: #08203a; }
html[data-theme="light"] .slide h1 em,
html[data-theme="light"] .slide .slide-title em { color: #1a63c4; }
html[data-theme="light"] .slide-tag { color: #1e6fd9; }
html[data-theme="light"] .slide-tag .idx { color: #67788d; border-color: rgba(10, 37, 64, 0.22); }
html[data-theme="light"] .slide .shot-slot { border-color: rgba(10, 37, 64, 0.2); }


/* full-bleed hero photos in light theme */
html[data-theme="light"] .slide-bg { filter: none; opacity: 1; }
html[data-theme="light"] .slide::after {
  background:
    linear-gradient(90deg, rgba(243, 247, 251, 0.97) 0%, rgba(243, 247, 251, 0.93) 32%, rgba(243, 247, 251, 0.62) 54%, rgba(243, 247, 251, 0.28) 76%, rgba(243, 247, 251, 0.62) 100%),
    linear-gradient(0deg, rgba(243, 247, 251, 0.95), rgba(243, 247, 251, 0) 58%);
}
