/* ==========================================================================
   СВІТЛОДАХ — демонстраційний сайт монтажу сонячних станцій
   Стилістика «інженерного аркуша»: тонкі лінії, моно-підписи, сонячний акцент
   ========================================================================== */
:root {
  --paper: #eef4f7;
  --paper-2: #dfeaf0;
  --card: #f8fbfc;
  --ink: #14201b;
  --ink-2: #3c4842;
  --muted: #66716b;
  --line: rgba(20, 32, 27, 0.13);
  --line-2: rgba(20, 32, 27, 0.24);
  --sun: #f0a202;
  --sun-2: #ffc94a;
  --sun-soft: rgba(240, 162, 2, 0.14);
  --forest: #10291f;
  --forest-2: #183a2d;
  --on-forest: #eef3ee;
  --on-forest-2: #a9b9af;

  --font: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(72px, 9vw, 132px);
  --radius: 22px;
  --radius-sm: 12px;
  --header: 72px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.menu-open { overflow: hidden; }
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, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
p { color: var(--ink-2); text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.container { width: min(100%, calc(var(--container) + var(--gutter) * 2)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 300; top: 12px; left: 12px; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; transform: translateY(-160%); transition: transform 0.2s; }
.skip-link:focus { transform: none; }

/* ---------- Переходи між сторінками ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out 0.32s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.55s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Типографіка-помічники ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); }
.mark { background: linear-gradient(transparent 62%, rgba(240, 162, 2, 0.38) 62%, rgba(240, 162, 2, 0.38) 92%, transparent 92%); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: var(--sun-2); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--forest-2); }
.btn--line { border-color: var(--line-2); background: transparent; color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* ---------- Шапка ---------- */
.sunbar {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.sunbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.sunbar__live { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sunbar__live i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--sun-soft); }
.sunbar__demo { white-space: nowrap; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 244, 247, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 44px; height: 44px; flex: none; }
.brand__text { display: grid; line-height: 1; }
.brand__text strong { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.07em; }
.brand__text small { margin-top: 6px; color: var(--ink-2); font-family: var(--font); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.04em; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.main-nav a:hover { background: rgba(20, 32, 27, 0.06); color: var(--ink); }
.main-nav a[aria-current='page'] { background: var(--ink); color: #fff; }
.header-cta { min-height: 46px; padding: 0 20px; font-size: 0.92rem; }
/* Кнопка меню: «пігулка» з написом і двома лініями різної довжини, що складаються в хрестик */
.menu-button {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s;
}
.menu-button__icon { position: relative; display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); }
.menu-button__icon i { position: absolute; left: 8px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 0.35s var(--ease), width 0.35s var(--ease), top 0.35s var(--ease); }
.menu-button__icon i:first-child { top: 11px; width: 14px; }
.menu-button__icon i:last-child { top: 17px; width: 9px; }
.menu-button[aria-expanded='true'] { background: var(--forest-2); }
.menu-button[aria-expanded='true'] .menu-button__icon i { top: 14px; width: 14px; }
.menu-button[aria-expanded='true'] .menu-button__icon i:first-child { transform: rotate(45deg); }
.menu-button[aria-expanded='true'] .menu-button__icon i:last-child { transform: rotate(-45deg); }

/* ---------- Перший екран головної ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(40px, 6vw, 84px) clamp(56px, 7vw, 96px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 46% 60% at 92% 6%, rgba(255, 201, 74, 0.42), transparent 70%),
    linear-gradient(180deg, #d6e8f2 0%, var(--paper) 78%);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 15% 30%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 15% 30%, #000, transparent 75%);
  opacity: 0.6;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 22px; font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.2rem); }
.hero-lead { max-width: 46ch; margin-top: 24px; font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-roofs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding: 0; list-style: none; }
.hero-roofs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.hero-roofs a:hover { border-color: var(--ink); background: var(--card); }
.hero-roofs svg { width: 22px; height: 22px; }
.hero-visual { position: relative; }
.hero-photo { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(16, 41, 31, 0.5)); }

/* Віджет «Сонце над Києвом» */
.sunwidget {
  position: absolute;
  left: clamp(-28px, -2vw, -12px);
  bottom: clamp(-28px, -2vw, -16px);
  width: min(340px, 82%);
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 30px 60px -30px rgba(20, 32, 27, 0.45);
}
.sunwidget__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.sunwidget svg { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.sunwidget__arc { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 3 5; }
.sunwidget__horizon { stroke: var(--ink); stroke-width: 1.2; }
.sunwidget__sun { fill: var(--sun); transition: transform 0.6s var(--ease); }
.sunwidget__glow { fill: var(--sun); opacity: 0.18; }
.sunwidget__row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); }
.sunwidget__now { margin-top: 10px; font-size: 0.92rem; font-weight: 600; }
.sunwidget__now b { color: var(--sun); font-weight: 700; }
/* Десктоп: фото й віджет сонця зліва, текст справа — інакше, ніж у решти демо */
@media (min-width: 961px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
  .hero-visual { order: -1; }
  .hero::before { -webkit-mask-image: radial-gradient(ellipse 60% 70% at 85% 30%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 85% 30%, #000, transparent 75%); }
  .sunwidget { left: auto; right: clamp(-28px, -2vw, -12px); }
}

/* ---------- Заголовки секцій ---------- */
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(20px, 5vw, 80px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin-top: 18px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); }
.section-head p { max-width: 48ch; }

/* ---------- Два типи дахів ---------- */
.roof-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.roof-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.roof-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(20, 32, 27, 0.5); }
.roof-card__img { aspect-ratio: 16 / 9; overflow: hidden; }
.roof-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.roof-card:hover .roof-card__img img { transform: scale(1.04); }
.roof-card__body { display: grid; gap: 12px; padding: clamp(22px, 3vw, 32px); }
.roof-card__body h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.roof-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.roof-card__meta li { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-family: var(--mono); font-size: 0.72rem; }
.roof-card__go { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-weight: 600; }
.roof-card__go svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.roof-card:hover .roof-card__go svg { transform: translateX(4px); }

/* ---------- Схема кріплення (перемикач) ---------- */
.mount { background: var(--forest); color: var(--on-forest); }
.mount p { color: var(--on-forest-2); }
.mount .label { color: var(--on-forest-2); }
.mount-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.mount h2 { margin-top: 18px; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.2rem); }
.mount-intro { margin-top: 20px; max-width: 44ch; }
.switch { display: inline-flex; gap: 4px; margin-top: 30px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; }
.switch button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--on-forest-2); font-weight: 600; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.switch button[aria-selected='true'] { background: var(--sun); color: var(--ink); }
.mount-specs { display: grid; gap: 0; margin-top: 28px; }
.mount-specs[hidden] { display: none; }
.mount-specs div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.mount-specs dt { color: var(--on-forest-2); font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; }
.mount-specs dd { color: var(--on-forest); font-size: 0.96rem; }
.mount-diagram { position: relative; padding: clamp(16px, 3vw, 28px); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius); background: rgba(255, 255, 255, 0.03); }
.mount-diagram svg { display: block; width: 100%; height: auto; }
.mount-diagram figcaption { margin-top: 10px; color: var(--on-forest-2); font-family: var(--mono); font-size: 0.72rem; }
.diagram { transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.diagram[hidden] { display: none; }
.diagram.is-entering { animation: diagram-in 0.55s var(--ease) both; }
@keyframes diagram-in { from { opacity: 0; transform: translateY(10px); } }
.dg-line { fill: none; stroke: var(--on-forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dg-thin { fill: none; stroke: var(--on-forest-2); stroke-width: 1.2; stroke-dasharray: 4 5; }
.dg-panel { fill: #0b1d16; stroke: var(--sun); stroke-width: 2; }
.dg-cell { stroke: rgba(240, 162, 2, 0.35); stroke-width: 1; }
.dg-ballast { fill: #2c4a3d; stroke: var(--on-forest-2); stroke-width: 1.2; }
.dg-text { fill: var(--on-forest-2); font-family: var(--mono); font-size: 12px; }
.dg-dot { fill: var(--sun); }
.dg-ray { stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 2 6; opacity: 0.7; }

/* ---------- Що входить ---------- */
.scope { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.scope li { display: grid; align-content: start; gap: 10px; padding: 28px 24px 0 0; list-style: none; }
.scope li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.scope svg { width: 34px; height: 34px; color: var(--ink); }
.scope h3 { margin-top: 8px; font-size: 1.15rem; letter-spacing: -0.015em; }
.scope p { font-size: 0.95rem; }

/* ---------- Процес ---------- */
.process { background: var(--paper-2); }
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding: 0; list-style: none; counter-reset: step; }
.timeline::before { content: ''; position: absolute; top: 19px; left: 20px; right: 20px; height: 1px; background: var(--line-2); }
.timeline li { position: relative; display: grid; align-content: start; gap: 10px; counter-increment: step; }
.timeline li::before {
  content: counter(step);
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.timeline li:last-child::before { border-color: var(--sun); background: var(--sun); }
.timeline h3 { margin-top: 10px; font-size: 1.08rem; letter-spacing: -0.01em; }
.timeline p { font-size: 0.93rem; }

/* ---------- Калькулятор ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 20px; align-items: stretch; }
.calc-box { padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.calc fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.calc fieldset + fieldset { margin-top: 28px; }
.calc legend, .calc-field > label { display: block; margin-bottom: 12px; color: var(--muted); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; gap: 2px; height: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); font-weight: 600; line-height: 1.3; transition: border-color 0.2s, background-color 0.2s; }
.seg small { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.seg input:checked + span { border-color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1px var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--sun); outline-offset: 2px; }
.calc-field { margin-top: 28px; }
.range-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 14px; align-items: center; }
.range-row input[type='range'] { width: 100%; accent-color: var(--ink); }
.range-row .num { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); }
.range-row .num input { width: 100%; min-width: 0; min-height: 44px; border: 0; background: transparent; font-family: var(--mono); font-size: 1rem; outline: none; }
.range-row .num span { color: var(--muted); font-family: var(--mono); font-size: 0.8rem; }
.select { width: 100%; min-height: 50px; padding: 0 44px 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314201b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; -webkit-appearance: none; appearance: none; }
.calc-result { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); background: var(--forest); color: var(--on-forest); }
.calc-result .label { color: var(--on-forest-2); }
.calc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.calc-kpis div { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.calc-kpis dt { color: var(--on-forest-2); font-size: 0.82rem; }
.calc-kpis dd { font-size: clamp(1.4rem, 1rem + 1.3vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-kpis dd small { margin-left: 4px; color: var(--on-forest-2); font-size: 0.8rem; font-weight: 500; letter-spacing: 0; }
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 170px; margin-top: 30px; }
.chart div { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; }
.chart i { align-self: end; display: block; height: var(--h, 0%); min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--sun-2), var(--sun)); transition: height 0.6s var(--ease); }
.chart span { color: var(--on-forest-2); font-family: var(--mono); font-size: 0.66rem; text-align: center; }
.calc-note { margin-top: auto; padding-top: 22px; color: var(--on-forest-2) !important; font-size: 0.82rem; }
.calc-result .btn { align-self: flex-start; margin-top: 18px; }

/* ---------- Сторінки дахів ---------- */
.page-hero { position: relative; padding-block: clamp(36px, 5vw, 64px) clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-family: var(--mono); font-size: 0.74rem; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--line-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; margin-top: 28px; }
.page-hero h1 { margin-top: 18px; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); }
.page-hero-lead { max-width: 46ch; font-size: clamp(1.03rem, 1rem + 0.3vw, 1.18rem); }
.page-hero-photo { margin-top: clamp(28px, 4vw, 48px); aspect-ratio: 21 / 8; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.page-hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table thead th { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.spec-table tbody th { width: 26%; font-size: 1.02rem; font-weight: 600; }
.spec-table td { color: var(--ink-2); font-size: 0.96rem; }
.spec-table td:last-child { width: 24%; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--sun-soft); color: #7a5300; font-family: var(--mono); font-size: 0.72rem; white-space: nowrap; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3.2; background: var(--paper-2); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split h2 { margin-top: 18px; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); }
.checklist { display: grid; gap: 0; margin-top: 26px; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.checklist li::before { content: ''; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0a202' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.checklist b { display: block; font-weight: 600; }
.checklist span { color: var(--ink-2); font-size: 0.95rem; }

.gallery-strip { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.gallery-strip figure { height: clamp(220px, 24vw, 340px); overflow: hidden; border-radius: var(--radius-sm); background: var(--paper-2); }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; }

.facts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.fact .mono { color: var(--muted); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.fact h3 { margin-top: 12px; font-size: 1.2rem; letter-spacing: -0.015em; }
.fact p { margin-top: 8px; font-size: 0.95rem; }

/* ---------- Питання: список ліворуч, відповідь праворуч ---------- */
.qa { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(16px, 2.5vw, 28px); align-items: stretch; }
.qa-list { display: grid; align-content: start; gap: 6px; }
.qa-q {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s;
}
.qa-q:hover { background: rgba(20, 32, 27, 0.05); }
.qa-q__no { padding-top: 2px; color: var(--muted); font-family: var(--mono); font-size: 0.8rem; font-weight: 600; transition: color 0.25s; }
.qa-q__body { display: grid; gap: 3px; color: var(--ink); font-size: 1.04rem; font-weight: 600; line-height: 1.35; }
.qa-q__body small { color: var(--muted); font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.qa-q[aria-selected='true'] { border-color: var(--line-2); background: var(--card); box-shadow: 0 16px 34px -26px rgba(20, 32, 27, 0.5); }
.qa-q[aria-selected='true'] .qa-q__no { color: var(--ink); }
.qa-q[aria-selected='true']::after { content: ''; position: absolute; top: 50%; right: 18px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px var(--sun-soft); }
.qa-stage { position: relative; min-height: 100%; }
.qa-a {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: clamp(24px, 3.5vw, 44px);
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--on-forest);
}
.qa-a[hidden] { display: none; }
.qa-a.is-entering { animation: qa-in 0.5s var(--ease) both; }
@keyframes qa-in { from { opacity: 0; transform: translateY(12px); } }
.qa-a__topic { color: var(--sun-2); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.qa-a h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); }
.qa-a p { color: var(--on-forest-2); font-size: 1.02rem; }
.qa-a__tip { display: grid; gap: 4px; margin-top: 4px; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; background: rgba(255, 255, 255, 0.04); font-size: 0.95rem !important; }
.qa-a__tip b { color: var(--sun-2); font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.qa-a__link { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: auto; padding-top: 8px; color: var(--on-forest); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(240, 162, 2, 0.6); text-underline-offset: 6px; }
.qa-a__link svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.qa-a__link:hover { color: var(--sun-2); }
.qa-a__link:hover svg { transform: translateX(4px); }

/* ---------- Заявка ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: #fff; }
.cta-band-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 28px; align-items: center; padding: clamp(28px, 5vw, 64px); }
.cta-band h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 3rem); }
.cta-band p { margin-top: 14px; color: rgba(255, 255, 255, 0.72); max-width: 48ch; }
.cta-band::after { content: ''; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(240, 162, 2, 0.5), transparent 65%); pointer-events: none; }

.form-wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.form-wrap h2 { margin-top: 18px; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.2rem); }
.contact-list { display: grid; gap: 0; margin-top: 28px; }
.contact-list div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-family: var(--mono); font-size: 0.76rem; }
.contact-list dt .ci { display: inline-block; width: 1rem; height: 1rem; margin: 0 0.45rem -0.2em 0; color: var(--forest); }
.contact-list dd { font-weight: 500; overflow-wrap: anywhere; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.field { display: grid; gap: 8px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { color: var(--ink-2); font-size: 0.86rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); transition: border-color 0.2s, box-shadow 0.2s; }
.field select { padding-right: 44px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314201b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat; -webkit-appearance: none; appearance: none; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 4px var(--sun-soft); }
.field.has-error input, .field.has-error select { border-color: #c2412d; }
.field-error { color: #b23a26; font-size: 0.8rem; font-weight: 600; }
.field-error:empty { display: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; grid-column: 1 / -1; }
.form-foot p { max-width: 40ch; color: var(--muted); font-size: 0.82rem; }
.form-status { grid-column: 1 / -1; padding: 14px 16px; border-radius: 10px; background: var(--sun-soft); color: var(--ink); font-weight: 500; }
.form-status:empty { display: none; }

/* ---------- Підвал ---------- */
.section--flush-top { padding-top: 0; }
.site-footer { padding-block: clamp(48px, 6vw, 72px) 32px; background: var(--forest); color: var(--on-forest); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid p { margin-top: 16px; max-width: 40ch; color: var(--on-forest-2); font-size: 0.92rem; }
.footer-grid h3 { margin-bottom: 14px; color: var(--on-forest-2); font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-grid ul { display: grid; gap: 10px; padding: 0; list-style: none; }
.footer-grid a { color: var(--on-forest); text-decoration: none; }
.footer-grid a:hover { color: var(--sun-2); }
.site-footer .brand__text small { color: var(--on-forest-2); }
.footer-bottom { display: grid; gap: 10px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: var(--on-forest-2); font-size: 0.8rem; }
.footer-bottom a { color: var(--on-forest); }

/* ---------- Поява ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .main-nav a { padding: 10px 10px; }
  .timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
  .timeline::before { display: none; }
  .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope li:nth-child(3) { padding-left: 0; border-left: 0; }
  .scope li:nth-child(n + 3) { margin-top: 28px; }
}
@media (max-width: 960px) {
  :root { --header: 64px; }
  .menu-button { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 4px;
    max-height: calc(100dvh - var(--header));
    padding: 16px var(--gutter) 28px;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .main-nav .nav-cta { display: flex; margin-top: 10px; }
  .hero-grid, .mount-grid, .section-head, .calc, .page-hero-grid, .split, .qa, .form-wrap, .cta-band-inner { grid-template-columns: minmax(0, 1fr); }
  /* Питання — горизонтальна стрічка карток, відповідь під нею */
  .qa-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 42%);
    gap: 8px;
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .qa-list::-webkit-scrollbar { display: none; }
  .qa-q { height: 100%; border-color: var(--line); scroll-snap-align: start; }
  .qa-q[aria-selected='true']::after { top: 18px; margin-top: 0; }
  .qa-a { min-height: 0; }
  .split--rev .split__media { order: 0; }
  .hero-visual { max-width: 640px; margin-bottom: 24px; }
  .sunwidget { left: 12px; bottom: -24px; }
  .facts-row { grid-template-columns: minmax(0, 1fr); }
  .gallery-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-strip figure { height: auto; aspect-ratio: 4 / 3; }
  .gallery-strip figure:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .page-hero-photo { aspect-ratio: 16 / 9; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (min-width: 961px) { .main-nav .nav-cta { display: none; } }
@media (max-width: 680px) {
  body { font-size: 16px; }
  .sunbar__demo { display: none; }
  .roof-cards { grid-template-columns: minmax(0, 1fr); }
  .scope { grid-template-columns: minmax(0, 1fr); }
  .scope li, .scope li + li { padding: 24px 0 0; border-left: 0; }
  .scope li:nth-child(n + 2) { margin-top: 20px; border-top: 1px solid var(--line); }
  .timeline { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .timeline li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; }
  .timeline li::before { grid-row: span 2; }
  .timeline h3 { margin-top: 8px; }
  .mount-specs div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .calc-kpis { grid-template-columns: minmax(0, 1fr); }
  .calc-kpis div { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .seg { grid-template-columns: minmax(0, 1fr); }
  .range-row { grid-template-columns: minmax(0, 1fr) 6.5rem; }
  .chart { height: 140px; gap: 4px; }
  .spec-table thead { display: none; }
  .spec-table tr { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .spec-table th, .spec-table td { width: auto !important; padding: 0; border: 0; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .qa-list { grid-auto-columns: minmax(220px, 78%); }
  .qa-q { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .btn { padding-block: 12px; white-space: normal; text-align: center; }
  .calc-result .btn, .cta-band .btn { align-self: stretch; width: 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .sunwidget { width: calc(100% - 24px); }
  .brand__text small { display: none; }
  .header-inner { gap: 10px; }
  .menu-button { gap: 8px; padding: 0 6px 0 12px; font-size: 0.82rem; }
}
/* «Нагору»: сонячна дуга. Сонце рухається від сходу до заходу разом із прокруткою сторінки, у кінці «сідає» і світиться на горизонті */
.sunup {
  position: fixed;
  z-index: 90;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: none;
  width: 78px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: var(--forest-2);
  color: var(--on-forest);
  box-shadow: 0 14px 30px -12px rgba(16, 41, 31, 0.7);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.35s, transform 0.5s var(--ease), visibility 0s 0.5s, background-color 0.25s;
}
.sunup.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sunup:hover { background: var(--forest); }
.sunup svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sunup .rail { fill: none; stroke: rgba(238, 243, 238, 0.22); stroke-width: 1.5; stroke-linecap: round; }
.sunup .trail { fill: none; stroke: var(--sun); stroke-width: 2; stroke-linecap: round; }
.sunup .ground { stroke: rgba(238, 243, 238, 0.3); stroke-width: 1.5; stroke-linecap: round; }
.sunup .sun { fill: var(--sun-2); }
.sunup .halo { fill: var(--sun); opacity: 0; transition: opacity 0.6s; }
.sunup.is-end .halo { opacity: 0.35; animation: sunup-glow 2.4s ease-in-out infinite; }
.sunup .arrow { fill: none; stroke: var(--on-forest); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.sunup:hover .arrow { transform: translateY(-2px); }
.sunup.is-go .arrow { animation: sunup-go 0.5s var(--ease); }
@keyframes sunup-glow { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.5; } }
@keyframes sunup-go { 0% { transform: translateY(0); } 45% { transform: translateY(-16px); opacity: 0; } 46% { transform: translateY(16px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@media (max-width: 1024px) {
  .sunup { display: block; }
  .site-footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .sunup { transform: none; }
  .sunup .arrow, .sunup.is-end .halo { animation: none; }
}@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
