/* ============================================================
   VARME HUS — bold reimagining
   Design tokens + global styles
   ============================================================ */

:root {
  /* Warm white + orange theme — hues pulled from the Varme Hus logo (hsl 35) */
  --cream:       hsl(38 55% 97%);   /* warm white page background */
  --cream-2:     hsl(35 45% 92%);   /* alt section background */
  --card:        hsl(40 60% 99%);   /* card */
  --ink:         hsl(26 35% 12%);   /* warm near-black text */
  --ink-2:       hsl(26 22% 26%);
  --ink-soft:    hsl(28 14% 42%);   /* muted text */
  --line:        hsl(33 35% 86%);   /* border */
  --ink-light:   hsl(36 32% 95%);   /* light text on dark bands */
  --ink-dark:    hsl(26 35% 9%);  /* text on orange / white surfaces */

  --orange:      hsl(35 100% 53%);   /* sampled from logo */   /* --primary */
  --orange-deep: hsl(32 100% 44%);
  --orange-soft: hsl(38 100% 74%);
  --teal:        hsl(158 42% 36%);  /* --accent / nordic green */
  --teal-deep:   hsl(158 45% 28%);
  --partner-gold: rgb(255 192 1);   /* sampled from partner logo strip */

  --dark:        hsl(26 28% 5.5%); /* deepest bands */
  --dark-2:      hsl(26 22% 13%);

  /* Energy-label spectrum (G -> A) */
  --e-g: #E13123;
  --e-f: #F2701C;
  --e-e: #F8A21A;
  --e-d: #F4CF14;
  --e-c: #AFC42B;
  --e-b: #5BB12E;
  --e-a: #1C9145;
  --energy-grad: linear-gradient(90deg,
     var(--e-g) 0%, var(--e-f) 17%, var(--e-e) 34%,
     var(--e-d) 51%, var(--e-c) 68%, var(--e-b) 84%, var(--e-a) 100%);

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 14px;
  --shadow: 0 14px 36px -10px rgba(80,42,8,.2), 0 4px 12px -4px rgba(80,42,8,.1);
  --shadow-sm: 0 6px 18px -4px rgba(80,42,8,.15);
  --shadow-glow: 0 0 24px -4px hsl(35 100% 53% / .25);

  --ff-display: "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  --ff-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16.5px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.eyebrow {
  font-family: var(--ff-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 13px;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 3px; border-radius: 3px;
  background: var(--teal);
}
.eyebrow.on-dark { color: var(--orange-soft); }
.eyebrow.on-dark::before { background: var(--orange); }
.eyebrow.center { justify-content: center; }

/* ---- Energy spectrum strip (signature motif) ---- */
.spectrum {
  height: 6px; width: 100%;
  background: var(--energy-grad);
  border: none;
}
.spectrum.tall { height: 10px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: var(--r);
  background: linear-gradient(110deg, var(--orange), var(--orange) 55%, hsl(32 100% 45%));
  color: #fff;
  border: none; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, filter .2s;
  box-shadow: 0 4px 14px -2px hsl(32 100% 40% / .35), var(--shadow-glow);
  white-space: nowrap;
}
.btn::after { /* sheen sweep */
  content: ""; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
  pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px hsl(32 100% 40% / .45), var(--shadow-glow); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .25s; }
.btn:hover .arr { transform: translateX(4px); }

.btn.ghost {
  background: transparent;
  border: 2px solid var(--ink);
  box-shadow: none;
  color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--ink-dark); transform: translateY(-2px); }
.btn.on-dark.ghost { border-color: var(--ink-light); color: var(--ink-light); }
.btn.on-dark.ghost:hover { background: var(--ink-light); color: var(--ink-dark); }
.btn.lg { padding: 18px 34px; font-size: 18px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.scrolled {
  background: hsl(38 55% 97% / .92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
  padding-block: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { height: 62px; width: auto; flex: none; display: block; transition: height .3s; }
.nav.scrolled .brand .logo { height: 50px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-weight: 600; font-size: 16px; color: var(--ink);
  position: relative; padding: 4px 0; white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--teal);
  transition: width .25s ease;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--teal); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2.5px; background: var(--ink); border-radius: 3px; transition: .3s; }
.nav-toggle span + span { margin-top: 6px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(120px, 16vh, 190px) 0 90px;
  overflow: hidden;
}
/* Ambient heat orbs */
.orb {
  position: absolute; z-index: 0;
  border-radius: 50%;
  filter: blur(56px);
  pointer-events: none;
  mix-blend-mode: normal;
}
.orb.o1 {
  width: clamp(320px, 46vw, 620px); height: clamp(320px, 46vw, 620px);
  top: -140px; right: -100px;
  background: radial-gradient(circle, hsl(35 100% 53% / .3), transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.orb.o2 {
  width: clamp(240px, 32vw, 440px); height: clamp(240px, 32vw, 440px);
  bottom: -120px; left: -140px;
  background: radial-gradient(circle, hsl(158 42% 42% / .18), transparent 65%);
  animation: drift2 27s ease-in-out infinite alternate;
}
.orb.o3 {
  width: clamp(180px, 24vw, 330px); height: clamp(180px, 24vw, 330px);
  top: 32%; left: 40%;
  background: radial-gradient(circle, hsl(36 100% 60% / .18), transparent 60%);
  animation: drift3 18s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-130px, 100px) scale(1.18); } }
@keyframes drift2 { to { transform: translate(110px, -80px) scale(1.12); } }
@keyframes drift3 { to { transform: translate(90px, 70px) scale(.88); } }
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 5vw, 80px); align-items: center;
  transition: grid-template-columns .75s cubic-bezier(.2,.8,.2,1), gap .75s cubic-bezier(.2,.8,.2,1);
}
.hero .wrap.engine-open { grid-template-columns: .55fr 1.45fr; gap: clamp(28px, 3.5vw, 56px); }
.hero h1 {
  font-size: clamp(38px, 5.4vw, 78px);
  font-weight: 800; margin: 18px 0 22px;
  transition: font-size .75s cubic-bezier(.2,.8,.2,1);
}
.engine-open .hero-copy h1 { font-size: clamp(30px, 3.6vw, 52px); }
.hero h1 .hl {
  background: linear-gradient(100deg, var(--orange), var(--teal), var(--orange-soft), var(--orange));
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.hero .lead { font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-soft); max-width: 36ch; }
.hero .lead a { color: var(--teal); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Address product-entry card */
.address-card {
  margin-top: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  max-width: 520px;
}
.address-card .ac-label {
  font-family: var(--ff-display); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 9px; margin-bottom: 14px;
}
.address-card .ac-label .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--e-a); box-shadow: 0 0 0 4px rgba(28,145,69,.18); }
.address-form { display: flex; gap: 10px; position: relative; }

