/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100vh;
  width: 100%;
  max-width: none;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  background: var(--blue-ink);
  isolation: isolate;
}

/* Poster img = LCP; video fades in when ready (no bandwidth fight) */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: var(--blue-ink);
  overflow: hidden;
}

.hero-poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  display: block;
}

.hero-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.04);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.45s var(--ease-out);
  will-change: opacity;
}

.hero-video.is-ready {
  opacity: 1;
}

/* Full-bleed veil — readable copy, video still visible */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-out);
  background:
    linear-gradient(
      115deg,
      rgba(10, 18, 48, 0.72) 0%,
      rgba(15, 26, 61, 0.55) 42%,
      rgba(26, 44, 102, 0.42) 72%,
      rgba(15, 26, 61, 0.58) 100%
    ),
    linear-gradient(to top, rgba(10, 18, 48, 0.82) 0%, rgba(10, 18, 48, 0.28) 45%, transparent 72%);
}

/* Film grain — distinctive institutional texture */
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(90, 180, 255, 0.35);
  box-shadow:
    0 0 24px var(--glow-cyan),
    0 0 60px rgba(40, 65, 140, 0.35),
    inset 0 0 40px rgba(90, 200, 255, 0.08);
  animation: orbFloat 14s var(--ease) infinite;
}

.orb-a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  right: -8%;
  top: 12%;
  border-color: rgba(165, 120, 101, 0.45);
  box-shadow:
    0 0 28px var(--glow-earth),
    0 0 70px rgba(40, 65, 140, 0.3),
    inset 0 0 36px rgba(165, 120, 101, 0.1);
  animation-duration: 16s;
}

.orb-b {
  width: min(28vw, 280px);
  height: min(28vw, 280px);
  right: 18%;
  bottom: 22%;
  border-color: rgba(90, 200, 255, 0.4);
  animation-duration: 12s;
  animation-delay: -3s;
}

.orb-c {
  width: min(18vw, 160px);
  height: min(18vw, 160px);
  left: 8%;
  top: 28%;
  border-color: rgba(232, 221, 212, 0.35);
  box-shadow:
    0 0 20px rgba(255, 255, 255, 0.15),
    0 0 48px rgba(90, 200, 255, 0.2);
  animation-duration: 18s;
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(12px, -18px, 0);
  }
}

.hero-content {
  position: relative;
  z-index: 4;
  /* Desktop: bottom pad only — top pad is mobile-only (avoids pushing copy) */
  padding: 0 0 clamp(5.5rem, 12vw, 8.5rem);
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out),
    visibility 0.55s;
}

/* Cinema mode: sound on → copy slides left & fades out */
.hero.is-listening .hero-content {
  transform: translateX(-56px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hide decorative orbs + soften veil for clean video */
.hero.is-listening .hero-orbs {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s var(--ease-out), visibility 0.55s;
}

.hero-orbs {
  transition: opacity 0.55s var(--ease-out), visibility 0.55s;
}

.hero.is-listening .hero-overlay {
  opacity: 0.45;
}

.hero.is-listening .hero-grain {
  opacity: 0.04;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.35rem;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.1s forwards;
}

.kicker-line {
  width: 36px;
  height: 2px;
  background: var(--earth);
  flex-shrink: 0;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.55rem, 6.2vw, 4.65rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 1.5rem;
}

.hero-title__line {
  display: block;
}

.hero-accent {
  display: block;
  color: var(--earth);
  margin-top: 0.15em;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.85s forwards;
}

.hero-title .word {
  display: inline-block;
  margin-right: 0.28em;
  overflow: hidden;
  vertical-align: bottom;
  /* Room for wordUp translateY so first line is not clipped */
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.hero-title .word span {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: wordUp 0.85s var(--ease-out) forwards;
}

@keyframes wordUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-lead {
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.55s forwards;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  line-height: 1.5;
}

.lead-rotate {
  position: relative;
  display: inline-grid;
  min-width: 14ch;
  color: var(--sand);
  font-weight: 600;
}

.lead-word {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  white-space: normal;
}

.lead-word.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.7s forwards;
  margin-bottom: 0.25rem;
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: sheen 3.2s var(--ease) 1.2s infinite;
}

@keyframes sheen {
  0%,
  55% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.hero-proof-line {
  margin-top: 1.15rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 42ch;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 0.85s forwards;
  border-left: 2px solid var(--earth);
  padding-left: 0.85rem;
}

/* Compact speaker — corner of hero */
.hero-mute {
  position: absolute;
  left: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(4.5rem, 9vw, 6.5rem);
  z-index: 6;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 26, 61, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  transform: translateX(0);
  opacity: 1;
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.45s var(--ease-out),
    visibility 0.45s,
    border-color 0.25s,
    background 0.25s;
}

.hero-mute:hover {
  border-color: var(--earth);
  background: rgba(165, 120, 101, 0.35);
}

.hero-mute:focus,
.hero-mute:focus-visible,
.hero-mute:active {
  outline: none !important;
  box-shadow: none !important;
}

.hero-mute svg {
  width: 20px;
  height: 20px;
  display: none;
  pointer-events: none;
}

.hero-mute.is-muted .icon-mute {
  display: block;
}

.hero-mute:not(.is-muted) .icon-sound {
  display: block;
}

/* Scroll down → hide mute; scroll up → show again */
.hero-mute.is-away {
  transform: translateX(-72px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(5.5rem, 10vw, 7.5rem);
  z-index: 5;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  padding-top: 8px;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 1s forwards;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--sand);
  animation: scrollDot 1.6s var(--ease) infinite;
}

@keyframes scrollDot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero-curve {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  min-width: 100%;
  max-width: none;
  height: clamp(52px, 8vw, 96px);
  z-index: 5;
  color: var(--blue);
  display: block;
  pointer-events: none;
}

.hero-curve path {
  fill: currentColor;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .hero {
    /* Grow if copy + CTAs exceed one screen — never clip H1 */
    min-height: 100dvh;
    min-height: 100svh;
    overflow: visible;
  }

  .hero-media,
  .hero-overlay,
  .hero-grain,
  .hero-orbs {
    position: absolute;
    inset: 0;
    min-height: 100%;
  }

  .hero-content {
    padding: calc(var(--header-h) + 1rem) 0 4.5rem;
    width: min(100% - 32px, var(--max));
  }

  .hero-kicker {
    margin-bottom: 0.85rem;
    font-size: 0.7rem;
  }

  .hero-title {
    max-width: none;
    width: 100%;
    font-size: clamp(1.5rem, 6.4vw, 1.9rem);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .hero-title__line {
    display: block;
    white-space: nowrap;
  }

  .hero-lead {
    font-size: 0.95rem;
    margin-bottom: 1.35rem;
    max-width: none;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.1rem;
    font-size: 0.78rem;
  }

  .lead-word {
    white-space: normal;
  }

  .hero-mute {
    bottom: clamp(3.8rem, 12vw, 5rem);
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: 1.35rem;
  }
}
