/* IVORX site. Fonts are self-hosted (SIL OFL): no requests to third parties. */
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(fonts/cormorant-italic-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-style: italic; font-weight: 300 700; font-display: swap; src: url(fonts/cormorant-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/cormorant-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Cormorant'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/cormorant-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(fonts/montserrat-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 200 700; font-display: swap; src: url(fonts/montserrat-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(fonts/jetbrains-mono-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens: colors from the IVORX.pro logo ---------- */
:root {
  color-scheme: dark;
  --black: #0a0a0b;
  --ink-2: #111113;
  --surface: #151517;
  --surface-2: #1b1b1e;
  --ivory: #f3f0e8;
  --muted: #a8a49b;
  --faint: #77736b;
  --line: rgb(243 240 232 / .10);
  --line-2: rgb(243 240 232 / .18);
  --gold: #d4bf8e;
  --gold-2: #b89d63;
  --gold-deep: #7d6a43;
  --gold-glow: rgb(212 191 142 / .35);
  --on-gold: #17130a;
  --ok: #8fd19e;
  --bad: #f08a7e;
  --info: #9db7d6;

  --wrap: 76rem;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);

  accent-color: var(--gold);
  scrollbar-color: var(--gold-deep) var(--black);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--black); color: var(--ivory);
  font-family: var(--sans); font-weight: 400; font-size: 1rem; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--on-gold); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
