/* hero: full-screen video opener. Entrance runs in pure CSS (works without JS);
   js/hero.js adds the video, count-ups and the scroll-out depth effect. */

.hero { padding: 0; overflow: hidden; overflow: clip; }
/* Inter turns "20x10" into "20×10" via contextual alternates; `font` shorthands reset the
   feature, so pin it with an ID selector for the whole section. */
#hero, #hero * { font-feature-settings: "calt" 0; }

.hero-stage {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
}

/* ---- Media layer ---- */
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); transform-origin: 50% 70%; will-change: transform; }
.hero-poster, .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 45%;
}
.hero-poster { animation: hero-zoom 2.4s var(--ease) both; }
.hero-video { opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-video.is-playing { opacity: 1; }
/* Colour grade + legibility */
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgb(var(--bg-rgb) / .78) 0%, rgb(var(--bg-rgb) / .15) 26%, rgb(var(--bg-rgb) / .1) 45%, rgb(var(--bg-rgb) / .72) 76%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgb(var(--bg-rgb) / .75) 100%);
}
.hero-glow {
  position: absolute; inset: 0; mix-blend-mode: screen; opacity: .55;
  background: radial-gradient(46rem 26rem at 85% 20%, rgb(var(--primary-rgb) / .12), transparent 70%);
}
.hero-grain {
  position: absolute; inset: 0; opacity: .09; pointer-events: none;
  background-size: 160px 160px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: hero-grain 1.2s steps(4) infinite;
}

/* ---- Copy ---- */
.hero-inner {
  position: relative; width: 100%; max-width: var(--wide); margin-inline: auto;
  padding: 7rem var(--gutter) clamp(6.5rem, 14vh, 9rem);
  will-change: transform, opacity;
}

.hero-eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem;
  margin: 0 0 clamp(1rem, 2.5vw, 1.6rem);
  font: 700 clamp(.66rem, 1.6vw, .78rem)/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--text);
  animation: hero-fade .9s var(--ease) .15s both;
}
.hero-eyebrow-hosts { color: var(--primary); }
.hero-x { color: var(--ink); }
.hero-eyebrow-sep { width: 1.1rem; height: 1px; background: rgb(var(--ink-rgb) / .4); }

.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(5.2rem, 23vw, 15.5rem); line-height: .8; letter-spacing: -.045em;
  color: var(--ink);
  text-shadow: 0 10px 60px rgba(0, 0, 0, .35);
}
.hero-line { display: flex; align-items: flex-start; overflow: hidden; padding: .02em .12em .1em 0; margin-bottom: -.1em; }
.hero-word { display: block; animation: hero-rise 1.1s var(--ease) both; }
.hero-line:nth-child(1) .hero-word { animation-delay: .25s; }
.hero-line--accent .hero-word {
  font-style: italic; font-weight: 700; letter-spacing: -.035em;
  padding-right: .06em;
  color: var(--primary);
  animation-delay: .38s;
}
.hero-tag {
  align-self: center; margin: .25em 0 0 .45em;
  font: 700 clamp(.6rem, 1.35vw, .9rem)/1.35 var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); text-shadow: none;
  animation: hero-fade .8s var(--ease) 1s both;
}

.hero-kicker {
  margin: clamp(1.1rem, 2.6vw, 1.8rem) 0 0; max-width: 40rem;
  font: 700 clamp(1.25rem, 3.4vw, 2.1rem)/1.2 var(--font); letter-spacing: -.02em; color: var(--ink);
}
.hero-k { display: inline-block; animation: hero-word .7s var(--ease) both; }
.hero-k:nth-child(1) { animation-delay: .75s; } .hero-k:nth-child(2) { animation-delay: .82s; }
.hero-k:nth-child(3) { animation-delay: .95s; } .hero-k:nth-child(4) { animation-delay: 1.02s; }
.hero-k:nth-child(5) { animation-delay: 1.18s; } .hero-k:nth-child(6) { animation-delay: 1.26s; }
.hero-k--accent { color: var(--primary); text-shadow: 0 0 30px rgb(var(--primary-rgb) / .3); }

