/* Zadaszenia Rataj · demo budstrony.pl nr 4
   System: strona nocna. Grafit profilu aluminiowego, trawertyn i beton tarasu, jeden sygnał: światło LED w profilu.
   Kanty 0 px (profil). Krój: Geologica, nagłówki lekkie (300), tekst 400. Plan: dema-plany/pergole/PLAN-DEMA.md */

@font-face {
  font-family: "Geologica";
  src: url(fonts/geologica-latin-ext.woff2) format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geologica";
  src: url(fonts/geologica-latin.woff2) format("woff2");
  font-weight: 200 800; font-display: swap;
  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;
}

:root {
  --stone: #F3F2EE;   /* trawertyn */
  --con: #E6E4DE;     /* beton */
  --white: #FBFAF8;
  --ink: #17191B;
  --mute: #565B60;
  --night: #141618;   /* grafit profilu */
  --night2: #1E2124;  /* panel „screen” na ciemnym */
  --night3: #2A2E32;
  --frost: #A9AFB4;
  --led: #F2B45A;     /* SYGNAŁ: światło LED, tylko na ciemnym */
  --led-dp: #8C5410;  /* sygnał jako tekst na jasnym */
  --sky: #9DB4DE;     /* niebo między lamelami: tylko rysunek */
  --line: #CFCCC4;
  --line-dk: #33383D;
  --field: #767B80;
  --err: #A4282B;
  --err-dk: #FF9C8F;

  --wrap: 1320px;
  --gut: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --bars: 108px; /* pasek demo + nawigacja */
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font: 400 17px/1.55 "Geologica", system-ui, sans-serif;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
p, li, dd { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
:focus-visible { outline: 2px solid var(--led-dp); outline-offset: 3px; }
.hero :focus-visible, .tilt :focus-visible, .eve :focus-visible, .foot :focus-visible, .nav :focus-visible, .mbar :focus-visible, .roof__tab:focus-visible { outline-color: var(--led); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--led); color: var(--night); padding: 10px 16px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- typografia: lekki, szeroki nagłówek ---------- */
.h2 {
  font-size: clamp(32px, 4vw, 56px); line-height: 1.02; font-weight: 300;
  letter-spacing: -.03em; text-wrap: balance;
}
.h3 { font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; }
small { font-size: .8em; color: var(--mute); }
.src { font-size: 13px; color: var(--mute); margin-top: 18px; max-width: 80ch; }
.src--dark { color: var(--frost); }

.sec-head { display: grid; gap: 14px; margin-bottom: clamp(26px, 3.5vw, 44px); max-width: 760px; }
.sec-head__lead { color: var(--mute); max-width: 56ch; }
.sec-head--row { max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 14px 48px; }
.sec-head .h2::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 18px; background: var(--led-dp); }

/* ---------- przyciski: prostokąt, ikona w kwadracie ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 52px; padding: 6px 6px 6px 20px; border: 0;
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .5s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn__ic { display: grid; place-items: center; width: 40px; height: 40px; transition: transform .5s var(--ease); }
.btn:hover .btn__ic { transform: translateX(3px); }
.btn--led { background: var(--led); color: var(--night); }
.btn--led .btn__ic { background: var(--night); color: var(--led); }
.btn--led:hover { background: #F7C677; }
.btn--night { background: var(--night); color: var(--white); }
.btn--night .btn__ic { background: var(--led); color: var(--night); }
.btn--night:hover { background: var(--night3); }
.btn--ghost { padding: 6px 20px; background: rgba(20, 22, 24, .35); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: rgba(20, 22, 24, .7); box-shadow: inset 0 0 0 1px #fff; }
.btn--line { padding: 6px 18px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--field); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--sm { min-height: 44px; font-size: 15px; padding-left: 16px; }
.btn--sm .btn__ic { width: 34px; height: 34px; }

/* ---------- pasek demo ---------- */
.demobar {
  display: flex; align-items: center; justify-content: center; gap: 8px 18px; flex-wrap: wrap;
  background: #0B0C0D; color: #DDE0E2; font-size: 14px; padding: 9px var(--gut); text-align: center;
}
.demobar a { display: inline-flex; align-items: center; gap: 6px; color: var(--led); font-weight: 500; text-underline-offset: 3px; min-height: 28px; }

/* ---------- nawigacja: grafit, linia LED pod spodem po zjechaniu z hero ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; }
.nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--led); opacity: 0; transform: scaleX(.2); transition: opacity .5s var(--ease), transform .8s var(--ease); }
.nav.is-solid::after { opacity: .7; transform: none; }
.nav__in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); height: 68px; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.logo__word { font-weight: 300; font-size: 21px; letter-spacing: -.01em; }
.logo__word b { font-weight: 600; }
.logo__mark { display: grid; gap: 4px; width: 28px; }
.logo__mark i { display: block; height: 4px; background: #DDE0E2; transform: skewX(-28deg); }
.logo__mark i:nth-child(2) { background: var(--led); }
.nav__links { display: flex; gap: 24px; font-size: 15px; }
.nav__links a { text-decoration: none; padding: 8px 0; position: relative; color: #DDE0E2; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--led); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__menu-tel { display: none; }
.nav__tel { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-variant-numeric: tabular-nums; color: #fff; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: var(--night3); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: #fff; transition: transform .45s var(--ease), top .45s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.nav.is-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.nav.is-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }

/* =========================================================
   1 · HERO: wieczór pod dachem z lamelami. Lamele obracają się na samym zdjęciu.
   Scena w proporcjach zdjęcia (3:2) liczona w jednostkach kontenera: szeroki ekran = pełna szerokość,
   dach przy górnej krawędzi; wąski = pełna wysokość, kadr przesunięty na ścianę z kinkietami (30%).
   ========================================================= */
.hero {
  position: relative; overflow: hidden; background: #0E0F10; color: #fff;
  height: max(600px, calc(100svh - var(--bars)));
  container-type: size; container-name: hero;
}
.hero__stage { position: absolute; top: 0; left: 0; width: 100cqw; height: calc(100cqw * 2 / 3); }
@container hero (aspect-ratio < 3 / 2) {
  .hero__stage { width: calc(100cqh * 3 / 2); height: 100cqh; left: clamp(calc(100cqw - 150cqh), calc(50cqw - 45cqh), 0px); }
}
.hero__img, .hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img img { object-fit: cover; }
/* warstwy zamkniętych lamel: górne 25,43% zdjęcia (339 z 1333 px) */
.lam { position: absolute; left: 0; top: 0; width: 100%; height: 25.43%; }
.lam img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.hero__dusk { position: absolute; inset: 0; pointer-events: none; background: #070809; opacity: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 9, 10, .35) 0%, rgba(8, 9, 10, 0) 18%),
    linear-gradient(180deg, rgba(8, 9, 10, 0) 40%, rgba(8, 9, 10, .74) 70%, rgba(8, 9, 10, .93) 100%);
}
.hero__copy { position: absolute; left: 0; right: 0; bottom: clamp(24px, 5cqh, 56px); margin: 0 auto; z-index: 2; }
.hero__h {
  font-size: clamp(44px, min(7.4vw, 12.5vh), 128px); line-height: .98; font-weight: 300;
  letter-spacing: -.045em; margin-bottom: clamp(18px, 3.2cqh, 32px);
}
.hero__h .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__h .ln > span { display: block; }
.hero__row { display: grid; grid-template-columns: minmax(0, 38ch) auto; justify-content: space-between; align-items: end; gap: 20px 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .22); }
.hero__lead { font-size: 18px; color: #E8E9EA; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__state {
  position: absolute; right: var(--gut); bottom: calc(100% + 18px);
  display: none; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(8, 9, 10, .62);
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #E8E9EA;
}
.hero__state i { width: 22px; height: 2px; background: var(--led); box-shadow: 0 0 10px 1px rgba(242, 180, 90, .7); }
.hero__state .sts { display: inline-grid; }
.hero__state .st { grid-area: 1 / 1; }
.hero__state .st--a { opacity: 0; }

