/* The headline leads; four resource and learning links frame it. */
.hero-intro { min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; }
.hero { position: relative; isolation: isolate; flex: 1; display: grid; align-content: center; min-height: 540px; padding-block: 62px 54px; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at center, #000 25%, transparent 74%); }
.orbit-stage { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
.orbit-ring { position: absolute; left: 50%; top: 50%; width: 112%; height: 75%; border: 1px solid var(--line); border-radius: 50%; opacity: .55; transform: translate(-50%, -50%) rotate(-15deg); mask-image: linear-gradient(110deg, transparent 9%, #000 35%, #000 65%, transparent 91%); }
.hero-code, .hero-code-mark { position: absolute; color: var(--accent-text); user-select: none; }
.hero-code { font: 400 .75rem/1.9 var(--mono); opacity: .28; white-space: pre; }
.hero-code span { display: block; }
.hero-code span:nth-child(2) { color: var(--muted); }
.hero-code span:last-child::after { content: ''; display: inline-block; width: 6px; height: 11px; margin-left: 5px; vertical-align: -1px; background: currentColor; opacity: .6; }
.hero-code-build { left: 4%; top: 49%; }
.hero-code-defend { right: 4%; top: 49%; }
.hero-code-mark { top: 7%; font: 400 1.25rem/1 var(--mono); opacity: .22; }
.hero-code-mark-open { left: 8%; }
.hero-code-mark-close { right: 8%; }
.hero-center { width: min(740px, 100%); margin-inline: auto; position: relative; z-index: 1; text-align: center; }
.hero-center h1 { font: 600 clamp(3.5rem, 6.3vw, 5.25rem)/1.04 var(--sans); letter-spacing: -.035em; margin: 0 0 24px; }
.hero-center h1 span { color: var(--accent-text); }
.hero-description { max-width: 510px; margin: 0 auto; color: var(--muted); font-size: 1.125rem; line-height: 1.65; text-wrap: pretty; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-actions .button { min-height: 48px; padding: 12px 23px; font: 500 .9375rem/1.5 var(--sans); }
.hero-actions .button-primary { box-shadow: inset 0 1px 0 #ffffff38; }
.hero-actions .button-secondary { background: var(--surface); }
.hero-actions kbd { padding: 3px 6px; margin-left: 4px; color: var(--muted); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 2px; font: .6875rem/1.5 var(--mono); }
.hero-paths { display: flex; justify-content: center; gap: 8px 28px; flex-wrap: wrap; margin-top: 24px; }
.hero-paths a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 5px; font: 500 .9375rem/1.5 var(--sans); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 6px; transition: color .18s, text-decoration-color .18s; }
.hero-paths a:hover, .hero-paths a:focus-visible { color: var(--accent-text); text-decoration-color: var(--accent-text); }
.hero-center .hero-footnote { margin: 15px 0 0; color: var(--dim); font: .75rem/1.7 var(--mono); }
.hero-resources { display: contents; }
.orbit-resource { position: absolute; width: 100px; text-align: center; }
.orbit-resource a { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px; color: var(--muted); }
.hero .resource-glyph { position: relative; width: 64px; height: 64px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 2px; box-shadow: none; transition: transform .2s, border-color .2s, background .2s; }
.hero .resource-glyph::before, .hero .resource-glyph::after { content: ''; position: absolute; width: 10px; height: 10px; border-color: var(--accent-text); border-style: solid; opacity: .65; pointer-events: none; }
.hero .resource-glyph::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.hero .resource-glyph::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.hero .resource-glyph img { width: 30px; height: 30px; opacity: .85; }
.hero .resource-caption { font: .75rem/1.5 var(--mono); letter-spacing: 0; }
.orbit-resource a:hover .resource-glyph, .orbit-resource a:focus-visible .resource-glyph { transform: translateY(-4px); border-color: var(--accent-text); background: var(--surface-hover); }
.orbit-resource a:hover, .orbit-resource a:focus-visible { color: var(--text); }
.orbit-1 { left: 5%; top: 22%; }
.orbit-2 { right: 5%; top: 22%; }
.orbit-3 { left: 10%; bottom: 15%; }
.orbit-4 { right: 10%; bottom: 15%; }
.ticker { border-block: 1px solid var(--line); }
.hero-method { list-style: none; display: flex; justify-content: space-between; gap: 18px 30px; margin-block: 0; padding-block: 22px; }
.hero-method li { display: flex; align-items: baseline; gap: 12px; color: var(--muted); font: .75rem/1.6 var(--mono); }
.hero-method li > span { color: var(--accent-text); }
/* Finish the opening motion within 4.8s; keep hover transforms independent. */
@media (prefers-reduced-motion: no-preference) {
  .hero .resource-glyph { animation: hero-resource-float 4.4s ease-in-out both; }
  .orbit-2 .resource-glyph { animation-delay: .15s; }
  .orbit-3 .resource-glyph { animation-delay: .4s; }
  .orbit-4 .resource-glyph { animation-delay: .25s; }
  .hero-code { animation: hero-code-reveal 2.6s steps(18, end) both; }
  .hero-code-defend { animation-delay: .35s; }
  .orbit-resource a:focus-visible .resource-glyph { animation: none; }
}
@keyframes hero-resource-float {
  0%, 100% { translate: 0 0; }
  30% { translate: 0 -8px; }
  65% { translate: 0 3px; }
}
@keyframes hero-code-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@media (max-width: 1100px) {
  .hero-code { display: none; }
}
@media (max-width: 1000px) {
  .hero { min-height: 0; padding-block: 52px 36px; }
  .hero-center h1 { font-size: clamp(3rem, 7vw, 4.25rem); }
  .hero-resources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; width: min(420px, 100%); margin: 34px auto 0; }
  .orbit-resource { position: static; width: auto; }
  .hero-code-mark { top: 18px; font-size: 1rem; }
  .hero-code-mark-open { left: 40px; }
  .hero-code-mark-close { right: 40px; }
  .hero .resource-glyph { width: 52px; height: 52px; }
  .orbit-resource a { gap: 8px; padding: 4px; }
  .hero-method { flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
}
@media (max-width: 600px) {
  .hero { padding-block: 42px 32px; }
  .hero-center h1 { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 20px; }
  .hero-description { max-width: 380px; font-size: 1rem; line-height: 1.7; }
  .hero-actions { gap: 10px; margin-top: 24px; }
  .hero-actions .button { padding-inline: 18px; }
  .hero-actions kbd { display: none; }
  .hero-paths { gap: 0 20px; margin-top: 18px; }
  .hero-paths a { font-size: .875rem; }
  .hero-center .hero-footnote { margin-top: 12px; font-size: .75rem; }
  .hero-resources { display: none; }
  .orbit-resource a { padding-inline: 2px; }
  .hero .resource-glyph { width: 44px; height: 44px; }
  .hero .resource-glyph img { width: 24px; height: 24px; }
  .hero .resource-caption { font-size: .6875rem; }
  .hero-method { display: grid; justify-content: start; gap: 10px; padding-block: 18px; }
  .orbit-ring { width: 160%; height: 64%; opacity: .35; }
  .hero-code-mark { top: 14px; font-size: .75rem; }
  .hero-code-mark-open { left: 22px; }
  .hero-code-mark-close { right: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero *, .hero *::before, .hero *::after { animation: none; transition: none; }
  .orbit-resource a:hover .resource-glyph, .orbit-resource a:focus-visible .resource-glyph { transform: none; }
}
@media print { .hero-intro { display: none; } }
