/* ─── Home page ───────────────────────────────────────────────────────── */

/* Hero geometry — two anchors, one shared constant.

   The starfield's waterline (scenes/starfield.js WATER_RATIO = 0.22) sits at
   78% of the hero height. The CTA group is pinned to it, and the copy above it
   lives in a band that *ends* at that same line, minus the room the pinned
   video CTA occupies above it. Because the copy's box stops where the button
   starts, the two cannot collide at any viewport size — rather than relying on
   a fixed spacer that only balances at one aspect ratio. */
.marketing .hero {
  --hero-waterline: 78%;
  --hero-nav-clear: 5.5rem;  /* fixed nav (1.25rem × 2 + logo) + breathing room */
  --hero-cta-clear: 4.5rem;  /* video CTA height + its 1rem lift + breathing room */

  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--night);
}

.marketing .hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The band between the nav and the waterline. Centred inside it, so the copy
   keeps the same optical position in the sky at every resolution. */
.marketing .hero__content {
  position: absolute;
  z-index: 1;
  top: var(--hero-nav-clear);
  left: 0;
  right: 0;
  bottom: calc(100% - var(--hero-waterline) + var(--hero-cta-clear));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.marketing .hero__content > * {
  max-width: 1100px;
}

/* Capped against the band's height as well as the viewport width: at wide-but-
   short window sizes a width-only scale overflows the band. */
.marketing .hero__title {
  font-size: min(var(--text-hero), 11.5vh);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance; /* keeps the wrap even instead of orphaning a word */
  opacity: 0;
  transform: translateY(40px);
}

.marketing .hero__sub {
  color: var(--muted);
  font-size: var(--text-lg);
  margin-top: 1.5rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
}

/* Anchor: the group's top edge sits exactly on the starfield waterline. */
.marketing .hero__horizon {
  position: absolute;
  top: var(--hero-waterline);
  left: 0;
  right: 0;
  z-index: 1;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

/* bottom:100% lifts the button clear of the group's top edge — i.e. it ends
   exactly at the waterline, then 1rem of breathing room above it. */
.marketing .hero__video-cta {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  background: rgba(12, 12, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.marketing .hero__video-cta:hover {
  background: rgba(12, 12, 12, 0.75);
  border-color: rgba(255, 255, 255, 0.45);
}

.marketing .hero__video-cta svg {
  flex: none;
  opacity: 0.85;
}

.marketing .hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

/* Mobile: the hero is too short to straddle the waterline with two button
   rows, so fall back to a single centred stack in normal flow.

   height:auto + min-height lets the hero grow past the viewport on small or
   landscape phones instead of clipping the CTAs against overflow:hidden. */
@media (max-width: 640px) {
  .marketing .hero {
    --hero-nav-clear: 4.5rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 100svh;
    padding-block: var(--hero-nav-clear) 4.5rem;
  }
  /* Narrow screens: the 3.2rem clamp floor is what pushes the stack below the
     fold, so let the title scale with the viewport down there too. */
  .marketing .hero__title {
    font-size: min(var(--text-hero), 11.5vh, 12vw);
  }
  .marketing .hero__content {
    position: static;
    width: 100%;
  }
  .marketing .hero__horizon {
    position: static;
    margin-top: 2rem;
  }
  .marketing .hero__video-cta {
    position: static;
    transform: none;
    margin: 0 auto 1.25rem;
    display: flex;
    width: max-content;
  }
  .marketing .hero__ctas {
    margin-top: 0;
  }
}

.marketing .hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 1;
  animation: scroll-hint-fade 2s ease-out 2s both;
}

@keyframes scroll-hint-fade {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Features wrapper ───────────────────────────────────────────────── */
.marketing .features-wrapper {
  border-top: 1px solid var(--border);
}

.marketing .features-wrapper .feat-block {
  border-bottom: 1px solid var(--border);
}

.marketing .features-wrapper .feat-block:nth-child(even) {
  background: var(--dark-bg);
}

/* ─── Closed section ─────────────────────────────────────────────────── */
.marketing .closed-section {
  padding-block: var(--sp-xl);
  text-align: center;
  background: var(--dark-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marketing .closed-section__quote {
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  max-width: 820px;
  margin-inline: auto;
  letter-spacing: -0.02em;
}

.marketing .closed-section__sub {
  color: var(--muted);
  margin-top: 1.25rem;
  font-size: var(--text-base);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ─── Pricing teaser ─────────────────────────────────────────────────── */
.marketing .pricing-teaser {
  padding-block: var(--sp-xl);
  text-align: center;
  border-top: 1px solid var(--border);
}

.marketing .pricing-teaser__eyebrow { margin-bottom: 0.75rem; }
.marketing .pricing-teaser__title {
  font-size: var(--text-3xl);
  margin-bottom: 0.75rem;
}
.marketing .pricing-teaser__sub {
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: var(--text-base);
}
.marketing .pricing-teaser__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
  .marketing .pricing-teaser__grid { grid-template-columns: 1fr; }
}

/* ─── Manifesto teaser ───────────────────────────────────────────────── */
.marketing .manifesto-teaser {
  padding-block: var(--sp-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.marketing .manifesto-teaser__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.marketing .manifesto-teaser__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.marketing .manifesto-teaser__quote {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 2rem;
  color: var(--text);
}