/* Address autocomplete dropdown */
.addr-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden; display: none;
}
.addr-suggest.open { display: block; animation: fadeup .22s ease both; }
.as-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  font-size: 14.5px; color: var(--ink-2);
}
.as-item svg { flex: none; color: var(--ink-soft); }
.as-item b { color: var(--orange-deep); font-weight: 700; }
.as-item.active, .as-item:hover { background: var(--cream-2); }
.as-src {
  padding: 8px 14px; font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); border-top: 1px dashed var(--line);
}
.address-input {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  background: hsl(36 45% 95%); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}
.address-input:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px hsl(35 100% 53% / .15); }
.address-input svg { flex: none; color: var(--ink-soft); }
.address-input input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-family: var(--ff-body); font-size: 16px; color: var(--ink); padding: 15px 0;
}
.address-form .btn { padding-inline: 22px; }
.ac-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--e-a); position: relative; flex: none; }
.pulse-dot::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid var(--e-a); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0%{transform:scale(.6);opacity:.9} 100%{transform:scale(1.8);opacity:0} }

/* ---- Hero staircase graphic ---- */
.hero-art { position: relative; min-width: 0; }
.stair-panel {
  position: relative;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  border-radius: 24px;
  padding: 40px 34px 0;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1.04;
  display: flex; align-items: flex-end; justify-content: center;
}
.stair-panel::before {
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(circle at 70% 10%, hsl(35 100% 53% / .25), transparent 55%),
    radial-gradient(ellipse at 50% 100%, hsl(35 80% 40% / .14), transparent 60%);
}

/* ---- Grade-pulsing Varme Hus logo (placeholder state) ---- */
.grade-house {
  position: absolute; left: 30%; top: 12%;
  transform: translateX(-50%);
  width: clamp(96px, 36%, 160px);
  z-index: 1; color: var(--e-f);
  animation: gh-breath 4.5s ease-in-out infinite;
}
@keyframes gh-breath {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.045); }
}
.grade-house svg {
  width: 100%; height: auto; display: block; overflow: visible;
  filter: drop-shadow(0 0 16px currentColor);
  animation: gh-color 9s ease-in-out infinite alternate;
}
.gh-letters text {
  fill: currentColor; opacity: 0;
  font-family: var(--ff-display); font-weight: 800; font-size: 30px;
}
.gh-letters text:nth-child(1) { animation: ghl1 9s ease-in-out infinite alternate; }
.gh-letters text:nth-child(2) { animation: ghl2 9s ease-in-out infinite alternate; }
.gh-letters text:nth-child(3) { animation: ghl3 9s ease-in-out infinite alternate; }
.gh-letters text:nth-child(4) { animation: ghl4 9s ease-in-out infinite alternate; }
.gh-letters text:nth-child(5) { animation: ghl5 9s ease-in-out infinite alternate; }
@keyframes gh-color {
  0%, 12%  { color: var(--e-f); }
  25%, 37% { color: var(--e-e); }
  50%, 62% { color: var(--e-d); }
  73%, 80% { color: var(--e-c); }
  92%, 100% { color: var(--e-b); }
}
@keyframes ghl1 { 0%, 12% { opacity: 1; } 20%, 100% { opacity: 0; } }
@keyframes ghl2 { 0%, 17% { opacity: 0; } 25%, 37% { opacity: 1; } 45%, 100% { opacity: 0; } }
@keyframes ghl3 { 0%, 42% { opacity: 0; } 50%, 62% { opacity: 1; } 68%, 100% { opacity: 0; } }
@keyframes ghl4 { 0%, 67% { opacity: 0; } 73%, 80% { opacity: 1; } 86%, 100% { opacity: 0; } }
@keyframes ghl5 { 0%, 86% { opacity: 0; } 92%, 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gh-letters text:nth-child(1) { opacity: 1; }
}
.staircase {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 7px;
  width: 100%; height: 86%;
}
.step {
  flex: 1; position: relative;
  border-radius: 9px 9px 3px 3px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 10px;
  color: #fff; font-family: var(--ff-display); font-weight: 800; font-size: clamp(13px,1.4vw,19px);
  transform-origin: bottom;
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--c) 78%, white) 0%, var(--c) 26%, color-mix(in oklab, var(--c) 86%, black) 100%);
  box-shadow:
    inset 0 2px 0 hsl(0 0% 100% / .32),
    inset 2px 0 0 hsl(0 0% 100% / .1),
    inset -2px 0 6px hsl(0 0% 0% / .18),
    0 0 26px -6px var(--c),
    0 14px 22px -14px hsl(0 0% 0% / .8);
}
.step::before { /* glass sheen */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, hsl(0 0% 100% / .22), transparent);
  pointer-events: none;
}
.step span {
  position: relative; z-index: 1;
  text-shadow: 0 1px 4px hsl(0 0% 0% / .35);
  opacity: 0; transform: translateY(6px);
  transition: opacity .5s ease .55s, transform .5s ease .55s;
}
.staircase[data-grown] .step span { opacity: 1; transform: none; }
/* satisfying G→A energy wave once bars have grown */
.staircase.grown .step { animation: step-wave 4.4s ease-in-out infinite; animation-delay: var(--wd, 0s); }
@keyframes step-wave {
  0%, 24%, 100% { filter: brightness(1); transform: translateY(0); }
  9% { filter: brightness(1.22) saturate(1.15); transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .staircase.grown .step { animation: none; }
  .step span { opacity: 1; transform: none; }
}
/* ---- ByggSMART Core pipeline panel ---- */
.hero-art.show-engine .stair-panel { display: none; }
.engine-panel {
  display: none;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  border: 1px solid hsl(26 30% 22%);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px 22px;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
}
.hero-art.show-engine .engine-panel { display: flex; animation: fadeup .5s ease both; }
.ep-head {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-light); font-family: var(--ff-display); font-weight: 700; font-size: 14px;
}
.ep-head > span { white-space: nowrap; }
.ep-head img { width: 28px; height: auto; }
.ep-badge {
  font: 600 10px/1 var(--ff-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-soft); border: 1px solid hsl(35 80% 50% / .4);
  padding: 5px 9px; border-radius: 99px; white-space: nowrap;
}
.ep-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 22px; line-height: 1; padding: 2px 8px; border-radius: 8px;
}
.ep-close:hover { color: var(--ink-light); background: hsl(0 0% 100% / .08); }