/* ---- Stats ---- */
.hero-stats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: clamp(1.8rem, 4vw, 2.8rem) 0 0; max-width: 46rem;
  border-top: 1px solid var(--line2);
  animation: hero-fade 1s var(--ease) 1.35s both;
}
.hero-stat { display: flex; flex-direction: column-reverse; gap: .35rem; padding: .9rem .4rem 0 0; }
.hero-stat + .hero-stat { padding-left: clamp(.5rem, 2vw, 1.2rem); border-left: 1px solid var(--line); }
.hero-stat dd {
  margin: 0; font: 900 clamp(1.45rem, 5vw, 2.9rem)/1 var(--font-display);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.02em; color: var(--ink);
  white-space: nowrap;
}
.hero-plus { font-size: .6em; vertical-align: .55em; margin-left: .04em; color: var(--primary); font-family: var(--font); font-weight: 800; }
.hero-stat dt {
  font: 700 clamp(.56rem, 1.4vw, .7rem)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

/* ---- Scroll cue ---- */
.hero-cue {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  color: var(--muted); text-decoration: none;
  font: 700 .62rem/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase;
  animation: hero-fade 1s var(--ease) 1.8s both;
}
.hero-cue:hover { color: var(--ink); }
.hero-cue-line { position: relative; width: 1px; height: 2.6rem; overflow: hidden; background: var(--line2); }
.hero-cue-line span {
  position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--primary));
  animation: hero-drip 2s var(--ease) infinite;
}

/* ---- Sponsor ribbon ---- */
.hero-ribbon {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .6rem 1.3rem; padding: 1.15rem var(--gutter);
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.hero-ribbon-label {
  font: 700 .66rem/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  flex-basis: 100%; text-align: center;
}
.hero-ribbon .sponsor-mark { font-size: 1.35rem; }
.hero-ribbon .sponsor-mark[data-sponsor="nextserves"] { font-size: .95rem; }
.hero-ribbon img { height: 1.6rem; width: auto; }
.hero-ribbon-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--secondary); }
@media (min-width: 640px) {
  .hero-ribbon { gap: 1.6rem; }
  .hero-ribbon-label { flex-basis: auto; }
}

/* ---- Desktop layout: stats to the right of the kicker ---- */
@media (min-width: 1100px) {
  .hero-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 3rem; align-items: end; }
  .hero-eyebrow, .hero-title { grid-column: 1 / -1; }
  .hero-kicker { grid-column: 1; white-space: nowrap; font-size: clamp(1.5rem, 2.2vw, 2rem); }
  .hero-stats { grid-column: 2; margin-top: 0; width: 100%; max-width: 38rem; justify-self: end; }
  .hero-stat dd { font-size: clamp(1.8rem, 2.6vw, 2.6rem); }
}

@media (max-width: 600px) {
  .hero-eyebrow-hosts { flex-basis: 100%; }
  .hero-eyebrow-sep--first { display: none; }
}
@media (max-width: 420px) {
  .hero-inner { padding-bottom: 6.2rem; }
  .hero-stat { padding-right: .1rem; }
  .hero-stat + .hero-stat { padding-left: .45rem; }
}

/* ---- Keyframes ---- */
@keyframes hero-rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes hero-word { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }
@keyframes hero-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes hero-drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@keyframes hero-grain {
  0% { transform: scale(1.12) translate(0, 0); } 25% { transform: scale(1.12) translate(-3%, 2%); }
  50% { transform: scale(1.12) translate(2%, -3%); } 75% { transform: scale(1.12) translate(-2%, -1%); } 100% { transform: scale(1.12) translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grain, .hero-cue-line span { animation: none; }
  .hero-video { display: none; }
}
