/* ═══════════════════════════════════════════════════════════════════════
   Lavrenroof — Hero
   hero.css · Cinematic header with scroll-driven smooth zoom
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Hero container ──────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: var(--nav-h);
}

.hero-photo {
  min-height: calc(100vh - 60px);
  min-height: calc(100svh - 60px);
  display: flex;
  align-items: flex-end;
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: #1a1a1a;
}

.hero-photo .bg-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   POSTER — scroll-driven smooth zoom
   ═══════════════════════════════════════════════════════════════════════ */

/* The wrapper acts as the "viewport tracker" — its position relative to
   the page scroll is what we observe. The <img> inside is what scales. */
.hero-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  /* Start state — JS or scroll-timeline will animate transform/opacity */
  transform: scale(1) translateZ(0);
  transform-origin: center 60%;
  will-change: transform, opacity;
  /* GPU acceleration hint */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── Modern: scroll-driven animation (Chrome/Edge 115+, Safari 26+) ──
   This is preferred — no JS, declarative, butter smooth. */
@supports (animation-timeline: scroll()) {
  .hero-poster img {
    animation: heroZoom linear both;
    animation-timeline: scroll(root block);
    animation-range: 0vh 100vh;
  }
}

/* ── JS fallback: --scroll-progress is set on the .hero-photo
   element and read here via custom property animation. */
.hero-photo {
  --scroll-progress: 0;
}
.hero-poster img {
  /* When scroll-timeline isn't supported, JS sets --scroll-progress
     from 0 → 1 as the user scrolls past the hero. We translate that
     into a transform here. */
  transform:
    scale(calc(1 + var(--scroll-progress) * 0.25))
    translateY(calc(var(--scroll-progress) * -3%))
    translateZ(0);
}

/* If scroll-timeline IS supported, override the JS-driven transform
   so the keyframe animation runs cleanly (highest specificity wins). */
@supports (animation-timeline: scroll()) {
  .hero-poster img {
    transform: scale(1) translateZ(0); /* reset; keyframe takes over */
  }
}

@keyframes heroZoom {
  0% {
    transform: scale(1) translateY(0) translateZ(0);
    filter: brightness(1) saturate(1);
  }
  100% {
    transform: scale(1.4) translateY(-10%) translateZ(0);
    filter: brightness(0.85) saturate(0.92);
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   OVERLAYS — readability & cinematic mood
   ═══════════════════════════════════════════════════════════════════════ */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(15, 14, 13, 0.55) 0%,
      rgba(15, 14, 13, 0.20) 30%,
      rgba(15, 14, 13, 0.30) 60%,
      rgba(15, 14, 13, 0.92) 100%),
    radial-gradient(ellipse at 18% 90%, rgba(122, 26, 26, 0.20) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* Subtle darkening that intensifies as user scrolls — adds depth */
.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.4);
  opacity: var(--scroll-progress, 0);
  transition: opacity 50ms linear;
}

/* Film grain — barely-there texture for cinematic feel */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  animation: grainShift 1.4s steps(8) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(3%, -2%); }
  60%  { transform: translate(-2%, -3%); }
  80%  { transform: translate(2%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO CONTENT — text, ticker, scroll cue
   ═══════════════════════════════════════════════════════════════════════ */
.hero-photo .container {
  position: relative;
  z-index: 3;
  padding-top: var(--s-10);
  padding-bottom: var(--s-9);
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
}

.hero-photo h1 {
  color: #fff;
  font-size: clamp(56px, 6vw, 132px);
  letter-spacing: -0.04em;
  font-weight: 400;
  line-height: 0.92;
  max-width: 14ch;
}
.hero-photo h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: #fff;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 14px;
}
.hero-sub {
  color: rgba(255,255,255,0.85);
  font-size: var(--t-lg);
  max-width: 47ch;
  line-height: 1.5;
}
.hero-photo .eyebrow {
  color: rgba(255,255,255,0.78);
  margin-bottom: 32px;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-photo .btn {
  background: #fff;
  border-color: #fff;
  color: var(--graphite);
}
.hero-photo .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero-photo .btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.hero-photo .btn-ghost:hover { background: #fff; color: var(--graphite); border-color: #fff; }

/* Hero ticker bar */
.hero-ticker {
  border-top: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.hero-ticker > div {
  padding: 16px 0;
  border-right: 1px solid rgba(255,255,255,0.12);
  display: flex;
  gap: 10px;
  align-items: center;
}
.hero-ticker > div:first-child { padding-left: 0; }
.hero-ticker > div:last-child { border-right: 0; }
.hero-ticker .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-3);
  display: inline-block;
  flex-shrink: 0;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: var(--s-7);
  width: 28px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  background: transparent;
  z-index: 4;
  padding: 6px 0;
  display: flex;
  justify-content: center;
  transition: border-color var(--dur-2), opacity 400ms var(--ease);
  opacity: calc(1 - var(--scroll-progress, 0) * 2);
}
.hero-scroll:hover { border-color: #fff; }
.hero-scroll span {
  display: block;
  width: 2px;
  height: 8px;
  background: #fff;
  border-radius: 999px;
  animation: heroScrollDot 2.2s ease-in-out infinite;
}
@keyframes heroScrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(20px); opacity: 0; }
  61%  { transform: translateY(0); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 960px) {
  .hero-ticker { grid-template-columns: 1fr 1fr; }
  .hero-ticker > div:nth-child(2) { border-right: 0; }
  .hero-scroll { display: none; }
}

@media (max-width: 600px) {
  .hero-photo { min-height: 90vh; min-height: 90svh; }
  .hero-photo .container { padding-top: 80px; padding-bottom: 64px; }
  .hero-photo h1 { font-size: clamp(40px, 10vw, 64px); }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn { justify-content: center; width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ACCESSIBILITY — reduced motion disables all hero motion
   ═══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-poster img {
    animation: none !important;
    transform: scale(1.04) translateZ(0) !important;
    filter: none !important;
  }
  .hero-grain { display: none; }
  .hero-overlay::after { opacity: 0 !important; }
}
