/* The light theme. Every rule here is scoped to html[data-theme="light"], so
   the dark page is unchanged when this file is loaded without that attribute.
   Colours are the app's own BLANC tokens (app/src/theme.rs). The particle
   footage is the same video, inverted, so the wave reads as charcoal ink on
   a pale ground. */

html[data-theme="light"] {
  --bg: #f7f7f7;
  --text: #161616;
  --muted: #6b6b6b;
  --stat: #3a3a3a;
  --border: rgba(0, 0, 0, 0.14);
  --hair: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  /* How far the footage is inverted: black lands on #ededed, white on #121212. */
  --ink-invert: invert(0.93);
  color-scheme: light;
}
html[data-theme="light"],
html[data-theme="light"] body {
  background: #f7f7f7 !important;
  color: #161616 !important;
}

html[data-theme="light"] .grain { opacity: 0.045; }

/* ---------- Header and buttons ---------- */

html[data-theme="light"] .logo { color: #161616; }

html[data-theme="light"] .notch--tc .nav-link { color: #555555; }
html[data-theme="light"] .notch--tc .nav-link:hover { background: rgba(0, 0, 0, 0.06); color: #161616; }

html[data-theme="light"] .burger { background: rgba(255, 255, 255, 0.7); }
html[data-theme="light"] .burger:hover { border-color: rgba(0, 0, 0, 0.28); background: #ffffff; }
html[data-theme="light"] .burger span { background: #161616; }

html[data-theme="light"] .btn::after {
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.22) 48%, transparent 76%);
}
html[data-theme="light"] .btn-solid {
  background: linear-gradient(180deg, #2c2c2c 0%, #161616 52%, #0b0b0b 100%);
  color: #f5f5f5;
  border: 1px solid #0b0b0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .btn-solid:hover,
html[data-theme="light"] .btn-solid.btn-lg:hover {
  background: linear-gradient(180deg, #3a3a3a 0%, #1e1e1e 50%, #0b0b0b 100%);
  border-color: #0b0b0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 22px rgba(52, 85, 250, 0.18), 0 8px 18px rgba(0, 0, 0, 0.14);
}
html[data-theme="light"] .btn-ghost {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 240, 240, 0.86));
  color: #161616;
  border: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .btn-ghost:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 1px 0 #ffffff, 0 0 22px rgba(52, 85, 250, 0.12);
}

/* ---------- Type ---------- */

html[data-theme="light"] em { color: #7a7a7a; }
html[data-theme="light"] .h2 { color: #161616; }
html[data-theme="light"] .hero h1 { color: #161616; }
html[data-theme="light"] .hero h1 em,
html[data-theme="light"] .head h2 em { color: #9a9a9a; }
html[data-theme="light"] .lede { color: #555555; }
html[data-theme="light"] .head p { color: #6b6b6b; }
html[data-theme="light"] .pixel { color: #161616; }

/* ---------- Hero ---------- */

html[data-theme="light"] .hero-wrap { --ground: #e6e6e6; }
html[data-theme="light"] .hero-photo { background: #ededed; }
html[data-theme="light"] .hero-photo video { filter: var(--ink-invert); }
/* The frame: the same blurred copy, inverted with the clear video, and a
   touch darker so the clear panel reads lighter than the glass round it. */
html[data-theme="light"] .frost canvas { filter: blur(10px) var(--ink-invert) saturate(1.1) brightness(1.02); }
html[data-theme="light"] .frost-noise { opacity: 0.14; }
html[data-theme="light"] .frost-edge path { stroke: rgba(0, 0, 0, 0.1); }
html[data-theme="light"] .hero-shade {
  background: linear-gradient(90deg, rgba(247, 247, 247, 0.82) 0%, rgba(247, 247, 247, 0.55) 34%, rgba(247, 247, 247, 0) 60%);
}

/* The window in the hero, in BLANC. */
html[data-theme="light"] .app {
  --shell: #dbdbdb;
  --rail: #e6e6e6;
  --bg: #f7f7f7;
  --panel: #ffffff;
  --elevated: #e0e0e0;
  --input: #ebebeb;
  --fg: #161616;
  --muted: #6b6b6b;
  --subtle: #8f8f8f;
  --border: #e4e4e4;
  --border-strong: #c8c8c8;
  --pane-border: #dcdcdc;
  --input-border: #d5d5d5;
  --hit-on: #00000014;
  --ico-dim: #00000059;
  --ico-on: #000000b2;
  --term-bg: #efefef;
  --term-fg: #1f2328;
  font-weight: 400;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.1),
    0 0 90px rgba(155, 107, 255, 0.12),
    0 0 40px rgba(47, 180, 255, 0.06),
    0 50px 120px rgba(0, 0, 0, 0.2);
}

/* ---------- Hero, footage behind the window only ----------
   The particle footage is no longer the whole hero's ground: it sits in a
   rounded area on the right with the window in it, and the copy is on the
   plain panel. */
html[data-theme="light"] .hero-shade { display: none; }
html[data-theme="light"] .hero-photo--app {
  position: absolute;
  inset: 96px 24px 24px 8px;
  z-index: auto;
  border-radius: 24px;
  overflow: hidden;
  container-type: size;
}
html[data-theme="light"] .hero .hero-photo--app .app {
  left: 40px;
  top: 40px;
  height: calc((100cqh - 40px) / var(--s));
}

@media (max-width: 900px) {
  html[data-theme="light"] .hero-app { height: 420px; padding: 0 16px 16px; }
  html[data-theme="light"] .hero-photo--app { position: relative; inset: auto; height: 100%; border-radius: 20px; }
  /* Cropped to the terminal pane, which starts 264px into the window. */
  html[data-theme="light"] .hero .hero-photo--app .app { --s: 0.9; left: calc(16px - 264px * 0.9); top: 20px; height: calc((100cqh - 20px) / 0.9); }
  /* The two buttons side by side at their normal size. */
  html[data-theme="light"] .hero-copy .hero-actions { flex-direction: row; flex-wrap: nowrap; width: auto; gap: 8px; }
  html[data-theme="light"] .hero-copy .hero-actions .btn { width: auto; height: 40px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
}

/* ---------- Live scenes ---------- */

html[data-theme="light"] .scene { background: #f7f7f7; }

/* ---------- The pipeline ---------- */

html[data-theme="light"] .dot-pill {
  color: #2a2a2a;
  border-color: rgba(52, 85, 250, 0.35);
  background: rgba(52, 85, 250, 0.06);
}
html[data-theme="light"] .pipe-head-r { color: #6b6b6b; }

html[data-theme="light"] .bcard {
  border-color: rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}
html[data-theme="light"] .bcard::before { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent); }
html[data-theme="light"] .bcard:hover { border-color: rgba(0, 0, 0, 0.16); }
html[data-theme="light"] .btext h3 { color: #161616; }
html[data-theme="light"] .btext p { color: #6b6b6b; }
html[data-theme="light"] .kicker { color: color-mix(in srgb, var(--accent) 78%, black); }

html[data-theme="light"] .bart .cine { filter: var(--ink-invert); opacity: 1; }
html[data-theme="light"] .cine-tint {
  background:
    radial-gradient(90% 80% at 15% 0%, color-mix(in srgb, var(--accent) 60%, transparent), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4));
}
html[data-theme="light"] .cine-tint::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.4));
}
html[data-theme="light"] .shot {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 0 0 7px rgba(0, 0, 0, 0.035),
    0 30px 70px rgba(0, 0, 0, 0.22);
}

/* ---------- Agents ---------- */

html[data-theme="light"] .agents-frame .scene {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 40px 100px rgba(0, 0, 0, 0.16);
}
html[data-theme="light"] .agents-frame::before { opacity: 0.7; }
html[data-theme="light"] .facts .stat:first-child .stat-icon rect { fill: #161616; }
html[data-theme="light"] .facts .stat:first-child .stat-icon path { stroke: #ffffff; }
html[data-theme="light"] .facts .stat:nth-child(3) .stat-icon { filter: invert(1); }

/* ---------- Team ---------- */

html[data-theme="light"] .tile-live {
  border-color: rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffffff, #fbfbfb);
}
html[data-theme="light"] .tile-top span { color: #6b6b6b; }
html[data-theme="light"] .tile-live .scene { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }

/* ---------- Closing call and footer ---------- */

html[data-theme="light"] .closer-photo video { filter: var(--ink-invert); }
html[data-theme="light"] .closer-photo::after {
  background:
    radial-gradient(46% 40% at 50% 54%, rgba(247, 247, 247, 0.94), rgba(247, 247, 247, 0.6) 55%, transparent 80%),
    linear-gradient(180deg, #f7f7f7 0%, rgba(247, 247, 247, 0) 28%, rgba(247, 247, 247, 0) 72%, #f7f7f7 100%);
}
html[data-theme="light"] .footer { color: #7a7a7a; }
html[data-theme="light"] .footer a:hover { color: #161616; }
html[data-theme="light"] .footer .logo { color: #3a3a3a; }
html[data-theme="light"] .closer .head h2 em { color: #6b6b6b; }