em { font-style: italic; color: var(--gold); }
p, li { text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.icon { inline-size: 1.1em; block-size: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.overline {
  display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem;
  font: 500 .72rem/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}
.overline .line { inline-size: 2.5rem; block-size: 1px; background: var(--gold); }

/* ---------- Pills (outline buttons) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-block-size: 3rem; padding: .75rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ivory); background: transparent;
  font: 500 .82rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: border-color .25s, background-color .25s, color .25s;
}
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill .icon { transition: translate .25s var(--ease); }
.pill:hover .icon { translate: .2rem 0; }
.pill-gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.pill-gold:hover { background: var(--ivory); border-color: var(--ivory); color: var(--on-gold); }
.pill-lg { min-block-size: 3.6rem; padding-inline: 2.2rem; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 30; transition: background-color .3s, border-color .3s; border-block-end: 1px solid transparent; }
.site-header.is-solid { background: rgb(10 10 11 / .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-block-end-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 2rem; block-size: 4.5rem; overflow: hidden; }
.header-inner > * { flex-shrink: 0; white-space: nowrap; }
.logo { display: block; }
.logo-img { block-size: 1.9rem; inline-size: auto; }
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 1rem; }
.menu-button {
  display: inline-flex; align-items: center; gap: .55rem; min-block-size: 2.75rem; padding: .5rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ivory);
  font: 500 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; anchor-name: --menu-button;
}
.site-menu {
  position: fixed; inset: auto; inset-block-start: 4.75rem; inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1.25rem; inline-size: min(84dvw, 20rem); max-block-size: calc(100dvh - 6rem); overflow: auto;
  margin: .6rem 0 0; padding: .6rem; list-style: none; color: var(--ivory);
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 1rem;
}
.site-menu a:not(.pill) { display: flex; align-items: center; min-block-size: 2.9rem; padding: .3rem 1rem; color: var(--muted); text-decoration: none; font-size: .95rem; border-radius: .6rem; }
.site-menu a:not(.pill):hover { color: var(--ivory); background: var(--surface); }
.site-menu .menu-cta { padding: .5rem .2rem .2rem; margin-block-start: .4rem; border-block-start: 1px solid var(--line); }
.site-menu .menu-cta .pill { inline-size: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .site-menu { transition: opacity .2s, translate .2s var(--ease), display .2s, overlay .2s; transition-behavior: allow-discrete; }
  .site-menu:not(:popover-open) { opacity: 0; translate: 0 -.4rem; }
  @starting-style { .site-menu:popover-open { opacity: 0; translate: 0 -.4rem; } }
}
.site-header.is-wide .menu-button, .site-header.is-wide .menu-cta { display: none; }
.site-header.is-wide .site-menu {
  position: static; display: flex; align-items: center; gap: .3rem; inline-size: auto; max-block-size: none; overflow: visible;
  margin: 0; padding: 0; border: 0; background: transparent; opacity: 1; translate: none;
}
.site-header.is-wide .site-menu a:not(.pill) { min-block-size: 2.5rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.site-header.is-wide .site-menu a:not(.pill):hover { background: transparent; color: var(--gold); }
.is-measuring * { transition: none !important; }
@media (width < 34em) { .site-header:not(.is-wide) .header-cta { display: none; } }

/* ---------- Language switcher (EH-58v): a popover in the header (no JS), plain links in the footer ---------- */
.lang-button {
  display: inline-flex; align-items: center; justify-content: center; min-block-size: 2.75rem; min-inline-size: 2.75rem; padding: .5rem .75rem;
  border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ivory);
  font: 500 .75rem/1 var(--sans); letter-spacing: .12em; cursor: pointer; anchor-name: --lang-button;
}
.lang-button:hover { border-color: var(--gold); color: var(--gold); }
.lang-menu {
  position: fixed; inset: auto; inset-block-start: 4.75rem; inset-block-start: anchor(--lang-button bottom);
  inset-inline-end: 1.25rem; min-inline-size: 11rem; margin: .6rem 0 0; padding: .4rem; list-style: none; color: var(--ivory);
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 1rem;
}
.lang-menu a { display: flex; align-items: center; min-block-size: 2.75rem; padding: .3rem 1rem; color: var(--muted); text-decoration: none; font-size: .95rem; border-radius: .6rem; }
.lang-menu a:hover { color: var(--ivory); background: var(--surface); }
.lang-menu a[aria-current], .foot-lang a[aria-current] { color: var(--gold); }
.foot .foot-lang { gap: .6rem 1.2rem; }
/* Phones: logo, language and menu must fit in 360 px. The menu word stays for screen readers. */
@media (width < 26em) {
  .header-inner { gap: 1rem; }
  .site-nav { gap: .5rem; }
  .site-header:not(.is-wide) .menu-button { padding-inline: .8rem; }
  .site-header:not(.is-wide) .menu-button span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-nav > .pill:not(.header-cta) { display: none; }
}

/* ---------- Hero: night city ---------- */
.hero { position: relative; min-block-size: max(100svh, 46rem); display: grid; align-content: start; overflow: clip; isolation: isolate;
  background: radial-gradient(70rem 40rem at 70% 110%, rgb(212 191 142 / .10), transparent 60%), linear-gradient(180deg, #08080a 0%, #0d0d10 55%, #121216 100%); }
.hero-copy { position: relative; z-index: 2; padding-block: clamp(7rem, 15vh, 9.5rem) 0; }
.hero h1 { font-size: clamp(2.8rem, 1.2rem + 5.2vw, 6.6rem); font-weight: 300; line-height: .98; letter-spacing: -.025em; }
.hero h1 em { font-weight: 400; }
.hero-lead { max-inline-size: 34rem; margin: 1.8rem 0 0; color: var(--muted); font-size: clamp(.98rem, .92rem + .2vw, 1.08rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-block-start: 2.2rem; }

.city { position: relative; z-index: 1; margin-block-start: -3rem; block-size: min(46vh, 30rem); font-size: clamp(7px, .62vw, 11px); pointer-events: none; }
.city::after { content: ""; position: absolute; inset: auto 0 0; block-size: 5rem; background: linear-gradient(transparent, #121216); }
.moon { position: absolute; inset-block-start: -26vh; inset-inline-end: 12%; inline-size: 7rem; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f7f1e1, #d9cba8 60%, #b9a47a); box-shadow: 0 0 6rem 1rem rgb(243 230 200 / .12); opacity: .85; }
@media (width < 52em) { .moon { display: none; } }
.towers { position: absolute; inset: auto 0 0; display: flex; align-items: flex-end; justify-content: center; gap: 2.2em; padding-inline: 2em; }
.tower {
  display: grid; grid-template-columns: repeat(var(--cols), 1.4em); grid-auto-rows: 1.8em; gap: .75em;
  padding: 1.6em 1.3em 0; background: linear-gradient(180deg, #17171b, #101013); border: 1px solid rgb(243 240 232 / .05); border-block-end: 0;
}
.tower i { display: block; position: relative; background: #1a1a1e; border-radius: 1px; }
/* Each window is a dark pane with light layers on top; only their opacity animates.
   The resting state is the end of the blackout, so reduced motion shows it at once. */
.tower i.on::before, .tower i.bk::after { content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0; }
.tower i.on::before { background: rgb(233 206 150 / .55); box-shadow: 0 0 .6em rgb(233 206 150 / .25); }
/* Power bank, LED bulb or lantern: dimmer and warmer light. */
.tower i.bk::after { background: rgb(222 146 66 / .34); box-shadow: 0 0 .5em rgb(222 146 66 / .16); opacity: var(--o, .8); }
.tower i.lit { background: var(--gold); box-shadow: 0 0 1.2em .3em var(--gold-glow), 0 0 4em 1em rgb(212 191 142 / .18); }
@media (prefers-reduced-motion: no-preference) {
  .tower i.on::before { animation: lights-out .9s ease-in var(--d, 1s) both; }
  .tower i.on.fk::before { animation: lights-out-flicker 1.3s linear var(--d, 1s) both; }
  .tower i.bk::after { animation: backup-on 1.2s ease-out var(--b, 2s) both; }
  .tower i.bk.fl::after { animation: backup-on 1.2s ease-out var(--b, 2s) both, candle 2.8s ease-in-out calc(var(--b, 2s) + 1.2s) infinite; }
  .tower i.lit { animation: glow 3.6s ease-in-out 3.6s infinite; }
}
@keyframes lights-out { from { opacity: 1; } }
@keyframes lights-out-flicker { 0% { opacity: 1; } 18% { opacity: .3; } 30% { opacity: .85; } 48% { opacity: .1; } 60% { opacity: .45; } 78%, 100% { opacity: 0; } }
@keyframes backup-on { from { opacity: 0; } }
@keyframes candle { 0%, 100% { opacity: var(--o, .8); } 30% { opacity: calc(var(--o, .8) * .78); } 55% { opacity: calc(var(--o, .8) * .92); } 75% { opacity: calc(var(--o, .8) * .7); } }
@keyframes glow { 50% { box-shadow: 0 0 1.6em .45em var(--gold-glow), 0 0 6em 1.4em rgb(212 191 142 / .22); } }
@media (width < 52em) { .tower:nth-child(1), .tower:nth-child(8) { display: none; } }
@media (width < 34em) { .tower:nth-child(2), .tower:nth-child(3) { display: none; } .hero { min-block-size: auto; } .city { block-size: 20rem; margin-block-start: 1rem; font-size: 7px; } }
.callout { position: absolute; display: flex; align-items: center; gap: .8rem; inset-inline-start: var(--x, 60%); inset-block-start: var(--y, 40%); opacity: 0; font-size: 1rem; }
.callout.is-placed { opacity: 1; transition: opacity .8s 3.8s; }
@media (prefers-reduced-motion: reduce) { .callout.is-placed { transition: none; } }
.callout-line { inline-size: 4rem; block-size: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.callout-text { font: 500 .7rem/1.5 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.callout-text b { display: block; font: 400 1.6rem/1 var(--mono); letter-spacing: 0; color: var(--gold); margin-block-end: .3rem; }
@media (width < 40em) { .callout { display: none; } }

/* ---------- Facts ---------- */
.facts { border-block: 1px solid var(--line); background: #121216; }
.facts ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(50%, 9.5rem), 1fr)); margin-block: 0; padding: 0; list-style: none; }
.facts li { display: grid; gap: .3rem; padding: 1.8rem 1.2rem; border-inline-start: 1px solid var(--line); }
.facts li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts b { font-size: 1.6rem; font-weight: 500; color: var(--gold); line-height: 1; }
.facts span { color: var(--muted); font-size: .85rem; }

/* ---------- Chapters ---------- */
.chapter { padding-block: clamp(5rem, 12vw, 10rem); }
.chapter-no { margin: 0; font: 300 clamp(4rem, 2rem + 6vw, 8rem)/.8 var(--serif); color: transparent; -webkit-text-stroke: 1px var(--gold-deep); }
.chapter-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-block-end: clamp(3rem, 6vw, 5rem); }
.chapter-head h2 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.8rem); font-weight: 300; }

.problem-grid { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.drain { margin: 0; display: grid; grid-template-columns: auto auto; gap: 1.6rem; align-items: stretch; align-self: center; }
.drain-cell { position: relative; inline-size: 5.5rem; block-size: 22rem; border: 1px solid var(--gold-deep); border-radius: 1rem; padding: .45rem; }
.drain-cell::before { content: ""; position: absolute; inset-block-start: -.6rem; inset-inline-start: 50%; translate: -50% 0; inline-size: 1.8rem; block-size: .5rem; border: 1px solid var(--gold-deep); border-block-end: 0; border-radius: .3rem .3rem 0 0; }
.drain-fill { position: absolute; inset: .45rem; border-radius: .6rem; transform-origin: bottom; scale: 1 .12;
  background: linear-gradient(180deg, var(--bad), color-mix(in srgb, var(--bad) 40%, var(--gold-deep))); }
.drain figcaption { display: grid; grid-template-rows: auto auto 1fr auto auto; font-size: .78rem; color: var(--faint); letter-spacing: .06em; }
.drain figcaption .mono { color: var(--ivory); font-size: 1.1rem; }
.drain figcaption span:nth-child(3) { align-self: end; }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes drain { from { scale: 1 1; background: linear-gradient(180deg, var(--gold), var(--gold-2)); } 60% { background: linear-gradient(180deg, var(--gold), var(--gold-2)); } }
    .drain-fill { animation: drain linear both; animation-timeline: view(); animation-range: cover 15% cover 65%; }
  }
}
@media (width < 62em) { .drain { display: none; } .problem-grid { grid-template-columns: auto 1fr; } }
.huge { font-size: clamp(6rem, 2rem + 16vw, 16rem); font-weight: 300; line-height: .8; letter-spacing: -.04em; color: var(--ivory); }
.huge .mono-num { color: var(--gold); font-style: italic; }
.statement { max-inline-size: 40rem; margin: 2.4rem 0 0; font: 300 clamp(1.3rem, 1rem + 1vw, 1.9rem)/1.45 var(--serif); color: var(--muted); }
.statement em { color: var(--ivory); }
@media (width < 40em) { .problem-grid, .chapter-head { grid-template-columns: 1fr; } .chapter-no { font-size: 3.5rem; } }

/* ---------- Day story ---------- */
.day { background: linear-gradient(180deg, var(--black), #0e0e11 30%, #0e0e11 70%, var(--black)); }
.story { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.story-stage { position: sticky; top: 6rem; }
.moments { margin: 0; padding: 0; list-style: none; }
.moment { min-block-size: 62vh; display: grid; align-content: center; padding-inline-start: 2rem; border-inline-start: 1px solid var(--line); transition: border-color .4s; }
.moment time { font-size: .85rem; color: var(--faint); letter-spacing: .1em; transition: color .4s; }
.moment h3 { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); font-weight: 300; margin-block: .4rem .8rem; color: var(--faint); transition: color .4s; }
.moment p { margin: 0; max-inline-size: 26rem; color: var(--faint); transition: color .4s; }
.moment.is-current { border-color: var(--gold); }
.moment.is-current time { color: var(--gold); }
.moment.is-current h3 { color: var(--ivory); }
.moment.is-current p { color: var(--muted); }
@media (width < 56em) {
  .story { grid-template-columns: 1fr; }
  .story-stage { top: 4.75rem; z-index: 2; background: #0e0e11; padding-block: .5rem; }
  .moment { min-block-size: 46vh; }
}

.console { position: relative; padding: 1.2rem; border: 1px solid var(--line-2); border-radius: 1.4rem; background: linear-gradient(180deg, #141417, #0f0f12); box-shadow: 0 40px 80px -40px #000; }
.console-head { display: flex; align-items: center; justify-content: space-between; margin-block-end: .9rem; }
.console-title { display: flex; align-items: baseline; gap: .7rem; margin: 0; font: 500 .7rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }
.clock { font-size: 1.4rem; letter-spacing: 0; color: var(--ivory); }
.demo-tag { padding: .3rem .7rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .65rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.status { padding: .75rem .9rem; border-radius: .8rem; margin-block-end: .9rem; border: 1px solid color-mix(in srgb, var(--state) 40%, transparent); background: color-mix(in srgb, var(--state) 9%, transparent); transition: border-color .4s, background-color .4s; }
.status b { display: block; font-weight: 600; font-size: .9rem; color: var(--state); transition: color .4s; }
.status small { display: block; color: var(--muted); font-size: .8rem; }
.flow { position: relative; aspect-ratio: 1 / .86; }
.flow svg.lines { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
.flow .wire { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 1 6; stroke-linecap: round; }
.flow .pulse { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 13; opacity: 0; transition: opacity .4s; stroke: var(--gold); }
.flow .pulse.grid { stroke: var(--info); }
.flow .pulse.bat, .flow .pulse.home { stroke: var(--ok); }
.flow .pulse.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .flow .pulse.on { animation: flow 1s linear infinite; } .flow .pulse.rev { animation-direction: reverse; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
.node {
  position: absolute; translate: -50% -50%; inline-size: 34%; min-inline-size: 6.6rem;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 .6rem; padding: .55rem .7rem;
  border-radius: .8rem; background: #131316; border: 1px solid var(--line-2); transition: border-color .4s;
}
.node .icon { grid-row: span 2; inline-size: 1.3rem; block-size: 1.3rem; color: var(--faint); transition: color .4s; }
.node .lbl { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.node .val { font: 500 .92rem/1.2 var(--mono); white-space: nowrap; }
.node[data-active="true"] { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.node[data-active="true"] .icon { color: var(--c); }
.node[data-active="false"] .val { color: var(--faint); }
.node[data-off="true"] { --c: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.node[data-off="true"] .icon, .node[data-off="true"] .val { color: var(--bad); }
.node.sun { --c: var(--gold); left: 18%; top: 11%; } .node.grid { --c: var(--info); left: 82%; top: 11%; }
.node.bat { --c: var(--ok); left: 18%; top: 89%; } .node.home { --c: var(--ok); left: 82%; top: 89%; }
.node.boiler { --c: var(--gold); left: 82%; top: 50%; }
.hub {
  position: absolute; left: 38%; top: 50%; translate: -50% -50%; inline-size: 30%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: .2rem; text-align: center;
  background: radial-gradient(circle, #1d1a14, #121214 70%); border: 1px solid var(--gold-deep);
  box-shadow: 0 0 0 .6rem rgb(212 191 142 / .04), 0 0 3rem rgb(212 191 142 / .12);
}
.hub-lbl { font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.soc { font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem); line-height: 1; }
.soc small { font-size: .45em; color: var(--muted); }
.eta { font-size: .66rem; color: var(--muted); line-height: 1.3; max-inline-size: 7rem; }
@media (width < 30em) { .node { min-inline-size: 6.4rem; padding: .4rem .5rem; gap: 0 .4rem; } .node .val { font-size: .74rem; } .node .lbl { font-size: .6rem; } .node .icon { inline-size: 1.1rem; block-size: 1.1rem; } .eta { display: none; } }

/* ---------- Products triptych ---------- */
.triptych { display: flex; min-block-size: 38rem; border-block: 1px solid var(--line); }
.panel {
  position: relative; flex: 1 1 0; display: flex; flex-direction: column; gap: 1rem; padding: clamp(2rem, 4vw, 3.5rem); overflow: hidden; isolation: isolate;
  border-inline-start: 1px solid var(--line); transition: flex-grow .6s var(--ease), background-color .6s;
}
.panel:first-child { border-inline-start: 0; }
.panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(30rem 20rem at 50% 30%, rgb(212 191 142 / .09), transparent 70%); opacity: 0; transition: opacity .6s; }
.panel:hover, .panel:focus-within { flex-grow: 1.5; background: #0f0f12; }
.panel:hover::before, .panel:focus-within::before { opacity: 1; }
.panel-art { flex: 1; display: grid; place-items: center; min-block-size: 14rem; max-block-size: 18rem; }
.panel-art svg { block-size: 12rem; }
.panel-art svg { inline-size: min(100%, 17rem); fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.panel-art .soft { stroke: rgb(212 191 142 / .4); }
.panel-art .glow { fill: var(--gold); stroke: none; filter: drop-shadow(0 0 6px var(--gold)); }
.panel-art .glow-line { stroke-width: 2.4; filter: drop-shadow(0 0 4px var(--gold-glow)); }
.panel-art .num { fill: var(--ivory); stroke: none; font: 400 30px var(--mono); }
.panel-kicker { margin: 0; font: 500 .72rem/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.panel h3 { font-size: clamp(1.9rem, 1.4rem + 1.2vw, 2.6rem); font-weight: 300; }
.panel p:not(.panel-kicker) { margin: 0; color: var(--muted); max-inline-size: 26rem; font-size: .95rem; }
.panel .pill { align-self: flex-start; margin-block-start: .6rem; }
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }
@media (width < 56em) { .triptych { flex-direction: column; } .panel { border-inline-start: 0; border-block-start: 1px solid var(--line); } .panel:first-child { border-block-start: 0; } .panel:hover, .panel:focus-within { flex-grow: 1; } }

/* ---------- Savings ---------- */
.savings-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
@media (width < 56em) { .savings-grid { grid-template-columns: 1fr; } }
.big-figure { display: flex; align-items: flex-end; gap: 1.4rem; flex-wrap: wrap; }
.figure { font-size: clamp(5.5rem, 2rem + 14vw, 15rem); font-weight: 300; line-height: .78; letter-spacing: -.06em; color: var(--gold);
  background: linear-gradient(180deg, #efe1bd, var(--gold) 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.figure-unit { font: 300 clamp(1.3rem, 1rem + 1vw, 2rem)/1.3 var(--serif); padding-block-end: .6rem; }
.figure-unit .muted { font-family: var(--mono); font-size: .9rem; }
.calc { display: grid; gap: 2rem; }
.field { display: grid; gap: .8rem; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .9rem; }
.field-top output { color: var(--ivory); white-space: nowrap; }
.hint { font-size: .8rem; color: var(--faint); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; inline-size: 100%; block-size: 1.75rem; margin: 0; background: transparent; cursor: pointer;
  --track: linear-gradient(90deg, var(--gold) var(--p, 50%), var(--line-2) var(--p, 50%));
}
input[type="range"]::-webkit-slider-runnable-track { block-size: 2px; background: var(--track); border-radius: 2px; }
input[type="range"]::-moz-range-track { block-size: 2px; background: var(--line-2); border-radius: 2px; }
input[type="range"]::-moz-range-progress { block-size: 2px; background: var(--gold); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; inline-size: 1.25rem; block-size: 1.25rem; margin-block-start: calc(-.625rem + 1px); border-radius: 50%; background: var(--black); border: 1px solid var(--gold); box-shadow: 0 0 0 4px rgb(212 191 142 / .12); }
input[type="range"]::-moz-range-thumb { inline-size: 1.25rem; block-size: 1.25rem; border-radius: 50%; background: var(--black); border: 1px solid var(--gold); box-shadow: 0 0 0 4px rgb(212 191 142 / .12); }
input[type="range"]:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; }

/* ---------- Compatibility and FAQ ---------- */
.details-ch { border-block-start: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(3rem, 8vw, 8rem); }
@media (width < 56em) { .two-col { grid-template-columns: 1fr; } }
.small-h { font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); font-weight: 300; margin-block-end: 2rem; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; border-block-end: 1px solid var(--line); }
.state { font: 500 .68rem/1.9 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.state.dim { color: var(--faint); }
.note { margin-block-start: 1.2rem; font-size: .9rem; }
.accordion details { border-block-end: 1px solid var(--line); }
.accordion summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 4rem; cursor: pointer; font: 400 clamp(1.2rem, 1rem + .6vw, 1.5rem)/1.3 var(--serif); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; flex-shrink: 0; inline-size: 2rem; block-size: 2rem; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; font: 300 1.1rem/1 var(--sans); color: var(--gold); transition: rotate .3s var(--ease); }
.accordion details[open] > summary::after { rotate: 45deg; }
.accordion details p { margin: 0; padding-block-end: 1.4rem; color: var(--muted); max-inline-size: 38rem; }
details::details-content { interpolate-size: allow-keywords; overflow: clip; contain: layout; }
details:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) { details::details-content { transition: block-size .35s ease-in-out, content-visibility .35s; transition-behavior: allow-discrete; } }
@media (prefers-reduced-motion: reduce) { .accordion summary::after { transition: none; } }

/* ---------- Finale ---------- */
.finale { position: relative; overflow: clip; padding-block: clamp(7rem, 16vw, 12rem); text-align: center; isolation: isolate; border-block-start: 1px solid var(--line); }
.finale-window { position: absolute; z-index: -1; inset-inline-start: 50%; inset-block-start: 50%; translate: -50% -50%; inline-size: min(70vw, 46rem); aspect-ratio: 1.3;
  background: radial-gradient(closest-side, rgb(212 191 142 / .22), rgb(212 191 142 / .06) 60%, transparent); filter: blur(10px); }
.finale-in { display: grid; justify-items: center; gap: 1.6rem; }
.finale h2 { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.8rem); font-weight: 300; }
.finale p { margin: 0; max-inline-size: 36rem; color: var(--muted); }
.finale .fine { font-size: .8rem; color: var(--faint); }

/* ---------- Footer ---------- */
.foot { padding-block: 3rem; border-block-start: 1px solid var(--line); font-size: .85rem; }
.foot-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.foot-logo { block-size: 2.2rem; inline-size: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.foot a { text-decoration: none; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.foot a:hover { color: var(--gold); }

/* ---------- Document page ---------- */
.doc { width: min(100% - 2.5rem, 44rem); margin-inline: auto; padding-block: 8rem 5rem; }
.doc h1 { overflow-wrap: break-word; hyphens: auto; font-size: clamp(2.6rem, 1.8rem + 3vw, 4.4rem); font-weight: 300; margin-block-end: 1.4rem; }
.doc h2 { font-size: 1.8rem; font-weight: 400; margin-block: 2.6rem .8rem; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-inline-start: 1.2rem; display: grid; gap: .4rem; }
.doc .meta { display: inline-block; padding: .35rem .9rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .78rem; letter-spacing: .1em; }
.doc h3 { font-size: 1.15rem; font-weight: 500; color: var(--ivory); margin-block: 1.8rem .5rem; }
.doc ol { padding-inline-start: 1.4rem; display: grid; gap: .4rem; }
.doc a { color: var(--gold); text-underline-offset: .2em; }
.doc .draft { margin-block: 1.2rem; padding: 1rem 1.2rem; border: 1px solid var(--gold-deep); border-radius: .8rem; background: var(--surface); color: var(--ivory); }
.doc .todo { color: var(--gold); font-weight: 500; }
.doc .table-wrap { overflow-x: auto; margin-block: 1rem; }
.doc table { inline-size: 100%; border-collapse: collapse; font-size: .9rem; }
.doc th, .doc td { padding: .6rem .7rem; text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); color: var(--muted); }
.doc th { color: var(--ivory); font-weight: 500; border-block-end-color: var(--line-2); }

/* ---------- Scroll reveal (decorative, progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal { from { opacity: 0; translate: 0 2rem; } }
    .reveal { animation: reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  }
}

@media (forced-colors: active) {
  .pill, .node, .console, .panel { border: 1px solid CanvasText; }
  .tower i.lit { background: Highlight; }
}
.doc .email-reveal { font: inherit; color: var(--gold); background: none; border: 0; padding: 0; text-decoration: underline dotted; text-underline-offset: .2em; cursor: pointer; }
.doc .email-reveal:hover, .doc .email-reveal:focus-visible { color: var(--ivory); }
