/* Landing hero (direction B, the nest) and the hatch, ported from IntroScreen and _NestPainter. */
.hero-split { min-height: min(calc(100svh - 80px), 680px); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-block: 24px 48px; }
.words { display: grid; gap: 20px; }
.words h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.08; max-width: 13ch; }
.words p { max-width: 40ch; color: var(--text-2); font-size: 17px; }
.words .soon { font: 600 17px/1.4 var(--sans); color: var(--text); margin-top: 8px; }
.nest-stage { display: grid; justify-items: center; gap: 12px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The stage is one button: a 260 x 252 box like the Nest (Pip 220 + 32), scaled by --w. */
.stage {
  --w: clamp(280px, 33vw, 440px);
  position: relative; width: var(--w); height: calc(var(--w) * 252 / 260);
  padding: 0; border: 0; background: none; cursor: pointer; color: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.stage:focus-visible { outline: 2px solid var(--action); outline-offset: 8px; border-radius: 22px; }
.stage > * { position: absolute; left: 50%; translate: -50% 0; pointer-events: none; }
.nest { bottom: 0; width: 100%; height: auto; }
.nest-shadow { fill: var(--pip-shadow); }
.nest-twigs { stroke: var(--twig); }
.glow { bottom: 2%; width: 120%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); }

/* Egg: sits in the nest, its own ground shadow off (the nest has one). */
.egg-wrap { bottom: 9%; width: 56%; transform-origin: 50% 90%; }
.egg-wrap .egg { display: block; width: 100%; height: auto; overflow: visible; }
.egg-wrap .egg-shadow { display: none; }
.egg .egg-crack { transition: stroke-dashoffset var(--base) var(--standard); }
.stage[data-taps="1"] .egg-crack { stroke-dashoffset: .55; }
.stage[data-taps="2"] .egg-crack { stroke-dashoffset: 0; }
.stage.shake .egg-wrap { animation: shake 380ms var(--standard); }
@keyframes shake { 20% { transform: translateX(-12px); } 50% { transform: translateX(12px); } 75% { transform: translateX(-7px); } 100% { transform: none; } }

/* Hatch: the egg grows to 1.4 and fades, a hatchLight burst, Pip settles from 1.2 to 1. */
.burst { bottom: 22%; width: 40%; aspect-ratio: 1; border-radius: 50%; opacity: 0; scale: .6;
  background: radial-gradient(closest-side, rgba(255, 253, 246, .8), rgba(255, 253, 246, 0)); }
.pip { bottom: 6%; width: 80%; opacity: 0; scale: 1.2; transform-origin: 50% 100%; }
.pip img { display: block; width: 100%; height: auto; }
.pip img + img { position: absolute; inset: 0; opacity: 0; }
.stage.hatched .egg-wrap { opacity: 0; scale: 1.4; transition: opacity var(--slow) ease-in, scale var(--slow) var(--standard); }
.stage.hatched .burst { animation: burst 900ms var(--standard); }
.stage.hatched .pip { opacity: 1; scale: 1; transition: opacity var(--slow) var(--standard), scale var(--slow) var(--standard); }
@keyframes burst { 0% { opacity: .9; scale: .6; } 100% { opacity: 0; scale: 3.2; } }

/* After the hatch: Pip breathes (ambient), blinks, and squashes when booped. */
.stage.settled .pip { animation: float 3.2s ease-in-out infinite alternate; }
@keyframes float { to { transform: translateY(-4px); } }
.stage.blink .pip-blink, .stage.happy .pip-happy { opacity: 1; }
.stage.happy .pip-blink { opacity: 0; }
.stage.boop .pip img { animation: boop 420ms cubic-bezier(.34, 1.56, .64, 1); transform-origin: 50% 100%; }
@keyframes boop { 0% { scale: 1; } 30% { scale: 1.06 .9; } 100% { scale: 1; } }
.hint { font-size: 17px; color: var(--text-2); transition: opacity var(--base) var(--standard); }
.stage.hatched ~ .hint { opacity: 0; }

@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 32px; padding-top: 8px; }
  .nest-stage { order: -1; }
  .words { text-align: center; justify-items: center; }
  .stage { --w: min(72vw, 280px); }
}
@media (prefers-reduced-motion: reduce) {
  .stage.settled .pip { animation: none; }
  .stage.hatched .burst { animation: none; }
}
/* The hint names the gesture the reader has: a click with a mouse, a tap on a phone. */
.hint .mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .hint .touch { display: none; } .hint .mouse { display: inline; } }
