/* ============================================================
   AI4S-Benchmark · Front page
   One idea per screen. Dark acts carry the story (opening,
   process stage, finale); light acts carry the facts (criteria,
   roadmap, updates). Loaded by index.html only; everything is
   prefixed hm- so it cannot collide with page-level styles.
   ============================================================ */

:root {
  --hm-navy-deep: #070E20;
  --hm-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.hm-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.hm-label--blue { color: var(--electric-blue); }
.hm-label--cyan { color: var(--cyan); }

/* ---------- Act 1 · Opening ---------- */
.hm-open {
  position: relative;
  min-height: clamp(40rem, calc(100svh - var(--header-height)), 58rem);
  display: grid;
  place-items: center;
  padding: clamp(3rem, 7vw, 5rem) 0 7.5rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(36, 116, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 30% at 62% 60%, rgba(24, 183, 201, 0.12), transparent 70%),
    linear-gradient(180deg, #0A1428 0%, var(--navy) 100%);
}
.hm-open canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hm-open::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 10rem;
  background: linear-gradient(180deg, transparent, rgba(7, 14, 32, 0.9));
  pointer-events: none;
}
.hm-open__inner { position: relative; text-align: center; max-width: calc(62rem + 2 * var(--gutter)); margin-inline: auto; }
.hm-open .hm-label { color: #8FA0C4; display: inline-flex; align-items: center; gap: 0.9rem; }
.hm-open .hm-label::before, .hm-open .hm-label::after { content: ""; width: 2rem; height: 1px; background: rgba(143, 160, 196, 0.5); }
.hm-open h1 {
  margin: 1.5rem 0 0;
  font-size: clamp(2.6rem, 7.2vw, 6.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  color: #fff;
}
.hm-open h1 .glow {
  background: linear-gradient(92deg, #5C98FF 0%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(36, 116, 255, 0.35));
}
.hm-open__lede {
  margin: 1.75rem auto 0;
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.5;
  color: #B9C4DA;
  text-wrap: pretty;
}
.hm-open__cta { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 2.25rem; }
.hm-open .btn--primary { box-shadow: 0 8px 30px -10px rgba(36, 116, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.18); }

/* Status readout: one glass strip */
.hm-readout {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 3.5rem auto 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(247, 249, 252, 0.12);
  background: rgba(247, 249, 252, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1rem;
  box-shadow: inset 0 1px 0 rgba(247, 249, 252, 0.08), 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.hm-readout > div {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1rem 1.4rem;
  text-align: left;
  border-right: 1px solid rgba(247, 249, 252, 0.1);
  min-width: 9rem;
}
.hm-readout > div:last-child { border-right: 0; }
.hm-readout dt { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: #8FA0C4; }
.hm-readout dd { margin: 0; font-size: 0.95rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.hm-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(24, 183, 201, 0.18); animation: hm-pulse 2.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes hm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (max-width: 760px) {
  .hm-readout > div { flex: 1 1 45%; border-right: 0; border-bottom: 1px solid rgba(247, 249, 252, 0.1); }
  .hm-readout > div:last-child { border-bottom: 0; }
}
.hm-cue {
  position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; color: #6F7F9F;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hm-cue::after { content: ""; width: 1px; height: 2.4rem; background: linear-gradient(180deg, #6F7F9F, transparent); animation: hm-cue 2.2s var(--hm-ease) infinite; }
@keyframes hm-cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Act 2 · Statement ---------- */
.hm-statement { background: var(--bg); color: var(--ink); padding: clamp(7rem, 14vw, 12rem) 0; }
.hm-statement p {
  max-width: 62rem;
  margin: 0 auto;
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
}
.hm-statement .w { color: var(--ink-faint); transition: color 320ms var(--hm-ease); }
.hm-statement .w.on { color: var(--ink); }
.hm-statement .w.on.hi { color: var(--electric-blue); }

/* ---------- Act 3 · What we collect ---------- */
.hm-collect { background: var(--bg); padding: 0 0 clamp(6rem, 10vw, 9rem); }
.hm-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.hm-head h2 { margin: 1rem 0 0; font-size: clamp(2.2rem, 4.8vw, 4rem); letter-spacing: -0.04em; line-height: 1.02; }
.hm-head p { margin: 1.25rem 0 0; font-size: var(--text-md); color: var(--ink-secondary); max-width: 40rem; }
.hm-bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2.5rem; }
.hm-bar { position: relative; padding-top: 1.75rem; border-top: 1px solid var(--border); }
.hm-bar::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 3rem; height: 2px; background: var(--electric-blue);
  transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--hm-ease);
}
.hm-bar.in::before { transform: scaleX(1); }
.hm-bar svg { width: 3.2rem; height: 3.2rem; display: block; margin-bottom: 1.5rem; color: var(--navy); }
.hm-bar h3 { font-size: 1.75rem; letter-spacing: -0.03em; margin-bottom: 0.7rem; }
.hm-bar p { color: var(--ink-secondary); font-size: var(--text-md); max-width: 22rem; margin: 0; }
.hm-pull {
  margin-top: clamp(4rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem 4rem;
  align-items: start;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.hm-pull h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.12; margin: 0; }
.hm-pull h3 em { font-style: normal; color: var(--cyan-deep); }
.hm-pull p { color: var(--ink-secondary); font-size: var(--text-md); max-width: 40rem; margin: 0; }
@media (max-width: 860px) { .hm-bars, .hm-pull { grid-template-columns: 1fr; } }

/* ---------- Act 4 · The process stage (pinned) ---------- */
.hm-stage { position: relative; height: 420vh; background: var(--hm-navy-deep); color: #fff; }
.hm-stage__pin {
  position: sticky; top: var(--header-height);
  height: calc(100vh - var(--header-height)); height: calc(100svh - var(--header-height));
  overflow: hidden; display: flex; align-items: center;
}
.hm-stage__pin::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(36, 116, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 40% at 90% 90%, rgba(24, 183, 201, 0.1), transparent 70%);
}
.hm-stage__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(247, 249, 252, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(247, 249, 252, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
}
.hm-stage__inner { position: relative; flex: 0 0 auto; width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
.hm-stage__copy { min-height: 18rem; position: relative; }
.hm-step { position: absolute; inset: 0; opacity: 0; transform: translateY(18px); transition: opacity 500ms var(--hm-ease), transform 600ms var(--hm-ease); pointer-events: none; }
.hm-step.on { opacity: 1; transform: none; pointer-events: auto; }
.hm-step__num { font-family: var(--font-mono); font-size: clamp(3.5rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: rgba(247, 249, 252, 0.14); margin-bottom: 0.5rem; }
.hm-step h3 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.04em; color: #fff; margin-bottom: 1rem; }
.hm-step p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: #B9C4DA; max-width: 30rem; line-height: 1.5; margin: 0; }
.hm-step p a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.35); }
.hm-step p a:hover { text-decoration: none; border-bottom-color: #fff; }

.hm-rail { position: relative; aspect-ratio: 1; max-width: 32rem; margin-inline: auto; width: 100%; }
.hm-rail svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hm-rail .track { fill: none; stroke: rgba(247, 249, 252, 0.12); stroke-width: 1.5; }
.hm-rail .prog { fill: none; stroke: url(#hmRailGrad); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hm-rail .node { fill: var(--hm-navy-deep); stroke: rgba(247, 249, 252, 0.3); stroke-width: 1.5; transition: fill 400ms var(--hm-ease), stroke 400ms var(--hm-ease); }
.hm-rail .node.on { fill: var(--electric-blue); stroke: var(--electric-blue); }
.hm-rail .node.now { fill: #fff; stroke: #fff; }
.hm-rail .halo { fill: none; stroke: var(--electric-blue); stroke-width: 1; opacity: 0; }
.hm-rail .halo.now { animation: hm-halo 2.2s var(--hm-ease) infinite; }
@keyframes hm-halo { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
.hm-rail .nlabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; fill: #6F7F9F; transition: fill 300ms; }
.hm-rail .nlabel.on { fill: #C9D3E6; }
.hm-rail .core { fill: #fff; }
.hm-rail .core-ring { fill: none; stroke: rgba(247, 249, 252, 0.25); stroke-width: 1; }
.hm-stage__progress { position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); display: flex; gap: 0.4rem; }
.hm-stage__progress i { width: 1.6rem; height: 2px; background: rgba(247, 249, 252, 0.15); border-radius: 2px; transition: background 300ms; }
.hm-stage__progress i.on { background: #fff; }
.hm-stage__kicker { position: absolute; top: 2.5rem; left: 0; right: 0; }
.hm-stage__kicker h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.03em; color: #fff; margin: 0.6rem 0 0; }
@media (max-width: 900px) {
  .hm-stage { height: 380vh; }
  .hm-stage__inner { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 5rem; }
  .hm-rail { max-width: 17rem; order: -1; }
  .hm-stage__copy { min-height: 15rem; }
  .hm-step__num { font-size: 2.6rem; }
}
/* Reduced motion or no JS: the stage lays flat and shows every step */
.hm-stage.flat { height: auto; padding: 6rem 0; }
.hm-stage.flat .hm-stage__pin { position: static; height: auto; display: block; }
.hm-stage.flat .hm-stage__inner { display: block; }
.hm-stage.flat .hm-stage__copy { min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem; margin-top: 3rem; }
.hm-stage.flat .hm-step { position: static; opacity: 1; transform: none; pointer-events: auto; }
.hm-stage.flat .hm-rail, .hm-stage.flat .hm-stage__progress { display: none; }
.hm-stage.flat .hm-stage__kicker { position: static; }

/* ---------- Act 5 · Roadmap ---------- */
.hm-roadmap { background: var(--surface); padding: clamp(6rem, 10vw, 9rem) 0; }
.hm-line { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.hm-line::before { content: ""; position: absolute; left: 0; right: 0; top: 0.45rem; height: 1px; background: var(--border); }
.hm-stop { position: relative; padding-top: 2.25rem; margin: 0; }
.hm-stop::before { content: ""; position: absolute; top: 0; left: 0; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--ink-faint); }
.hm-stop--now::before { background: var(--electric-blue); border-color: var(--electric-blue); box-shadow: 0 0 0 6px rgba(36, 116, 255, 0.15); }
.hm-stop--pub::before { border-style: dashed; border-color: var(--cyan); }
.hm-stop .hm-label { margin-bottom: 0.6rem; display: block; }
.hm-stop--now .hm-label { color: var(--electric-blue); }
.hm-stop--pub .hm-label { color: var(--cyan-deep); }
.hm-stop h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.hm-stop p { color: var(--ink-secondary); font-size: var(--text-base); max-width: 16rem; margin: 0; }
@media (max-width: 900px) {
  .hm-line { grid-template-columns: 1fr; gap: 2.5rem; }
  .hm-line::before { top: 0; bottom: 0; left: 0.45rem; right: auto; width: 1px; height: auto; }
  .hm-stop { padding: 0 0 0 2.25rem; }
}

/* ---------- Act 6 · Updates ---------- */
.hm-updates { background: var(--bg); padding: clamp(5rem, 8vw, 7rem) 0; border-top: 1px solid var(--border); }
.hm-updates__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 3rem; align-items: start; }
.hm-updates h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -0.035em; margin: 0.8rem 0 0; }
.hm-news { list-style: none; margin: 0; padding: 0; }
.hm-news li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--border); margin: 0; }
.hm-news li:last-child { border-bottom: 1px solid var(--border); }
.hm-news time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); padding-top: 0.3rem; }
.hm-news h3 { font-size: var(--text-md); letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.hm-news h3 a { color: var(--navy); }
.hm-news p { color: var(--ink-secondary); font-size: var(--text-base); margin: 0; }
@media (max-width: 860px) { .hm-updates__grid { grid-template-columns: 1fr; } .hm-news li { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ---------- Act 7 · Finale ---------- */
.hm-finale {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(8rem, 16vw, 14rem) 0 clamp(6rem, 12vw, 10rem);
  background:
    radial-gradient(ellipse 55% 55% at 50% 100%, rgba(36, 116, 255, 0.28), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--hm-navy-deep) 100%);
  text-align: center;
}
.hm-finale canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.55; }
.hm-finale__inner { position: relative; max-width: 54rem; margin-inline: auto; }
.hm-finale h2 { font-size: clamp(2.4rem, 6vw, 5.25rem); letter-spacing: -0.045em; color: #fff; line-height: 1; margin: 1.2rem 0 0; }
.hm-finale p { margin: 1.5rem auto 0; max-width: 36rem; color: #B9C4DA; font-size: var(--text-md); text-wrap: pretty; }
.hm-finale__cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }
/* the footer follows straight on from the finale */
.hm-finale + .site-footer, body[data-page="home"] .site-footer { margin-top: 0; }

/* ---------- Reveal on scroll (from a visible resting state) ---------- */
.rv { opacity: 0.001; transform: translateY(22px); transition: opacity 800ms var(--hm-ease), transform 900ms var(--hm-ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hm-statement .w { color: var(--ink); transition: none; }
  .hm-dot, .hm-cue::after, .hm-rail .halo.now { animation: none; }
}
