/* Layout concept: a night-to-day route. The page opens on a dark, live map of the
   network and travels into bright "daylight" sections; a scroll "charge" fills as you go. */
:root {
  /* color */
  --ink: #0A1530;        /* night navy, derived from brand #345387 */
  --ink-2: #13224A;
  --navy: #345387;       /* brand */
  --volt: #9BC23A;       /* brand green #8BAF2B, lifted for glow on dark */
  --volt-deep: #6F8F1C;  /* green for text on light */
  --mist: #EDF1F6;       /* cool daylight ground */
  --paper: #F8FAFC;
  --line: #D4DCE8;
  --mute: #5B6B86;
  --white: #FFFFFF;
  --on-dark-mute: #9AA8C4;

  /* type */
  --f-display: "Archivo", "Arial Black", "Helvetica Neue", sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --fs-hero: clamp(2.9rem, 7.2vw, 6.9rem);
  --fs-h2: clamp(2rem, 4.6vw, 3.9rem);
  --fs-h3: 1.25rem;
  --fs-lede: clamp(1.05rem, 1.4vw, 1.22rem);
  --fs-body: 1rem;
  --fs-small: .84rem;
  --fs-micro: .7rem;

  --gutter: max(16px, 4vw);
  --maxw: 1240px;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 72px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--volt); color: var(--ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 var(--fs-micro)/1 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow--light { color: var(--volt); }
.h2 {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: 800;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  line-height: .98;
  letter-spacing: -.025em;
}
.h2--light { color: var(--white); }
.lede { font-size: var(--fs-lede); color: var(--mute); max-width: 52ch; }
.lede--light { color: var(--on-dark-mute); }

.dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 0 0 rgb(155 194 58 / .6);
  animation: live 1.8s infinite;
  display: inline-block; flex: none;
}
@keyframes live { 70% { box-shadow: 0 0 0 8px rgb(155 194 58 / 0); } 100% { box-shadow: 0 0 0 0 rgb(155 194 58 / 0); } }

/* ---------- buttons ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: var(--h); padding: 0 1.3em;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--f-body);
  text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s;
  position: relative; isolation: isolate; overflow: hidden;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--sm { --h: 40px; font-size: .9rem; padding: 0 1.05em; }
.btn--lg { --h: 58px; font-size: 1.02rem; padding: 0 1.5em; }
.btn--xl { --h: 72px; font-size: clamp(1.05rem, 2vw, 1.35rem); padding: 0 2em; white-space: normal; text-align: center; }
.btn--volt { background: var(--volt); color: var(--ink); box-shadow: 0 10px 30px -10px rgb(155 194 58 / .7); }
.btn--volt::after { /* sweeping current */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sweep 3.6s var(--ease) infinite 1.2s;
}
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.btn--volt:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgb(155 194 58 / .9); }
.btn--ghost { color: var(--white); border-color: rgb(255 255 255 / .28); background: rgb(255 255 255 / .04); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--volt); color: var(--volt); }
.btn__arrow { font-family: var(--f-mono); font-size: .9em; transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translate(2px, -2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--white);
  transition: background-color .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-scrolled { background: rgb(10 21 48 / .78); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 rgb(255 255 255 / .06); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.nav__logo img { width: 112px; height: auto; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px; color: rgb(255 255 255 / .82);
  transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--white); background: rgb(255 255 255 / .08); }
.nav__end { display: flex; align-items: center; gap: 14px; }

.charge-pill { display: inline-flex; align-items: center; gap: 8px; font: 500 var(--fs-micro)/1 var(--f-mono); color: var(--on-dark-mute); font-variant-numeric: tabular-nums; }
.charge-pill__cell { position: relative; width: 30px; height: 14px; border: 1.5px solid rgb(255 255 255 / .55); border-radius: 4px; padding: 1.5px; }
.charge-pill__cell::after { content: ""; position: absolute; right: -4px; top: 3.5px; width: 2px; height: 4px; background: rgb(255 255 255 / .55); border-radius: 0 1px 1px 0; }
.charge-pill__fill { display: block; height: 100%; width: 0; background: var(--volt); border-radius: 1.5px; transition: width .15s linear; }
.charge-pill__pct { width: 4ch; }

.nav__burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); background: transparent; position: relative; }
.nav__burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav__burger { display: block; }
  .nav__cta { display: none; }
  .nav__links {
    position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column; gap: 0; padding: 12px var(--gutter) 28px;
    background: rgb(10 21 48 / .97); backdrop-filter: blur(14px);
    max-height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .3s, transform .3s var(--ease), visibility .3s;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__links a { font: 700 1.6rem/1.1 var(--f-display); font-stretch: 115%; padding: 14px 0; border-radius: 0; border-bottom: 1px solid rgb(255 255 255 / .08); }
  .nav__links a:hover { background: none; color: var(--volt); }
}
@media (max-width: 420px) { .charge-pill__pct { display: none; } }

/* ---------- reveal on scroll (progressive: visible if unsupported) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes rise { from { translate: 0 40px; } to { translate: 0 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