/* Mini orchestration graph */
.ep-graph {
  margin: 14px 0 4px;
  background: hsl(26 24% 7% / .55);
  border: 1px solid hsl(26 24% 17%);
  border-radius: 14px;
  padding: 12px 10px;
}
.ep-graph svg { width: 100%; height: auto; display: block; }
.ep-graph .wire { fill: none; stroke: hsl(28 28% 27%); stroke-width: 1.3; stroke-dasharray: 3 3; }
.ep-graph .node { fill: hsl(26 24% 10%); stroke: hsl(26 26% 25%); stroke-width: 1; }
.ep-graph .node-label { fill: hsl(36 32% 92%); font-family: var(--ff-body); font-size: 8.5px; font-weight: 600; }
.ep-graph .node-sub { fill: hsl(32 14% 55%); font-family: var(--ff-body); font-size: 6.5px; font-weight: 500; }
.ep-graph .core-label { font-size: 9.5px; font-weight: 700; }
.ep-graph .node.blue-node { stroke: hsl(210 80% 55% / .8); }
.ep-graph .node.green-node { stroke: hsl(145 55% 40% / .85); }
.ep-graph .pkt.blue { fill: hsl(210 80% 62%); }
.ep-graph .pkt.green { fill: var(--e-a); }
.ep-graph .core-rect {
  fill: hsl(28 40% 11%); stroke: var(--orange); stroke-width: 1.6;
  filter: drop-shadow(0 0 5px hsl(35 100% 53% / .45));
}
.ep-graph.active .core-rect { animation: corepulse 1.8s ease-in-out infinite; }
@keyframes corepulse {
  0%, 100% { filter: drop-shadow(0 0 4px hsl(35 100% 53% / .35)); }
  50% { filter: drop-shadow(0 0 11px hsl(35 100% 53% / .75)); }
}
.ep-graph .out-node { stroke: hsl(158 40% 32%); }
.ep-graph .pkt { fill: var(--orange); opacity: 0; transition: opacity .4s; }
.ep-graph .pkt.out { fill: var(--e-a); }
.ep-graph.active .pkt.started { opacity: 1; }

@container (max-width: 430px) {
  .ep-row .det { display: none; }
  .ep-badge { display: none; }
}

