/* ==========================================================================
   Header, mobile menu and hero
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: transform 500ms var(--ease-out-expo);
}

.site-header.is-scrolled {
  transform: translateY(calc(-1 * var(--topbar-h)));
}

/* Bring the topbar back while its phone link has keyboard focus. */
.site-header.is-scrolled:has(.topbar :focus-visible) {
  transform: none;
}

.topbar {
  height: var(--topbar-h);
  background: var(--ink-950);
  color: var(--text-on-dark-muted);
  font-size: 0.875rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* One line; if space runs out the label truncates, never the phone number. */
.topbar__text {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.topbar__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-on-dark);
  font-weight: 600;
}

.topbar__phone {
  flex: none;
  padding-block: 0.6rem;
  color: var(--sun-400);
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.topbar__phone:hover {
  text-decoration: underline;
}

.nav {
  height: var(--header-h);
  color: var(--white);
  border-bottom: 1px solid transparent;
  transition:
    background-color 400ms var(--ease-out-expo),
    border-color 400ms var(--ease-out-expo);
}

.site-header.is-scrolled .nav {
  background: rgba(5, 21, 32, 0.78);
  border-bottom-color: var(--line-on-dark);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
}

.brand {
  display: block;
  width: 108px;
  border-radius: 8px;
}

.nav__links ul {
  display: flex;
  gap: 0.25rem;
}

.nav__links a {
  position: relative;
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: var(--r-pill);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}

.nav__links a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav__links a.is-active {
  color: var(--white);
}

.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sky-400);
  transform: translateX(-50%);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav__toggle {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.nav__toggle .icon {
  width: 1.35rem;
  height: 1.35rem;
}

@media (max-width: 960px) {
  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: grid;
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 68px;
    --topbar-h: 36px;
  }

  .topbar {
    font-size: 0.75rem;
  }

  .brand {
    width: 92px;
  }

  /* Keep the investor CTA in view on phones, as a compact pill. */
  .nav__cta {
    padding-inline: 0.95rem;
  }

  .nav__cta .icon--arrow {
    display: none;
  }
}

@media (max-width: 389px) {
  .topbar__mid {
    display: none;
  }
}

/* Landscape phones: give the content more of the short screen. */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --header-h: 60px;
    --topbar-h: 32px;
  }

  .brand {
    width: 84px;
  }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink-950);
  color: var(--text-on-dark);
  overflow-y: auto;
  animation: menu-in 420ms var(--ease-out-expo);
}

.mobile-menu[hidden] {
  display: none;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-block: 1.25rem 2.5rem;
}

.mobile-menu__close {
  align-self: flex-end;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
}

.mobile-menu__links {
  display: grid;
  gap: 0.25rem;
  margin-top: 2.5rem;
}

.mobile-menu__links a {
  display: block;
  padding-block: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 1px solid var(--line-on-dark);
}

.mobile-menu__foot {
  margin-top: auto;
  padding-top: 2.5rem;
  color: var(--text-on-dark-muted);
}

.mobile-menu__phone {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--sun-400);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 650;
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: max(680px, 100svh);
  color: var(--white);
  background: var(--ink-950);
  overflow: hidden;
  isolation: isolate;
}

.hero__media,
.hero__shade,
.hero__video {
  position: absolute;
  inset: 0;
}

.hero__media {
  z-index: -1;
}

.hero__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
  transform: scale(1.04);
  animation: hero-settle 2.4s var(--ease-out-expo) both;
}

@keyframes hero-settle {
  from {
    transform: scale(1.12);
  }
}

/* Quick fade out (pause, buffering, loop restart) so YouTube's spinner and
   overlays never show; slow fade in once frames are actually playing. */
.hero__video {
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  container-type: size;
}

.hero.is-video-playing .hero__video {
  opacity: 1;
  transition-duration: 1.2s;
}

/* Cover-fit a 16:9 iframe to the hero box (container units track the hero,
   not the viewport, so tall mobile heroes never letterbox). A slight
   overscale hides player chrome at the edges. */
.hero__video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  max-width: none;
  transform: translate(-50%, -50%) scale(1.15);
  border: 0;
}

