/* ==========================================================
   Автономія — лендинг (макет v0.1)
   Структура: токени → база → шапка → hero → секції → форма
   ========================================================== */

:root {
  --bg: #060608;
  --bg-2: #0b0b10;
  --panel: #0f0f15;
  --line: #1f1f27;
  --line-2: #2e2e38;
  --ink: #f3efe7;
  --muted: #8e8a83;
  --dim: #5a5751;
  --amber: #ff6a13;
  --amber-2: #ffa24a;
  --glow: #ffd7a1;
  --cool: #7fd8ff;
  --red: #ff4a3d;
  --ok: #7dffa8;

  --pad: clamp(16px, 4vw, 56px);
  --maxw: 1280px;
  --r: 20px;

  --f-display: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-brand: "Unbounded", var(--f-display);
  --ease: cubic-bezier(.6, .1, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  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");
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 300; letter-spacing: -.025em; }
p { margin: 0; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; }
.muted { color: var(--muted); }
::selection { background: var(--amber); color: #000; }

/* placeholder the owner still has to fill in */
.tbd {
  border-bottom: 1px dashed var(--amber-2);
  color: var(--amber-2);
  cursor: help;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px;
  font: 500 15px/1 var(--f-display);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .3s, border-color .3s, color .3s, box-shadow .3s, transform .3s;
  white-space: nowrap;
}
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-fill {
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: #160800;
  box-shadow: 0 0 0 0 rgba(255,106,19,.0), 0 10px 40px -10px rgba(255,106,19,.6);
}
.btn-fill:hover { box-shadow: 0 0 0 4px rgba(255,106,19,.18), 0 14px 50px -10px rgba(255,106,19,.8); }
.btn-line { border-color: rgba(255,106,19,.55); color: var(--ink); background: rgba(255,106,19,.04); }
.btn-line:hover { border-color: var(--amber); background: rgba(255,106,19,.12); }
.btn-ghost { color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-wide { width: 100%; }

/* ---------- header ---------- */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 18px var(--pad);
  transition: background .4s, backdrop-filter .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.hdr.scrolled {
  background: rgba(6,6,8,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-color: var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font: 300 21px/1 var(--f-brand);
  letter-spacing: -.02em;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255,106,19,.5);
  box-shadow: 0 0 18px rgba(255,106,19,.35) inset;
}
.logo-mark svg { width: 14px; height: 14px; fill: var(--amber-2); }
.nav { display: flex; gap: 34px; margin: 0 auto; }
.nav a { font-size: 14px; color: #cfcac1; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.hdr-cta { height: 40px; font-size: 14px; padding: 0 18px; }
.burger { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 3vw, 56px);
  padding: 120px var(--pad) 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; z-index: -1;
  right: -10%; top: 10%;
  width: 70vw; height: 70vw;
  background: radial-gradient(closest-side, rgba(255,106,19,.13), transparent 70%);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.rib { fill: none; opacity: .42; }
.rib-hl { fill: none; stroke: #ffcf9a; stroke-width: 1.2; opacity: .35; }
.rib-pulse {
  fill: none; stroke: #fff0d8; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 4 96;
  animation: ribflow 7s linear infinite;
  filter: drop-shadow(0 0 6px #ff8a2a);
}
@keyframes ribflow { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 13px/1 var(--f-mono);
  color: #bdb8ae;
  margin-bottom: 28px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(255,106,19,.6);
  animation: ping 2s infinite;
}
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255,106,19,0); } 100% { box-shadow: 0 0 0 0 rgba(255,106,19,0); } }

h1 {
  font-size: clamp(40px, 5.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 300;
}
.glow-word {
  color: #4a4741;
  transition: color .2s;
}
.glow-word.on {
  color: #fff4e2;
  text-shadow: 0 0 18px rgba(255,170,90,.75), 0 0 60px rgba(255,106,19,.45);
  animation: flick .9s steps(1) 1;
}
.lead {
  margin-top: 26px;
  font-size: clamp(16px, 1.25vw, 18px);
  color: #bdb8ae;
  max-width: 520px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* scene status card */
.status {
  margin-top: 44px;
  max-width: 460px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(20,20,26,.8), rgba(12,12,16,.8));
  backdrop-filter: blur(10px);
}
.status-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.grid-off { color: var(--red); display: inline-flex; align-items: center; gap: 8px; }
.grid-off i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: blink 1.2s steps(2) infinite; }
.status-main { display: flex; align-items: center; gap: 14px; }
.batt {
  position: relative; flex: none;
  width: 44px; height: 22px;
  border: 1.5px solid #4a4741; border-radius: 5px; padding: 2px;
}
.batt::after { content: ""; position: absolute; right: -5px; top: 6px; width: 3px; height: 7px; border-radius: 0 2px 2px 0; background: #4a4741; }
.batt i {
  display: block; height: 100%; width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  box-shadow: 0 0 10px rgba(255,106,19,.6);
  transition: width 1.2s var(--ease);
}
.status-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.status-txt b { font-weight: 500; font-size: 18px; }
.status-txt span { font-size: 13px; color: var(--muted); }
.switch { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.sw {
  width: 42px; height: 24px; border-radius: 99px;
  background: #24242c; position: relative;
  transition: background .3s;
}
.sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #8e8a83; transition: transform .3s var(--ease), background .3s;
}
.switch input:checked + .sw { background: rgba(255,106,19,.35); }
.switch input:checked + .sw::after { transform: translateX(18px); background: var(--amber-2); box-shadow: 0 0 12px var(--amber); }
.switch input:focus-visible + .sw { outline: 2px solid var(--amber-2); outline-offset: 2px; }

/* ---------- apartment illustration ---------- */
.hero-art { position: relative; z-index: 1; }
.apt { width: 100%; height: auto; display: block; }
.apt .room { fill: #08080b; }
.apt .b { fill: none; stroke: #2a2a33; stroke-width: 1.5; }
.apt .s {
  fill: none; stroke: #2f2f39; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.apt .slab { fill: url(#hatch); }
.apt .city { fill: #101119; stroke: #1d1e27; stroke-width: 1; }
.apt .candle { fill: #ff9a45; opacity: .55; animation: candle 2.4s infinite; }
@keyframes candle { 0%,100% { opacity: .55; } 40% { opacity: .3; } 60% { opacity: .65; } }

.apt .wires path {
  fill: none; stroke: #1e1e26; stroke-width: 1.3;
  stroke-dasharray: 3 5;
  transition: stroke .8s;
}
.apt.energized .wires path { stroke: rgba(255,140,60,.38); }

/* contour tracers: cloned from .s by JS, drawn when the device powers on */
.tr, .tr2 {
  fill: none !important;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--ease);
}
.tr { stroke: var(--settle, var(--amber-2)); stroke-width: 1.6; }
.tr2 { stroke: var(--amber); stroke-width: 6; opacity: .12; }
.on .tr, .on .tr2 { stroke-dashoffset: 0; }
.on .tr { animation: settle 2.6s forwards; }
.on .tr2 { animation: settle2 2.6s forwards; }
@keyframes settle { 0%, 45% { stroke: #ffc27a; } 100% { stroke: var(--settle, var(--amber-2)); } }
@keyframes settle2 { 0%, 45% { opacity: .22; } 100% { opacity: var(--settle-o, .08); } }
.apt .dev { --settle: #d98f52; }
.apt .struct { --settle: #4b3a2b; --settle-o: 0; }
.tr.ice { --settle: var(--cool); }

.apt .roomlight, .apt .cone, .apt .tvglow, .apt .burnglow { opacity: 0; transition: opacity 1.4s; }
.apt .roomlight.on, .apt .cone.on { opacity: 1; animation: flick .9s steps(1) 1; }
.apt .cone-sm.on { opacity: .7; }
.apt .tvglow.on { opacity: 1; animation: tvflick 5s infinite; }
.apt .burnglow.on { opacity: 1; animation: burn 2s ease-in-out infinite alternate; }
@keyframes flick { 0% { opacity: .2; } 12% { opacity: 1; } 20% { opacity: .35; } 34% { opacity: 1; } 42% { opacity: .6; } 55%, 100% { opacity: 1; } }
@keyframes tvflick { 0%,100% { opacity: 1; } 30% { opacity: .7; } 33% { opacity: 1; } 70% { opacity: .85; } }
@keyframes burn { from { opacity: .7; } to { opacity: 1; } }

.apt .halo { opacity: 0; transition: opacity .8s; }
.apt .on .halo { opacity: 1; animation: flick .9s steps(1) 1; }
.apt .bulb { fill: #24242a; transition: fill .3s; }
.apt .on .bulb { fill: #fff6e6; }

.apt .scr { fill: #111116; stroke: #2f2f39; stroke-width: 1.2; transition: fill .6s; }
.apt .on .scr { fill: #1f1206; stroke: #ff8a2a; }
.apt .scrtxt { font: 500 12px var(--f-mono); fill: var(--amber-2); text-anchor: middle; opacity: 0; transition: opacity .5s .4s; }
.apt .on .scrtxt { opacity: 1; }
.apt .lbl { font: 500 8px var(--f-mono); letter-spacing: .12em; fill: #3a3a44; text-anchor: middle; transition: fill .6s; }
.apt .lbl-sm { font-size: 9px; letter-spacing: 0; }
.apt .on .lbl { fill: #c98a55; }
.apt .led { fill: #24242a; transition: fill .4s; }
.apt .on .ledg { fill: var(--ok); }
.apt .on .led:not(.ledg):not(.ledc):not(.blink) { fill: var(--amber-2); }
.apt .on .ledc { fill: var(--cool); }
.apt .on .blink { fill: var(--ok); animation: blink 1s steps(2) infinite; }
.apt .on .b2 { animation-duration: .7s; }
.apt .on .b3 { animation-duration: 1.4s; }
@keyframes blink { 50% { opacity: .2; } }

.apt .cell { fill: #15151b; stroke: #2a2a33; stroke-width: 1; transition: fill .5s, stroke .5s; }
.apt .on .cell { fill: rgba(255,122,32,.85); stroke: #ffa24a; }
.apt .on .cell-top { fill: rgba(255,122,32,.45); }

.apt .coolfill { fill: var(--cool); opacity: 0; transition: opacity 1s; }
.apt .on .coolfill { opacity: .06; }
.apt .flame { fill: var(--amber); opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .5s; }
.apt .on .flame { opacity: 1; animation: flame .5s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(.85, .8); } to { transform: scale(1.05, 1.1); } }
.apt .ovenwin { fill: var(--amber); opacity: 0; transition: opacity 1s; }
.apt .on .ovenwin { opacity: .3; }
.apt .on .burner + .tr { --settle: #ff6a13; }
.apt .steam { fill: none; stroke: #b9b2a6; stroke-width: 1.4; stroke-linecap: round; opacity: 0; }
.apt .on .steam { animation: steam 2.8s ease-out infinite; }
.apt .on .st2 { animation-delay: 1.3s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 35% { opacity: .55; } 100% { opacity: 0; transform: translateY(-16px); } }
.apt .screen, .apt .tvpic { opacity: 0; transition: opacity .6s; }
.apt .on .screen { opacity: 1; animation: tvflick 5s infinite; }
.apt .on .tvpic { opacity: 1; }

.apt .p {
  fill: none; stroke: #fff0d6; stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 3 47;
  opacity: 0; transition: opacity .6s;
  animation: pulse 2.6s linear infinite;
}
.apt .p.on { opacity: 1; }
.apt .p[data-dev="bat"] { animation-duration: 1.2s; }
@keyframes pulse { from { stroke-dashoffset: 50; } to { stroke-dashoffset: 0; } }

/* chips under the illustration */
.powered {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  justify-content: center;
}
.powered li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 99px;
  border: 1px solid var(--line);
  font: 400 12px/1 var(--f-mono); color: var(--dim);
  transition: color .5s, border-color .5s, background .5s;
}
.powered li i { width: 6px; height: 6px; border-radius: 50%; background: #2a2a32; transition: background .4s, box-shadow .4s; }
.powered li.on { color: var(--ink); border-color: rgba(255,106,19,.35); background: rgba(255,106,19,.06); }
.powered li.on i { background: var(--amber-2); box-shadow: 0 0 10px var(--amber); }

/* ---------- sections ---------- */
.sec {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 110px) var(--pad) 0;
}
.sec-head { position: relative; margin-bottom: clamp(36px, 5vw, 64px); }
/* the "wire" above each section head with a spark running along it */
.sec-head::before {
  content: ""; display: block; height: 1px; margin-bottom: 26px;
  background: linear-gradient(90deg, var(--line-2), var(--line) 60%, transparent);
}
.sec-head::after {
  content: ""; position: absolute; top: -1px; left: 0;
  width: 60px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #ffd2a0, transparent);
  filter: drop-shadow(0 0 6px var(--amber));
  opacity: 0;
}
.sec-head.in::after { animation: spark 2.2s var(--ease) .2s forwards; }
@keyframes spark { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 60px); opacity: 0; } }
.sec-num { font: 400 13px/1 var(--f-mono); color: var(--amber-2); margin-bottom: 18px; letter-spacing: .06em; }
h2 { font-size: clamp(30px, 3.8vw, 56px); line-height: 1.06; max-width: 900px; }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* segmented toggle */
.seg {
  position: relative; display: inline-flex; margin-top: 30px;
  padding: 4px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--panel);
}
.seg button {
  position: relative; z-index: 1;
  height: 40px; padding: 0 20px;
  background: none; border: 0; border-radius: 99px;
  font: 500 14px var(--f-display); color: var(--muted);
  cursor: pointer; transition: color .3s;
}
.seg button[aria-pressed="true"] { color: #170800; }
.seg-ind {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  border-radius: 99px;
  background: #8e8a83;
  transition: transform .45s var(--ease), width .45s var(--ease), background .45s;
}
.seg.is-on .seg-ind { background: linear-gradient(135deg, var(--amber-2), var(--amber)); box-shadow: 0 0 24px rgba(255,106,19,.5); }

/* problem cards */
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pcard {
  position: relative; overflow: hidden;
  padding: 24px 22px 26px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color .8s, background .8s, opacity .9s var(--ease), transform .9s var(--ease);
}
.pcard::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255,140,60,.16), transparent 60%);
  opacity: 0; transition: opacity 1s;
}
.pcard > * { position: relative; z-index: 1; }
.pcard.on { border-color: rgba(255,106,19,.32); }
.pcard.on::before { opacity: 1; }
.ico { width: 44px; height: 44px; display: block; margin-bottom: 20px; overflow: visible; --settle: var(--amber-2); }
.ico .s { fill: none; stroke: #4a4741; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico .ray { opacity: 0; transition: opacity .4s; }
.pcard.on .ico .ray { opacity: 1; }
.ico .tr2 { stroke-width: 5; }

.swap { display: grid; }
.swap > * { grid-area: 1 / 1; transition: opacity .5s, transform .5s var(--ease); }
.swap > .t-on { opacity: 0; transform: translateY(8px); }
.pcard.on .swap > .t-on { opacity: 1; transform: none; transition-delay: .25s; }
.pcard.on .swap > .t-off { opacity: 0; transform: translateY(-8px); }
.pcard h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 6px; }
.pcard p { color: var(--muted); font-size: 15px; }

/* steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 9px);
}
.steps::after {
  content: ""; position: absolute; left: 22px; top: 21px; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  box-shadow: 0 0 12px var(--amber);
  border-radius: 3px;
  transition: width 2.4s var(--ease) .3s;
}
.steps.in::after { width: calc(100% - 44px); }
.steps li { position: relative; }
.sn {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font: 300 16px/1 var(--f-brand);
  background: var(--bg); border: 1px solid rgba(255,106,19,.5); color: var(--amber-2);
  margin-bottom: 22px;
}
.steps h3 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15px; }

/* price line under the steps */
.price-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  margin-top: 48px; padding: 22px 26px;
  border: 1px solid rgba(255,106,19,.35); border-radius: 20px;
  background: radial-gradient(80% 140% at 0% 50%, rgba(255,106,19,.12), transparent 70%), var(--panel);
}
.price-row p { font-size: 18px; }
.price-row b { font-weight: 500; }

/* faq */
.faq { border-top: 1px solid var(--line); max-width: 960px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 24px 0;
  font-size: clamp(17px, 1.6vw, 21px); font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--amber-2);
  font: 300 20px/1 var(--f-display);
  transition: transform .4s var(--ease), background .3s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: rgba(255,106,19,.12); }
.faq details p { padding: 0 48px 26px 0; color: var(--muted); max-width: 760px; }

/* cta + form */
.cta {
  position: relative; overflow: hidden;
  max-width: var(--maxw); margin: clamp(64px, 8vw, 110px) auto 0;
  padding: clamp(32px, 5vw, 72px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px);
  border-top: 1px solid var(--line);
}
.cta-glow {
  position: absolute; z-index: -1; left: -10%; bottom: -40%;
  width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(255,106,19,.18), transparent 70%);
}
.cta h2 { font-size: clamp(34px, 4.6vw, 66px); }
.glow-text { color: #fff1dc; text-shadow: 0 0 20px rgba(255,170,90,.6), 0 0 60px rgba(255,106,19,.35); }
.contacts { list-style: none; padding: 0; margin: 34px 0 0; }
.contacts li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }

.form {
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line-2); border-radius: 24px;
  background: linear-gradient(180deg, rgba(20,20,26,.9), rgba(10,10,14,.9));
}
.form > label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.form input[type="text"], .form input[type="tel"], .form input[type="email"] {
  height: 50px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: #0a0a0e; color: var(--ink);
  font: 400 16px var(--f-display);
  transition: border-color .3s, box-shadow .3s;
}
.form input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,106,19,.15); }
.form input.err { border-color: var(--red); }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.radios, .pick { display: flex; flex-wrap: wrap; gap: 8px; }
.radios label, .pick label { cursor: pointer; }
.radios input, .pick input { position: absolute; opacity: 0; pointer-events: none; }
.radios span, .pick span {
  display: inline-block; padding: 9px 15px; border-radius: 99px;
  border: 1px solid var(--line-2); font-size: 14px; color: #cfcac1;
  transition: border-color .3s, background .3s, color .3s;
}
.radios input:checked + span, .pick input:checked + span {
  border-color: var(--amber); background: rgba(255,106,19,.14); color: var(--ink);
}
.radios input:focus-visible + span, .pick input:focus-visible + span { outline: 2px solid var(--amber-2); outline-offset: 2px; }
.form-msg { font-size: 14px; color: var(--amber-2); min-height: 1.4em; }

/* footer */
.ftr {
  max-width: var(--maxw); margin: 80px auto 0;
  padding: 32px var(--pad) 40px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 14px;
}

.mbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav { gap: 22px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .steps::before, .steps::after { display: none; }
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 104px; min-height: auto; gap: 0; }
  /* on narrow screens the animated flat goes right under the headline */
  .hero-copy { display: contents; }
  .hero .kicker { order: 1; }
  .hero h1 { order: 2; }
  .hero-art { order: 3; margin-top: 28px; }
  .hero .lead { order: 4; }
  .hero .cta-row { order: 5; }
  .hero .status { order: 6; margin-top: 32px; }
  .status { max-width: none; }
  .cta { grid-template-columns: 1fr; }

  .nav {
    position: fixed; top: 64px; left: 12px; right: 12px;
    flex-direction: column; gap: 0;
    padding: 8px 18px;
    border: 1px solid var(--line-2); border-radius: 18px;
    background: rgba(10,10,14,.96); backdrop-filter: blur(14px);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .3s, transform .3s var(--ease);
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .hdr.nav-open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .hdr.nav-open { background: rgba(6,6,8,.9); }
  .hdr-cta { margin-left: auto; }
  .burger {
    display: grid; place-content: center; gap: 6px;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line-2); background: none; cursor: pointer;
  }
  .burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s; }
  .hdr.nav-open .burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .hdr.nav-open .burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
}

@media (max-width: 640px) {
  .hdr { gap: 12px; padding-top: 14px; padding-bottom: 14px; }
  .hdr-cta { display: none; }
  .burger { margin-left: auto; }
  .logo { font-size: 18px; }
  .hero { padding-top: 92px; gap: 28px; }
  .kicker { font-size: 11px; margin-bottom: 20px; }
  .cta-row .btn { flex: 1 1 auto; }
  .status-main { flex-wrap: wrap; }
  .switch { margin-left: 0; }
  .pgrid { gap: 10px; }
  .pcard { padding: 18px 16px 20px; }
  .ico { width: 36px; height: 36px; margin-bottom: 14px; }
  .pcard h3 { font-size: 16px; }
  .pcard p { font-size: 13px; line-height: 1.45; }
  .price-row { padding: 20px; }
  .price-row .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; row-gap: 22px; }
  .steps li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
  .steps .sn { grid-row: span 2; width: 40px; height: 40px; margin: 0; }
  .steps h3 { font-size: 18px; margin-bottom: 4px; }
  .price-row { margin-top: 32px; }
  .faq details p { padding-right: 0; }
  .contacts li { grid-template-columns: 100px 1fr; }
  .ftr { padding-bottom: 96px; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(6,6,8,.9); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mbar .btn { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}


/* ==========================================================
   Автономія — світла версія (підключається ПІСЛЯ style.css)
   Сторінка біла й читабельна; анімована квартира лишається
   темною «вітриною», бо це сцена відключення.
   ========================================================== */

:root {
  --bg: #fbfaf7;
  --bg-2: #f4f1ea;
  --panel: #ffffff;
  --line: #e8e3da;
  --line-2: #d8d1c5;
  --ink: #17140f;
  --muted: #5c564c;
  --dim: #8f887c;
  --amber: #f2620a;
  --amber-2: #c9560b;   /* темніший помаранчевий — для дрібного тексту на білому */
  --red: #d93a2b;
}

body { font-size: 17px; }
body::after { display: none; }              /* без «зерна» на білому */
h1, h2 { font-weight: 400; }
::selection { color: #fff; }

/* ---------- buttons ---------- */
.btn-fill {
  background: linear-gradient(135deg, #ff9a4d, #ff6a13);
  color: #1a0b00;
  box-shadow: 0 10px 30px -12px rgba(242,98,10,.55);
}
.btn-fill:hover { box-shadow: 0 0 0 4px rgba(242,98,10,.15), 0 14px 36px -12px rgba(242,98,10,.7); }
.btn-line { border-color: rgba(242,98,10,.6); background: #fff; }
.btn-line:hover { background: #fff3ea; }
.btn-ghost { background: #fff; }

/* ---------- header ---------- */
.hdr.scrolled { background: rgba(251,250,247,.88); }
.nav a { color: #3d3830; }
.logo-mark { border-color: rgba(242,98,10,.45); box-shadow: none; background: #fff3ea; }
.logo-mark svg { fill: var(--amber); }

/* ---------- hero ---------- */
.hero::before { background: radial-gradient(closest-side, rgba(255,140,60,.16), transparent 70%); }
.rib { opacity: .5; }
.rib-hl { stroke: #ffb27a; opacity: .5; }
.rib-pulse { stroke: #ff7a1a; filter: drop-shadow(0 0 5px rgba(255,122,26,.6)); }
.kicker { color: #6b655b; }
.lead { color: #4b463e; }
.glow-word { color: #d3ccc0; }
.glow-word.on {
  color: var(--amber);
  text-shadow: 0 0 28px rgba(255,140,60,.35);
}

.status {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 20px 40px -30px rgba(40,25,10,.35);
  backdrop-filter: none;
}
.batt { border-color: #bdb5a8; }
.batt::after { background: #bdb5a8; }
.batt i { box-shadow: none; }
.sw { background: #e3ddd3; }
.switch input:checked + .sw { background: rgba(242,98,10,.3); }
.switch input:checked + .sw::after { background: var(--amber); box-shadow: none; }

/* the flat stays a dark "night window" — restore dark tokens inside it */
.hero-art {
  --bg: #060608; --bg-2: #0b0b10; --panel: #0f0f15;
  --line: #1f1f27; --line-2: #2e2e38;
  --ink: #f3efe7; --muted: #8e8a83; --dim: #5a5751;
  --amber: #ff6a13; --amber-2: #ffa24a; --red: #ff4a3d;
  padding: clamp(12px, 1.6vw, 22px) clamp(12px, 1.6vw, 22px) clamp(16px, 1.8vw, 24px);
  border-radius: 28px;
  background: #08080b;
  box-shadow: 0 40px 80px -40px rgba(40,20,5,.55), 0 0 0 1px rgba(0,0,0,.04);
}

/* ---------- sections ---------- */
.sec-head::after { background: linear-gradient(90deg, transparent, var(--amber), transparent); filter: none; }

.seg { background: #fff; }
.seg-ind { background: #2a2620; }
.seg button[aria-pressed="true"] { color: #fff; }
.seg.is-on button[aria-pressed="true"] { color: #1a0b00; }
.seg.is-on .seg-ind { background: linear-gradient(135deg, #ff9a4d, #ff6a13); box-shadow: 0 8px 20px -8px rgba(242,98,10,.6); }

.pcard { background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.pcard::before { background: radial-gradient(120% 80% at 0% 0%, rgba(255,140,60,.14), transparent 60%); }
.pcard.on { border-color: rgba(242,98,10,.35); box-shadow: 0 20px 40px -28px rgba(242,98,10,.45); }
.ico { --settle: var(--amber); }
.ico .s { stroke: #b9b1a4; }
.ico .tr2 { opacity: .1; }
.pcard p { color: var(--muted); }

.sn { background: #fff; color: var(--amber); }
.steps::after { box-shadow: none; }

.price-row { background: radial-gradient(80% 140% at 0% 50%, rgba(255,140,60,.12), transparent 70%), #fff; }

.faq summary::after { background: #fff; }
.faq details[open] summary::after { background: #fff3ea; }

/* ---------- cta + form ---------- */
.cta {
  background: var(--bg-2); border-radius: 32px; border-top: 0;
  margin-left: max(var(--pad), calc((100% - var(--maxw)) / 2));
  margin-right: max(var(--pad), calc((100% - var(--maxw)) / 2));
}
.cta-glow { background: radial-gradient(closest-side, rgba(255,140,60,.16), transparent 70%); }
.glow-text { color: var(--amber); text-shadow: none; }
.form {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 30px 60px -40px rgba(40,25,10,.35);
}
.form > label, .form legend { color: #4b463e; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"] { background: var(--bg); }
.radios span, .pick span { color: #3d3830; background: #fff; }
.radios input:checked + span, .pick input:checked + span { background: #fff3ea; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { background: rgba(255,255,255,.98); box-shadow: 0 20px 40px -24px rgba(40,25,10,.35); }
  .hdr.nav-open { background: rgba(251,250,247,.96); }
}
@media (max-width: 640px) {
  .hero-art { border-radius: 20px; margin-left: -4px; margin-right: -4px; }
  .cta { border-radius: 24px; margin-left: 8px; margin-right: 8px; }
  .mbar { background: rgba(251,250,247,.95); }
}

/* трохи менший заголовок: вага 400 ширша за 300 */
h1 { font-size: clamp(38px, 4.7vw, 76px); }

/* ---------- form extras ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg.err { color: var(--red); }
.form-note { font-size: 13px; color: var(--muted); margin-top: -8px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- form fields + validation ---------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #4b463e; }
.field .opt { color: var(--muted); }
.form .field input { width: 100%; }
.phone-wrap { display: flex; align-items: stretch; }
.phone-prefix {
  display: grid; place-items: center; padding: 0 14px;
  border: 1px solid var(--line-2); border-right: 0; border-radius: 12px 0 0 12px;
  background: var(--bg-2); color: var(--ink); font: 500 16px var(--f-display);
}
.form .phone-wrap input { border-radius: 0 12px 12px 0; min-width: 0; }
.field__err { display: none; margin: 0; font-size: 13px; color: var(--red); }
.field.has-error .field__err { display: block; }
.form .field.has-error input, .field.has-error .phone-prefix { border-color: var(--red); }
.form .field.has-error input:focus { box-shadow: 0 0 0 3px rgba(217,58,43,.15); }

/* ---------- validation: clearly visible errors ---------- */
.field__err {
  align-items: flex-start; gap: 8px;
  padding: 9px 12px; border-radius: 10px;
  background: #fdecea; color: #b42318;
  font: 600 14px/1.35 var(--f-display);
}
.field.has-error .field__err { display: flex; }
.field__err::before {
  content: "!"; flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: #d92d20; color: #fff; font: 700 12px/1 var(--f-display);
}
.form .field.has-error input { border: 2px solid #d92d20; background: #fff7f6; }
.field.has-error .phone-prefix { border: 2px solid #d92d20; border-right: 0; background: #fdecea; color: #b42318; }
.field.has-error label { color: #b42318; font-weight: 600; }
.form-msg.err {
  padding: 12px 14px; border-radius: 12px;
  background: #fdecea; color: #b42318; font-weight: 600;
}

/* ---------- thank-you state ---------- */
.form-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 8px; outline: none; }
.form-done[hidden] { display: none; }
.form.is-sent > :not(.form-done) { display: none; }
.form.is-sent { border-color: rgba(31,160,90,.45); }
.form-done__icon {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e7f6ec; box-shadow: 0 0 0 10px #f2fbf5;
  animation: donePop .5s var(--ease) both;
}
.form-done__icon svg { width: 38px; height: 38px; fill: none; stroke: #1a9a55; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: doneTick .6s .25s var(--ease) forwards; }
@keyframes donePop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes doneTick { to { stroke-dashoffset: 0; } }
.form-done h3 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 500; letter-spacing: -.02em; margin-top: 6px; }
.form-done p { font-size: 17px; color: #4b463e; max-width: 380px; }
.form-done__call a { color: var(--amber); font-weight: 600; white-space: nowrap; }
.form-done__again { margin-top: 6px; background: none; border: 0; color: var(--muted); font: 500 14px var(--f-display); text-decoration: underline; cursor: pointer; }

/* ---------- phone in header ---------- */
.hdr-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 16px/1 var(--f-display); color: var(--ink); white-space: nowrap;
}
.hdr-phone svg {
  width: 32px; height: 32px; padding: 7px; flex: none;
  border-radius: 50%; background: #fff3ea;
  fill: none; stroke: var(--amber); stroke-width: 1.8; stroke-linejoin: round;
}
.hdr-phone:hover span { color: var(--amber); }
@media (max-width: 1100px) { .hdr-phone { font-size: 15px; } .hdr-phone svg { width: 28px; height: 28px; padding: 6px; } }
@media (max-width: 960px) { .hdr-phone { margin-left: auto; } .hdr-cta { margin-left: 0; } }
@media (max-width: 640px) {
  .hdr-phone { font-size: 14px; gap: 6px; }
  .hdr-phone svg { width: 26px; height: 26px; padding: 5px; }
  .burger { margin-left: 0; }
}
@media (max-width: 370px) { .hdr-phone svg { display: none; } .logo-mark { display: none; } }
.nav a { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1180px) {
  .nav { gap: 20px; }
  .hdr-cta { display: none; }
  .hdr-phone { margin-left: auto; }
}
.hdr-phone__short { display: none; }
@media (max-width: 640px) {
  .hdr-phone svg { display: none; }
  .hdr-phone__full { display: none; }
  .hdr-phone__short { display: inline; color: var(--amber); font-size: 15px; }
}
@media (max-width: 370px) { .hdr-phone__short { font-size: 14px; } }

/* ---------- language switch ---------- */
.nav a.lang-switch {
  padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--line-2);
  font: 600 12px/1.2 var(--f-mono); letter-spacing: .06em; color: var(--ink);
}
.nav a.lang-switch::after { display: none; }
.nav a.lang-switch:hover { border-color: var(--amber); color: var(--amber); }
@media (max-width: 960px) {
  .nav a.lang-switch { align-self: flex-start; margin: 10px 0 6px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
}
