:root {
  --bg: #080c14;
  --panel: #111a2a;
  --line: #22314a;
  --text: #f3f4f6;
  --muted: #a7b0c0;
  --accent: #ffc21a;
  --glow: #5ad1ff;
  --ok: #4ade80;
  --warm: #ffb347;
  --nav-h: 64px;
  --dev-h: 28px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
h1, h2 {
  font-family: Impact, "Arial Narrow Bold", "Arial Narrow", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .98;
  margin: 0 0 .5rem;
  font-weight: 800;
}
h1 { font-size: clamp(2.4rem, 7.5vw, 5.4rem); }
h2 { font-size: clamp(2rem, 5.5vw, 3.8rem); }
p { margin: 0 0 .75rem; color: var(--muted); max-width: 34rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 700; }
.fine { font-size: .8rem; opacity: .8; }

.devbar {
  height: var(--dev-h); display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #111; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 0 .5rem; text-align: center;
}

.nav {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  display: flex; align-items: center; gap: 1.25rem; padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(8, 12, 20, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.brand svg { width: 22px; height: 22px; fill: var(--accent); }
.nav nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.nav nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.brand span { white-space: nowrap; }
.nav nav a:hover, .nav nav a:focus-visible { color: var(--text); }
.cta {
  display: inline-block; background: var(--accent); color: #111; text-decoration: none; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; padding: .7rem 1.1rem; border-radius: 999px;
  min-height: 44px; line-height: 1.6;
}
.cta:hover { filter: brightness(1.08); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.cta.big { font-size: 1rem; padding: 1rem 1.6rem; }

/* ----- pinned scroll scenes ----- */
.scene { height: calc(320vh + var(--hold, 0px)); position: relative; }
.stage {
  position: sticky; top: calc(var(--nav-h)); height: calc(100vh - var(--nav-h));
  overflow: hidden; display: grid; place-items: center; background: linear-gradient(180deg, #0a1120, #14213a);
  --open: clamp(0, calc((var(--p, 0) - .12) * 4), 1);
  --xray: clamp(0, calc((var(--p, 0) - .62) * 4), 1);
}
.stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 80% 55% at 12% 100%, rgba(8, 12, 20, .9), transparent 72%), linear-gradient(180deg, rgba(8, 12, 20, .45), transparent 22%); }
.beats { position: absolute; left: clamp(1rem, 5vw, 4rem); bottom: clamp(5.5rem, 12vh, 8rem); right: clamp(1rem, 5vw, 4rem); pointer-events: none; z-index: 2; }
.beat {
  position: absolute; left: 0; bottom: 0; max-width: 36rem;
  opacity: 0; transform: translateY(24px); transition: opacity .45s ease, transform .45s ease;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .8);
}
.beat.on { opacity: 1; transform: none; }
.beat p { color: #d6dbe6; }

.hud {
  position: absolute; z-index: 3; top: 1.25rem; right: clamp(1rem, 4vw, 3rem); list-style: none; margin: 0; padding: .8rem 1rem;
  background: rgba(8, 12, 20, .78); border: 1px solid var(--line); border-radius: 10px; min-width: 12.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .78rem; backdrop-filter: blur(6px);
}
.hud li { display: flex; justify-content: space-between; gap: 1.5rem; padding: .15rem 0; color: var(--muted); }
.hud b { color: var(--text); }
.checklist li::before { content: "○"; margin-right: .5rem; color: var(--muted); }
.checklist li { justify-content: flex-start; }
.checklist li.done { color: var(--text); }
.checklist li.stat { justify-content: space-between; }
.checklist li.stat::before { content: none; }
.checklist li.stat:first-of-type, .checklist li.done + li.stat { margin-top: .35rem; }
.checklist li.note { font-size: .68rem; opacity: .7; }
.checklist li.done::before { content: "✓"; color: var(--ok); }

/* ----- photo layers ----- */
.layers { position: absolute; inset: 0; overflow: hidden; background: #0a1120; }
.layers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; will-change: opacity, transform; }
.layers img[data-in] { opacity: 0; }
.try-demo .layers { position: relative; inset: auto; aspect-ratio: 1344 / 768; border-radius: 14px; border: 1px solid var(--line); }
.cover-box { position: absolute; will-change: transform; }
.try-demo .layers img.room, .cover-box img.room { position: absolute; inset: auto; object-fit: fill; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.try-demo .layers img.room.on, .cover-box img.room.on { opacity: 1; }

/* ----- electric glow over the open panel ----- */
.layers .dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 52% 48%, rgba(2, 8, 20, .5), rgba(2, 6, 14, .88) 75%); opacity: 0; }
.glow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; --draw: 0; filter: drop-shadow(0 0 3px #7fe3ff) drop-shadow(0 0 9px #2f8cff); }
.glow path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.glow .trace { stroke: #5ad1ff; stroke-width: 2.4; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw)); }
.glow .flow { stroke: #e9fbff; stroke-width: 2.4; stroke-dasharray: .035 .165; opacity: var(--draw); animation: flow 2.4s linear infinite; }
.glow .main { stroke-width: 4; }
.glow .cell { fill: #5ad1ff; opacity: calc(var(--draw) * .85); animation: pulse 1.8s ease-in-out infinite; }
@keyframes flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -.2; } }
@keyframes pulse { 50% { opacity: calc(var(--draw) * .35); } }
@media (prefers-reduced-motion: reduce) { .glow .flow, .glow .cell { animation: none; } }

/* ----- hero ----- */
#hero .beats { top: clamp(1.25rem, 6vh, 3.5rem); bottom: auto; }
#hero .beat { bottom: auto; top: 0; max-width: 46rem; }
#hero h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); }
#hero .stage::after { background: linear-gradient(180deg, rgba(8, 12, 20, .8), transparent 48%); }
.cue {
  position: absolute; z-index: 2; left: 50%; bottom: 1.5rem; transform: translateX(-50%); text-align: center;
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  opacity: clamp(0, calc(1 - var(--p, 0) * 12), 1);
}
.cue::after { content: ""; display: block; width: 1px; height: 28px; margin: .5rem auto 0; background: linear-gradient(var(--accent), transparent); }

/* ----- services ----- */
.services { padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 5vw, 4rem); background: #0b1424; }
.services h2 { max-width: 40rem; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 2rem 0 1.5rem; }
.svc-grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.svc-grid h3 { margin: 0 0 .5rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.svc-grid p { margin: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; padding: 0; margin: .5rem 0 0; }
.chips a { display: inline-block; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: .6rem 1rem; font-size: .85rem; min-height: 44px; line-height: 1.7; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }

/* ----- breaker board + About (pinned scene) ----- */
.scene.compact { height: calc(100vh + 2800px + var(--hold, 0px)); } /* 8 steps x 350 px: each breaker gets about 3-4 wheel notches */
.try-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); grid-template-rows: auto 1fr;
  column-gap: clamp(1.5rem, 4vw, 4rem); row-gap: 1rem; align-content: start; align-items: start; justify-items: stretch;
  padding: 1.5rem clamp(1rem, 5vw, 4rem); background: linear-gradient(180deg, #0a1120, #0b1424);
}
.try-stage::after { display: none; }
.try-head { grid-column: 1; grid-row: 1; }
.try-head h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.try-head p:last-child { margin-bottom: 0; }
.try-side { grid-column: 1; grid-row: 2; display: grid; gap: .9rem; align-content: start; }
.try-demo { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: grid; gap: 1rem; position: relative; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.brk {
  min-height: 52px; border-radius: 8px; border: 1px solid var(--line); background: #1b2740; color: var(--muted);
  font: inherit; font-size: .78rem; cursor: pointer; padding: .4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.brk small { font-family: ui-monospace, Menlo, monospace; opacity: .8; }
.brk[aria-pressed="true"] { background: #3a2f0f; border-color: var(--accent); color: var(--text); }
.blurb { min-height: 9.5rem; padding: 1rem 1.1rem; background: rgba(17, 26, 42, .85); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; }
.blurb h3 { margin: .15rem 0 .4rem; font-family: Impact, "Arial Narrow Bold", system-ui, sans-serif; text-transform: uppercase; font-size: 1.5rem; line-height: 1.05; font-weight: 800; }
.blurb p:last-child { margin: 0; }
.blurb a { color: var(--accent); font-weight: 700; }
.blurb > * { transition: opacity .25s ease; }
.blurb.swap > * { opacity: 0; }
.readout { display: flex; flex-wrap: wrap; gap: 1.5rem; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--muted); }
.readout b { color: var(--text); }
.readout .bar { flex: 1 0 100%; height: 6px; border-radius: 99px; background: #1b2740; overflow: hidden; }
.readout .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.try-demo .layers { position: relative; inset: auto; aspect-ratio: 1344 / 768; border-radius: 14px; border: 1px solid var(--line); }

/* ----- contact ----- */
.contact { text-align: center; padding: clamp(4rem, 12vw, 9rem) 1rem; background: radial-gradient(60% 80% at 50% 0%, #17223a, var(--bg)); }
.contact p { margin-inline: auto; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.25rem clamp(1rem, 4vw, 2.5rem) 5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.mobilebar { display: none; }

/* ----- responsive ----- */

@media (max-width: 1000px) {
  .nav nav { display: none; }
  .nav .cta { margin-left: auto; }
}
@media (max-width: 860px) {
  .try-stage { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: .6rem; padding: .75rem 1rem 4.75rem; }
  .try-head, .try-demo, .try-side { grid-column: 1; grid-row: auto; }
  .try-head { order: 1; } .try-demo { order: 2; align-self: start; gap: .4rem; } .try-side { order: 3; gap: .6rem; }
  .try-head h2 { font-size: 1.7rem; }
  .try-head p { font-size: .85rem; margin-bottom: 0; }
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; padding: .5rem; }
  .brk { min-height: 46px; font-size: .66rem; padding: .25rem; }
  .brk small { display: none; }
  .blurb { min-height: 7.5rem; padding: .75rem .9rem; }
  .blurb h3 { font-size: 1.25rem; }
  .readout { gap: .9rem; font-size: .72rem; }
  .nav .cta { margin-left: auto; padding: .55rem .9rem; white-space: nowrap; font-size: .7rem; }
  .brand { font-size: .72rem; }
  .try { grid-template-columns: 1fr; min-height: 0; }
  .hud { top: .75rem; right: .75rem; min-width: 10.5rem; font-size: .7rem; }
  .beats { bottom: 5.5rem; }
  #hero .beats { bottom: auto; }
  .mobilebar {
    display: block; position: fixed; z-index: 30; left: .75rem; right: .75rem; bottom: .75rem; text-align: center;
    background: var(--accent); color: #111; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
    padding: .9rem; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  }
  footer { flex-direction: column; padding-bottom: 6rem; }
}

/* ----- reduced motion: no pinning, everything visible ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene, .scene.compact { height: auto; }
  .stage { display: block; position: relative; top: 0; height: auto; min-height: 0; overflow: visible; --p: 1; }
  .stage::after, .cue { display: none; }
  .layers { position: relative; inset: auto; width: 100%; height: 56vh; }
  .beats, #hero .beats { position: relative; inset: auto; padding: 1.25rem clamp(1rem, 5vw, 4rem); display: grid; gap: 1.25rem; }
  .beats, #hero .beats { justify-content: start; justify-items: start; margin: 0; }
  .beat, #hero .beat { position: static; margin: 0; opacity: 1; transform: none; transition: none; max-width: 36rem; }
  .hud { position: relative; inset: auto; margin: 1rem clamp(1rem, 5vw, 4rem); max-width: 20rem; }
}

/* ----- quote page ----- */
.quote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 5vw, 4rem); min-height: 80vh; background: radial-gradient(60% 60% at 20% 0%, #17223a, var(--bg)); }
.quote-intro h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
.quote-points { padding-left: 1.1rem; color: var(--muted); }
.quote-points li { margin-bottom: .4rem; }
.quote-points a, .quote-done a, .contact a.fine, .contact .fine a { color: var(--accent); }
.quote-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.1rem, 3vw, 2rem); }
.quote-card fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
.quote-card legend, .quote-card label { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; padding: 0; }
.quote-card .opt { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
.field { margin-bottom: 1.1rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.quote-card input[type="text"], .quote-card input[type="email"], .quote-card input[type="tel"], .quote-card select, .quote-card textarea {
  width: 100%; font: inherit; color: var(--text); background: #0d1626; border: 1px solid var(--line); border-radius: 10px; padding: .75rem .85rem; min-height: 46px;
}
.quote-card textarea { resize: vertical; }
.quote-card input:focus-visible, .quote-card select:focus-visible, .quote-card textarea:focus-visible { outline: 3px solid var(--glow); outline-offset: 1px; }
.quote-card [aria-invalid="true"] { border-color: #ff6b6b; }
.choice-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.quote-card label.choice { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .7rem 1.1rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; color: var(--text); min-height: 46px; background: #0d1626; }
.quote-card label.choice:has(input:checked) { border-color: var(--accent); background: #2a2410; }
.quote-card label.choice input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }
.err { color: #ff8a8a; font-size: .82rem; margin: .35rem 0 0; }
.submit { border: 0; cursor: pointer; width: 100%; }
.quote-done h2 { font-size: 2rem; }
.quote-done textarea { width: 100%; font: .85rem ui-monospace, Menlo, monospace; color: var(--text); background: #0d1626; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.done-actions { display: flex; gap: 1rem; align-items: center; margin-top: .9rem; flex-wrap: wrap; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
.quote-page .nav nav { display: flex; }
@media (max-width: 1000px) { .quote-page .nav nav { display: none; } }
@media (max-width: 860px) {
  .quote { grid-template-columns: 1fr; padding-bottom: 3rem; }
  .two { grid-template-columns: 1fr; gap: 0; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote-done[hidden], .quote-card form[hidden] { display: none; }
.quote-done a.cta { color: #111; }

/* green charging light drawn over the charger face so the charger itself never changes between photos */
.cover-box .led { position: absolute; left: 61.05%; top: 22.1%; width: 6.7%; height: 15%; border-radius: 14%; opacity: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(190, 255, 190, .95), rgba(60, 230, 90, .85) 55%, rgba(20, 170, 60, .7));
  box-shadow: 0 0 22px 8px rgba(70, 240, 100, .55), 0 0 70px 24px rgba(70, 240, 100, .25); mix-blend-mode: screen; }

/* EV scene on phones: show the whole car-to-charger area as a band, text and readouts below it */
@media (max-width: 860px) {
  #ev .layers { inset: 0 0 auto 0; height: 47vh; --fx: .55; }
  #ev .layers img { object-position: calc(var(--fx) * 100%) 50%; }
  #ev .stage::after { display: none; }
  #ev .hud { top: calc(47vh + .6rem); left: 1rem; right: 1rem; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; padding: .5rem .75rem; font-size: .66rem; }
  #ev .hud li { padding: .05rem 0; }
  #ev .hud li.stat { margin-top: 0; }
  #ev .beats { bottom: 5.5rem; }
  #ev .beat h2 { font-size: 1.75rem; }
  #ev .beat p { font-size: .85rem; }
}

.try-demo .layers img.room { transition-duration: 1s; }
