/* LMSysDojo project page: the hero. Wordmark, full title, authors, links and TL;DR over the ambient request-stream
 * canvas (hero.js). Everything is scoped under .hero; colors come from the base.css tokens so both themes work. */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 44px) 0 72px;
  overflow: hidden;
  overflow: clip;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  transition: opacity 1.8s var(--ease-out);
}
.hero.hero-pre .hero-canvas { opacity: 0; }
/* a breath of blue behind the waist (hero.js sets --hx/--hy); deeper on dark */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(34% 40% at var(--hx, 74%) var(--hy, 52%), color-mix(in srgb, var(--blue) 5%, transparent), transparent 70%);
}
/* melt the bottom edge into the next section (the canvas fades itself out under the copy) */
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, var(--bg) 0, color-mix(in srgb, var(--bg) 0%, transparent) 16%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; }

/* ------------------------------------------------------------------ type */
.hero .hero-eyebrow { margin-bottom: 26px; text-transform: none; letter-spacing: .1em; font-size: 12.5px; }
.hero-title { margin: 0; font-weight: 560; text-wrap: balance; }
.hero-mark {
  display: block;
  margin-left: -.05em;
  font-size: clamp(64px, min(10vw, 15.5vh), 136px);   /* short laptop screens keep the copy above the fold */
  font-weight: 560;
  line-height: .9;
  letter-spacing: -.052em;
  color: var(--ink);
  white-space: nowrap;
}
.hero-mark b { font-weight: inherit; color: var(--blue); }
.hero-sub {
  display: block;
  max-width: 19em;
  margin-top: 22px;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -.02em;
  color: var(--ink-2);
  text-wrap: balance;
}

/* authors: thin separators that vanish at line starts (clipped by the list's own box) */
.hero .authors {
  display: flex; flex-wrap: wrap; column-gap: 27px; row-gap: 2px;
  max-width: 34em; margin: 40px 0 0; padding: 4px 0 2px; list-style: none;
  overflow: hidden;
  font-size: 16.5px; font-weight: 520; line-height: 1.5; letter-spacing: -.005em; color: var(--ink);
}
.hero .authors li { position: relative; white-space: nowrap; }
.hero .authors li::before {
  content: ""; position: absolute; left: -14px; top: .28em; bottom: .22em; width: 1px; background: var(--line-2);
}
.hero .authors sup, .hero .affils sup {
  margin-left: 2px; font-family: var(--mono); font-size: .62em; font-weight: 600; color: var(--blue-ink);
}
.hero .affils {
  display: flex; flex-wrap: wrap; gap: 4px 22px;
  margin: 6px 0 0; font-size: 14.5px; color: var(--ink-3);
}
.hero .affils sup { margin: 0 3px 0 0; }

.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

.hero-tldr {
  max-width: 38em;
  margin: 36px 0 0;
  padding-left: 18px;
  border-left: 1px solid var(--line-2);
  font-size: 16.5px; line-height: 1.62; color: var(--ink-2);
  text-wrap: pretty;
}
.hero-tldr b { color: var(--ink); font-weight: 620; font-variant-numeric: tabular-nums; }
.hero-tldr em { font-style: italic; color: var(--ink); }
/* the way to the Playgrounds tab, closing the summary */
.hero-tldr-link { font-weight: 600; white-space: nowrap; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.hero-tldr-link:hover { text-decoration-color: currentColor; }

/* scroll cue */
.hero-scroll {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(30px, 5.5vh, 60px);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); text-decoration: none;
  transition: color .25s var(--ease);
}
.hero-scroll:hover { color: var(--blue-ink); }
.hero-scroll-arrow {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-2); font-family: var(--sans); font-size: 14px; letter-spacing: 0; line-height: 1;
  animation: hero-bob 2.6s cubic-bezier(.45, 0, .55, 1) infinite;
  transition: border-color .25s var(--ease);
}
.hero-scroll:hover .hero-scroll-arrow { border-color: currentColor; }
@keyframes hero-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* figure caption for the canvas (hero.js), bottom right, on the scroll cue's baseline */
.hero-figcap {
  position: absolute; z-index: 2; right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))); bottom: 34px;
  margin: 0;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); pointer-events: none;
}
.hero.hero-strip .hero-figcap { display: none; }
.hero.hero-pre .hero-figcap { opacity: 0; }
.hero.hero-play .hero-figcap { animation: hero-up .8s var(--ease-out) 1.1s backwards; }

/* ------------------------------------------------------------------ on-load choreography (hero.js)
   .hero-pre hides the pieces until the play starts; .hero-play runs the rises, each delayed by --d.
   fill-mode backwards releases the element afterwards, so button hovers keep their own transitions. */
.hero .hero-w { display: inline-block; }
.hero.hero-pre .hero-w, .hero.hero-pre .hero-step { opacity: 0; }
.hero.hero-play .hero-w { animation: hero-rise 1s var(--ease-out) backwards; animation-delay: var(--d, 0s); }
.hero.hero-play .hero-step { animation: hero-up .8s var(--ease-out) backwards; animation-delay: var(--d, 0s); }
@keyframes hero-rise {
  from { opacity: 0; transform: translate3d(0, .36em, 0); filter: blur(14px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes hero-up {
  from { opacity: 0; transform: translate3d(0, 16px, 0); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ------------------------------------------------------------------ dark: an atmospheric glow behind the waist */
:root[data-theme="dark"] .hero::before {
  background: radial-gradient(42% 46% at var(--hx, 74%) var(--hy, 52%), color-mix(in srgb, var(--blue) 11%, transparent), transparent 72%);
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 760px) {
  .hero { align-items: flex-start; padding: calc(var(--nav-h) + 36px) 0 64px; }
  .hero-mark { font-size: min(17vw, 72px); }
  .hero-sub { margin-top: 16px; font-size: 22px; }
  .hero .hero-eyebrow { margin-bottom: 20px; }
  .hero .authors { margin-top: 30px; font-size: 15.5px; column-gap: 23px; }
  .hero .authors li::before { left: -12px; }
  .hero .affils { font-size: 13.5px; gap: 2px 16px; }
  .hero-links { margin-top: 26px; gap: 8px; }
  .hero-links .btn { padding: 9px 15px; font-size: 14.5px; }
  .hero-tldr { margin-top: 28px; font-size: 15.5px; padding-left: 14px; }
}

/* no room beside the copy (hero.js measures): the flow runs in a band between the nav and the title */
.hero.hero-strip { padding-top: calc(var(--nav-h) + 150px); }
.hero.hero-strip .hero-veil { background: linear-gradient(0deg, var(--bg) 0, color-mix(in srgb, var(--bg) 0%, transparent) 64px); }

@media (prefers-reduced-motion: reduce) {
  .hero.hero-pre .hero-w, .hero.hero-pre .hero-step { opacity: 1; }
  .hero.hero-play .hero-w, .hero.hero-play .hero-step { animation: none; }
  .hero-scroll-arrow { animation: none; }
}
