/* COMFRIG · Casa Verde Baterii 2026 — site.css (v0.1, hero) */

/* ---------- Fonts (self-hosted, no data sent to Google) ---------- */
@font-face { font-family: "Plex Serif"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/ibm-plex-serif-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Serif"; font-weight: 600; font-style: normal; font-display: swap;
  src: url(../fonts/ibm-plex-serif-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 500; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* Logo wordmark: Libre Baskerville, subset to the letters of COMfrig only (~2.5 KB) */
@font-face { font-family: "Logo Baskerville"; font-weight: 700; font-style: normal; font-display: block;
  src: url(../fonts/libre-baskerville-700-logo.woff2) format("woff2"); }
@font-face { font-family: "Logo Baskerville"; font-weight: 400; font-style: italic; font-display: block;
  src: url(../fonts/libre-baskerville-italic-logo.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --paper: #ffffff;
  --surface: #f5f5f4;      /* light grey from the logo bar */
  --ink: #16202c;          /* blue-black of the solar cells */
  --ink-2: #47525f;
  --muted: #8b949e;        /* inactive headline line, 3:1 on white */
  --line: #dde2e7;
  --sun: #e78b2e;          /* logo orange: score, calculator */
  --sky: #0f7ac7;          /* logo blue: links */
  --plan: #0c569a;         /* blueprint: dossier */
  --open: #1e8a4c;

  --serif: "Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --header-h: 72px;
  --gutter: clamp(20px, 4.2vw, 64px);
  --r-ctl: 14px;            /* controls: soft, like an inverter housing */
  --ease: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; }
a { color: var(--sky); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 40px; padding-inline: var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; }
.wordmark { font-family: "Logo Baskerville", "Libre Baskerville", Baskerville, Georgia, serif; font-size: 27px; line-height: 1;
  white-space: nowrap; font-feature-settings: normal; padding-bottom: 2px; }
.wordmark b { font-weight: 700; color: var(--sun); letter-spacing: .01em; }
.wordmark i { font-weight: 400; font-style: italic; color: var(--plan); margin-left: .03em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.call { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: var(--r-ctl); color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 15px; letter-spacing: .01em; transition: background-color .2s, color .2s; }
.call:hover { background: var(--ink); color: #fff; }

/* ---------- Hero: full-width footage, switch over its bottom edge, text below ---------- */
.hero { position: relative; --overlap: 64px; }

.hero-media { position: relative; width: 100%; overflow: hidden;
  height: clamp(400px, calc(100svh - var(--header-h) - 210px), 800px);
  background: #2b2723 url(../img/hero-real.jpg) 50% 55% / cover no-repeat; }
.hero-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.switch { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: min(1040px, calc(100% - 2 * var(--gutter))); margin: calc(-1 * var(--overlap)) auto 0; padding: 10px;
  background: #fff; border-radius: 22px; box-shadow: 0 26px 60px rgba(10, 20, 35, .26), 0 2px 6px rgba(10, 20, 35, .1); }

.choice { position: relative; overflow: hidden; display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px;
  column-gap: 16px; row-gap: 4px; align-items: center; padding: 18px 20px 20px;
  border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--ink); text-decoration: none;
  transition: background-color .45s var(--ease), border-color .45s var(--ease), color .45s var(--ease); }
.choice:hover { border-color: var(--ink); }
.choice-icon { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--surface); transition: background-color .45s var(--ease); }
.choice-title { font: 600 clamp(1.45rem, 1.05rem + 1vw, 2.05rem)/1.1 var(--serif); letter-spacing: -.01em; }
.choice-desc { grid-column: 2; font-size: 15px; line-height: 1.4; color: var(--ink-2); transition: color .45s var(--ease); }
.choice-go { grid-column: 3; grid-row: 1 / span 2; opacity: .55; transition: transform .25s var(--ease), opacity .25s; }
.choice:hover .choice-go { transform: translateX(3px); opacity: 1; }
.choice[data-scene="calc"].is-active { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.choice[data-scene="calc"].is-active .choice-desc { color: #33261a; }
.choice[data-scene="plan"].is-active { background: var(--plan); border-color: var(--plan); color: #fff; }
.choice[data-scene="plan"].is-active .choice-desc { color: rgba(255, 255, 255, .85); }
.choice.is-active .choice-icon { background: rgba(255, 255, 255, .24); }
.choice.is-active .choice-go { opacity: 1; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: currentColor; opacity: .3;
  transform: scaleX(0); transform-origin: left center; }
.choice.is-active.is-timing .progress { animation: fill var(--cycle, 6s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.hero-copy { display: grid; justify-items: center; gap: 16px; max-width: 46rem; margin: 0 auto;
  padding: clamp(36px, 5vw, 56px) var(--gutter) clamp(48px, 6vw, 72px); text-align: center; }
.program { margin: 0; display: grid; gap: 6px; }
.program-name { font: 600 clamp(1.9rem, 1.3rem + 1.6vw, 2.7rem)/1.08 var(--serif); letter-spacing: -.01em; color: var(--ink); }
.program-sub { font-size: 17px; font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.status { display: inline-flex; align-items: flex-start; gap: 10px; margin: 4px 0 0; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); font-size: 15px; font-weight: 500; color: var(--ink); text-align: left; }
.status-dot { flex: none; margin-top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(231, 139, 46, .2); }
.status[data-phase="open"] .status-dot { background: var(--open); box-shadow: 0 0 0 4px rgba(30, 138, 76, .16); }
.status[data-phase="closed"] .status-dot { background: var(--muted); box-shadow: none; }
.lead { margin: 0; max-width: 36em; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.talk { margin: 0; font-size: 15px; color: var(--ink-2); }
.talk a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.legal { margin: 4px 0 0; max-width: 44em; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* drawing title block, shown with the plan */
.titleblock { position: absolute; z-index: 2; right: clamp(16px, 2.2vw, 32px); top: clamp(16px, 2.2vw, 32px);
  width: min(340px, 64%); color: #fff; border: 1.5px solid rgba(255, 255, 255, .85); font-size: 13px; line-height: 1.35;
  background: var(--plan); opacity: 0; transform: translateY(-8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.hero-media[data-scene="plan"] .titleblock { opacity: 1; transform: none; transition-delay: .55s; }
.tb-head { padding: 9px 12px; font: 600 16px var(--serif); border-bottom: 1.5px solid rgba(255, 255, 255, .85); }
.titleblock dl { margin: 0; }
.titleblock dl div { display: grid; grid-template-columns: 84px 1fr; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.titleblock dl div:last-child { border-bottom: 0; }
.titleblock dt { padding: 7px 12px; color: rgba(255, 255, 255, .72); border-right: 1px solid rgba(255, 255, 255, .45); }
.titleblock dd { margin: 0; padding: 7px 12px; }
.hero-media[data-style="creion"] .titleblock { color: var(--ink); border-color: var(--ink); background: #fff; }
.hero-media[data-style="creion"] .tb-head { border-color: var(--ink); }
.hero-media[data-style="creion"] .titleblock dl div, .hero-media[data-style="creion"] .titleblock dt { border-color: rgba(22, 32, 44, .35); }
.hero-media[data-style="creion"] .titleblock dt { color: var(--ink-2); }

/* ---------- Placeholder sections (until built) ---------- */
.next { padding: 72px var(--gutter); border-top: 1px solid var(--line); }
.next h2 { margin: 0 0 8px; font: 600 1.9rem/1.15 var(--serif); }
.next p { margin: 0; color: var(--ink-2); }

/* ---------- Responsive (header + hero) ---------- */
@media (max-width: 1100px) { .nav { gap: 20px; } }
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .wordmark { font-size: 23px; }
  .nav { display: none; }
  .call { margin-left: auto; height: 40px; padding: 0 14px; font-size: 14px; }
  .hero { --overlap: 34px; }
  .hero-media { height: auto; aspect-ratio: 4 / 3; max-height: 56svh; }
  .switch { grid-template-columns: 1fr; width: calc(100% - 24px); padding: 8px; gap: 8px; border-radius: 18px; }
  .choice { grid-template-columns: 44px minmax(0, 1fr) 20px; padding: 14px 14px 16px; column-gap: 12px; }
  .choice-icon { width: 44px; height: 44px; border-radius: 11px; }
  .choice-title { font-size: clamp(1.35rem, 1.05rem + 1.4vw, 1.6rem); }
  .choice-desc { font-size: 14px; }
  .hero-copy { gap: 14px; padding-top: 30px; }
  .program-sub { font-size: 15.5px; }
  .status { font-size: 14px; border-radius: 14px; }
  .lead { font-size: 16.5px; }
  .titleblock { display: none; }
}
@media (max-width: 420px) {
  .call span { display: none; }
  .call { width: 44px; padding: 0; justify-content: center; }
}
@media (min-width: 901px) and (max-height: 820px) {
  .hero-media { height: clamp(380px, calc(100svh - var(--header-h) - 190px), 800px); }
  .choice { padding-block: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
.status, .lead, .choice-desc, .legal { text-wrap: pretty; }

/* =========================================================
   Sections (calculator, offer, dossier)
   ========================================================= */
.sec { padding: clamp(64px, 8vw, 112px) var(--gutter); border-top: 1px solid var(--line); }
.sec-head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 48px); }
.sec-head h2 { margin: 0 0 14px; font: 600 clamp(2rem, 1.35rem + 1.9vw, 3rem)/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.sec-head p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 22px;
  border: 0; border-radius: var(--r-ctl); font: 600 16.5px/1.25 var(--sans); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .2s var(--ease); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #d97c1f; }
.btn-light { background: #fff; color: var(--plan); }
.btn-light:hover { background: #eef4fa; }
.btn:active { transform: translateY(1px); }
.link-btn { padding: 0; border: 0; background: none; font: 600 15px/1.3 var(--sans); color: var(--sky); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.hint, .fine { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.fine { font-size: 13px; }

/* segmented control */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: calc(var(--r-ctl) + 2px); background: var(--surface); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; min-width: 92px; padding: 10px 18px; border-radius: 11px; text-align: center; font-weight: 500; font-size: 15.5px; color: var(--ink-2); transition: background-color .2s, color .2s, box-shadow .2s; }
.seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(22, 32, 44, .12), 0 0 0 1px rgba(22, 32, 44, .06); }
.seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

/* ---------- calculator ---------- */
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .95fr); gap: clamp(28px, 4vw, 64px); align-items: start; max-width: 1240px; }
.calc-in { display: grid; gap: 34px; }
.q { margin: 0; padding: 0; border: 0; min-width: 0; }
.q legend, .lbl { display: block; padding: 0; margin: 0 0 12px; font-weight: 600; font-size: 17px; color: var(--ink); }
.lbl { margin: 18px 0 8px; font-size: 15.5px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row label { font-weight: 600; font-size: 15.5px; }
.row output { font-weight: 600; font-size: 17px; }

.pkgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pkg { position: relative; display: grid; align-content: start; gap: 4px; padding: 14px 16px 15px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.pkg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pkg:hover { border-color: var(--ink-2); }
.pkg-name { font-weight: 600; font-size: 15.5px; letter-spacing: .01em; }
.pkg-cfg { font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.pkg-price { margin-top: 6px; font-weight: 600; font-size: 17px; }
.pkg-score { font-size: 13px; color: var(--ink-2); }
.pkg:has(input:checked) { border-color: var(--sun); box-shadow: inset 0 0 0 1.5px var(--sun); background: #fff8f0; }
.pkg:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.pkg.is-manual { background: var(--surface); }
.pkg.is-manual .pkg-price { font-size: 15px; font-weight: 500; color: var(--ink-2); }

.manual { padding: 22px 22px 24px; border-radius: var(--r-ctl); background: var(--surface); }
.money-in { display: flex; align-items: center; max-width: 260px; border: 1px solid #c9d0d7; border-radius: 12px; background: #fff; }
.money-in:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(15, 122, 199, .18); }
.money-in input { flex: 1; min-width: 0; height: 48px; padding: 0 12px 0 14px; border: 0; border-radius: 12px; background: transparent; font: 600 17px var(--sans); color: var(--ink); font-feature-settings: "tnum" 1; }
.money-in input:focus { outline: none; }
.money-in span { padding-right: 14px; color: var(--ink-2); }
.manual .seg { margin-bottom: 4px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; margin: 6px 0 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--sun) var(--p, 50%), #dfe3e8 var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: #dfe3e8; }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--sun); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: 0 1px 4px rgba(22, 32, 44, .25); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(15, 122, 199, .35); }
.q .row input[type=range] { flex: 1; }
.big-out { min-width: 6.5em; text-align: right; font-size: 20px !important; }
.afm-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; font-size: 14.5px; color: var(--ink-2); }
.afm-meta b { color: var(--ink); }

/* result instrument */
.calc-out { position: sticky; top: calc(var(--header-h) + 20px); padding: clamp(22px, 2.4vw, 32px); border-radius: 18px; background: var(--surface); }
.out-label { margin: 0; font: 500 15px/1.3 var(--sans); color: var(--ink-2); }
.score { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 14px; }
.score [data-score] { font: 600 clamp(4.2rem, 3rem + 3vw, 5.6rem)/1 var(--serif); letter-spacing: -.02em; font-feature-settings: "tnum" 1, "lnum" 1; }
.score .of { font-size: 18px; color: var(--ink-2); }
.meter { position: relative; height: 12px; border-radius: 6px; background: #e3e6ea; overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; background: var(--sun); transition: width .5s var(--ease); }
.ticks { position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(10% - 1px), rgba(255, 255, 255, .9) calc(10% - 1px) 10%); }
.meter-scale { display: flex; justify-content: space-between; margin: 6px 0 22px; font-size: 12.5px; color: var(--ink-2); }

.crit, .sum { margin: 0; display: grid; }
.crit div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding: 10px 0; border-top: 1px solid #dfe3e7; }
.crit dt { font-size: 15px; }
.crit dd { margin: 0; font-size: 14px; color: var(--ink-2); }
.crit dd b { font-size: 16px; color: var(--ink); }
.cbar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: #e3e6ea; overflow: hidden; }
.cbar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 2px; transition: width .5s var(--ease); }
.sum { margin-top: 14px; padding-top: 6px; border-top: 1px solid #cfd5db; }
.sum div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 15px; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; font-weight: 600; white-space: nowrap; }
.sum .you { margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: #fff; }
.sum .you dt { color: var(--ink); font-weight: 500; }
.sum .you dd { font-size: 17px; }
.sum small { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.calc-out .btn { width: 100%; margin-top: 4px; }
.disclaimer { max-width: 62rem; margin: 32px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

.dock { position: fixed; z-index: 25; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgba(22, 32, 44, .3); }
.dock b { font: 600 20px var(--serif); color: var(--sun); }
.dock a { color: #fff; font-weight: 600; }

/* ---------- offer ---------- */
.offer { background: var(--surface); }
.offer-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: start; max-width: 1240px; }
.sheet { position: sticky; top: calc(var(--header-h) + 20px); padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.sheet h3, .sent h3 { margin: 0 0 12px; font: 600 1.35rem/1.2 var(--serif); }
.sheet dl { margin: 0 0 16px; }
.sheet dl div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.sheet dt { color: var(--ink-2); }
.sheet dd { margin: 0; font-weight: 600; text-align: right; }
.sheet dl div.score-row dd { color: var(--ink); font: 600 1.25rem var(--serif); }
.sheet-empty { margin: 0 0 14px; color: var(--ink-2); }

.lead-form { padding: clamp(22px, 3vw, 36px); border-radius: 18px; background: #fff; border: 1px solid var(--line); display: grid; gap: 18px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.f { margin: 0; padding: 0; border: 0; min-width: 0; }
.f > label, .f legend { display: block; margin: 0 0 7px; padding: 0; font-weight: 600; font-size: 15px; }
.opt { font-weight: 400; color: var(--ink-2); }
.f input:not([type=checkbox]):not([type=radio]), .f select, .f textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #c9d0d7; border-radius: 12px;
  background: #fff; font: 400 16px/1.4 var(--sans); color: var(--ink); }
.f textarea { resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(15, 122, 199, .18); }
.f [aria-invalid="true"] { border-color: #c2410c !important; }
.err { margin: 6px 0 0; font-size: 13.5px; color: #b3400d; }
.err:empty { display: none; }
.f > label.check { display: flex; margin: 0; font-weight: 400; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; }
.lead-form .btn { justify-self: start; min-width: 220px; }
.form-note { margin: 0; font-size: 14px; color: var(--ink-2); }
.form-note:empty { display: none; }
.form-note.is-preview { padding: 12px 14px; border-radius: 10px; background: #fff8f0; color: #6a3e10; }
.sent { padding: clamp(22px, 3vw, 36px); border-radius: 18px; background: #fff; border: 1.5px solid var(--open); }
.sent ol { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 8px; }

/* ---------- dossier (blueprint) ---------- */
.plan { position: relative; color: #fff; border-top: 0;
  background-color: var(--plan);
  background-image:
    linear-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .13) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px, 28px 28px, 28px 28px; }
.plan .sec-head p { color: rgba(255, 255, 255, .86); }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: start; max-width: 1240px; }
.who h3, .docs h3 { margin: 0 0 14px; font: 600 1.3rem/1.2 var(--serif); }
.who h3:not(:first-child) { margin-top: 36px; }
.who ul { margin: 0; padding-left: 1.1em; display: grid; gap: 10px; font-size: 16px; line-height: 1.5; }
.who li::marker { color: var(--sun); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 0; }
.steps li { counter-increment: s; position: relative; padding: 12px 0 12px 48px; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 15.5px; line-height: 1.5; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 11px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .9); font: 600 14px var(--sans); }

.docs { padding: clamp(22px, 3vw, 32px); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 20px 50px rgba(5, 30, 60, .35); }
.docs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.docs-count { margin: 0 0 14px; font-weight: 600; font-size: 14.5px; color: var(--plan); }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { border-top: 1px solid var(--line); }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; cursor: pointer; font-size: 15.5px; line-height: 1.45; }
.checklist input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--plan); }
.checklist input:checked + span { color: var(--ink-2); }
.checklist input:checked + span b { text-decoration: line-through; text-decoration-thickness: 1px; }
.checklist .extra label { font-size: 14.5px; color: var(--ink-2); }
.warn { margin-top: 18px; padding: 16px 18px; border-radius: 12px; background: var(--plan); color: #fff; }
.warn p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }

@media (max-width: 1100px) {
  .pkgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .calc-grid, .offer-grid, .plan-grid { grid-template-columns: 1fr; }
  .calc-out, .sheet { position: static; }
  .sheet { order: -1; }
  .f2 { grid-template-columns: 1fr; }
  .sec-head p { font-size: 16.5px; }
  .lead-form .btn { justify-self: stretch; }
}
@media (max-width: 420px) {
  .seg span { min-width: 0; padding: 10px 14px; }
  .pkg { padding: 12px 12px 13px; }
}

/* =========================================================
   Drifting line drawings (panels, batteries, AC, heat pumps)
   ========================================================= */
.sec { position: relative; }
.drift { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.drift i { position: absolute; left: 0; top: var(--y); width: var(--s); display: block; opacity: var(--o);
  animation: drift var(--d) linear var(--delay) infinite; will-change: transform; }
.drift i.rev { animation-direction: reverse; }
.drift svg { display: block; width: 100%; height: auto; aspect-ratio: 1; overflow: visible; animation: bob var(--b) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes bob { from { transform: translateY(-9px) rotate(-6deg); } to { transform: translateY(9px) rotate(6deg); } }
.is-still .drift i, .is-still .drift svg { animation-play-state: paused; }
.sec-head, .calc-grid, .disclaimer, .offer-grid, .plan-grid { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .drift i { left: var(--x); } }

/* =========================================================
   Lucrări: four small cards, slowly floating
   ========================================================= */
.works { overflow-x: clip; text-align: center; }
.works-head { max-width: 40rem; margin: 0 auto clamp(40px, 5vw, 64px); }
.works-head h2 { margin: 0 0 12px; font: 600 clamp(2rem, 1.35rem + 1.9vw, 3rem)/1.08 var(--serif); letter-spacing: -.01em; }
.works-head p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: balance; }

.fan { position: relative; max-width: 1000px; height: clamp(330px, 30vw, 400px); margin: 0 auto; perspective: 1400px; }
.card { --w: 200px; --x: 0px; --r: 0deg; --ry: 0deg; --top: 0px;
  position: absolute; left: 50%; top: var(--top); z-index: 1; width: var(--w); aspect-ratio: 3 / 4; margin: 0 0 0 calc(var(--w) / -2);
  border-radius: 18px; overflow: hidden; background: #1d2128 center / cover no-repeat;
  box-shadow: 0 22px 44px rgba(10, 20, 35, .28), 0 2px 6px rgba(10, 20, 35, .12);
  transform: translateX(var(--x)) rotate(var(--r)) rotateY(var(--ry));
  animation: float calc(6s + var(--i) * 1.1s) ease-in-out calc(var(--i) * -1.7s) infinite alternate;
  transition: scale .35s var(--ease), box-shadow .35s var(--ease); }
.card:nth-child(1) { --w: 196px; --x: -330px; --r: -7deg; --ry: 14deg; --top: 44px; }
.card:nth-child(2) { --w: 232px; --x: -114px; --r: -2.5deg; --ry: 4deg; z-index: 2; }
.card:nth-child(3) { --w: 232px; --x: 114px; --r: 2.5deg; --ry: -4deg; z-index: 2; }
.card:nth-child(4) { --w: 196px; --x: 330px; --r: 7deg; --ry: -14deg; --top: 44px; }
.card:hover { z-index: 5; scale: 1.045; box-shadow: 0 30px 60px rgba(10, 20, 35, .34); }
@keyframes float { from { translate: 0 -7px; } to { translate: 0 9px; } }
.card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s ease; }
.card.is-swap video { opacity: 0; }
.card figcaption { position: absolute; inset: auto 0 0 0; z-index: 1; display: grid; gap: 3px; padding: 44px 14px 14px; text-align: left; color: #fff;
  background: linear-gradient(to top, rgba(8, 12, 18, .78), rgba(8, 12, 18, 0)); transition: opacity .3s ease; }
.card.is-swap figcaption { opacity: 0; }
.card figcaption b { font: 600 17px/1.2 var(--serif); }
.card figcaption span { font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, .86); }

@media (max-width: 900px) {
  .card:nth-child(1) { --w: 170px; --x: -282px; }
  .card:nth-child(2) { --w: 200px; --x: -98px; }
  .card:nth-child(3) { --w: 200px; --x: 98px; }
  .card:nth-child(4) { --w: 170px; --x: 282px; }
  .fan { height: 330px; }
}
@media (max-width: 760px) {
  .fan { height: auto; max-width: 440px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; perspective: none; padding-bottom: 20px; }
  .card, .card:nth-child(n) { position: relative; left: auto; top: auto; width: auto; margin: 0; --ry: 0deg; --x: 0px; }
  .card:nth-child(1) { --r: -2deg; }
  .card:nth-child(2) { --r: 1.5deg; top: 18px; }
  .card:nth-child(3) { --r: 1.5deg; }
  .card:nth-child(4) { --r: -2deg; top: 18px; }
  .card figcaption { padding: 34px 11px 11px; }
  .card figcaption b { font-size: 15px; }
  .card figcaption span { font-size: 11.5px; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, .82); padding: clamp(48px, 6vw, 72px) var(--gutter) 28px; font-size: 15px; line-height: 1.6; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); }
.foot-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; max-width: 1240px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand .wordmark i { color: #6fb4ff; }
.foot-brand p { margin: 0; max-width: 26em; }
.foot-col h2 { margin: 0 0 10px; font: 600 15px var(--sans); color: #fff; }
.foot-col p { margin: 0; }
.foot-legal { max-width: 1240px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 13px; color: rgba(255, 255, 255, .62); }
.foot-legal p { margin: 0 0 8px; max-width: 70em; }
@media (max-width: 900px) { .foot-inner { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-inner { grid-template-columns: 1fr; } }

/* legal page */
.legal-page { max-width: 46rem; }
.legal-page h1 { margin: 0 0 8px; font: 600 clamp(2rem, 1.35rem + 1.9vw, 2.8rem)/1.1 var(--serif); }
.legal-page h2 { margin: 32px 0 8px; font: 600 1.25rem/1.25 var(--serif); }
.legal-page p, .legal-page li { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.legal-page ul { padding-left: 1.2em; }
.legal-page .updated { color: var(--muted); font-size: 14px; }

/* =========================================================
   Calculator v2: three questions, two modes, suggestion beside the score
   ========================================================= */
.h2-next { display: block; color: #b8620f; }
.qn { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 600 14px/1 var(--sans); vertical-align: 1px; }
.q-label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 17px; color: var(--ink); }
.row .q-label { margin: 0; }
.seg-wide { display: flex; width: 100%; max-width: 30rem; }
.seg-wide label { flex: 1; }
.seg-wide span { min-width: 0; }
.mode-pkg, .mode-manual { margin-top: -10px; }
.pkgs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pkgs:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc-in .money-in { max-width: 280px; }


.tip-arrow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .25s; }
.tip-arrow.is-on { opacity: 1; }
.out-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 4px; }
.out-score .score { margin: 2px 0 6px; }

.tip { position: relative; z-index: 4; margin: 0; padding: 14px 16px 15px; border: 0; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1.5px var(--sun), 0 10px 24px rgba(231, 139, 46, .22); font-size: 14.5px; line-height: 1.42;
  animation: tip-in .35s var(--ease); }
.tip p { margin: 0; }
.tip-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px !important; font: 600 1.05rem/1.2 var(--serif); color: #a8560c; }
.tip-head::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.tip[data-kind="warn"] { box-shadow: 0 0 0 1.5px #c2410c, 0 10px 24px rgba(194, 65, 12, .2); }
.tip[data-kind="warn"] .tip-head { color: #b3400d; }
.tip[data-kind="warn"] .tip-head::before { background: #c2410c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v8' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='18' r='1.8' fill='%23fff'/%3E%3C/svg%3E") center/14px no-repeat; }
.tip[data-kind="ok"], .tip[data-kind="info"] { box-shadow: 0 0 0 1.5px #b9c6d3, 0 8px 20px rgba(22, 32, 44, .08); }
.tip[data-kind="ok"] .tip-head { color: var(--open); }
.tip[data-kind="ok"] .tip-head::before { background: var(--open) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.tip[data-kind="info"] .tip-head { color: var(--plan); }
.tip[data-kind="info"] .tip-head::before { background: var(--plan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='7' r='1.8' fill='%23fff'/%3E%3Cpath d='M12 11v7' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.tip-btn { margin-top: 10px; min-height: 38px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--sun); color: var(--ink);
  font: 600 14.5px var(--sans); cursor: pointer; transition: background-color .2s; }
.tip-btn:hover { background: #d97c1f; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* the line the suggestion is about */
.crit div, .sum div { transition: background-color .3s, box-shadow .3s; }
.crit .is-target, .sum .is-target { background: #fff3e6; box-shadow: inset 3px 0 0 var(--sun); border-radius: 8px; }
.crit .is-target { padding-inline: 10px; margin-inline: -10px; }
.sum .is-target:not(.you) { padding-inline: 10px; margin-inline: -10px; }
.sum .you.is-target { background: #fff3e6; box-shadow: inset 3px 0 0 var(--sun), 0 0 0 1.5px rgba(231, 139, 46, .45); }

@media (max-width: 1180px) and (min-width: 901px) {
  .out-top { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 900px) {
  .pkgs, .pkgs:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .out-top { grid-template-columns: 1fr; gap: 10px; }
  .seg-wide span { padding-inline: 8px; font-size: 15px; }
}
@media (max-width: 380px) {
  .pkgs, .pkgs:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; }
}
.out-top { margin-bottom: 14px; }
@media (max-width: 900px) { .calc-out { position: relative; top: auto; } }
.hero-copy { max-width: 54rem; }
.hero-copy .lead { max-width: 46em; text-wrap: balance; }
