/* ════════════════════════════════════════════════════════════════
   H24GRID — "DC circuit" chassis (rd 5, 2026-08-21)
   Two rails frame the page: a RED energized line on TOP (section
   progression) and a YELLOW line on the BOTTOM (contact · company ·
   tabs). Side connectors close the loop; bright pulses run clockwise
   around it — the DC current. Content lives in the bay between the
   rails and slides one section to the next. Mobile ≤820px: vertical
   stack, rails become simple bars.
   Palette: graphite/bone/pine · RED hot line · YELLOW return line.
   ════════════════════════════════════════════════════════════════ */

:root {
  --graphite: #232526;
  --graphite-2: #1C1E1F;
  --panel: #2E3133;
  --panel-hi: #35383A;
  --bone: #EDEAE4;
  --bone-60: rgba(237, 234, 228, .6);
  --bone-38: rgba(237, 234, 228, .38);
  --bone-line: rgba(237, 234, 228, .14);
  --yellow: #C2E019;
  --red: #F5821F;
  --red-deep: #A8500C;
  --copper: #B87333;
  --pine: #1E3A2A;
  --disp: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --rail: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  background: var(--graphite);
  color: var(--bone);
  font-family: var(--disp);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--bone); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--yellow); color: var(--graphite); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.01em; }

/* ══ TOP RAIL — red energized line ══════════════════════════════ */
.rail-top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--rail);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 26px;
  background: linear-gradient(var(--graphite), rgba(35,37,38,.82) 60%, transparent);
}
/* the full-width red conductor at the rail's lower edge */
.rail-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--red-deep), var(--red) 20%, var(--red) 80%, var(--red-deep));
  box-shadow: 0 0 10px rgba(245,130,31,.55);
}
.wordmark { font-weight: 700; font-size: 1.06rem; letter-spacing: .14em; flex: none;
  display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 26px; height: 26px; flex: none; }
.wm-text { line-height: 1; }
.wordmark .mk { color: var(--yellow); }
.spec-tag {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .18em;
  color: var(--bone-60); text-transform: uppercase;
  display: flex; align-items: center; gap: 9px; flex: none;
}
.spec-tag .led { width: 7px; height: 7px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 8px var(--red); animation: blink 4.5s steps(1) infinite; }
@keyframes blink { 0%,92%{opacity:1} 93%,100%{opacity:.25} }

/* nodes sit on the red line */
.nodes { position: relative; flex: 1; max-width: 720px; height: var(--rail);
  display: flex; align-items: center; justify-content: space-between; }
.node { position: relative; display: flex; flex-direction: column; align-items: center;
  gap: 7px; padding-top: 20px; }
.node .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--panel-hi);
  border: 2px solid var(--red); transition: all .25s var(--ease-out); }
