/* Web3 Pi Cluster Edition — one-pager */

:root {
  --bg: #0b0d10;
  --bg-2: #0f1215;
  --surface: #15191e;
  --surface-2: #1b2026;
  --line: #242a31;
  --line-2: #343b44;
  --text: #f3efe7;
  --muted: #a7adb6;
  --dim: #858b95;
  --red: #f05a4b;
  --red-deep: #b8322a;
  --gold: #cdbe96;
  --on-red: #f6f1e8;
  --on-red-soft: #f6e3df;
  --ink: #14100f;

  --f-display: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --f-text: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 24px;
  --maxw: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, dl, dd, ol, ul { margin: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto; }

.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px;
}
.skip:focus { left: 16px; }

kbd {
  font: 600 13px var(--f-mono);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
  padding: 2px 7px; color: var(--text);
}

/* ---------- type ---------- */

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 500 13px/1.2 var(--f-mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}
.eyebrow__num { color: var(--text); }
.eyebrow__num::after { content: " /"; color: var(--dim); }
.eyebrow--light { color: var(--on-red-soft); }

.display {
  font: 600 clamp(60px, 8.8vw, 152px)/.9 var(--f-display);
  letter-spacing: -.01em;
  margin: 0 0 28px;
}
.display__accent, .grad {
  background: linear-gradient(92deg, #f05a4b 0%, #f39a78 52%, #cdbe96 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.h2 {
  font: 600 clamp(40px, 5.4vw, 80px)/1 var(--f-display);
  letter-spacing: -.005em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.lead {
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 40em;
  text-wrap: pretty;
}

.mono-label {
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.fineprint { margin-top: 20px; font-size: 14px; color: var(--dim); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--red); color: var(--ink);
  font: 600 16px/1 var(--f-text);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 14px 40px -14px rgba(240, 90, 75, .75);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); background: #ff6b5c; box-shadow: 0 18px 50px -14px rgba(240, 90, 75, .9); }
.btn .ic { width: 18px; height: 18px; }
.btn__meta { font: 500 13px var(--f-mono); opacity: .7; }
.btn--ghost { background: rgba(255, 255, 255, .02); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, .06); box-shadow: none; }
.btn--small { padding: 10px 16px; font-size: 14px; }
[href="#film"] .ic use[href="#i-play"], .film__play use { fill: currentColor; }

/* ---------- nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 13, 16, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: min(var(--maxw), 100% - var(--gutter) * 2); margin-inline: auto;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  font: 600 19px/1 var(--f-display); letter-spacing: .01em;
}
.brand img { width: 18px; height: auto; }
.brand em {
  font: 500 11px/1 var(--f-mono); font-style: normal;
  letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
  margin-left: 6px;
}
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--text); background: rgba(255, 255, 255, .06); }

/* ---------- hero ---------- */

.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 44px;
  overflow: hidden;
}
.hero__media {
  position: absolute; top: 0; bottom: 0;
  /* anchored to the content column, bleeding a little past its right edge */
  right: calc((100% - min(100% - var(--gutter) * 2, var(--maxw))) / 2 - 5vw - 40px);
  width: min(60%, 1000px);
  display: flex; align-items: center;
  z-index: -2;
  will-change: transform;
}
.hero__video {
  width: 100%; height: auto; aspect-ratio: 1280 / 912;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 5%, #000 40%), linear-gradient(180deg, transparent 0%, #000 14%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 5%, #000 40%), linear-gradient(180deg, transparent 0%, #000 14%, #000 80%, transparent 100%);
  mask-composite: intersect;
}
.hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vw 34vw at 16% 52%, rgba(11, 13, 16, .78), transparent 72%),
    radial-gradient(60vw 40vw at 72% 64%, rgba(240, 90, 75, .13), transparent 70%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero__content { position: relative; }
.hero__content .lead { max-width: 33em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: 72px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero__stats div { padding-right: 16px; }
.hero__stats dt {
  font: 500 12px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.hero__stats dd { font: 600 clamp(32px, 3.4vw, 48px)/1.1 var(--f-display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.hero__stats .odo__unit { color: var(--gold); }

/* odometer digits */
.odo { display: inline-flex; align-items: flex-start; line-height: 1.12; }
.odo > span { height: 1.12em; }
.odo { position: relative; }
.odo__col { display: inline-flex; justify-content: center; align-items: flex-start; overflow: hidden; }
@supports (overflow: clip) { .odo__col { overflow-x: visible; overflow-y: clip; } }
.odo__strip {
  display: flex; flex-direction: column;
  transition: transform 1.9s cubic-bezier(.16, .84, .24, 1);
  transition-delay: calc(var(--k, 0) * 110ms);
  will-change: transform;
}
.odo__strip span { display: block; height: 1.12em; text-align: center; }

/* LED pips under the hero stats */
.pips { display: flex; gap: 3px; margin-top: 12px; max-width: 100%; }
.pips i {
  flex: 0 1 var(--pip-w, 8px); min-width: 2px; height: 4px; border-radius: 2px;
  background: var(--line-2);
  transition: background .35s, box-shadow .35s;
  transition-delay: calc(var(--i) * 40ms);
}
.pips.is-on i {
  background: var(--red); box-shadow: 0 0 8px rgba(240, 90, 75, .45);
  animation: pip 4.2s ease-in-out infinite;
  animation-delay: calc(2s + var(--i) * 70ms);
}
@keyframes pip {
  0%, 72%, 100% { background: var(--red); box-shadow: 0 0 8px rgba(240, 90, 75, .45); }
  80% { background: var(--gold); box-shadow: 0 0 12px rgba(205, 190, 150, .75); }
}
.hero__stats [data-pips] { cursor: default; }

/* ---------- sections ---------- */

.section { padding: clamp(80px, 9vw, 136px) 0; position: relative; }
.section--tight { padding: clamp(56px, 7vw, 100px) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 780px; margin-bottom: 56px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section__head--row .lead { max-width: 28em; }

/* ---------- film ---------- */

.film { padding-top: clamp(64px, 8vw, 120px); }
.film__layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.film__player {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 50px 140px -50px rgba(240, 90, 75, .45);
}
.film__player video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.film__overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .05), rgba(0, 0, 0, .5));
  transition: opacity .4s var(--ease);
}
.film__player.is-playing .film__overlay { opacity: 0; pointer-events: none; }
.film__play {
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: var(--ink);
  box-shadow: 0 0 0 0 rgba(240, 90, 75, .5);
  animation: ping 2.4s var(--ease) infinite;
  transition: transform .3s var(--ease);
}
.film__overlay:hover .film__play { transform: scale(1.06); }
.film__play .ic { width: 38px; height: 38px; margin-left: 5px; }
.film__overlay { grid-auto-flow: row; align-content: center; gap: 18px; }
.film__label {
  font: 600 17px var(--f-text); text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}
.film__label span { display: block; font: 500 12px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }

.chapters {
  list-style: none; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.chapters li + li { border-top: 1px solid var(--line); }
.chapters button {
  width: 100%; display: flex; gap: 14px; align-items: baseline;
  padding: 14px 18px; background: transparent; border: 0; cursor: pointer;
  text-align: left; color: var(--muted); font-size: 15px; line-height: 1.35;
  transition: background .2s, color .2s, box-shadow .2s;
}
.chapters button:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.chapters button.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--red); }
.chapters__t { font: 500 13px var(--f-mono); color: var(--dim); min-width: 36px; }
.chapters button.is-active .chapters__t { color: var(--red); }

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(240, 90, 75, .55); }
  70% { box-shadow: 0 0 0 22px rgba(240, 90, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 90, 75, 0); }
}

