/* ===== About hero: amplify. One small gold light (a person's judgment) and, opening out from it, wide soft
   azure veils that carry its warmth further across the screen: warm at the root where they touch the light,
   azure as they reach out. Drawn in inline SVG; the markup is the resting picture, so it is complete with
   scripting off. One screen on a desktop. ===== */
.ab-hero {
  --cx: 64%;                                  /* where the gold light sits, across the hero */
  --cy: 56%;
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-start;
  height: calc(100svh - var(--nav-h));
  min-height: 34rem;
  padding-block: clamp(var(--space-xl), 9vh, var(--space-3xl)) var(--space-xl);
  overflow: clip;
  isolation: isolate;
}

/* --- The picture: a full-bleed ground, the bloom set to the right of the type --- */
.ab-hero__scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, var(--color-paper) 82%, transparent); mask-image: linear-gradient(to bottom, var(--color-paper) 82%, transparent); }
.ab-hero__wash {                    /* the warmth the light throws on the ground around it, wide and faint */
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 30% 40% at var(--cx) var(--cy), color-mix(in oklab, var(--color-dawn) 22%, transparent), color-mix(in oklab, var(--color-dawn) 6%, transparent) 55%, transparent 80%),
    radial-gradient(ellipse 70% 80% at calc(var(--cx) + 12%) var(--cy), color-mix(in oklab, var(--color-accent-2) 22%, transparent), transparent 75%);
}
.ab-hero__bloom {
  position: absolute;
  left: calc(var(--cx) - 25 * var(--u)); top: calc(var(--cy) - 52 * var(--u));
  width: calc(100 * var(--u)); height: calc(100 * var(--u));
  --u: min(0.8vw, 0.95svh);                    /* one hundredth of the bloom's box */
  overflow: visible;
}
.ab-hero__bloom path { mix-blend-mode: screen; }
.ab-hero__layer--mid path, .ab-hero__layer--front path { stroke: color-mix(in oklab, var(--color-accent) 24%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ab-hero__layer, .ab-hero__sway, .ab-hero__core, .ab-hero__halo { transform-box: view-box; transform-origin: 0 0; }

/* --- The type: the title on the container's left line, the line and the link under it --- */
.ab-hero__copy { position: relative; z-index: 2; display: grid; justify-items: start; gap: var(--space-lg); }
.ab-hero__title { max-width: 11.5em; font-size: var(--text-display); line-height: 1.02; letter-spacing: -0.025em; }
.ab-hero__ln { display: block; }
.ab-hero__ln + .ab-hero__ln { margin-top: 0.08em; }
.ab-hero__line { max-width: 34ch; margin-top: var(--space-xs); color: var(--color-ink-2); }
.ab-hero__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--text-md); font-weight: 500; color: var(--color-ink);
  text-decoration: underline; text-decoration-color: var(--color-rule-2); text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  transition: text-decoration-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.ab-hero__link:hover { text-decoration-color: var(--color-ink); }
.ab-hero__link:active { color: var(--color-ink-2); }
.ab-hero__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }

.ab-hero__foot { position: absolute; left: 0; right: 0; bottom: var(--space-lg); z-index: 2; display: flex; justify-content: flex-end; }
.ab-hero__toggle { min-height: 44px; }

/* --- Motion. On load, once: the title lands (the lead), the line and link a beat behind; meanwhile the gold
       light comes up and the veils open out of it, nearest first, as one gesture. Then only a slow sway,
       each layer on its own long clock, and the light breathing. Pausable; still under reduced motion. --- */
@keyframes ab-hero-title { from { opacity: 0; transform: translateY(20px); } }
@keyframes ab-hero-sub { from { opacity: 0; transform: translateY(8px); } }
@keyframes ab-hero-light { from { opacity: 0; transform: scale(0.4); } }
@keyframes ab-hero-open { from { opacity: 0; transform: scale(0.35) rotate(-14deg); } }
@keyframes ab-hero-sway-a { 0%, 100% { transform: rotate(-1.6deg) scale(0.985); } 50% { transform: rotate(1.4deg) scale(1.015); } }
@keyframes ab-hero-sway-b { 0%, 100% { transform: rotate(1.8deg) scale(1.01); } 50% { transform: rotate(-1.2deg) scale(0.99); } }
@keyframes ab-hero-breathe { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.08); } }
.js .ab-hero__title { animation: ab-hero-title 560ms var(--ease-out) both; }
.js .ab-hero__line, .js .ab-hero__go { animation: ab-hero-sub 440ms var(--ease-out) 140ms both; }
.js .ab-hero__core { animation: ab-hero-light 900ms var(--ease-out) 250ms both; }
.js .ab-hero__halo { animation: ab-hero-light 1400ms var(--ease-out) 300ms both, ab-hero-breathe 7s ease-in-out 2.4s infinite; }
.js .ab-hero__layer--front { animation: ab-hero-open 1700ms var(--ease-out) 420ms both; }
.js .ab-hero__layer--mid { animation: ab-hero-open 1900ms var(--ease-out) 520ms both; }
.js .ab-hero__layer--back { animation: ab-hero-open 2100ms var(--ease-out) 580ms both; }
.js .ab-hero__layer--front .ab-hero__sway { animation: ab-hero-sway-a 11s ease-in-out 2.2s infinite; }
.js .ab-hero__layer--mid .ab-hero__sway { animation: ab-hero-sway-b 14s ease-in-out 2.4s infinite; }
.js .ab-hero__layer--back .ab-hero__sway { animation: ab-hero-sway-a 19s ease-in-out 2.6s infinite reverse; }
.ab-hero.is-held .ab-hero__sway, .ab-hero.is-held .ab-hero__halo, .ab-hero.is-away .ab-hero__sway, .ab-hero.is-away .ab-hero__halo { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .js .ab-hero__title, .js .ab-hero__line, .js .ab-hero__go, .js .ab-hero__core, .js .ab-hero__halo,
  .js .ab-hero__layer, .js .ab-hero__sway { animation: none; }
}

/* --- Narrower screens: the type takes the top, the bloom opens under it --- */
@media (max-width: 68.75rem) {
  .ab-hero { --cx: 34%; --cy: 74%; justify-content: flex-start; padding-top: var(--space-2xl); }
  .ab-hero__bloom { --u: min(1.05vw, 0.62svh); }
}
@media (max-width: 40rem) {
  .ab-hero { --cx: 22%; --cy: calc(100% - 210px); height: auto; min-height: 0; padding-block: var(--space-xl) 400px; }
  .ab-hero__bloom { --u: 4.2px; }
  .ab-hero__title { line-height: 1.04; }
  .ab-hero__foot { bottom: var(--space-md); }
}