/* Single-column hero: an even scrim so full-width text always reads. */
.hero__shade {
  background: linear-gradient(180deg, rgba(5, 21, 32, 0.72) 0%, rgba(5, 21, 32, 0.45) 28%, rgba(5, 21, 32, 0.58) 55%, rgba(5, 21, 32, 0.9) 100%);
}

/* Two-column hero: darken the left (title) and the lower right (intro). */
@media (min-width: 1100px) {
  .hero__shade {
    background:
      radial-gradient(50% 58% at 80% 78%, rgba(5, 21, 32, 0.62), rgba(5, 21, 32, 0) 72%),
      linear-gradient(180deg, rgba(5, 21, 32, 0.7) 0%, rgba(5, 21, 32, 0.15) 26%, rgba(5, 21, 32, 0.12) 48%, rgba(5, 21, 32, 0.84) 100%),
      linear-gradient(90deg, rgba(5, 21, 32, 0.72) 0%, rgba(5, 21, 32, 0.25) 55%, rgba(5, 21, 32, 0) 80%);
  }
}

.hero__content {
  align-self: end;
  display: grid;
  gap: 2rem var(--gutter);
  padding-top: calc(var(--topbar-h) + var(--header-h) + 3rem);
  padding-bottom: clamp(2.5rem, 6vh, 4.75rem);
}

@media (min-width: 1100px) {
  .hero__content {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: end;
  }
}

.hero__eyebrow {
  color: var(--sky-300);
  margin-bottom: 1.5rem;
}

.hero__title {
  display: grid;
  gap: 1.25rem;
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.05em;
}

.hero__title-main {
  display: block;
  font-size: var(--fs-hero);
  line-height: 0.9;
}

.hero__line {
  display: block;
}

.hero__title-main .serif-accent {
  font-size: 1.1em;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--sky-300);
}

.hero__title-sub {
  display: block;
  max-width: 24ch;
  font-size: clamp(1.3rem, 1rem + 1.1vw, 1.9rem);
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
}

.hero__aside {
  max-width: 34rem;
}

.hero__lead {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  line-height: 1.7;
  color: rgba(238, 244, 247, 0.94);
  text-shadow: 0 1px 14px rgba(5, 21, 32, 0.55);
}

.hero__film-inline {
  display: none;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* Load-in choreography */
.hero__eyebrow,
.hero__title-main,
.hero__title-sub,
.hero__lead,
.hero__actions {
  animation: rise-in 1.1s var(--ease-out-expo) both;
}

.hero__title-main { animation-delay: 80ms; }
.hero__title-sub { animation-delay: 200ms; }
.hero__lead { animation-delay: 320ms; }
.hero__actions { animation-delay: 440ms; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

/* Banner strip */
.hero__strip {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 21, 32, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: rise-in 1.1s var(--ease-out-expo) 560ms both;
}

.hero__strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 92px;
  padding-block: 1rem;
}

.hero__banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
}

.hero__banner .pill {
  flex: none;
}

.hero__film-controls {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero__bgtoggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8125rem;
}

.hero__bgtoggle[hidden] {
  display: none;
}

.hero__bgtoggle:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.film-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--r-pill);
}

.film-btn__disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-950);
  transition: transform var(--dur-normal) var(--ease-out-expo);
}

.film-btn__disc::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  animation: ring-pulse 2.4s ease-out 2;
}

@keyframes ring-pulse {
  0% {
    transform: scale(0.92);
    opacity: 1;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.film-btn__disc .icon {
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 3px;
}

.film-btn:hover .film-btn__disc {
  transform: scale(1.08);
}

.film-btn__text {
  display: grid;
  line-height: 1.25;
  white-space: nowrap;
}

.film-btn__label {
  font-weight: 600;
}

.film-btn__meta {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Below the two-column hero the pause control becomes a 44px icon button;
   its label stays available to screen readers. */
@media (max-width: 1099px) {
  .hero__bgtoggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
  }

  .hero__bgtoggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (max-width: 900px) {
  .hero__strip-inner {
    gap: 1rem;
    padding-block: 1.1rem;
  }
}

/* Phones: the film gets its own button among the hero actions, so it is
   on the first screen; the strip keeps the banner and the pause control. */
@media (max-width: 760px) {
  .hero__film-inline {
    display: inline-flex;
  }

  .hero__strip .film-btn {
    display: none;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 560px) {
  .hero__banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 1rem;
  }
}