.node .nlbl { font-family: var(--mono); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--bone-38); transition: color .25s; white-space: nowrap; }
.node:hover .dot { transform: scale(1.2); }
.node.is-on .dot { background: var(--red); box-shadow: 0 0 12px var(--red), 0 0 3px #fff inset; transform: scale(1.25); }
.node.is-on .nlbl { color: var(--bone); }
/* travelling spark on the red rail */
.rail-spark { position: absolute; left: 0; bottom: 30px; width: 6px; height: 6px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 8px 1px var(--red); opacity: .8;
  animation: spark-lr 13s linear infinite; }
@keyframes spark-lr { from{left:0} to{left:100%} }

/* ══ SIDE CONNECTORS — quiet accessory + one-shot transition zap ═ */
.connector { position: fixed; top: var(--rail); bottom: var(--rail); width: 1px; z-index: 30; opacity: .2; }
.connector.left  { left: 0;  background: linear-gradient(var(--red-deep), #6E7A0E); }
.connector.right { right: 0; background: linear-gradient(var(--red-deep), #6E7A0E); }
/* the zap: a short bright segment runs top→bottom on the right when a section
   changes — signals the new circuit is energised. No constant running loop. */
.zap { position: fixed; right: 0; width: 2px; height: 20%; z-index: 33; opacity: 0;
  pointer-events: none; top: var(--rail);
  background: linear-gradient(var(--yellow), rgba(194,224,25,0));
  box-shadow: 0 0 8px 1px rgba(194,224,25,.7); }
.zap.fire { animation: zap-run .55s var(--ease-out); }
@keyframes zap-run {
  0%   { opacity: 0; top: var(--rail); }
  18%  { opacity: 1; }
  100% { opacity: 0; top: calc(100% - var(--rail) - 20%); }
}

/* ══ STAGE + BAY + SECTIONS ═════════════════════════════════════ */
.stage { position: fixed; inset: var(--rail) 0; z-index: 10; }
.bay { position: relative; width: 100%; height: 100%; overflow: hidden; }
.section {
  position: absolute; inset: 0; padding: 42px clamp(26px, 6vw, 92px) 30px;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  opacity: 0; transform: translateX(46px); pointer-events: none;
  transition: opacity .55s var(--ease-out), transform .55s var(--ease-out);
}
.section.is-active { opacity: 1; transform: none; pointer-events: auto; }
.section.is-prev { transform: translateX(-46px); }

.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--yellow); }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; }
.lede { font-size: clamp(1rem, 1.15vw, 1.2rem); color: var(--bone-60); max-width: 54ch; }
.copy { max-width: 62ch; display: flex; flex-direction: column; gap: 14px; }
.copy--top { max-width: 70ch; }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.cta { display: inline-block; background: var(--red); color: #fff; font-weight: 700;
  padding: 13px 26px; border-radius: 6px; letter-spacing: .01em;
  box-shadow: 0 0 0 rgba(245,130,31,0); transition: box-shadow .2s, transform .15s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(245,130,31,.4); }
.cta-note { font-family: var(--mono); font-size: .72rem; color: var(--bone-38); letter-spacing: .04em; }

/* image slots */
.slot { background-image: var(--slot-img, none); background-size: cover;
  background-position: center; background-repeat: no-repeat; }
.slot--hero      { --slot-img: url('/assets/img/hero-dusk-aerial.webp'); }
.slot--hydrogen  { --slot-img: url('/assets/img/hydrogen-unit.webp'); }
.slot--battery   { --slot-img: url('/assets/img/battery-hall.webp'); }
.slot--nuclear   { --slot-img: url('/assets/img/nuclear-concept.webp'); }
.slot--hall      { --slot-img: url('/assets/img/data-hall.webp'); }
.slot--build     { --slot-img: url('/assets/img/build-install.webp'); }
.slot--ems       { --slot-img: url('/assets/img/ems-room.webp'); }
.slot--campus    { --slot-img: url('/assets/img/campus-ground.webp'); }
.slot--dcbus     { --slot-img: url('/assets/img/dc-busbar.webp'); }
.slot--campusnight { --slot-img: url('/assets/img/campus-night.webp'); }
.slot--dchall    { --slot-img: url('/assets/img/dc-hall-hero.webp'); }
.slot--integrated { --slot-img: url('/assets/img/integrated-campus.webp'); }

/* accent word in any headline */
.section em { color: var(--yellow); font-style: normal; }

/* full-bleed cinematic image section (shared pattern with the hero) */
.section--img { justify-content: center; }
.section--img .copy, .section--img .cta-row { position: relative; z-index: 3; }
.section--img .scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(14,16,15,.95) 0%, rgba(14,16,15,.72) 40%, rgba(14,16,15,.2) 78%, rgba(14,16,15,.5) 100%),
              linear-gradient(0deg, rgba(14,16,15,.8), transparent 58%); }
.section--img::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 220px 60px rgba(0,0,0,.55); }
.section--img h2 { font-size: clamp(2rem, 3.2vw, 3.6rem); max-width: 20ch; }
.section--img .lede { font-size: clamp(1.05rem, 1.15vw, 1.35rem); max-width: 46ch; }

/* proof list (integration / resilience) */
.proof { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.proof li { position: relative; padding-left: 22px; font-size: clamp(.98rem, 1vw, 1.15rem);
  color: var(--bone); max-width: 48ch; }
.proof li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px;
  border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.proposed-line { font-size: clamp(.95rem, 1vw, 1.12rem); color: var(--bone-60); margin-top: 4px; }
/* timeline over a full-bleed image: even dark scrim so all 4 steps read */
.s-timeline.section--img .scrim { background: linear-gradient(0deg, rgba(14,16,15,.94), rgba(14,16,15,.6) 55%, rgba(14,16,15,.86)); }
.s-timeline.section--img::after { box-shadow: inset 0 0 200px 40px rgba(0,0,0,.5); }
.s-timeline .copy, .s-timeline .timeline { position: relative; z-index: 3; }
.section--img.s-next .lede { max-width: 50ch; }

/* ── 01 HERO — full-bleed campus ── */
.s-hero { justify-content: center; padding-top: 8vh; padding-bottom: 8vh; }
.s-hero .copy { max-width: 34vw; min-width: 340px; gap: 18px; }
.s-hero h1 { font-size: clamp(2rem, 3vw, 4rem); line-height: 1.05; }
.s-hero .lede { font-size: clamp(1.05rem, 1.15vw, 1.4rem); max-width: 100%; }
.s-hero .cta { padding: 14px 28px; font-size: 1.02rem; }
.s-hero .scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(28,30,31,.9) 0%, rgba(28,30,31,.55) 42%, rgba(28,30,31,.15) 100%),
              linear-gradient(0deg, rgba(28,30,31,.85), transparent 55%); }
