.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100dvh - var(--marketing-nav-height));
  display: grid;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--space-5) clamp(2.5rem, 5vw, 4rem);
}

/* Ethereal shadow backdrop — SVG-turbulence glow tinted with --primary so it
   reads correctly in both themes. marketing.js's heroEthereal() IIFE drifts
   the filter's baseFrequency/hue/scale over time; without JS (or with
   prefers-reduced-motion) it still renders as a static soft blob, so it
   degrades gracefully. .heroEtherealFade blends the masked shape's edges
   into --background instead of a fixed vignette, so it survives light/dark. */
.heroEtherealRoot {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.heroEtherealSvg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
}
.heroEtherealInner {
  position: absolute;
  inset: -120px;
  filter: url(#heroEtherealFilter) blur(4px);
  will-change: filter;
}
.heroEtherealShadow {
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  opacity: 0.16;
  mask-image: url("/static/img/hero-ethereal-mask.png");
  mask-size: cover;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("/static/img/hero-ethereal-mask.png");
  -webkit-mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
.heroEtherealNoise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("/static/img/hero-ethereal-noise.png");
  background-size: 240px;
  background-repeat: repeat;
  opacity: 0.05;
  mix-blend-mode: overlay;
}
.heroEtherealFade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, transparent 0%, var(--background) 92%),
    linear-gradient(180deg, var(--background) 0%, transparent 18%, transparent 82%, var(--background) 100%);
}
@media (prefers-contrast: more), (forced-colors: active) {
  .heroEtherealRoot { display: none; }
}

.heroInner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.heroEyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 1rem;
}
.heroHeading {
  font-weight: 400;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1.1rem;
  max-width: 18ch;
}
.heroSub {
  font-size: var(--text-lg);
  color: var(--muted-foreground);
  max-width: 46ch;
  line-height: var(--leading-normal);
  margin: 0 0 1.75rem;
}
.heroActions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Hero reel rail — the same video reel card used in the "native-looking
   outputs" section further down the page, auto-scrolling as a marquee so the
   hero previews the product instead of showing a static illustration.
   home_reel_marquee (see views.homepage) is the reel list duplicated once;
   the track is exactly two equal halves, so animating to translateX(-50%)
   and snapping back to 0% lines up perfectly — no visible jump at the loop. */
.heroReel { min-width: 0; overflow: hidden; }
.heroReelRail {
  padding: 0.25rem 0.25rem 0.5rem;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 85%, transparent 100%);
}
.heroReelTrack {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  animation: heroReelScroll 34s linear infinite;
}
.heroReelRail:hover .heroReelTrack,
.heroReelRail:focus-within .heroReelTrack { animation-play-state: paused; }
.heroReelTrack .videoReelCard--hero { flex: 0 0 auto; width: 128px; }
.heroReelTrack .videoReelCardHook { font-size: 0.82rem; }
@media (min-width: 700px) {
  .heroReelTrack .videoReelCard--hero { width: 148px; }
}
@keyframes heroReelScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .heroReelTrack { animation: none; }
}

@media (max-width: 900px) {
  .heroInner { grid-template-columns: 1fr; }
  .heroHeading { max-width: none; }
  .heroActions { flex-direction: column; align-items: stretch; }
  .heroActions .btnPrimary, .heroActions .btnGhost { width: 100%; }
  .heroReel { order: -1; margin: 0 -1.25rem; padding: 0 1.25rem; }
}

/* Page-level hero used by non-home marketing pages (product, pricing, etc.) */
.pageHero { padding: clamp(3rem, 6vw, 4.5rem) var(--space-5) 2.5rem; border-bottom: 1px solid var(--border); }
.pageHeroInner { max-width: 1240px; margin: 0 auto; text-align: left; width: 100%; }
.pageHeroInner .sectionEyebrow { margin-bottom: 0.65rem; }
.pageHeroIcon { width: 40px; height: 40px; margin-bottom: 0.75rem; color: var(--muted-foreground); }
.pageHeroIcon svg { width: 100%; height: 100%; display: block; }
.pageHero--narrow .pageHeroInner { max-width: 640px; }
.pageHero--center .pageHeroInner { text-align: center; }
.pageHero--center .pageHeroInner .sectionEyebrow,
.pageHero--center .pageHeroHeading,
.pageHero--center .pageHeroSub { margin-left: auto; margin-right: auto; }
.pageHero--center .heroActions { justify-content: center; }
.pageHeroHeading {
  font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
  max-width: 840px;
}
.pageHeroSub { font-size: var(--text-lg); color: var(--muted-foreground); margin: 0 0 1.75rem; max-width: 64ch; line-height: 1.55; }
.pageHeroInner .heroActions { margin-top: 1.75rem; margin-bottom: 1.5rem; }

/* Duo-font accent span for hero-style H1s — mirrors .authAccent in auth.css,
   using the shared --display-italic token instead of hardcoding "Fraunces". */
.headingAccent {
  font-family: var(--display-italic);
  font-style: italic;
  font-weight: 500;
  color: var(--primary);
}

/* Vertical verb rotator inside .headingAccent — enter from top, exit down.
   Invisible sizer keeps baseline + width stable (longest phrase). */
.headingAccentRotate {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  max-width: 100%;
}
.headingAccentRotateSizer {
  visibility: hidden;
  white-space: nowrap;
  pointer-events: none;
}
.headingAccentRotateViewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.headingAccentRotateWord {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transform: translate3d(0, -110%, 0);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}
.headingAccentRotateWord.isActive {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}
.headingAccentRotateWord.isExit {
  transform: translate3d(0, 110%, 0);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .headingAccentRotateWord {
    transition: none;
  }
}
