/* ===================================================================
   Kiürítve.hu — hero.css
   Pinnelt scroll-scrub hero: sticky vászon, feliratok, loader, sín
   =================================================================== */

/* ---------- Felső sáv ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  color: #F3EDE0;
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--hairline);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.wordmark .dot { color: var(--brass); }
.topbar-actions { display: flex; align-items: center; gap: 1.4rem; }
.topbar-tel {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.topbar-tel:hover { color: var(--brass); }
.topbar .btn { min-height: 44px; padding: 0.45em 1.2em; }
.topbar:not(.is-scrolled) .btn-ghost { color: #F3EDE0; border-color: #f3ede099; }
.topbar:not(.is-scrolled) .btn-ghost:hover { border-color: var(--brass); color: #fff; }
@media (max-width: 640px) {
  .topbar .btn { display: none; }
}

/* ---------- Pinnelt hero-szerkezet ----------
   .hero-scroll magas wrapper; .hero-sticky ragad a tetején.
   A wrapper magasságát a JS állítja (--hero-len), fallback: 380vh. */
.hero-scroll {
  position: relative;
  height: calc(100svh + var(--hero-len, 380vh));
  background: var(--night);
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: clip;
  background: var(--night);
}

/* Színpad: desktopon full-bleed, mobilon keretezett diorama-kártya */
.hero-stage {
  position: absolute;
  inset: 0;
}
.hero-poster,
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-canvas { opacity: 0; transition: opacity 0.5s ease; }
.hero-canvas.is-live { opacity: 1; }
@media (max-width: 640px) {
  /* Mobil: cím a folyó elrendezésben, alatta a diorama-kártya.
     Scrub közben a cím eltűnik, a kártya felcsúszik és kissé felnagyul. */
  .hero-sticky {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-stage {
    position: relative;
    inset: auto;
    order: 2;
    margin-top: clamp(0.9rem, 3svh, 2rem);
    width: min(93vw, 30rem);
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(246, 241, 231, 0.22);
    background: #0d0b08;
    flex: none;
    transition: transform 0.55s var(--ease-out);
  }
  .hero-sticky.is-scrubbing .hero-stage {
    transform: translateY(clamp(-11rem, -24svh, -5rem)) scale(1.07);
  }
}

/* Finom vignetta, hogy a szöveg mindig olvasható legyen */
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 8, 5, 0.55) 0%, rgba(10, 8, 5, 0) 30%),
    linear-gradient(0deg, rgba(10, 8, 5, 0.62) 0%, rgba(10, 8, 5, 0) 42%);
}