.s-hero .copy, .s-hero .cta-row { position: relative; z-index: 3; }
.s-hero h1 { max-width: 100%; }
.plate { position: absolute; right: 20px; bottom: 14px; z-index: 3;
  font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; color: var(--bone-38);
  text-transform: uppercase; }
/* labelled pins on the aerial */
.pins { position: absolute; z-index: 3; right: clamp(26px,5vw,80px); top: 46px;
  list-style: none; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.pin { font-family: var(--mono); font-size: .68rem; letter-spacing: .05em; color: var(--bone);
  display: flex; align-items: center; gap: 8px; background: rgba(28,30,31,.5);
  border: 1px solid var(--bone-line); border-radius: 20px; padding: 5px 12px; }
.pin .pd { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 7px var(--yellow); }
.pin-h2 .pd { background: var(--yellow); }
.pin-batt .pd { background: var(--copper); box-shadow: 0 0 7px var(--copper); }
.pin-hall .pd { background: var(--bone); box-shadow: 0 0 7px var(--bone); }
.pin-dc .pd { background: var(--red); box-shadow: 0 0 7px var(--red); }

/* ── 02 ONE VENDOR vs CHAOS ── */
.s-vs { justify-content: center; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  margin-top: 14px; max-width: 1100px; }
.vs figure { background: var(--panel); border: 1px solid var(--bone-line); border-radius: 12px;
  padding: 16px; text-align: center; }
.vs figure svg { width: 100%; height: auto; }
.vs figcaption { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--bone-60); margin-top: 8px; }
.vs-h24 { border-color: rgba(194,224,25,.4); }
.vs-arrow { font-size: 1.8rem; color: var(--yellow); }
.vs-run { animation: vs-run 3.2s ease-in-out infinite; }
@keyframes vs-run { 0%{ cx:78 } 100%{ cx:286 } }
.site-strip { margin-top: 10px; max-width: 1100px; width: 100%; align-self: center; }
.site-strip .thumb { aspect-ratio: 52 / 7; }
.site-strip figcaption { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bone-60); margin-top: 8px; text-align: center; }

/* ── 03 THE STACK ── */
.s-stack { justify-content: center; }
.stackrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 14px; }
.scard { background: var(--panel); border: 1px solid var(--bone-line); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.scard h3 { font-size: 1.02rem; font-weight: 700; }
.scard p { font-size: .84rem; color: var(--bone-60); line-height: 1.45; }
.thumb { width: 100%; aspect-ratio: 16/9; border-radius: 8px; background-color: var(--graphite-2);
  border: 1px solid var(--bone-line); }
.dc-svg { width: 100%; aspect-ratio: 16/9; display: grid; place-items: center;
  background: var(--graphite-2); border: 1px solid var(--bone-line); border-radius: 8px; padding: 8px; }
.dc-svg svg { width: 100%; height: 100%; }
.tag { font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--yellow); border: 1px solid rgba(194,224,25,.5); border-radius: 20px; padding: 2px 8px; }

/* ── 04 TIMELINE ── */
.s-timeline { justify-content: center; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 13px; left: 4%; right: 4%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 14px, transparent 14px 26px); }
.timeline li { position: relative; padding-top: 34px; }
.timeline li { padding-top: 44px; }
.timeline .tnum { position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--graphite); border: 2px solid var(--yellow); color: var(--yellow);
  font-family: var(--mono); font-size: .84rem; display: grid; place-items: center; }
.timeline::before { top: 17px; }
.timeline h3 { font-size: clamp(1.2rem, 1.4vw, 1.5rem); font-weight: 700; margin-bottom: 6px; }
.timeline p { font-size: clamp(.95rem, 1vw, 1.08rem); color: var(--bone-60); line-height: 1.5; }
.thumb--wide { aspect-ratio: 16/7; margin-top: 12px; }

/* ── 05 NEXT-GEN ── */
.s-next { justify-content: center; }
.nextrow { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; margin-top: 14px; }
.scard--nuc .thumb { aspect-ratio: 16/9; }
.smr-map { background: var(--panel); border: 1px solid var(--bone-line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.smr-map svg { width: 100%; height: auto; }
.smr-map figcaption { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--bone-60); }

/* ══ BOTTOM RAIL — yellow return line ═══════════════════════════ */
.rail-bottom {
  position: fixed; inset: auto 0 0 0; z-index: 40; height: var(--rail);
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  padding: 0 26px;
  background: linear-gradient(transparent, rgba(35,37,38,.82) 40%, var(--graphite));
}
.rail-bottom::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, #6E7A0E, var(--yellow) 20%, var(--yellow) 80%, #6E7A0E);
  box-shadow: 0 0 10px rgba(194,224,25,.5);
}
.rail-bottom .rail-spark.yl { top: 12px; bottom: auto; width: 5px; height: 5px; background: #fff;
  box-shadow: 0 0 7px 1px var(--yellow); opacity: .7; animation: spark-rl 17s linear infinite; }
