/* ==========================================================================
   CyboSpace — light mode
   Loaded last, only when build.py has MODE = 'light' (<html data-mode="light">).
   The page, cards, forms, menus and footer go light; the photo heroes and the
   pinned cinematic sequences stay dark "islands" for contrast.
   ========================================================================== */

/* ---------- Tokens: light ---------- */
html[data-mode="light"]{
  --ink-0:#f6f4ef; --ink-1:#efebe3; --ink-2:#e7e2d8; --ink-3:#dcd6ca;
  --bone:#16141f; --bone-2:#2e2b40; --fog:#55526a; --dim:#716e86;
  --lilac:#6d4fd0; --ice:#1f6fb8;
  --line:rgba(22,20,31,.1); --line-2:rgba(22,20,31,.18);
  --glass:rgba(255,255,255,.62);
  --grad-soft:linear-gradient(100deg,rgba(42,143,224,.12),rgba(154,82,200,.12));
  color-scheme:light;
}
/* the pale accents that read on black are too faint on cream: light areas use the page's mid accent,
   islands keep the pale one (--accent-2-dk) */
html[data-mode="light"] body[data-theme="home"]      { --accent-2-dk:#c6b3ff; }
html[data-mode="light"] body[data-theme="ai"]        { --accent-2-dk:#dcc7ff; }
html[data-mode="light"] body[data-theme="cloud"]     { --accent-2-dk:#cfe9ff; }
html[data-mode="light"] body[data-theme="software"]  { --accent-2-dk:#a9d9ff; }
html[data-mode="light"] body[data-theme="transform"] { --accent-2-dk:#d9ccff; }
html[data-mode="light"] body[data-theme="analytics"] { --accent-2-dk:#bfe4ff; }
html[data-mode="light"] body[data-theme="marketing"] { --accent-2-dk:#efc9ff; }
html[data-mode="light"] body[data-theme="audit"]     { --accent-2-dk:#bfe4ff; }
html[data-mode="light"] body[data-theme="validation"]{ --accent-2-dk:#dcc7ff; }
html[data-mode="light"] body[data-theme="company"]   { --accent-2-dk:#c6b3ff; }
html[data-mode="light"] body[data-theme="roadmap"]   { --accent-2-dk:#c6b3ff; }
html[data-mode="light"] body[data-theme]{ --accent-2:#4b52c9; --glow:rgba(92,99,217,.16); }
html[data-mode="light"] body:is([data-theme="ai"],[data-theme="validation"]){ --accent-2:#7d3fb3; }
html[data-mode="light"] body[data-theme="marketing"]{ --accent-2:#8c3cb8; }
html[data-mode="light"] body[data-theme="transform"]{ --accent-2:#5f42c2; }
html[data-mode="light"] body:is([data-theme="cloud"],[data-theme="software"],[data-theme="analytics"],[data-theme="audit"]){ --accent-2:#1b6db3; }
/* some pages paint their own dark page background */
html[data-mode="light"] body{ background:var(--ink-0); }

/* ---------- Tokens: dark islands ---------- */
html[data-mode="light"] :is(
  .hero, .co-hero, .rm-hero, .ai-hero, .an-hero, .cl-hero, .mk-hero, .sw-hero, .tx-hero, .pv-hero, .au-hero, .bl-hero, .bp-hero,
  .core-seq, .rm-seq, .ai-seq, .an-seq, .cl-seq, .mk-seq, .sw-seq, .tx-seq,
  .mission, .rmt, .stage, .cl-out, .tx-pano, .flip,
  .pv-intake, .results, .market-size-section, .priority-section, .breakdown-section, .competitor-section, .vc-section, .roadmap-section, .personnel-section, .cybospace-help,
  .editor, .tab-card, .ticket, .terminal, .co-office, .ba-tag, .oc,
  .nav:not(.is-scrolled), .dk
){
  --ink-0:#050509; --ink-1:#09091a; --ink-2:#0f0e22; --ink-3:#17152f;
  --bone:#f3f1ec; --bone-2:#e6e2da; --fog:#a8a6c0; --dim:#6b6987;
  --lilac:#c6b3ff; --ice:#a9d9ff;
  --line:rgba(243,241,236,.09); --line-2:rgba(243,241,236,.16);
  --glass:rgba(15,14,34,.55);
  --accent-2:var(--accent-2-dk); --glow:rgba(92,99,217,.38);
  color:var(--bone); color-scheme:dark;
}
html[data-mode="light"] :is(
  .hero, .co-hero, .rm-hero, .ai-hero, .an-hero, .cl-hero, .mk-hero, .sw-hero, .tx-hero, .pv-hero, .au-hero, .bl-hero, .bp-hero,
  .core-seq, .rm-seq, .ai-seq, .an-seq, .cl-seq, .mk-seq, .sw-seq, .tx-seq,
  .mission, .rmt, .cl-out, .tx-pano,
  .pv-intake, .results, .market-size-section, .priority-section, .breakdown-section, .competitor-section, .vc-section, .roadmap-section, .personnel-section, .cybospace-help, .dk
){ background-color:#050509; }

/* The menu bar: light text over the dark hero at the top, a frosted light bar once scrolled
   (and whenever the phone menu is open, since that menu is light) */
html[data-mode="light"] .nav.is-scrolled,
html[data-mode="light"] .menu-open .nav{ background:rgba(246,244,239,.82); }
html[data-mode="light"] .menu-open .nav:not(.is-scrolled){
  --bone:#16141f; --fog:#57546b; --line:rgba(22,20,31,.1); --line-2:rgba(22,20,31,.18); color:var(--bone);
  background:transparent;
}
html[data-mode="light"] .nav.is-scrolled .nav-links{ background:rgba(255,255,255,.6); backdrop-filter:none; -webkit-backdrop-filter:none; }   /* the bar behind it is already frosted */
html[data-mode="light"] .nav.is-scrolled .nav-links > a:hover,
html[data-mode="light"] .nav.is-scrolled .nav-links > .nav-dd > button:hover,
html[data-mode="light"] .nav.is-scrolled .nav-dd.open > button{ background:rgba(22,20,31,.06); }

/* Dropdowns are always light cards */
html[data-mode="light"] .mega{
  --bone:#16141f; --fog:#57546b; --dim:#86839a; --line:rgba(22,20,31,.1); --line-2:rgba(22,20,31,.14);
  color:var(--bone); background:#ffffff; box-shadow:0 30px 70px -24px rgba(22,20,31,.28);
}
html[data-mode="light"] .mega a:hover{ background:rgba(22,20,31,.045); }

/* ---------- Shared components ---------- */
html[data-mode="light"] .btn-ghost{ background:rgba(255,255,255,.55); }
html[data-mode="light"] .dk .btn-ghost,
html[data-mode="light"] :is(.hero, .co-hero, .rm-hero, .ai-hero, .an-hero, .cl-hero, .mk-hero, .sw-hero, .tx-hero, .pv-hero, .au-hero) .btn-ghost{ background:rgba(9,9,26,.35); }

/* the one "light" band per page becomes a crisp white band on the cream page */
html[data-mode="light"] .is-light{ background:#ffffff; color:var(--bone); --line:rgba(22,20,31,.1); --line-2:rgba(22,20,31,.18); }
html[data-mode="light"] .is-light .lead, html[data-mode="light"] .is-light .muted, html[data-mode="light"] .is-light .body-lg,
html[data-mode="light"] .is-light .chip{ color:var(--fog); }
html[data-mode="light"] .is-light .label{ color:var(--fog); }
html[data-mode="light"] .is-light .btn-ghost{ --fg:var(--bone); }

/* photo grade: the colour wash stays, the bottom shade only where text sits on the photo */
html[data-mode="light"] [data-spotlight]::before{ background:radial-gradient(420px circle at var(--mx) var(--my),rgba(92,99,217,.08),transparent 45%); }

/* cursor */
html[data-mode="light"] .cursor-ring{ border-color:rgba(22,20,31,.35); }
html[data-mode="light"] body.cursor-hover .cursor-ring{ background:rgba(22,20,31,.08); }

/* loader */
html[data-mode="light"] .loader-mark .track{ stroke:rgba(22,20,31,.1); }

/* contact: the photo sits behind a cream veil instead of a black one */
/* contact: under a cream veil the moving photo was ~5% visible but the costliest thing to redraw; a soft glow instead */
html[data-mode="light"] .contact-bg .media{ display:none; }
html[data-mode="light"] .contact-bg::after{ background:radial-gradient(60% 55% at 85% 35%,rgba(92,99,217,.10),transparent 70%),radial-gradient(45% 50% at 10% 80%,rgba(42,143,224,.08),transparent 70%); }
html[data-mode="light"] .form{ background:rgba(255,255,255,.9); box-shadow:0 30px 70px -40px rgba(22,20,31,.25); backdrop-filter:none; -webkit-backdrop-filter:none; }   /* blurring the moving photo behind it every frame was the slowest thing on the page */
html[data-mode="light"] .field select{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2357546b' stroke-width='1.4'/%3E%3C/svg%3E"); }
html[data-mode="light"] .field select option{ background:#fff; color:#16141f; }
html[data-mode="light"] #leadForm .form-error{ color:#a3193f; background:rgba(214,40,80,.07); border-color:rgba(214,40,80,.35); }

/* footer wordmark: dark ink fading out instead of bone */
html[data-mode="light"] .footer{ background:var(--ink-1); }
html[data-mode="light"] .footer-word span{ background:linear-gradient(180deg,rgba(22,20,31,.9),rgba(22,20,31,.08)); -webkit-background-clip:text; background-clip:text; }
html[data-mode="light"] .footer-word span.c{ background:linear-gradient(180deg,#8d4fc6,rgba(141,79,198,.1)); -webkit-background-clip:text; background-clip:text; }
html[data-mode="light"] .footer-word span.s{ background:linear-gradient(180deg,#2a8fe0,rgba(42,143,224,.1)); -webkit-background-clip:text; background-clip:text; }
html[data-mode="light"] .footer-status i{ background:#23a861; }

html[data-mode="light"] .social a{ background:rgba(22,20,31,.03); }

/* text sitting on photos keeps light type (service cards, related rail) */
html[data-mode="light"] .related a .r-copy{ color:#f3f1ec; }
html[data-mode="light"] .media-card .bc-over{ color:#f3f1ec; --fog:#d6d3e6; }
html[data-mode="light"] .media-card .grade::before{ background:linear-gradient(180deg,rgba(5,5,9,0) 25%,rgba(5,5,9,.82)); }   /* enough shade for the caption on a bright photo */
html[data-mode="light"] .related a .r-copy span{ color:#d6d3e6; }

/* grain: a lighter touch on cream */
/* the film grain barely shows on cream but costs a full-screen animated layer: off in light mode */
html[data-mode="light"] .grain{ display:none; }

/* ---------- Dark cards that become light cards ---------- */
html[data-mode="light"] :is(.ai-card, .an-card, .au-check, .co-cat-col, .wave, .ch-card){
  background:#ffffff; border-color:var(--line); box-shadow:0 24px 60px -36px rgba(22,20,31,.28);
}
html[data-mode="light"] .co-cat-col .chip{ color:var(--bone-2); }
html[data-mode="light"] .rmt-stages span{ background:rgba(5,5,9,.45); }

/* Home: the "03 Services" cards and the white "Why CyboSpace" cards share the gradient of the
   "Integrated tech + marketing" card — violet glow top-right, blue glow bottom-left on cream */
html[data-mode="light"] :is(.cap, .why .bc:not(.media-card):not(.dark)){
  background-color:var(--ink-1);
  background-image:radial-gradient(80% 80% at 100% 0%,rgba(141,79,198,.45),transparent 60%),radial-gradient(70% 70% at 0% 100%,rgba(42,143,224,.35),transparent 60%);
  border-color:transparent; box-shadow:0 24px 60px -36px rgba(22,20,31,.28);
}
html[data-mode="light"] .why .bc:not(.media-card) p{ color:var(--fog); }
/* "Marketing solutions" sits on a vibrant photo: white type */
html[data-mode="light"] .cap-divider .cd-copy{ color:#f3f1ec; }
html[data-mode="light"] .cap-divider .cd-copy .label{ color:#e2def0; }