.ep-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; color: var(--orange-soft);
  margin: 8px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ep-trace {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 2px;
}
.ep-row {
  display: flex; align-items: baseline; gap: 8px; color: var(--ink-soft);
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.ep-row.on { opacity: 1; transform: none; }
.ep-row .st { width: 14px; text-align: center; color: var(--orange); flex: none; }
.ep-row.running .st { animation: pulse-warm 1s ease-in-out infinite; }
.ep-row.ok .st { color: var(--e-a); animation: none; }
.ep-row .nm { color: var(--ink-light); white-space: nowrap; flex: none; }
.ep-row .det { flex: 1 1 auto; min-width: 0; font-size: 10.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-row .ms { margin-left: auto; flex: none; color: hsl(28 12% 46%); font-size: 10.5px; }
@keyframes pulse-warm { 0%,100% { opacity: .4; } 50% { opacity: 1; } }

.ep-result { display: none; }
.ep-result.on { display: block; animation: fadeup .5s ease both; margin-top: 12px; border-top: 1px solid hsl(26 26% 18%); padding-top: 4px; }

/* Boligdata block removed — result is chips + CTA only */
.ep-try-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.ep-try { padding: 13px 22px; font-size: 15px; }
.ep-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; letter-spacing: .03em;
  color: var(--ink-soft);
}
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ep-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ep-chip {
  font: 600 11px/1 var(--ff-body); color: var(--ink-light);
  border: 1px solid hsl(26 26% 28%); background: hsl(26 24% 12%);
  padding: 7px 10px; border-radius: 99px;
  white-space: nowrap;
}
.ep-note { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }
.ep-note a { color: var(--orange-soft); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   TAGLINE DIVIDER
   ============================================================ */
.tagline-strip { background: var(--cream); }
.tagline-strip .spectrum { height: 4px; }
.ts-inner {
  display: flex; align-items: center; justify-content: center; gap: 13px;
  padding: 20px var(--pad);
  border-bottom: 1px solid var(--line);
  font-family: var(--ff-display); font-weight: 700; font-size: 13.5px;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-soft); text-align: center;
}
.ts-inner img { height: 46px; width: auto; flex: none; }
@media (max-width: 560px) {
  .ts-inner { font-size: 11px; letter-spacing: .16em; }
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
section { position: relative; }
.section { padding: clamp(56px, 7vw, 92px) 0; }
.section-head { max-width: 760px; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head h2 { font-size: clamp(34px, 4.2vw, 56px); margin: 14px 0 12px; }
.section-head p { color: var(--ink-soft); font-size: 17.5px; max-width: 640px; }
.section-head .free-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-family: var(--ff-display); font-weight: 700; font-size: 14px;
  color: var(--teal-deep);
  background: hsl(158 42% 36% / .1);
  border: 1.5px solid hsl(158 42% 36% / .35);
  border-radius: 999px; padding: 9px 18px;
}
.section-head .free-pill svg { color: var(--teal); flex: none; }
.section-head.center p { margin-inline: auto; }

/* ---- Solution steps ---- */
.steps {
  margin-top: 44px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.step-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px 26px;
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.step-card::before {
  content:""; position:absolute; left:0; top:0; height:5px; width:100%;
  background: var(--energy-grad);
  transform: scaleX(0); transform-origin: left; transition: transform .4s ease;
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.step-card:hover::before { transform: scaleX(1); }
.step-arrow {
  position: absolute; top: 26px; right: 22px;
  color: var(--orange); font-weight: 700; font-size: 19px;
  opacity: .55; transition: opacity .3s, transform .3s;
}
.step-card:hover .step-arrow { opacity: 1; transform: translateX(4px); }
.step-ico svg { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.step-card:hover .step-ico svg { transform: scale(1.12) rotate(-5deg); }
.step-num {
  font-family: var(--ff-display); font-weight: 800; font-size: 14px;
  color: var(--orange); letter-spacing: .1em;
}
.step-ico {
  width: 56px; height: 56px; margin: 18px 0 18px;
  border-radius: 14px; background: var(--cream-2);
  display: grid; place-items: center; color: var(--ink);
  transition: background .3s, color .3s;
}
.step-card:hover .step-ico { background: var(--orange); color: #fff; }
.step-card h3 { font-size: 21px; margin-bottom: 10px; }
.step-card p { font-size: 15.5px; color: var(--ink-soft); }

/* ============================================================
   EKSEMPLER — showcase map
   ============================================================ */
.case-map {
  position: relative; margin-top: 52px;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  box-shadow: var(--shadow);
  height: clamp(444px, 46vw, 560px);
}
.cm-photo {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%, hsl(35 100% 53% / .07), transparent 50%),
    repeating-linear-gradient(135deg, hsl(36 30% 90% / .045) 0 12px, transparent 12px 26px);
}
.cm-note {
  position: absolute; left: 18px; bottom: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; letter-spacing: .05em;
  color: hsl(36 20% 70% / .45);
}
/* default house — the customer's home, tiltak pinned on it */
.cm-house {
  position: absolute; left: 50%; top: 55%;
  transform: translate(-50%, -50%);
  width: min(44%, 400px);
  color: var(--orange);
}
.cm-house svg {
  width: 100%; height: auto; display: block; overflow: visible;
  filter: drop-shadow(0 0 22px hsl(35 100% 53% / .3));
  animation: emblem-glow 5.5s ease-in-out infinite;
}
.cm-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cm-lines line { stroke: hsl(36 40% 90% / .5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cm-pin {
  position: absolute; width: 13px; height: 13px; border-radius: 50%;
  background: var(--orange); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px hsl(35 100% 53% / .25);
}
.cm-pin::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--orange);
  animation: pulse 2.4s ease-out infinite;
}
.case-card {
  position: absolute; width: min(300px, 30%);
  background: hsl(26 24% 9% / .84);
  backdrop-filter: blur(6px);
  border: 1px solid hsl(28 24% 26%);
  border-radius: 14px; padding: 15px 16px;
  color: var(--ink-light);
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.case-card:hover { transform: translateY(-5px); border-color: hsl(35 80% 50% / .6); }
.cc-meta {
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.case-card h3 { font-size: 16.5px; color: var(--ink-light); margin: 6px 0 10px; line-height: 1.2; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip { font: 600 11px/1.25 var(--ff-body); padding: 5px 9px; border-radius: 7px; white-space: nowrap; }
.cc-chip.enova { background: hsl(158 42% 36% / .22); color: hsl(158 50% 68%); border: 1px solid hsl(158 42% 40% / .5); }
.cc-chip.save { background: hsl(35 100% 53% / .14); color: var(--orange-soft); border: 1px solid hsl(35 80% 50% / .4); }
.cc-chip.kwh { background: hsl(0 0% 100% / .06); color: hsl(34 22% 80%); border: 1px solid hsl(0 0% 100% / .14); }
.cc-grade {
  display: flex; align-items: center; gap: 7px; margin-top: 11px;
  font-family: var(--ff-display); font-weight: 800; font-size: 12px; color: var(--ink-soft);
}
.cc-grade .g {
  width: 21px; height: 21px; border-radius: 5px;
  display: grid; place-items: center;
  color: #fff; font-size: 11.5px;
}
.cc-grade-txt { font-family: var(--ff-body); font-weight: 500; font-size: 11px; }
@media (max-width: 900px) {
  .case-map { height: auto; padding: 16px; display: grid; gap: 14px; }
  .case-card { position: static !important; width: 100%; }
  .cm-lines, .cm-pin, .cm-note, .cm-house { display: none; }
}

/* ============================================================
   BOLIGKONFIGURATOR — interactive house
   ============================================================ */
.konfig {
  margin-top: 44px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0;
  overflow: hidden;
}
.kf-side {
  padding: 26px 22px;
  border-right: 1px solid hsl(26 24% 16%);
  display: flex; flex-direction: column; gap: 12px;
}
.kf-group-label {
  font-family: var(--ff-display); font-weight: 700; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 6px;
}
.kf-types { display: flex; flex-direction: column; gap: 8px; }
.kf-type {
  text-align: left; cursor: pointer;
  background: hsl(26 24% 10%); border: 1px solid hsl(26 26% 22%);
  border-radius: 12px; padding: 10px 14px;
  color: var(--ink-light);
  transition: border-color .25s, background .25s, transform .25s;
}
.kf-type b { font-family: var(--ff-display); font-size: 14px; display: block; }
.kf-type small { font-size: 11.5px; color: var(--ink-soft); }
.kf-type:hover { transform: translateX(3px); }
.kf-type.active { border-color: var(--orange); background: hsl(28 40% 12%); box-shadow: 0 0 14px -4px hsl(35 100% 53% / .4); }
.kf-tiltak { display: flex; flex-direction: column; gap: 7px; }
.kf-up {
  display: flex; align-items: center; gap: 10px;
  text-align: left; cursor: pointer;
  background: none; border: 1px solid hsl(26 26% 20%);
  border-radius: 10px; padding: 9px 12px;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  transition: border-color .25s, color .25s, background .25s;
}
.kf-up:hover { border-color: hsl(35 60% 40%); color: var(--ink-light); }
.kf-up .kf-plus {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px; font-size: 13px; font-weight: 700;
  background: hsl(26 24% 14%); color: var(--orange);
  transition: background .25s, color .25s;
}
.kf-up.active { border-color: hsl(158 42% 40% / .7); color: var(--ink-light); background: hsl(158 42% 30% / .12); }
.kf-up.active .kf-plus { background: var(--e-a); color: #fff; }
.kf-note { margin-top: auto; font-size: 11.5px; color: var(--ink-soft); }
.kf-note a { color: var(--orange-soft); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.kf-stage { position: relative; min-height: 430px; overflow: hidden; }
.kf-promo {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  max-width: 270px;
  background: hsl(26 24% 9% / .85);
  backdrop-filter: blur(5px);
  border: 1px solid hsl(28 24% 24%);
  border-left: 3px solid var(--orange);
  border-radius: 12px;
  padding: 12px 15px;
  pointer-events: none;
}
.kf-promo b {
  display: block;
  font-family: var(--ff-display); font-weight: 700; font-size: 13.5px; line-height: 1.3;
  color: var(--ink-light);
}
.kf-promo span { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: hsl(33 20% 76%); }
.kf-promo b, .kf-promo span {
  opacity: 1; transform: none;
  transition: opacity .45s ease, transform .5s cubic-bezier(.2,.8,.2,1);
}
.kf-promo span { transition-delay: .07s; }
.kf-promo.pre b, .kf-promo.pre span { opacity: 0; transform: translateY(7px); transition: none; }
@media (max-width: 900px) {
  .kf-promo { position: static; max-width: none; margin: 14px 14px 0; order: -1; }
}
.kf-scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px 30px 18px; transition: opacity .4s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.kf-scene::before {
  content: ""; position: absolute; left: 50%; top: 52%;
  width: 60%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, hsl(35 100% 53% / .14), transparent 65%);
  animation: kf-glow-breath 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes kf-glow-breath {
  0%, 100% { opacity: .65; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.kf-stage.kf-fade .kf-scene { opacity: 0; transform: translateY(8px); }
.kf-stage.kf-zoom-in .kf-scene { opacity: 0; transform: scale(1.35); }

/* door-pass overlay («Går inn i huset …») */
.kf-pass {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center;
  background: hsl(26 28% 4% / .94);
  color: var(--ink-light);
  font-family: var(--ff-display); font-weight: 700; font-size: 17px;
  letter-spacing: .02em;
  animation: kf-pass 1.25s ease both;
  pointer-events: none;
}
@keyframes kf-pass {
  0% { opacity: 0; }
  22% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; }
}
.kf-house { width: min(100%, 520px); height: auto; color: var(--orange); overflow: visible; filter: drop-shadow(0 0 24px hsl(35 100% 53% / .22)); position: relative; z-index: 1; }
.kf-house .g-ground { stroke: hsl(28 20% 30%); }
.kf-house .g-knob { fill: currentColor; stroke: none; }

/* ---- staggered construction (Home Harmony-style build-in) ---- */
.kf-house .b-walls, .kf-house .b-roof, .kf-house .b-trim,
.kf-house .g-vindu, .kf-house .g-door, .kf-house .g-knob,
.kf-house .g-ground, .kf-house .g-radiator, .kf-house .up {
  transform-box: fill-box;
}
.kf-build .g-ground { transform-origin: 50% 50%; animation: b-ground .45s ease both; }
.kf-build .b-walls { transform-origin: 50% 100%; animation: b-walls .5s cubic-bezier(.2,.8,.2,1) .12s both; }
.kf-build .b-roof { animation: b-roof .5s cubic-bezier(.2,.8,.2,1) .38s both; }
.kf-build .b-trim { animation: b-fade .4s ease .55s both; }
.kf-build .g-vindu { transform-origin: 50% 50%; animation: b-pop .45s cubic-bezier(.34,1.56,.64,1) .62s both; }
.kf-build .g-door, .kf-build .g-knob { transform-origin: 50% 100%; animation: b-pop .45s cubic-bezier(.34,1.56,.64,1) .76s both; }
.kf-build .g-radiator { transform-origin: 50% 100%; animation: b-pop .45s cubic-bezier(.34,1.56,.64,1) .8s both; }
@keyframes b-ground { from { transform: scaleX(0); opacity: 0; } }
@keyframes b-walls { from { transform: scaleY(0); } }
@keyframes b-roof { from { transform: translateY(-16px); opacity: 0; } }
@keyframes b-pop { from { transform: scale(.4); opacity: 0; } }
@keyframes b-fade { from { opacity: 0; } }

/* upgrade overlays — springy pop-in */
.kf-house .up {
  opacity: 0; transform: scale(.65); transform-origin: 50% 50%;
  transition: opacity .4s ease, transform .45s cubic-bezier(.34,1.56,.64,1);
}
.kf-house.on-varmepumpe .up-varmepumpe,
.kf-house.on-solceller .up-solceller,
.kf-house.on-isolering .up-isolering,
.kf-house.on-gulvvarme .up-gulvvarme { opacity: 1; transform: scale(1); }

/* sun — rotates in and shines on the panels */
.kf-house .up-sun {
  opacity: 0;
  color: var(--e-d);
  transform: translate(-22px, -16px) rotate(-120deg) scale(.45);
  transform-origin: 50% 50%; transform-box: fill-box;
  transition: opacity .55s ease, transform .9s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 0 12px hsl(48 96% 55% / .6));
}
.kf-house.on-solceller .up-sun { opacity: 1; transform: none; }
.kf-house .sun-disc { fill: currentColor; stroke: none; }
.kf-house .sun-rays {
  stroke-width: 2.6;
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: sunspin 26s linear infinite;
}
@keyframes sunspin { to { transform: rotate(360deg); } }

.kf-house .sol-panel { fill: hsl(215 45% 26%); stroke-width: 2; }
.kf-house .iso-line { stroke: var(--e-b); stroke-width: 2.5; stroke-dasharray: 6 5; animation: iso-march 1.4s linear infinite; }
@keyframes iso-march { to { stroke-dashoffset: -11; } }
.kf-house.on-vinduer .g-vindu { stroke: var(--e-b); filter: drop-shadow(0 0 6px hsl(145 60% 45% / .6)); }
.kf-house .g-vindu { transition: stroke .4s, filter .4s; }
.kf-house .hp-wave { stroke-width: 2; animation: hp-pulse 1.6s ease-in-out infinite; }
.kf-house .hp-wave.w2 { animation-delay: .35s; }
.kf-house .hp-wave.w3 { animation-delay: .7s; }
@keyframes hp-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.kf-house .heat-dot { fill: var(--orange); stroke: none; animation: heat-rise 2.4s ease-in-out infinite; }
.kf-house .heat-dot.d1 { animation-delay: .3s; }
.kf-house .heat-dot.d2 { animation-delay: .6s; }
.kf-house .heat-dot.d3 { animation-delay: .9s; }
.kf-house .heat-dot.d4 { animation-delay: 1.2s; }
@keyframes heat-rise {
  0% { transform: translateY(0); opacity: .9; }
  70% { transform: translateY(-14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.kf-interior .g-radiator { transition: opacity .4s; }
.kf-interior.on-varmepumpe .g-radiator { opacity: .25; }

.kf-inout {
  position: absolute; right: 18px; bottom: 16px;
  font-family: var(--ff-display); font-weight: 700; font-size: 13.5px;
  background: hsl(26 24% 10% / .9); color: var(--ink-light);
  border: 1px solid hsl(28 24% 28%); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
  transition: border-color .25s, transform .25s, background .25s;
}
.kf-inout:hover { border-color: var(--orange); transform: translateY(-2px); background: hsl(28 40% 12%); }

.kf-results {
  grid-column: 1 / -1;
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px;
  padding: 16px 24px;
  border-top: 1px solid hsl(26 24% 16%);
  background: hsl(26 24% 7% / .55);
}
.kf-kwh { display: flex; align-items: baseline; gap: 8px; }
.kf-kwh .num { font-family: var(--ff-display); font-weight: 800; font-size: 30px; color: var(--orange); min-width: 86px; }
.kf-kwh .lbl { font-size: 12.5px; color: var(--ink-soft); }
.kf-grade { display: flex; align-items: center; gap: 7px; font-family: var(--ff-display); font-weight: 800; font-size: 13px; color: var(--ink-soft); }
.kf-grade .g { width: 23px; height: 23px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 12px; }
.kf-grade .lbl { font-family: var(--ff-body); font-weight: 500; font-size: 12px; }
.kf-comfort { display: flex; flex-wrap: wrap; gap: 7px; }
.kf-chip-in { animation: fadeup .4s ease both; }
.kf-hint { font-size: 12.5px; color: var(--ink-soft); font-style: italic; }
@media (max-width: 900px) {
  .konfig { grid-template-columns: 1fr; }
  .kf-side { border-right: none; border-bottom: 1px solid hsl(26 24% 16%); }
  .kf-stage { min-height: 340px; }
}

/* ============================================================
   OM OSS (split, dark staircase)
   ============================================================ */
.about { background: var(--cream-2); }
.about .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.about h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 14px 0 20px; }
.about p { color: var(--ink-2); margin-bottom: 16px; max-width: 52ch; }
.about p:last-child { margin-bottom: 0; }
.about .why { font-weight: 700; color: var(--ink); }
.about-art {
  position: relative;
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  border-radius: 24px; padding: 46px 40px; overflow: hidden;
  box-shadow: var(--shadow); min-height: 460px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.about-art::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 80% 0%, hsl(35 100% 53% / .20), transparent 55%); }
.about-art .lbl { position: relative; z-index:1; color: var(--ink-light); font-family: var(--ff-display); font-weight: 700; letter-spacing:.16em; font-size: 12px; text-transform: uppercase; margin-bottom: 22px; opacity: .8; }
.about-art .staircase { height: 320px; }

/* ---- ByggSMART Engine flow chart (sanitized) ---- */
.bs-flow { position: relative; z-index: 1; margin-top: 14px; }
.bs-flow svg { width: 100%; height: auto; display: block; }
.bs-flow .wire { fill: none; stroke: hsl(28 28% 27%); stroke-width: 1.3; stroke-dasharray: 3 3; }
.bs-flow .node { fill: hsl(26 24% 10%); stroke: hsl(26 26% 25%); stroke-width: 1; }
.bs-flow .chip { fill: hsl(26 24% 12%); stroke: hsl(26 26% 22%); stroke-width: 1; }
.bs-flow .frame { fill: none; stroke: hsl(26 26% 22%); stroke-width: 1; stroke-dasharray: 5 4; }
.bs-flow .node-label { fill: hsl(36 32% 92%); font-family: var(--ff-body); font-size: 8.5px; font-weight: 600; }
.bs-flow .node-sub { fill: hsl(32 14% 55%); font-family: var(--ff-body); font-size: 6.5px; font-weight: 500; letter-spacing: .04em; }
.bs-flow .core-label { font-size: 10px; font-weight: 700; }
.bs-flow .core-rect {
  fill: hsl(28 40% 11%); stroke: var(--orange); stroke-width: 1.6;
  filter: drop-shadow(0 0 7px hsl(35 100% 53% / .5));
  animation: corepulse 2.4s ease-in-out infinite;
}
.bs-flow .pkt { fill: var(--orange); }
.bs-flow .pkt.blue { fill: hsl(210 80% 62%); }
.bs-flow .pkt.green { fill: var(--e-a); }
.bs-logo {
  position: relative; flex: none;
  width: clamp(96px, 9.5vw, 130px);
  filter: drop-shadow(0 0 14px hsl(35 100% 53% / .4));
  animation: emblem-glow 5s ease-in-out infinite;
}
.bs-logo img { width: 100%; height: auto; display: block; }
.bs-logo .bsl-ring {
  position: absolute; inset: 0;
  transform-origin: var(--gcx, 50%) var(--gcy, 50%);
  animation: gearspin 24s linear infinite;
}

/* ---- ByggSMART emblem: logo house with turning cogs ---- */
.bs-emblem {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px;
  margin-bottom: auto;
  color: var(--orange);
}
.bs-emblem svg {
  width: clamp(92px, 9vw, 124px); height: auto; flex: none;
  filter: drop-shadow(0 0 16px hsl(35 100% 53% / .35));
  animation: emblem-glow 5s ease-in-out infinite;
}
@keyframes emblem-glow {
  0%, 100% { filter: drop-shadow(0 0 12px hsl(35 100% 53% / .25)); }
  50% { filter: drop-shadow(0 0 22px hsl(35 100% 53% / .5)); }
}
.bs-emblem .gear-big,
.bs-emblem .gear-small {
  transform-box: view-box;
}
.bs-emblem .gear-big {
  transform-origin: 50px 64px;
  animation: gearspin 18s linear infinite;
}
.bs-emblem .gear-small {
  transform-origin: 64px 48px;
  animation: gearspin-rev 13.5s linear infinite;
}
@keyframes gearspin { to { transform: rotate(360deg); } }
@keyframes gearspin-rev { to { transform: rotate(-360deg); } }
.bs-emblem .gear-hole { fill: hsl(26 23% 9%); }
.bs-cap {
  font-family: var(--ff-display); font-weight: 800; font-size: 21px;
  color: var(--ink-light); line-height: 1.05; letter-spacing: -0.01em;
}
.bs-cap small {
  display: block;
  font-family: var(--ff-body); font-weight: 500; font-size: 12.5px;
  color: var(--ink-soft); margin-top: 6px; letter-spacing: .02em;
}

/* ============================================================
   STATS / counters
   ============================================================ */
.stats { background: var(--dark); color: var(--ink-light); border-block: 1px solid hsl(26 20% 16%); }
.stats .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.stat { position: relative; padding-left: 24px; }
.stat::before { content:""; position:absolute; left:0; top:6px; bottom:6px; width:5px; border-radius:5px; background: var(--energy-grad); }
.stat .num { font-family: var(--ff-display); font-weight: 800; font-size: clamp(46px, 6vw, 78px); line-height: 1; color: var(--orange); }
.stat .num .suf { color: var(--ink-light); }
.stat .cap { margin-top: 12px; color: hsl(33 16% 74%); font-size: 16px; max-width: 26ch; }
.status-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 46px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1.5px solid hsl(0 0% 100% / .22); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; font-size: 15px;
}
.status-pill .pulse-dot { background: var(--e-a); }
.status-pill .pulse-dot::after { border-color: var(--e-a); }

/* ============================================================
   VIDEO / pitch
   ============================================================ */
.video-sec { text-align: center; }
.video-sec h2 { font-size: clamp(28px, 3.2vw, 44px); max-width: 18ch; margin: 14px auto 32px; }
.video-frame {
  position: relative; max-width: 880px; margin: 0 auto;
  aspect-ratio: 16/9; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--dark-2), var(--dark));
  box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center;
}
.video-frame .corner-logo { position:absolute; top:20px; left:22px; width:54px; color: var(--orange); opacity:.85; }
.video-frame .play {
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.9); background: rgba(0,0,0,.25);
  display: grid; place-items: center; color: #fff; backdrop-filter: blur(2px);
  transition: transform .25s, background .25s;
}
.video-frame:hover .play { transform: scale(1.08); background: var(--orange); border-color: var(--orange); color: #fff; }
.video-frame .ph-note { position:absolute; bottom:18px; font-family: var(--ff-mono, monospace); font-size:12px; color: rgba(255,255,255,.55); letter-spacing:.05em; }

/* ============================================================
   TEAM GALLERY — autoplay until clicked
   ============================================================ */
.gallery {
  position: relative; max-width: 880px; margin: 0 auto;
  aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden;
  background: var(--dark);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.gal-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transition: opacity .9s ease;
  pointer-events: none;
}
.gal-slide.on { opacity: 1; z-index: 1; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-slide.on img { animation: kenburns 7s ease-out both; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.055); } }
.gal-slide.fit-contain { background: var(--dark); }
.gal-slide.fit-contain img { object-fit: contain; }
.gal-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 44px 22px 16px;
  background: linear-gradient(transparent, hsl(26 30% 4% / .82));
  color: hsl(36 32% 96%);
  font-family: var(--ff-display); font-weight: 600; font-size: 14.5px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: hsl(26 24% 8% / .65); backdrop-filter: blur(4px);
  border: 1px solid hsl(0 0% 100% / .2);
  color: #fff; font-size: 18px; cursor: pointer;
  opacity: 0; transition: opacity .3s, background .25s, transform .25s;
}
.gal-nav.prev { left: 14px; }
.gal-nav.next { right: 14px; }
.gallery:hover .gal-nav, .gallery.manual .gal-nav, .gallery:focus-within .gal-nav { opacity: 1; }
.gal-nav:hover { background: var(--orange); border-color: var(--orange); transform: translateY(-50%) scale(1.08); }
.gal-dots {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 7px;
}
.gal-dot {
  width: 8px; height: 8px; border-radius: 99px;
  border: none; padding: 0; cursor: pointer;
  background: hsl(0 0% 100% / .45);
  transition: background .3s, width .3s;
}
.gal-dot.on { background: var(--orange); width: 22px; }
.gal-progress {
  position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 3;
  background: var(--energy-grad);
  transform: scaleX(0); transform-origin: left;
}
.gal-progress.run { animation: gal-prog 4.6s linear both; }
@keyframes gal-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.gallery.manual { cursor: default; }
.gallery.manual .gal-progress { display: none; }
@media (max-width: 560px) {
  .gal-nav { width: 38px; height: 38px; }
  .gal-slide figcaption { font-size: 12.5px; padding: 34px 14px 12px; }
}

/* ============================================================
   PARTNERS
   ============================================================ */
.partners { padding: clamp(56px, 7vw, 88px) 0; }
.partners h2 { font-size: clamp(28px, 3vw, 42px); color: var(--ink); margin-top: 14px; }
.partners .intro { max-width: 62ch; margin: 12px 0 0; color: var(--ink-soft); font-size: 16.5px; }

/* Gold strip — full-bleed brand-orange ribbon carrying the logo carousel */
.logo-strip {
  margin-top: 36px;
  width: 100vw; margin-left: calc(50% - 50vw);
  background: linear-gradient(110deg, hsl(35 100% 53%), hsl(31 98% 47%));
  border: none; border-radius: 0;
  border-block: 1px solid hsl(32 100% 42%);
  padding: 18px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
/* Infinite horizontal logo carousel */
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.logo-track {
  display: flex;
  width: max-content;
  animation: logo-scroll 32s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-set {
  display: flex; align-items: center;
  gap: clamp(56px, 7vw, 110px);
  padding: 14px clamp(56px, 7vw, 110px) 14px 0;
}
.logo-set img { display: block; height: auto; flex: none; transition: transform .3s; }
.logo-set img:hover { transform: scale(1.08); }
@keyframes logo-scroll { to { transform: translateX(-50%); } }

/* ============================================================
   BETATEST (dark band)
   ============================================================ */
.beta { background: var(--dark); color: var(--ink-light); border-block: 1px solid hsl(26 20% 16%); }
.beta .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(30px,5vw,70px); align-items: center; }
.beta h2 { font-size: clamp(46px, 7vw, 104px); line-height: .92; color: var(--ink-light); }
.beta h2 .o { color: var(--orange); }
.beta .right p { color: hsl(33 16% 74%); font-size: 18px; max-width: 38ch; }
.beta .right .spectrum { width: 120px; margin-top: 24px; border-radius: 4px; }

/* ============================================================
   TEAM
   ============================================================ */
.team-intro { background: var(--cream); }
.team-intro .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px,5vw,70px); }
.team-intro h2 { font-size: clamp(34px,4.4vw,60px); }
.team-intro p { color: var(--ink-soft); margin-bottom: 16px; }
.team-grid-sec { background: var(--cream-2); border-top: 1px solid var(--line); }
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  max-width: 880px; margin: 0 auto;
}
.member { }
.member .photo {
  position: relative; aspect-ratio: 287/323; border-radius: 14px;
  overflow: hidden; background: linear-gradient(135deg,#caa98c,#b48f6f);
}
.member .photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.member .photo .ph {
  position:absolute; inset:0; display:grid; place-items:center;
  font-family: monospace; font-size: 12px; color: rgba(255,255,255,.7); letter-spacing:.05em;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px);
}
.member .info {
  background: #fff; color: var(--ink-dark); margin: -38px 14px 0; position: relative; z-index: 2;
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.member .info h3 { font-size: 17.5px; color: var(--ink-dark); }
.member .info .role { font-weight: 700; color: var(--orange-deep); font-size: 14px; margin: 4px 0 8px; }
.member .info a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; font-size: 15px; word-break: break-word; }
.member .info .tel { display:block; color: hsl(28 10% 45%); font-size: 14px; margin-top: 6px; }

/* ============================================================
   KONTAKT
   ============================================================ */
.kontakt { background: var(--cream); position: relative; overflow: hidden; }
.kontakt-grid-bg {
  position:absolute; inset:0; opacity:.4;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
          mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%);
}
.kontakt .wrap { position: relative; z-index:1; display:grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,60px); align-items:center; }
.kontakt h2 { font-size: clamp(34px,4vw,54px); margin: 14px 0 18px; }
.kontakt .lead { color: var(--ink-soft); max-width: 38ch; font-size: 18px; }
.kontakt-actions { display:flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.kontakt-actions a.line { display:flex; align-items:center; gap:10px; font-weight:700; color: var(--ink); white-space: nowrap; }
.kontakt-art { display:flex; flex-direction: column; align-items:center; gap: 34px; }
.kontakt-art .biglogo { width: min(340px, 70%); }
.kontakt-art .biglogo img { width: 100%; height: auto; }
.socials { display:flex; gap: 14px; align-items: center; }
.socials a.primary {
  width: 56px; height: 56px;
  border: 1.5px solid hsl(35 80% 50% / .55);
  background: hsl(35 100% 53% / .1);
  color: var(--orange-deep);
}
.socials a.minor { width: 42px; height: 42px; opacity: .55; }
.socials a.minor:hover { opacity: 1; }
.socials a {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  transition: transform .25s, background .25s, color .25s;
}
.socials a:hover { transform: translateY(-4px); background: var(--orange); color: #fff; border-color: var(--orange); }

/* map */
.map { height: 360px; background: hsl(35 30% 92%); position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.map .grid-lines { position:absolute; inset:0; background-image: linear-gradient(hsl(33 28% 85%) 1px,transparent 1px),linear-gradient(90deg,hsl(33 28% 85%) 1px,transparent 1px); background-size: 80px 80px; opacity:.85; }
.map .road { position:absolute; background: hsl(0 0% 100%); }
.map .pin {
  position:absolute; left:50%; top:48%; transform: translate(-50%,-100%);
  display:flex; flex-direction: column; align-items: center;
}
.map .pin .card { background:#fff; color: var(--ink-dark); border-radius:8px; padding:10px 14px; box-shadow: var(--shadow-sm); font-size:13px; margin-bottom:6px; white-space: nowrap; }
.map .pin .card b { font-family: var(--ff-display); }
.map .pin .marker { width:26px; height:26px; color:#7a3df2; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--cream); padding: 26px 0 34px; text-align: center; }
.footer .spectrum { margin-bottom: 26px; }
.footer p { color: var(--ink-soft); font-size: 15px; }

/* ============================================================
   ANIMATION UTILITIES
   ============================================================ */
.reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1), filter .8s ease; }
.js .reveal:not(.in) { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(10px); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Cursor spotlight (dark cards) */
.spot { position: relative; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
     hsl(35 100% 53% / .13), transparent 70%);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.spot:hover::after { opacity: 1; }

/* Scroll progress — energy spectrum fills as you read */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  z-index: 300; pointer-events: none;
}
.scroll-progress .bar {
  height: 100%;
  background: var(--energy-grad);
  clip-path: inset(0 100% 0 0);
}
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); padding: 24px var(--pad) 30px;
    box-shadow: var(--shadow);
  }
  .nav.open .nav-right .btn { display: inline-flex; }
  .hero .wrap, .hero .wrap.engine-open, .about .wrap, .beta .wrap, .team-intro .wrap, .kontakt .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 460px; }
  .stats .grid { grid-template-columns: 1fr; gap: 36px; }
  .beta h2 { font-size: clamp(56px, 16vw, 90px); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps, .team-grid { grid-template-columns: 1fr; }
  .address-form { flex-direction: column; }
  .address-form .btn { justify-content: center; }
  .nav { padding-inline: 18px; }
}

/* ============================================================
   RESPONSIVE — phone + iPad refinements
   (additive only; preserves desktop layout)
   ============================================================ */

/* iPad portrait & small laptop niceties */
@media (max-width: 1024px) {
  html { scroll-padding-top: 80px; }
  .hero { padding: clamp(96px, 14vh, 150px) 0 70px; }
  .kontakt .wrap { gap: 36px; }
  .about .wrap { grid-template-columns: 1fr; }
  .about-art { min-height: auto; padding: 36px 28px; }
  .about-art .staircase { height: 240px; }
}

/* Tablet portrait (iPad) */
@media (max-width: 860px) {
  .brand .logo { height: 50px; }
  .nav.scrolled .brand .logo { height: 42px; }
  .hero h1 { margin: 14px 0 18px; }
  .hero-art { width: 100%; }
  .stair-panel { aspect-ratio: 1 / .9; padding: 32px 26px 0; }
  .engine-panel { padding: 16px 16px; }
  .ep-graph { padding: 8px 6px; }
  .kontakt-art { gap: 22px; }
  .case-map { height: auto; }
  .stats .grid { gap: 28px; }
  .video-frame .play { width: 64px; height: 64px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --pad: 18px; }
  html { scroll-padding-top: 70px; }
  body { font-size: 16px; }

  .hero { padding: 96px 0 56px; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); margin: 12px 0 16px; }
  .hero .lead { font-size: 16px; max-width: 100%; }

  .address-card { padding: 18px; margin-top: 24px; }
  .address-input input { font-size: 16px; padding: 13px 0; } /* 16px prevents iOS zoom */
  .address-form .btn { width: 100%; padding: 14px 20px; }
  .ac-note { font-size: 12.5px; }

  .nav { padding-block: 12px; gap: 12px; }
  .brand .logo, .nav.scrolled .brand .logo { height: 44px; }
  .nav.open .nav-links { padding: 18px var(--pad) 26px; gap: 14px; }

  .section { padding: 56px 0; }
  .section-head h2 { font-size: clamp(28px, 8vw, 38px); }
  .section-head p { font-size: 15.5px; }

  .step-card { padding: 22px 20px; }
  .step-card h3 { font-size: 19px; }

  /* Tagline strip — logo + text stack on tiny phones */
  .ts-inner { flex-wrap: wrap; gap: 8px; padding: 14px var(--pad); font-size: 10.5px; letter-spacing: .14em; }
  .ts-inner img { height: 36px; }

  /* Konfigurator */
  .konfig { border-radius: 18px; }
  .kf-side { padding: 20px 18px; }
  .kf-stage { min-height: 300px; }
  .kf-scene { padding: 20px 16px 14px; }
  .kf-house { width: min(100%, 360px); }
  .kf-promo { margin: 12px 12px 0; padding: 10px 12px; }
  .kf-promo b { font-size: 12.5px; }
  .kf-promo span { font-size: 11.5px; }
  .kf-inout { right: 12px; bottom: 12px; padding: 8px 14px; font-size: 12.5px; }
  .kf-results { padding: 14px 18px; gap: 12px 18px; }
  .kf-kwh .num { font-size: 26px; min-width: 70px; }

  /* About */
  .about h2 { font-size: clamp(26px, 7.5vw, 36px); }
  .about-art { padding: 28px 22px; border-radius: 18px; }
  .about-art .staircase { height: 200px; }
  .bs-emblem { gap: 14px; }
  .bs-cap { font-size: 18px; }

  /* Stats */
  .stat { padding-left: 18px; }
  .stat .num { font-size: clamp(38px, 12vw, 56px); }
  .stat .cap { font-size: 15px; }

  /* Video & gallery */
  .video-frame, .gallery { border-radius: 14px; }
  .video-frame .play { width: 56px; height: 56px; border-width: 2px; }
  .gal-nav { width: 36px; height: 36px; }

  /* Beta band */
  .beta h2 { font-size: clamp(48px, 14vw, 78px); }
  .beta .right p { font-size: 16px; }

  /* Team */
  .team-intro .wrap { grid-template-columns: 1fr; gap: 24px; }
  .member .info { margin: -28px 12px 0; padding: 12px 14px; }

  /* Kontakt */
  .kontakt h2 { font-size: clamp(28px, 8vw, 40px); }
  .kontakt .lead { font-size: 16px; }
  .kontakt-actions { gap: 10px; }
  .kontakt-actions .btn { width: 100%; justify-content: center; }
  .kontakt-art .biglogo { width: min(220px, 60%); }
  .socials a { width: 46px; height: 46px; border-radius: 12px; }
  .socials a.primary { width: 50px; height: 50px; }
  .socials a.minor { width: 38px; height: 38px; }

  /* Map */
  .map { height: 260px; }
  .map .pin .card { font-size: 12px; padding: 8px 10px; }

  /* Engine panel — tighter on phone */
  .engine-panel { padding: 14px 14px; border-radius: 18px; }
  .ep-head { font-size: 13px; }
  .ep-trace { font-size: 11px; }
  .ep-try-row { gap: 10px; }
  .ep-try { width: 100%; justify-content: center; }

  /* Logo strip — smaller logos */
  .logo-set { gap: 40px; padding-right: 40px; }
  .logo-set img { max-height: 32px; }

  /* Footer */
  .footer p { font-size: 13.5px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .hero h1 { font-size: 30px; }
  .section-head h2 { font-size: 26px; }
  .kf-house { width: 100%; }
  .ts-inner span { font-size: 10px; letter-spacing: .12em; }
}

/* Touch devices — disable hover transforms that look stuck */
@media (hover: none) {
  .step-card:hover { transform: none; }
  .case-card:hover { transform: none; }
  .socials a:hover { transform: none; }
  .btn:hover { transform: none; }
}