/* ---------- Hero-szöveg (felső harmad) ---------- */
.hero-copy {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  top: max(4.6rem, 9svh);
  padding-inline: var(--gutter);
  color: #F6F1E7;
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hero-copy.is-away { opacity: 0; transform: translateY(-18px); pointer-events: none; }

/* Üveg-panel a hero-szöveg mögött: blur + enyhe sötétítés az olvashatóságért */
.hero-copy-panel {
  display: inline-block;
  max-width: min(92vw, 62rem);
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.6rem, 4vw, 3.2rem) clamp(1.6rem, 3vw, 2.6rem);
  background: rgba(12, 9, 6, 0.42);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  border: 1px solid rgba(246, 241, 231, 0.1);
  border-radius: 6px;
}
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: var(--size-eyebrow);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #D9B36A;
}
.hero-title {
  margin-top: 0.7em;
  font-family: var(--font-display);
  font-size: var(--size-hero);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.45);
}
/* A megrendelő tagline-ja: a hero legidézhetőbb sora */
.hero-claim {
  margin-top: 0.85em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 0.95rem + 1vw, 1.75rem);
  line-height: 1.2;
  color: #F0E9DA;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.hero-trust {
  margin-top: 1.1em;
  font-size: var(--size-small);
  letter-spacing: 0.04em;
  color: #E4DAC4;
}
.hero-trust b { font-weight: 500; color: #fff; }
.hero-cta { margin-top: 1.6em; display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn-solid {
  background: #F6F1E7;
  color: var(--ink);
  border-color: #F6F1E7;
}
.hero-cta .btn-solid:hover { background: #D9B36A; border-color: #D9B36A; }
/* Másodlagos CTA: világos szöveg + keret, hogy a sötét képen is olvasható legyen */
.hero-cta .btn-ghost {
  color: #F6F1E7;
  border-color: rgba(246, 241, 231, 0.8);
  background: rgba(12, 9, 6, 0.28);
}
.hero-cta .btn-ghost:hover {
  color: #D9B36A;
  border-color: #D9B36A;
  background: rgba(12, 9, 6, 0.45);
}

/* ---------- Fázisfeliratok (alsó harmad) ---------- */
.hero-captions {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(3.4rem, 7svh);
  pointer-events: none;
  color: #F6F1E7;
}
.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 34em;
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
  /* blur-plakett: a világos frame-eken (kifestett lakás) is olvasható marad */
  background: rgba(10, 8, 5, 0.5);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  padding: 1rem 1.4rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(246, 241, 231, 0.07);
}
.hero-caption h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.5);
}
.hero-caption p {
  margin-top: 0.55em;
  font-size: var(--size-small);
  color: #EADFC8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* ---------- Fázis-sín (jobb szél) ---------- */
.hero-rail {
  position: absolute;
  z-index: 3;
  right: calc(var(--gutter) * 0.6);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
}
.hero-rail i {
  width: 5px;
  height: 34px;
  border-radius: 3px;
  background: rgba(246, 241, 231, 0.28);
  transition: background 0.3s;
}
.hero-rail i.on { background: #D9B36A; }
@media (max-width: 640px) { .hero-rail { display: none; } }

/* ---------- Görgetés-jelzés ---------- */
.hero-cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  color: #F0E9DA;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.hero-cue.show { opacity: 0.9; }
.hero-cue::after {
  content: '';
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, #E4DAC4, transparent);
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-cue::after { animation: none; } }

/* ---------- Betöltésjelző ---------- */
.hero-loader {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 3.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: #F0E9DA;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-display);
  transition: opacity 0.5s ease;
}
.hero-loader.done { opacity: 0; pointer-events: none; }
.hero-loader-bar {
  width: 180px;
  height: 2px;
  background: rgba(246, 241, 231, 0.22);
  overflow: hidden;
}
.hero-loader-bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: #D9B36A;
  transition: width 0.3s ease;
}
.hero-loader button {
  background: none;
  border: 0;
  color: #E4DAC4;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  min-height: 44px;
}
.hero-loader button:hover { color: #fff; }

/* ---------- Statikus fallback-mód ----------
   body.hero-static esetén: nincs pinnelés, előtte/utána csúszka. */
body.hero-static .hero-scroll { height: auto; }
body.hero-static .hero-sticky { position: relative; height: 100svh; }
body.hero-static .hero-canvas,
body.hero-static .hero-captions,
body.hero-static .hero-rail,
body.hero-static .hero-loader,
body.hero-static .hero-cue { display: none; }

.hero-compare {
  display: none;
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(3rem, 6svh);
  transform: translateX(-50%);
  width: min(92vw, 30rem);
  color: #F6F1E7;
  text-align: center;
}
body.hero-static .hero-compare { display: block; }
.hero-compare label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-compare input[type='range'] {
  width: 100%;
  accent-color: #D9B36A;
  min-height: 44px;
}
/* Az „utána” képet a poszter fölött clip-eljük a csúszka szerint:
   a csúszka a választóvonal — balra az előtte, jobbra az utána */
.hero-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 var(--reveal, 50%));
  display: none;
}
body.hero-static .hero-after { display: block; }

/* ---------- No-JS ---------- */
.no-js .hero-scroll { height: auto; }
.no-js .hero-sticky { position: relative; height: 100svh; }
.no-js .hero-canvas,
.no-js .hero-loader,
.no-js .hero-captions,
.no-js .hero-rail,
.no-js .hero-cue { display: none; }

/* ---------- Mobil: diorama-kártya elrendezés ---------- */
@media (max-width: 640px) {
  .hero-copy {
    position: relative;
    inset: auto;
    order: 1;
    margin-top: max(4.4rem, 7svh);
    flex: none;
  }
  /* Mobilon a szöveg sötét háttéren ül — a panel dísztelenül */
  .hero-copy-panel {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hero-eyebrow { letter-spacing: 0.16em; }
  .hero-title { font-size: clamp(2rem, 8.6vw, 2.9rem); }
  .hero-claim { margin-top: 0.6em; font-size: clamp(1.05rem, 4.6vw, 1.3rem); }
  .hero-trust { margin-top: 0.7em; font-size: 0.9rem; }
  .hero-cta { margin-top: 1.1em; }
  .hero-cta .btn-ghost { display: none; }
  .hero-captions {
    left: 1.1rem;
    right: 1.1rem;
    bottom: 5.2rem;
  }
  .hero-caption {
    max-width: none;
    right: 0;
    padding: 0.75rem 1rem 0.85rem;
  }
  .hero-caption h2 { font-size: clamp(1.45rem, 6.4vw, 2rem); }
  .hero-caption p { font-size: 0.92rem; }
  .hero-cue { bottom: 5rem; }
  .hero-loader { bottom: 5.4rem; }
  .hero-compare { bottom: 5.2rem; }
}
