/* Full-page chapters and the navigation transition portal. */
.yah-page {
  min-height: 100svh;
}

.yah-page--chapter {
  padding: 180px 0 100px;
}

.yah-page__intro {
  position: relative;
  max-width: 820px;
  margin-bottom: clamp(48px, 8vw, 96px);
}

.yah-page__intro::before {
  content: "";
  position: absolute;
  width: min(48vw, 480px);
  aspect-ratio: 1;
  top: -140px;
  left: -180px;
  border: 1px solid var(--yah-border);
  border-radius: 50%;
  box-shadow: inset 0 0 80px var(--yah-glow), 0 0 100px var(--yah-glow);
  animation: yah-orbit 18s linear infinite;
  pointer-events: none;
}

.yah-page__intro > * {
  position: relative;
}

.yah-page__title {
  font-size: clamp(3.4rem, 9vw, 8rem);
  line-height: 0.9;
  max-width: 900px;
  text-wrap: balance;
}

.yah-page__lede {
  max-width: 600px;
  color: var(--yah-muted);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.7;
}

.yah-page__managed-body {
  max-width: 720px;
  margin: -36px auto 64px;
  white-space: pre-line;
  color: var(--yah-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.yah-hero__copy + .yah-page__managed-body {
  position: relative;
  z-index: 2;
  margin: 0 auto 48px;
  padding: 0 24px;
  text-align: center;
}

.yah-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.yah-feature {
  min-height: 240px;
  padding: 28px;
  border: 1px solid var(--yah-border);
  border-radius: var(--yah-radius-lg);
  background: linear-gradient(145deg, var(--yah-surface), rgba(255, 255, 255, 0.015));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform var(--yah-transition-slow), border-color var(--yah-transition-slow);
}

.yah-feature:hover {
  transform: translateY(-6px);
  border-color: var(--yah-gold);
}

.yah-feature__number {
  color: var(--yah-gold);
  font: 600 0.7rem/1 var(--yah-font-body);
  letter-spacing: 0.16em;
}

.yah-feature h3 {
  margin: 14px 0 8px;
  font-size: 1.7rem;
}

.yah-feature p {
  color: var(--yah-muted);
  line-height: 1.6;
}

.yah-page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #03050b;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

.yah-page-transition__orb {
  width: min(55vw, 620px);
  aspect-ratio: 1;
  border: 1px solid var(--yah-gold);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(240, 209, 138, 0.04), 0 0 100px 30px var(--yah-glow);
  animation: yah-orbit 3s linear infinite;
}

.yah-page-transition__label {
  position: absolute;
  color: var(--yah-gold-bright);
  font: 600 0.72rem/1 var(--yah-font-body);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

body.is-leaving .yah-page-transition {
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 560ms cubic-bezier(0.76, 0, 0.24, 1);
}

@keyframes yah-orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  .yah-page--chapter { padding-top: 150px; }
  .yah-feature-grid { grid-template-columns: 1fr; }
  .yah-page__intro::before { left: -120px; top: -100px; width: 90vw; }
}

@media (prefers-reduced-motion: reduce) {
  .yah-page__intro::before,
  .yah-page-transition__orb { animation: none; }
}