/* ruch hero: lamele zamknięte → otwarte (pierścienie znikają od środka szczeliny), taras jaśnieje */
.is-motion .lam img { animation: lamOpen .75s cubic-bezier(.45, 0, .25, 1) both; animation-delay: calc(.7s + var(--k) * .26s); }
@keyframes lamOpen { from { opacity: 1; } to { opacity: 0; } }
.is-motion .hero__dusk { animation: dawn 3.2s cubic-bezier(.45, 0, .25, 1) .4s both; }
@keyframes dawn { from { opacity: .6; } to { opacity: 0; } }
.is-motion .hero__img img { animation: settle 3s var(--ease) both; }
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }
.is-motion .lam { animation: settle 3s var(--ease) both; transform-origin: 50% 0; }
.is-motion .hero__img img { transform-origin: 50% 0; }
.is-motion .hero__h .ln > span { animation: lineUp 1.1s var(--ease) .15s both; }
.is-motion .hero__h .ln + .ln > span { animation-delay: .27s; }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
.is-motion .hero__row { animation: up .9s var(--ease) .5s both; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.is-motion .hero__state .st--a { animation: fadeOut .2s linear 2.5s both; }
.is-motion .hero__state .st--b { animation: fadeIn .25s linear 2.7s both; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1000px) { .hero__state { display: inline-flex; } }

/* =========================================================
   2 · TRZY DACHY: harmonijka. Zwinięte panele = zamknięte lamele (ciemne pasy)
   ========================================================= */
.roofsec { padding: clamp(56px, 7vw, 96px) 0; background: var(--stone); }
.roofs { display: flex; gap: 8px; height: clamp(520px, 44vw, 620px); }
.roof { position: relative; flex: 0 0 112px; min-width: 0; background: var(--night); color: #fff; overflow: hidden; transition: flex-grow .8s var(--ease), flex-basis .8s var(--ease), background-color .4s var(--ease); }
.roof.is-on { flex: 1 1 0; background: var(--white); color: var(--ink); }
.roof__h { position: absolute; inset: 0 auto 0 0; width: 112px; z-index: 2; }
.roof__tab {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; height: 100%; padding: 22px 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left;
}
.roof__no { font-size: 13px; letter-spacing: .1em; color: var(--frost); }
.roof__name { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 26px; font-weight: 300; letter-spacing: -.01em; white-space: nowrap; }
.roof__price { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 14px; color: var(--led); font-variant-numeric: tabular-nums; white-space: nowrap; }
.roof:not(.is-on) .roof__tab:hover { background: var(--night3); }
.roof.is-on .roof__h { width: 0; overflow: hidden; }
.roof.is-on .roof__tab { pointer-events: none; }
.roof__body { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.roof__body[hidden] { display: none; }
.roof__img { position: relative; display: block; overflow: hidden; }
.roof__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.roof__txt { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(24px, 3.4vw, 48px); min-width: 0; }
.roof__title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
.roof__title span { display: block; font-size: 13px; letter-spacing: .1em; color: var(--led-dp); font-weight: 500; margin-bottom: 8px; }
.roof__lead { font-size: 18px; max-width: 42ch; }
.spec { display: grid; border-top: 1px solid var(--line); }
.spec > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding-top: 2px; }
.spec dd { font-weight: 500; }
.spec dd small { display: block; font-weight: 400; margin-top: 2px; }
.roof__txt .btn { align-self: flex-start; }
.is-motion .roof.is-on .roof__img img { animation: drift 1.2s var(--ease) both; }
.is-motion .roof.is-on .roof__txt > * { animation: up .7s var(--ease) both; }
.is-motion .roof.is-on .roof__txt > :nth-child(2) { animation-delay: .08s; }
.is-motion .roof.is-on .roof__txt > :nth-child(3) { animation-delay: .16s; }
@keyframes drift { from { transform: scale(1.08) translateX(2%); opacity: .4; } to { transform: none; opacity: 1; } }

/* =========================================================
   3 · LAMELE: przekrój + cień, suwak
   ========================================================= */
.tilt { padding: clamp(56px, 7vw, 100px) 0; background: var(--night); color: #fff; }
.tilt__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.tilt__lead { color: #D3D6D9; margin: 18px 0 26px; max-width: 44ch; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line-dk); }
.facts li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1px solid var(--line-dk); }
.facts li::before { content: ""; position: absolute; left: 0; top: 24px; width: 16px; height: 2px; background: var(--led); }
.tilt .src { color: var(--frost); }
.scene { position: relative; background: linear-gradient(180deg, #22324C 0%, #3A5078 27%, #1A1C1F 27.2%, #1A1C1F 86.8%, #26292C 87%); }
.scene svg { display: block; width: 100%; height: auto; }
.sc-beam, .sc-post { fill: #0B0C0D; }
.sc-gutter { fill: #0B0C0D; stroke: var(--led); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0; transition: opacity .4s var(--ease); }
.scene.is-rain .sc-gutter { opacity: .9; }
.sc-blade { fill: #D9DCDF; stroke: #8E959B; stroke-width: 1; }
.sc-led { fill: var(--led); opacity: 0; transition: opacity .4s var(--ease); }
.scene.is-eve .sc-led { opacity: 1; }
.sc-floor { stroke: #3A3F44; stroke-width: 2; }
.sc-sun { fill: rgba(255, 222, 160, .16); }
.sc-sun-floor { fill: rgba(255, 222, 160, .55); }
.sc-shade { fill: rgba(0, 0, 0, .55); }
.sc-rain { opacity: 0; transition: opacity .4s var(--ease); }
.scene.is-rain .sc-rain { opacity: 1; }
.sc-drop { stroke: var(--sky); stroke-width: 1.5; stroke-linecap: round; opacity: .8; }
.sc-flow { fill: none; stroke: var(--sky); stroke-width: 2; stroke-dasharray: 4 5; }
.scene__cap { position: absolute; left: 16px; top: 14px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #E8E9EA; background: rgba(11, 12, 13, .72); padding: 6px 10px; }
.tilt__ctl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 28px; align-items: end; margin-top: 18px; }
.presets { display: flex; gap: 6px; }
.presets button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; cursor: pointer;
  background: var(--night2); color: #DDE0E2; box-shadow: inset 0 0 0 1px var(--line-dk); transition: background-color .3s var(--ease), color .3s var(--ease);
}
.presets button:hover { background: var(--night3); }
.presets button[aria-pressed="true"] { background: var(--led); color: var(--night); box-shadow: none; }
.slider { display: grid; gap: 8px; }
.slider__lab { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--frost); gap: 12px; }
.slider__ends { display: flex; gap: 18px; text-transform: none; letter-spacing: 0; }
.slider input { width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--led); -webkit-appearance: none; appearance: none; }
.slider input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--led) var(--p, 50%), #4A5056 var(--p, 50%)); }
.slider input::-moz-range-track { height: 2px; background: #4A5056; }
.slider input::-moz-range-progress { height: 2px; background: var(--led); }
.slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -14px; background: var(--led); border: 6px solid var(--night); box-shadow: 0 0 0 1px var(--led); }
.slider input::-moz-range-thumb { width: 18px; height: 18px; background: var(--led); border: 6px solid var(--night); box-shadow: 0 0 0 1px var(--led); border-radius: 0; }

/* =========================================================
   4 · KALKULATOR
   ========================================================= */
.calc { padding: clamp(56px, 7vw, 100px) 0; background: var(--con); }
.panel { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.steps { display: flex; border-bottom: 1px solid var(--line); counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 16px 24px; font-size: 15px; color: var(--mute); border-right: 1px solid var(--line); position: relative; }
.steps b { display: grid; place-items: center; width: 26px; height: 26px; font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--field); }
.steps .is-on { color: var(--ink); font-weight: 500; }
.steps .is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.steps .is-on b, .steps .is-done b { background: var(--night); color: var(--led); box-shadow: none; }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.calc__main { padding: clamp(20px, 3vw, 40px); min-width: 0; }
.step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 26px; }
.step[hidden] { display: none; }
.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; }
.field label, .types legend, .mount legend, .extras legend { font-size: 14px; font-weight: 500; }
.opt { font-weight: 400; color: var(--mute); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; background: #fff; border: 0;
  box-shadow: inset 0 0 0 1px var(--field); transition: box-shadow .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:hover, .field select:hover, .field textarea:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink); }
.field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--err); }
.field__err { display: flex; align-items: flex-start; gap: 6px; color: var(--err); font-size: 14px; }
.field__err[hidden] { display: none; }
.field__err .ic { margin-top: 2px; }
.stepper { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; }
.stepper input { text-align: center; font-size: 22px; font-weight: 300; font-variant-numeric: tabular-nums; min-height: 56px; }
.stepper button { display: grid; place-items: center; border: 0; background: var(--night); color: #fff; cursor: pointer; min-height: 56px; transition: background-color .25s var(--ease); }
.stepper button:hover { background: var(--night3); }
.types, .mount, .extras { border: 0; margin: 0; padding: 0; min-width: 0; }
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.types legend, .mount legend, .extras legend { margin-bottom: 10px; padding: 0; }
.type { position: relative; display: grid; gap: 2px; padding: 14px 14px 14px; min-height: 76px; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--field); transition: box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease); }
.type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type__name { font-weight: 500; }
.type__sub { font-size: 14px; color: var(--mute); }
.type:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.type:has(input:checked) { background: var(--night); color: #fff; box-shadow: inset 0 -3px 0 var(--led); }
.type:has(input:checked) .type__sub { color: var(--frost); }
.type:has(input:focus-visible) { outline: 2px solid var(--led-dp); outline-offset: 3px; }
.mount { display: flex; flex-wrap: wrap; }
.mount legend { width: 100%; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; min-height: 46px; padding: 0 18px; box-shadow: inset 0 0 0 1px var(--field); background: #fff; transition: background-color .25s var(--ease), color .25s var(--ease); }
.seg + .seg span { margin-left: -1px; }
.seg input:checked + span { background: var(--night); color: #fff; box-shadow: inset 0 0 0 1px var(--night); }
.seg input:focus-visible + span { outline: 2px solid var(--led-dp); outline-offset: 3px; }
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.extras legend { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--night); cursor: pointer; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field--wide { grid-column: 1 / -1; }
.step__nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding-top: 4px; }
.step__nav .btn--night { margin-left: auto; }
.step--done { gap: 18px; }
.step--done:focus { outline: none; }
.h3 .ic { vertical-align: -3px; margin-right: 8px; color: var(--led-dp); }
.done__note { padding: 2px 0 2px 16px; box-shadow: inset 3px 0 0 var(--led-dp); }
.mail { margin: 0; padding: 18px; background: var(--night); color: #E8E9EA; font: 14px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.out { background: var(--night); color: #fff; padding: clamp(20px, 2.6vw, 32px); display: grid; align-content: start; gap: 18px; }
.plan { padding-bottom: 14px; border-bottom: 1px solid var(--line-dk); }
.plan svg { display: block; width: 100%; height: auto; }
.pl-wall { fill: #3A3F44; }
.pl-wall-t { fill: var(--frost); font-size: 9px; letter-spacing: .1em; }
.pl-roof { fill: rgba(157, 180, 222, .14); stroke: #DDE0E2; stroke-width: 1.5; }
.pl-roof--bio { fill: rgba(217, 220, 223, .12); }
.pl-rib { stroke: #8E959B; stroke-width: 1; }
.pl-lam { stroke: #C8CCD0; stroke-width: 1.6; }
.pl-post { fill: var(--led); }
.pl-dim { stroke: var(--frost); stroke-width: 1; }
.pl-dim-t { fill: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.pl-area { fill: #fff; font-size: 13px; font-weight: 300; }
.out__top { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line-dk); }
.out__big { display: flex; align-items: baseline; gap: 10px; font-size: clamp(48px, 5vw, 68px); line-height: 1; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.out__big small { font-size: 15px; color: var(--frost); letter-spacing: 0; }
.out__law { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: #E8E9EA; }
.out__law::before { content: ""; width: 18px; height: 2px; background: var(--led); flex: none; }
.out__law a { color: var(--led); text-underline-offset: 3px; }
.out__list { display: grid; }
.out__list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-dk); color: var(--frost); transition: color .3s var(--ease); }
.out__list dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.out__list > .is-on { color: #fff; }
.out__list > .is-on dt::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--led); vertical-align: 1px; }
.out__list > .is-on dd { color: var(--led); font-weight: 500; font-size: 18px; }
.out__src { font-size: 13px; color: var(--frost); max-width: 70ch; }

/* =========================================================
   5 · FORMALNOŚCI: linijka 0–60 m²
   ========================================================= */
.law { padding: clamp(56px, 7vw, 96px) 0; background: var(--stone); }
.ruler { position: relative; height: 92px; margin: 8px 0 34px; --w: calc(100% / 60); }
.ruler__bar { position: absolute; left: 0; right: 0; top: 42px; height: 14px; display: flex; }
.z { display: block; height: 100%; transform-origin: left; }
.z--1 { width: calc(35 * var(--w)); background: #CFE0C8; }
.z--2 { width: calc(15 * var(--w)); background: #EAD7A8; }
.z--3 { flex: 1; background: #E2B9AE; }
.ruler__tick { position: absolute; top: 62px; left: calc(var(--at) * var(--w)); transform: translateX(-50%); font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ruler__tick::before { content: ""; position: absolute; left: 50%; top: -24px; width: 1px; height: 22px; background: var(--ink); }
.ruler__tick:first-of-type { transform: none; }
.ruler__tick:first-of-type::before { left: 0; }
.ruler__tick:nth-last-of-type(2) { transform: translateX(-100%); }
.ruler__tick:nth-last-of-type(2)::before { left: auto; right: 0; }
.ruler__me {
  position: absolute; top: 0; left: min(calc(var(--at) * var(--w)), 100%); transform: translateX(-50%);
  padding: 5px 10px; background: var(--night); color: #fff; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums;
  transition: left .8s var(--ease);
}
.ruler__me b { font-weight: 500; color: var(--led); }
.ruler__me::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 12px; margin-left: -1px; background: var(--night); }
.is-motion .ruler.rv .z { transform: scaleX(0); transition: transform 1s var(--ease); }
.is-motion .ruler.rv .z--2 { transition-delay: .15s; }
.is-motion .ruler.rv .z--3 { transition-delay: .3s; }
.is-motion .ruler.rv.in .z { transform: none; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.tiers li { padding: 20px 24px 22px 0; display: grid; gap: 8px; align-content: start; max-width: 70ch; }
.tiers li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.tiers h3 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.law__note { margin-top: 28px; padding: 4px 0 4px 20px; box-shadow: inset 3px 0 0 var(--led-dp); max-width: 620px; }

/* =========================================================
   6 · WIECZÓR POD DACHEM
   ========================================================= */
.eve { padding: clamp(56px, 7vw, 100px) 0; background: var(--night); color: #fff; }
.eve__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.eve__img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.eve__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.eve__lead { color: #D3D6D9; margin: 18px 0 24px; max-width: 46ch; }
.adds { display: grid; border-top: 1px solid var(--line-dk); }
.adds li { position: relative; display: grid; gap: 2px; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--line-dk); }
.adds li::before { content: ""; position: absolute; left: 0; top: 25px; width: 20px; height: 2px; background: var(--led); box-shadow: 0 0 10px 1px rgba(242, 180, 90, .55); }
.adds b { font-weight: 500; }
.adds span { color: var(--frost); font-size: 15px; }
.is-motion .adds li.rv::before { opacity: .15; box-shadow: none; transition: opacity .5s var(--ease), box-shadow .5s var(--ease); transition-delay: calc(var(--i) * 140ms + .2s); }
.is-motion .adds li.rv.in::before { opacity: 1; box-shadow: 0 0 10px 1px rgba(242, 180, 90, .55); }

/* =========================================================
   7 · PRZEBIEG: kreska wymiarowa
   ========================================================= */
.flow { padding: clamp(56px, 7vw, 96px) 0; background: var(--con); }
.flow .h2 { margin-bottom: clamp(28px, 4vw, 48px); }
.flow__line { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 34px; }
.flow__line::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: var(--ink); transform-origin: left; }
.flow__line li { position: relative; display: grid; gap: 8px; align-content: start; }
.flow__line li::before { content: ""; position: absolute; left: 0; top: -34px; width: 1px; height: 17px; background: var(--ink); }
.flow__no { font-size: 13px; letter-spacing: .1em; color: var(--led-dp); font-weight: 500; }
.flow__line h3 { font-size: 22px; font-weight: 300; letter-spacing: -.01em; }
.flow__line p { color: var(--mute); font-size: 16px; }
.is-motion .flow__line.rv::before { transform: scaleX(0); transition: transform 1.4s var(--ease); }
.is-motion .flow__line.rv.in::before { transform: none; }

/* =========================================================
   8 · PYTANIA
   ========================================================= */
.faq { padding: clamp(56px, 7vw, 96px) 0; background: var(--stone); }
.faq .h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.faq__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
.faq details { border-top: 1px solid var(--line); }
.faq details:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 0; cursor: pointer; font-size: 19px; font-weight: 400; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .4s var(--ease); color: var(--led-dp); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { padding: 0 0 20px; color: var(--mute); max-width: 60ch; }

/* =========================================================
   9 · STOPKA
   ========================================================= */
.foot { background: var(--night); color: #fff; padding: clamp(48px, 6vw, 80px) 0 28px; overflow: hidden; }
.foot__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.foot__col { display: grid; gap: 16px; align-content: start; justify-items: start; }
.foot__h { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 300; }
.foot__h .ic { color: var(--led); }
.foot__tel { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(32px, 4vw, 48px); font-weight: 300; text-decoration: none; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.foot__tel .ic { color: var(--led); width: .8em; height: .8em; }
.foot__hours { display: inline-flex; align-items: center; gap: 8px; color: var(--frost); }
.towns { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #D3D6D9; }
.foot__word { margin: clamp(32px, 5vw, 64px) 0 18px; font-size: clamp(80px, 33vw, 486px); line-height: .78; font-weight: 200; letter-spacing: -.06em; color: #2B2F33; white-space: nowrap; }
.is-motion .foot__word { clip-path: inset(100% 0 0 0); transform: translateY(24px); transition: clip-path 1.3s var(--ease), transform 1.3s var(--ease); }
.is-motion .foot__word.in { clip-path: inset(0 0 -10% 0); transform: none; }
.foot__demo { font-size: 13px; color: var(--frost); padding-top: 18px; border-top: 1px solid var(--line-dk); }
.foot__demo a { color: var(--led); }

.mbar { display: none; }

/* ---------- odsłanianie ---------- */
.is-motion .rv:not(.ruler):not(.flow__line):not(.adds li) { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.is-motion .rv.in:not(.ruler):not(.flow__line):not(.adds li) { opacity: 1; transform: none; }

/* =========================================================
   Do 1100 px
   ========================================================= */
@media (max-width: 1100px) {
  .nav__links { gap: 18px; }
  .nav__tel span { display: none; }
  .calc__grid { grid-template-columns: 1fr; }
  .roof { flex-basis: 88px; }
  .roof__h { width: 88px; }
}

/* =========================================================
   Do 900 px: menu w burgerze, kolumny w stos, dachy jako lista rozwijana
   ========================================================= */
@media (max-width: 900px) {
  .burger { display: block; }
  .nav__tel { display: none; }
  .nav__links {
    position: fixed; inset: 68px 0 0; flex-direction: column; gap: 0; padding: 18px var(--gut);
    background: var(--night); font-size: 26px; font-weight: 300;
    visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility 0s .35s;
  }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line-dk); opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
  .nav.is-open .nav__links { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
  .nav.is-open .nav__links a { opacity: 1; transform: none; }
  .nav.is-open .nav__links a:nth-child(2) { transition-delay: .04s; }
  .nav.is-open .nav__links a:nth-child(3) { transition-delay: .08s; }
  .nav.is-open .nav__links a:nth-child(4) { transition-delay: .12s; }
  .nav.is-open .nav__links a:nth-child(5) { transition-delay: .16s; }
  .nav.is-open .nav__links a:nth-child(6) { transition-delay: .2s; }
  .nav__menu-tel { display: block; color: var(--led) !important; }
  .nav__links a::after { display: none; }

  .sec-head--row { grid-template-columns: 1fr; }
  .roofs { flex-direction: column; height: auto; gap: 6px; }
  .roof, .roof.is-on { flex: none; }
  .roof__h { position: static; width: auto; }
  .roof.is-on .roof__h { width: auto; overflow: visible; }
  .roof__tab { flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 14px; padding: 18px 18px; min-height: 64px; flex-wrap: wrap; }
  .roof__name, .roof__price { writing-mode: horizontal-tb; transform: none; }
  .roof__name { font-size: 22px; }
  .roof__price { margin-left: auto; }
  .roof.is-on .roof__tab { pointer-events: auto; background: var(--night); color: #fff; }
  .roof__body { position: static; grid-template-columns: 1fr; }
  .roof__title { display: none; }
  .roof__img { aspect-ratio: 16 / 10; }
  .roof__txt { padding: 22px 18px 24px; }
  .tilt__grid, .eve__grid, .foot__grid { grid-template-columns: 1fr; }
  .tilt__stage { order: -1; }
  .eve__img { aspect-ratio: 16 / 11; }
  .tiers { grid-template-columns: 1fr; }
  .tiers li, .tiers li + li { padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .flow__line { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .faq__cols { grid-template-columns: 1fr; }
  .faq details:nth-last-child(2) { border-bottom: 0; }
}

/* =========================================================
   TELEFON ≤ 760 px: mniej czytania, przyciski na całą szerokość
   ========================================================= */
@media (max-width: 760px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .demobar span { display: none; }
  .nav__cta { display: none; }
  .hero { height: max(620px, calc(100svh - 104px)); }
  .hero::after { background: linear-gradient(180deg, rgba(8, 9, 10, .3) 0%, rgba(8, 9, 10, 0) 16%, rgba(8, 9, 10, 0) 30%, rgba(8, 9, 10, .8) 56%, rgba(8, 9, 10, .95) 100%); }
  .hero__h { font-size: clamp(36px, 10.4vw, 56px); letter-spacing: -.04em; }
  .demobar { font-size: 12.5px; gap: 10px; padding: 7px 10px; flex-wrap: nowrap; white-space: nowrap; }
  .demobar a { min-height: 26px; }
  .demobar p { text-wrap: nowrap; }
  .hero__row { grid-template-columns: 1fr; padding-top: 16px; }
  .hero__lead { font-size: 17px; }
  .hero__cta .btn { width: 100%; justify-content: space-between; }
  .hero__cta .btn--ghost { justify-content: center; }
  .roof__tab { padding: 14px 16px; }
  .roof__name { font-size: 20px; }
  .roof__price { margin-left: 0; width: 100%; }
  .spec > div { grid-template-columns: 96px minmax(0, 1fr); }
  .tilt__ctl { grid-template-columns: 1fr; }
  .presets { width: 100%; }
  .presets button { flex: 1; justify-content: center; padding: 0 8px; }
  .scene__cap { left: 10px; top: 10px; font-size: 12px; }
  .steps li { padding: 14px 12px; font-size: 14px; gap: 8px; }
  .steps li:not(.is-on) { font-size: 0; gap: 0; }
  .steps li:not(.is-on) b { font-size: 13px; }
  .dims { grid-template-columns: 1fr; }
  .types { grid-template-columns: 1fr; }
  .type { min-height: 56px; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
  .mount { display: grid; grid-template-columns: 1fr 1fr; }
  .seg span { justify-content: center; text-align: center; padding: 0 10px; }
  .extras { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .step__nav .btn { width: 100%; justify-content: space-between; }
  .step__nav .btn--line { justify-content: center; }
  .ruler__me { font-size: 12px; }
  .flow__line { grid-template-columns: 1fr; padding-top: 0; padding-left: 28px; gap: 26px; }
  .flow__line::before { left: 8px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; transform-origin: top; }
  .is-motion .flow__line.rv::before { transform: scaleY(0); }
  .is-motion .flow__line.rv.in::before { transform: none; }
  .flow__line li::before { left: -20px; top: 10px; width: 14px; height: 1px; }
  .faq summary { font-size: 17px; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--night); box-shadow: 0 -1px 0 var(--line-dk);
  }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; font-weight: 500; text-decoration: none; }
  .mbar__tel { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
  .mbar__cta { background: var(--led); color: var(--night); }
}

/* ---------- reduced motion: na wszelki wypadek po stronie CSS ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