@keyframes spark-rl { from{left:100%} to{left:0} }
.rb-group { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rb-h { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--yellow); }
.rb-contact a { font-size: .82rem; border-bottom: 1px solid transparent; }
.rb-contact a:hover { border-bottom-color: var(--yellow); }
.rb-company { flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.rb-tag { font-size: .82rem; color: var(--bone); }
.rb-cc { font-family: var(--mono); font-size: .6rem; color: var(--bone-38); }
.rb-tabs button, .rb-tabs a { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bone-60); }
.rb-tabs button:hover, .rb-tabs a:hover { color: var(--yellow); }
.rb-legal { flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.rb-disc { font-family: var(--mono); font-size: .56rem; letter-spacing: .03em; color: var(--bone-38); max-width: 36ch; }
.rb-links { display: flex; gap: 14px; align-items: center; }
.rb-links a, .rb-links button { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bone-60); }
.rb-links a:hover, .rb-links button:hover { color: var(--yellow); }
.rb-links #openContact { color: var(--yellow); }

/* ── contact modal (mailto submit) ── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,12,11,.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 2; width: min(92vw, 480px); background: var(--panel);
  border: 1px solid var(--bone-line); border-radius: 16px; padding: 28px clamp(22px,3vw,34px);
  box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.modal-x { position: absolute; top: 10px; right: 14px; font-size: 1.6rem; line-height: 1; color: var(--bone-60); }
.modal-x:hover { color: var(--yellow); }
.modal-card h2 { font-size: 1.7rem; margin: 4px 0 6px; }
.modal-sub { color: var(--bone-60); margin-bottom: 16px; }
.cform { display: flex; flex-direction: column; gap: 12px; }
.crow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cform input, .cform textarea { width: 100%; background: var(--graphite-2); color: var(--bone);
  border: 1px solid var(--bone-line); border-radius: 8px; padding: 11px 13px;
  font-family: var(--disp); font-size: .95rem; }
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--yellow); }
.cform textarea { resize: vertical; }
.cform .cta { margin-top: 4px; border: 0; cursor: pointer; }
.modal-alt { font-family: var(--mono); font-size: .66rem; color: var(--bone-38); margin-top: 6px; }
.modal-alt a { color: var(--bone-60); }
@media (max-width: 520px) { .crow { grid-template-columns: 1fr; } }

/* ══ nav buttons + counter ══════════════════════════════════════ */
.navbtns { position: fixed; right: 26px; bottom: calc(var(--rail) + 14px); z-index: 45;
  display: flex; align-items: center; gap: 10px;
  background: rgba(28,30,31,.7); border: 1px solid var(--bone-line); border-radius: 30px; padding: 6px 12px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.counter { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; color: var(--bone-60); }
.navbtns button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--bone-line);
  display: grid; place-items: center; transition: border-color .2s, transform .15s; }
.navbtns button:hover { border-color: var(--yellow); transform: translateY(-1px); }

/* ══ reduced motion ═════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .rail-spark, .zap, .vs-run, .spec-tag .led { animation: none !important; }
  .zap { display: none; }
  .section { transition: opacity .2s linear; transform: none; }
}

/* ══ MOBILE ≤820px — vertical stack ═════════════════════════════ */
@media (max-width: 820px) {
  body { overflow: auto; }
  .connector, .zap, .rail-spark, .navbtns { display: none; }
  .nodes { display: none; }
  .rail-top { position: sticky; height: 54px; }
  .stage { position: static; inset: auto; }
  .bay { height: auto; overflow: visible; }
  .section { position: static; opacity: 1; transform: none; pointer-events: auto;
    min-height: 88vh; padding: 30px 20px; border-bottom: 1px solid var(--bone-line); }
  .s-hero { min-height: 92vh; }
  .vs { grid-template-columns: 1fr; }
  .vs-arrow { transform: rotate(90deg); justify-self: center; }
  .stackrow { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .nextrow { grid-template-columns: 1fr; }
  .pins { position: static; align-items: flex-start; margin-top: 14px; }
  .rail-bottom { position: static; height: auto; flex-direction: column; align-items: flex-start;
    gap: 12px; padding: 22px 20px 30px; }
  .rb-company { align-items: flex-start; text-align: left; }
  .rb-legal { align-items: flex-start; text-align: left; }
}
@media (max-width: 480px) { .stackrow { grid-template-columns: 1fr; } }