/* ---------- numbers ---------- */

.numbers {
  background: var(--red-deep); color: var(--on-red);
  padding: clamp(88px, 10vw, 140px) 0;
  position: relative; overflow: hidden;
}
.numbers::before {
  content: "x10"; position: absolute; right: -2vw; bottom: -6vw;
  font: 700 clamp(220px, 34vw, 520px)/1 var(--f-display);
  color: rgba(246, 241, 232, .06); pointer-events: none;
}
.numbers .h2 { margin-bottom: 56px; }
.numbers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 52px 56px; position: relative; }
.num { border-top: 2px solid #e08c83; padding-top: 24px; }
.num__v { font: 600 clamp(64px, 7.6vw, 120px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.num__v .odo { line-height: 1; }
.num__v .odo > span, .num__v .odo__strip span { height: 1em; }
.num { transition: border-color .4s; }
.num:hover { border-top-color: var(--on-red); }
.num__l { font: 600 22px/1.3 var(--f-text); margin-top: 10px; }
.num__s { font-size: 16px; color: var(--on-red-soft); margin-top: 6px; }

/* ---------- anatomy ---------- */

.anatomy { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.anatomy__figure {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #1b1b1b;
}
.spot {
  position: absolute; left: var(--x); top: var(--y);
  width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0;
  transform: translate(-50%, -50%);
  background: var(--red); color: var(--ink);
  font: 600 18px/40px var(--f-display); cursor: pointer;
  animation: ping 2.6s var(--ease) infinite;
  transition: transform .25s var(--ease), background .25s;
}
.spot:nth-of-type(2) { animation-delay: .3s; }
.spot:nth-of-type(3) { animation-delay: .6s; }
.spot:nth-of-type(4) { animation-delay: .9s; }
.spot:nth-of-type(5) { animation-delay: 1.2s; }
.spot.is-active { transform: translate(-50%, -50%) scale(1.22); background: var(--text); animation: none; box-shadow: 0 0 0 8px rgba(243, 239, 231, .18); }

.legend { list-style: none; padding: 0; }
.legend li {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 0; border-top: 1px solid var(--line);
  transition: opacity .3s;
  cursor: default;
}
.legend.has-active li:not(.is-active) { opacity: .38; }
.legend__n {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--red); color: var(--red);
  font: 600 17px/1 var(--f-display);
  transition: background .25s, color .25s;
}
.legend li.is-active .legend__n { background: var(--red); color: var(--ink); }
.legend__n--ghost { border-color: var(--line-2); color: var(--dim); }
.legend h3 { font: 600 19px/1.3 var(--f-text); margin-bottom: 3px; }
.legend p { color: var(--muted); font-size: 16px; line-height: 1.5; }

/* ---------- split layouts ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, .8);
}
.split__media img { width: 100%; transition: transform 1.2s var(--ease); }
.split__media:hover img { transform: scale(1.025); }
.split__body .lead { margin-bottom: 28px; }

.specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.specs div { padding: 14px 0; border-top: 1px solid var(--line); }
.specs dt { font: 500 12px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.specs dd { margin-top: 5px; font-size: 16px; }
.specs dd span { color: var(--dim); }
.specs dd span.nowrap { color: inherit; white-space: nowrap; }

.lcd-list { list-style: none; padding: 0; }
.lcd-list li { padding: 16px 0; border-top: 1px solid var(--line); }
.lcd-list li p:last-child { color: var(--muted); }
.chip {
  display: inline-flex; margin-top: 22px;
  font: 500 13px var(--f-mono); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px;
}

/* ---------- network ---------- */

.switches { display: flex; flex-direction: column; margin-bottom: 32px; }
.switches img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; aspect-ratio: 1280 / 540; object-fit: cover; object-position: 50% 15%; }
.switches__labels { order: -1; position: relative; height: 70px; }
.switches__labels span {
  position: absolute; left: var(--x); bottom: 0; transform: translateX(-50%);
  text-align: center; font: 500 11px/1.3 var(--f-mono); letter-spacing: .08em; color: var(--dim);
  text-transform: uppercase; white-space: nowrap;
}
.switches__labels b { display: block; font: 600 13px/1.3 var(--f-mono); letter-spacing: .02em; color: var(--text); }
.switches__labels span::after {
  content: ""; display: block; width: 1px; height: 18px; margin: 8px auto 0;
  background: linear-gradient(var(--red), rgba(240, 90, 75, 0));
}

.net { display: grid; grid-template-columns: 1fr; gap: 20px; }
.net__diagram {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 32px); display: grid; place-items: center;
}
.topo { width: 100%; height: auto; overflow: visible; }
.topo__links path { fill: none; stroke: #2a3038; stroke-width: 2; }
.topo__flow path {
  fill: none; stroke: url(#topo-grad); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 2 16;
  animation: flow 1.1s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -36; } }
.topo__node rect { fill: #1c2127; stroke: #343b44; stroke-width: 1.5; }
.topo__node--hot rect { fill: rgba(240, 90, 75, .1); stroke: var(--red); stroke-width: 2; }
.topo text { text-anchor: middle; fill: var(--text); }
.topo .t-strong { font: 600 22px var(--f-display); }
.topo .t-dim { font: 400 14px var(--f-text); fill: var(--dim); }
.topo .t-mono { font: 600 15px var(--f-mono); }
.topo__pis rect { fill: #1c2127; stroke: #343b44; stroke-width: 1.5; }
.topo__pis text { font: 600 16px var(--f-mono); }

.router {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center;
}
.router img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.router__body { padding: clamp(24px, 4vw, 56px); }
.router h3 { font: 600 clamp(28px, 3vw, 40px)/1.1 var(--f-display); margin-bottom: 12px; }
.router p:last-child { color: var(--muted); font-size: 16px; }

/* ---------- power ---------- */

.power-intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.power-intro .section__head { margin-bottom: 0; }
.power-intro__media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.power-intro__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 75% 50%; }

.sim {
  margin-top: clamp(48px, 6vw, 80px);
  background: linear-gradient(180deg, #13171b, #0f1215);
  border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(22px, 4vw, 44px);
}
.sim__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.sim__title { font: 600 clamp(26px, 2.6vw, 34px)/1.1 var(--f-display); margin-top: 4px; }
.sim[data-state="outage"] .sim__btn { background: var(--gold); box-shadow: 0 14px 40px -14px rgba(205, 190, 150, .7); }

.chain { display: flex; align-items: stretch; }
.chain__node {
  flex: 1 1 0; min-width: 0;
  background: #171b20; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 16px;
  transition: opacity .5s, filter .5s, border-color .5s, box-shadow .5s, background .5s;
}
.chain__node .ic { color: var(--gold); width: 22px; height: 22px; margin-bottom: 12px; }
.chain__k { font: 500 11px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.chain__v { font: 600 clamp(22px, 2.2vw, 30px)/1.15 var(--f-display); margin-top: 4px; white-space: nowrap; }
.chain__s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.chain__node--ups { border-color: rgba(240, 90, 75, .5); }
.chain__node--ups .ic { color: var(--red); }

.wire {
  flex: 0 0 clamp(18px, 3vw, 46px); align-self: center; height: 4px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--red) 0 9px, transparent 9px 18px);
  animation: wire .7s linear infinite;
  transition: opacity .4s;
}
@keyframes wire { from { background-position: 0 0; } to { background-position: 18px 0; } }

.sim[data-state="outage"] .chain__node[data-k="mains"],
.sim[data-state="outage"] .chain__node[data-k="strip"],
.sim[data-state="outage"] .chain__node[data-k="psu"] { opacity: .32; filter: grayscale(1); }
.sim[data-state="outage"] .chain__node[data-k="mains"] .chain__s { color: var(--red); }
.sim[data-state="outage"] .wire:not(.wire--out) { animation: none; background: #2a3038; opacity: .6; }
.sim[data-state="outage"] .wire--out { background: repeating-linear-gradient(90deg, var(--gold) 0 9px, transparent 9px 18px); }
.sim[data-state="outage"] .chain__node--ups {
  border-color: var(--gold); background: rgba(205, 190, 150, .08);
  box-shadow: 0 0 0 1px var(--gold), 0 20px 60px -20px rgba(205, 190, 150, .6);
}
.sim[data-state="outage"] .chain__node--ups .ic { color: var(--gold); animation: blink 1.2s ease-in-out infinite; }
.sim[data-state="outage"] .chain__node--ups .chain__s { color: var(--gold); }
.sim[data-state="outage"] .chain__node--pi { border-color: rgba(205, 190, 150, .5); }
@keyframes blink { 50% { opacity: .35; } }

.sim__log {
  list-style: none; padding: 0; margin-top: 28px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  counter-reset: step;
}
.sim__log li {
  counter-increment: step;
  font-size: 14px; line-height: 1.45; color: var(--muted);
  border-top: 2px solid var(--line); padding-top: 12px;
  opacity: .25; transform: translateY(6px);
  transition: opacity .5s, transform .5s var(--ease), border-color .5s;
}
.sim__log li::before { content: "0" counter(step) " "; font: 600 12px var(--f-mono); color: var(--dim); margin-right: 4px; }
.sim[data-state="outage"] .sim__log li { opacity: 1; transform: none; border-color: var(--gold); }
.sim[data-state="outage"] .sim__log li::before { color: var(--gold); }
.sim[data-state="outage"] .sim__log li:nth-child(2) { transition-delay: .35s; }
.sim[data-state="outage"] .sim__log li:nth-child(3) { transition-delay: .7s; }
.sim[data-state="outage"] .sim__log li:nth-child(4) { transition-delay: 1.05s; }

/* ---------- UPS ---------- */

.features { list-style: none; padding: 0; }
.features li { display: flex; gap: 16px; padding: 17px 0; border-top: 1px solid var(--line); }
.features .ic { color: var(--red); width: 26px; height: 26px; margin-top: 2px; }
.features h3 { font: 600 18px/1.3 var(--f-text); margin-bottom: 3px; }
.features p { color: var(--muted); font-size: 16px; line-height: 1.5; }

.sources { display: grid; grid-template-columns: 1fr 1.05fr 1fr; gap: 28px; margin-top: clamp(64px, 8vw, 112px); align-items: stretch; }
.sources__in { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.src {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.src .ic { color: var(--gold); width: 24px; height: 24px; }
.src h4 { font: 600 16px/1.3 var(--f-text); }
.src p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.sources__core {
  position: relative;
  background: radial-gradient(120% 80% at 50% 0%, #d6473b 0%, #a82b23 55%, #7f1f19 100%);
  color: var(--on-red); border-radius: var(--radius);
  padding: 32px 30px; display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 40px 100px -40px rgba(240, 90, 75, .7);
}
.sources__core::before, .sources__core::after {
  content: ""; position: absolute; top: 50%; width: 12px; height: 12px;
  border-top: 2px solid var(--red); border-right: 2px solid var(--red);
  transform: translateY(-50%) rotate(45deg);
}
.sources__core::before { left: -20px; }
.sources__core::after { right: -20px; border-color: var(--gold); }
.sources__core img { width: 26px; height: auto; margin-bottom: 18px; }
.sources__core h3 { font: 600 40px/1 var(--f-display); margin-bottom: 18px; }
.sources__core ul { list-style: none; padding: 0; }
.sources__core li { padding: 9px 0; border-top: 1px solid rgba(246, 241, 232, .24); font-size: 15px; color: var(--on-red-soft); }
.sources__out {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; justify-content: center;
}
.sources__big { font: 600 38px/1.05 var(--f-display); margin-top: 2px; }
.sources__mono { font: 600 17px var(--f-mono); color: var(--gold); margin: 6px 0 14px; }
.sources__out p:last-child { color: var(--muted); font-size: 15px; line-height: 1.55; }

.batteries { margin-top: 48px; }
.batteries__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.bat--used { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.bat__n { font: 600 16px var(--f-mono); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bat__n span { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.bat__bar { height: 8px; border-radius: 4px; background: #232830; margin: 14px 0 10px; overflow: hidden; }
.bat__bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease) .2s; }
.bat.is-in .bat__bar i { transform: scaleX(1); }
.bat__wh { font: 600 26px/1 var(--f-display); }

.remote { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.remote__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.remote__col h3 { font: 600 clamp(26px, 2.4vw, 32px)/1.1 var(--f-display); margin: 4px 0 10px; }
.remote__col > p:not(.mono-label) { color: var(--muted); font-size: 16px; }
.remote__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.remote__stats div { background: #11151a; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.remote__stats p { font-size: 14px; color: var(--muted); line-height: 1.4; }
.remote__stats .remote__v { font: 600 38px/1.05 var(--f-display); color: var(--red); margin-bottom: 4px; }
.remote__to { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.remote__to span { font: 500 11px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-right: 4px; }
.remote__to code { font: 500 13px var(--f-mono); background: #11151a; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cmds { list-style: none; padding: 0; margin-top: 18px; }
.cmds li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.cmds .ic { color: var(--red); }
.ups__more { margin-top: 32px; }
.ups__more a, .footer__links a {
  display: inline-flex; gap: 8px; align-items: center; text-decoration: none;
}
.ups__more a { color: var(--gold); border-bottom: 1px solid rgba(205, 190, 150, .35); padding-bottom: 2px; }
.ups__more a:hover { border-color: var(--gold); }
.ups__more .ic { width: 16px; height: 16px; }

/* ---------- software ---------- */

.soft { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.soft__facts div { padding: 16px 0; border-top: 1px solid var(--line); }
.soft__facts dt { font: 500 12px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.soft__facts dd { margin-top: 6px; font-size: 19px; }
.soft__facts dd span { color: var(--dim); }
.code {
  background: #0d1014; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, .9);
}
.code__bar { display: flex; gap: 8px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #12161b; }
.code__bar i { width: 11px; height: 11px; border-radius: 50%; background: #2c323b; }
.code__bar i:first-child { background: var(--red); }
.code__bar span { margin-left: 10px; font: 500 12px var(--f-mono); color: var(--dim); }
.code pre { margin: 0; padding: 24px 28px; overflow-x: auto; font: 400 15px/1.8 var(--f-mono); color: var(--text); }
.code .c { color: #7f8792; }
.code .k { color: var(--gold); }

/* ---------- deck viewer ---------- */

.deck { outline: none; }
.deck__stage-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line);
  box-shadow: 0 50px 140px -60px rgba(240, 90, 75, .35);
}
.deck__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; touch-action: pan-y; }
.deck__loading { position: absolute; inset: 0; display: grid; place-items: center; font: 500 14px var(--f-mono); color: var(--dim); }
.deck__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(11, 13, 16, .62); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--text); opacity: 0; transition: opacity .25s, background .25s;
}
.deck__nav:hover { background: rgba(11, 13, 16, .85); }
.deck__nav--prev { left: 16px; }
.deck__nav--next { right: 16px; }
.deck__stage-wrap:hover .deck__nav, .deck:focus-within .deck__nav { opacity: 1; }
.deck__nav[disabled] { opacity: 0 !important; pointer-events: none; }
.deck__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; flex-wrap: wrap; }
.deck__count { font: 500 14px var(--f-mono); color: var(--dim); }
.deck__cur { color: var(--text); }
.deck__title { font: 400 15px var(--f-text); color: var(--muted); margin-left: 12px; }
.deck__tools { display: flex; gap: 8px; }
.iconbtn {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--muted); font-size: 14px; line-height: 1;
  cursor: pointer; text-decoration: none; transition: color .2s, border-color .2s, background .2s;
}
.iconbtn .ic { width: 16px; height: 16px; }
.iconbtn:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.iconbtn[aria-pressed="true"] { color: var(--text); border-color: var(--red); }
.deck__notes {
  margin-bottom: 16px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: var(--muted); font-size: 15px; line-height: 1.65;
}
.deck__thumbs { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.thumb {
  position: relative; flex: 0 0 176px; aspect-ratio: 16 / 9; padding: 0;
  border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #000;
  cursor: pointer; scroll-snap-align: start; opacity: .5;
  transition: opacity .25s, border-color .25s;
}
.thumb:hover { opacity: .85; }
.thumb.is-active { opacity: 1; border-color: var(--red); }
.thumb__n {
  position: absolute; left: 6px; bottom: 4px; z-index: 2;
  font: 600 11px var(--f-mono); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .9);
}

.deck__stage-wrap:fullscreen { display: grid; place-items: center; border: 0; border-radius: 0; background: #000; }
.deck__stage-wrap:fullscreen .deck__stage { width: min(100vw, calc(100vh * 16 / 9)); }
.deck__stage-wrap:-webkit-full-screen { display: grid; place-items: center; border: 0; border-radius: 0; background: #000; width: 100%; height: 100%; }
.deck__stage-wrap:-webkit-full-screen .deck__stage { width: min(100vw, calc(100vh * 16 / 9)); }
.deck__stage-wrap.is-pseudo-fs {
  position: fixed; inset: 0; z-index: 120; border: 0; border-radius: 0;
  display: grid; place-items: center; background: #000;
}
.deck__stage-wrap.is-pseudo-fs .deck__stage { width: min(100vw, calc(100dvh * 16 / 9)); }
.deck__stage-wrap.is-pseudo-fs .deck__nav { opacity: 1; }

/* slide canvas — the deck's 1920 × 1080 slide format, scaled */
.slide-canvas {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0; transform: scale(var(--s, .5));
}
.slide-canvas.is-entering { animation: slideIn .45s var(--ease); }
@keyframes slideIn { from { opacity: 0; } to { opacity: 1; } }
.slide-canvas > section {
  position: absolute; inset: 0; width: 1920px; height: 1080px; overflow: hidden;
  font-size: 32px; line-height: 1.4; text-align: left; letter-spacing: normal;
}
.slide-canvas section * { margin: 0; box-sizing: border-box; }
.slide-canvas section div { display: flex; flex-direction: column; }
.slide-canvas section h1 { font-size: 96px; font-weight: 600; line-height: 1.1; }
.slide-canvas section h2 { font-size: 64px; font-weight: 600; line-height: 1.15; }
.slide-canvas section h3 { font-size: 44px; font-weight: 600; line-height: 1.2; }
.slide-canvas section p { font-size: 32px; line-height: 1.4; }
.slide-canvas section ul, .slide-canvas section ol { padding-left: 1.25em; }
.slide-canvas section table { border-collapse: collapse; width: 100%; }
.slide-canvas section th, .slide-canvas section td {
  padding: .35em .6em; text-align: left; vertical-align: top; font-weight: 400;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.slide-canvas section th { font-weight: 600; }
.slide-canvas section img { display: block; max-width: none; }
.slide-canvas section aside { display: none; }
.slide-canvas x-icon, .slide-canvas x-shape { display: block; flex: none; }
.slide-canvas x-icon svg, .slide-canvas x-shape svg { display: block; width: 100%; height: 100%; }

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: clamp(180px, 20vw, 290px); gap: 14px; }
.g {
  position: relative; padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  background: #111; cursor: zoom-in;
}
.g--wide { grid-column: span 2; grid-row: span 2; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.g:hover img { transform: scale(1.045); }
.g span {
  position: absolute; left: 12px; bottom: 12px;
  font: 500 12px var(--f-mono); letter-spacing: .04em;
  background: rgba(11, 13, 16, .72); color: var(--text);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 6px 10px; border-radius: 8px;
}

.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(5, 6, 8, .94);
  display: grid; place-items: center;
  padding: 64px 72px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 140px); border-radius: 12px; object-fit: contain; }
.lightbox__close, .lightbox__nav {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: var(--text);
}
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__cap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font: 500 13px var(--f-mono); color: var(--muted); }

/* ---------- specs table ---------- */

.bom { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.bom table { width: 100%; border-collapse: collapse; }
.bom th, .bom td { text-align: left; padding: 18px 22px; border-top: 1px solid var(--line); vertical-align: baseline; }
.bom thead th { border-top: 0; font: 500 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); background: #12161b; }
.bom tbody th { font-weight: 600; width: 22%; }
.bom td { color: var(--muted); }
.bom .num-col { text-align: right; width: 90px; }
.bom td.num-col { font: 600 24px/1 var(--f-display); color: var(--text); }
.bom tbody tr { transition: background .2s; }
.bom tbody tr:hover { background: rgba(255, 255, 255, .025); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--line); padding: clamp(72px, 9vw, 120px) 0 36px; position: relative; overflow: hidden; }
.footer::before {
  content: ""; position: absolute; inset: auto 0 -40% 0; height: 80%; pointer-events: none;
  background: radial-gradient(50% 60% at 30% 100%, rgba(240, 90, 75, .14), transparent 70%);
}
.footer__inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; position: relative; }
.footer__brand { display: flex; align-items: flex-end; gap: 28px; }
.footer__brand img { width: 36px; height: auto; margin-bottom: 10px; }
.footer__big { font: 600 clamp(52px, 7.4vw, 116px)/.92 var(--f-display); }
.footer__big span {
  background: linear-gradient(92deg, #f05a4b 0%, #f39a78 52%, #cdbe96 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__links { display: flex; flex-direction: column; gap: 12px; }
.footer__links a { color: var(--muted); font-size: 16px; }
.footer__links a:hover { color: var(--text); }
.footer__links .ic { width: 15px; height: 15px; }
.footer__fine {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim); position: relative;
}

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

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

@media (max-width: 1080px) {
  .film__layout { grid-template-columns: 1fr; }
  .chapters { display: grid; grid-template-columns: 1fr 1fr; }
  .chapters li + li { border-top: 0; }
  .chapters li { border-bottom: 1px solid var(--line); }
  .chapters li:nth-child(odd) { border-right: 1px solid var(--line); }
  .chapters li:nth-last-child(-n+2) { border-bottom: 0; }
  .anatomy { grid-template-columns: 1fr; }
  .net { grid-template-columns: 1fr; }
  .sources { grid-template-columns: 1fr; gap: 16px; }
  .sources__core::before, .sources__core::after { display: none; }
  .soft { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero { min-height: auto; padding: 76px 0 40px; justify-content: flex-start; }
  .hero__media { position: relative; top: auto; right: auto; bottom: auto; width: calc(100% + 8vw); margin: 0 -4vw 8px; }
  .hero__video {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 72%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 72%, transparent 100%);
  }
  .hero__stats { grid-template-columns: repeat(3, 1fr); row-gap: 20px; margin-top: 48px; }
  .split, .power-intro { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .numbers__grid { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
  .remote { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .sim__log { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .brand em { display: none; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stats div:last-child { grid-column: span 2; }
  .numbers__grid { grid-template-columns: 1fr; gap: 32px; }
  .specs { grid-template-columns: 1fr; }
  .router { grid-template-columns: 1fr; }
  .switches__labels { height: 62px; }
  .spot { width: 28px; height: 28px; font-size: 14px; line-height: 28px; }
  .switches__labels span { font-size: 9px; }
  .switches__labels b { font-size: 10px; }
  .chain { flex-direction: column; }
  .wire { flex: 0 0 22px; width: 4px; height: auto; background: repeating-linear-gradient(180deg, var(--red) 0 7px, transparent 7px 14px); animation-name: wire-v; }
  .sim[data-state="outage"] .wire--out { background: repeating-linear-gradient(180deg, var(--gold) 0 7px, transparent 7px 14px); }
  @keyframes wire-v { from { background-position: 0 0; } to { background-position: 0 14px; } }
  .chain__node { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; column-gap: 12px; padding: 14px 16px; }
  .chain__node .ic { margin: 0; grid-row: span 2; }
  .chain__k { grid-column: 2; }
  .chain__v { grid-column: 3; grid-row: 1 / span 2; font-size: 24px; }
  .chain__s { grid-column: 2; }
  .sim__log { grid-template-columns: 1fr; }
  .batteries__row, .remote__stats { grid-template-columns: 1fr; }
  .chapters { grid-template-columns: 1fr; }
  .chapters li:nth-child(odd) { border-right: 0; }
  .chapters li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .deck__tools .iconbtn span { display: none; }
  .deck__title { display: none; }
  .thumb { flex-basis: 132px; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .g--wide { grid-column: auto; grid-row: span 1; }
  .bom th, .bom td { padding: 14px 12px; font-size: 14px; }
  .bom thead th:nth-child(2) { display: none; }
  .bom tbody th { width: auto; }
  .bom tbody tr { display: grid; grid-template-columns: 1fr auto; }
  .bom tbody td:not(.num-col) { grid-column: 1 / -1; grid-row: 2; padding-top: 0; border-top: 0; }
  .bom tbody td.num-col { grid-column: 2; grid-row: 1; }
  .bom thead tr { display: grid; grid-template-columns: 1fr auto; }
  .lightbox { padding: 56px 12px; }
  .lightbox__nav { top: auto; bottom: 14px; transform: none; }
  .footer__brand { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (hover: none) {
  .deck__nav { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .spot, .film__play, .topo__flow path, .wire, .sim[data-state="outage"] .chain__node--ups .ic, .pips.is-on i { animation: none; }
  .bat__bar i { transform: none; transition: none; }
  .slide-canvas.is-entering { animation: none; }
}
