/* Panalo Students — the outside: sky, splash, landing, the crossing, birth. */

/* ---- Sky + splash ----------------------------------------------------------- */

.sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  transition: opacity var(--dur-3);
}
body.in-app .sky {
  opacity: 0.35;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  background: var(--bg);
}
.splash svg {
  animation: breathe 1.6s ease-in-out infinite;
}
html[data-boot="app"] body:not(.ready) .splash {
  display: grid;
}
html[data-boot="app"] body:not(.ready) .landing {
  display: none;
}
@keyframes breathe {
  50% {
    transform: scale(1.08);
    opacity: 0.7;
  }
}

/* ---- Wordmark --------------------------------------------------------------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.wm-name {
  font: 600 18px/1 var(--f-display);
  letter-spacing: -0.03em;
}
.wm-sub {
  font: 600 10px/1 var(--f-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--time);
  padding: 4px 7px;
  border: 1px solid rgba(255, 196, 122, 0.35);
  border-radius: var(--r-pill);
}
.wordmark.small .wm-name {
  font-size: 15px;
}

/* ---- Landing ---------------------------------------------------------------- */

.landing {
  position: relative;
  z-index: 1;
}
.land-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
  padding: 0 var(--gutter);
  transition: background var(--dur-2), border-color var(--dur-2);
  border-bottom: 1px solid transparent;
}
.land-bar.scrolled {
  background: rgba(7, 9, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.land-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.land-links a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
}
.land-links a:hover {
  color: var(--text);
}
.land-cta {
  display: flex;
  gap: 6px;
}
@media (max-width: 760px) {
  .land-links {
    display: none;
  }
  .land-cta {
    margin-left: auto;
  }
  .wordmark .wm-sub {
    display: none;
  }
}

.land {
  position: relative;
}

/* The hero: two lines of type that slam in on speed lines, and a whole
   world to the right that you can spin, tip, speed up and reverse, with
   water and flame winding around it. */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 2vw;
  padding: 96px var(--gutter) 110px;
  overflow: hidden;
}
.hero-drift {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
}
/* Horizontal speed streaks behind the title, once, as it lands. */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 10% -20% 30% -30%;
  z-index: -1;
  background: repeating-linear-gradient(180deg, transparent 0 9px, rgba(154, 216, 255, 0.16) 9px 10px, transparent 10px 23px, rgba(255, 196, 122, 0.1) 23px 24px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 60%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 60%, transparent);
  opacity: 0;
  animation: streak 1.3s var(--ease-out) 0.35s both;
  pointer-events: none;
}
@keyframes streak {
  0% {
    opacity: 0;
    transform: translateX(-30%) scaleX(1.6);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(20%) scaleX(1);
  }
}
.hero-kicker {
  color: var(--time);
  animation: rise var(--dur-3) var(--ease-out) 0.2s both;
}
.hero-title {
  margin: 20px 0 22px;
  font: 400 clamp(34px, 5.4vw, 88px) / 1 var(--f-display);
  letter-spacing: -0.05em;
}
.ht-line {
  display: block;
  animation: slam 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.ht-line:nth-child(1) {
  animation-delay: 0.4s;
}
.ht-serif {
  margin-top: 0.08em;
  font-size: 1.32em;
  letter-spacing: -0.01em;
  line-height: 0.95;
  background: linear-gradient(100deg, #9ad8ff 0%, #f4f6ff 35%, #ffc47a 60%, #ff7aa8 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slam 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.7s both, sheen 6s linear 1.6s infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 22px rgba(154, 216, 255, 0.25));
}
@keyframes slam {
  0% {
    opacity: 0;
    transform: translateX(-14%) skewX(-18deg) scale(1.08);
    filter: blur(10px);
  }
  55% {
    opacity: 1;
    transform: translateX(1.5%) skewX(4deg) scale(1);
    filter: blur(0);
  }
  100% {
    transform: none;
  }
}
@keyframes sheen {
  to {
    background-position: -200% 0;
  }
}
.hero-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
  font: 500 clamp(16px, 1.6vw, 21px) / 1.3 var(--f-body);
  color: var(--text-2);
}
.hero-sub b,
.hero-sub span {
  display: inline-block;
  animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.hero-sub b {
  color: var(--text);
  font-weight: 600;
}
.hero-sub b:nth-child(1) { animation-delay: 1.15s; }
.hero-sub b:nth-child(2) { animation-delay: 1.27s; }
.hero-sub b:nth-child(3) { animation-delay: 1.39s; }
.hero-sub span {
  color: var(--world);
  animation-delay: 1.55s;
}
@keyframes pop {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.6);
  }
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: rise 1s var(--ease-out) 1.7s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
}

/* A single horizontal flare crosses the screen once, like an engine
   lighting. Then it's gone. */
.ignition {
  position: absolute;
  left: 0;
  right: 0;
  top: 48%;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 196, 122, 0.9) 45%, #fff 50%, rgba(154, 216, 255, 0.9) 55%, transparent);
  box-shadow: 0 0 40px 6px rgba(255, 196, 122, 0.35);
  transform: scaleX(0);
  opacity: 0;
  animation: ignite 1.5s var(--ease-cine) 0.1s both;
  pointer-events: none;
}
@keyframes ignite {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

.hero-world {
  position: relative;
  z-index: 1;
  width: min(100%, 74vh, 760px);
  aspect-ratio: 1;
  animation: planetin 1.6s cubic-bezier(0.2, 1.2, 0.3, 1) 0.3s both;
}
.hero-world canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-world .rib {
  pointer-events: none;
}
.hero-world .rib-back {
  z-index: 0;
}
#hero-globe {
  z-index: 1;
  cursor: grab;
  border-radius: 50%;
}
#hero-globe.grabbing {
  cursor: grabbing;
}
#hero-globe:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -12%;
}
.hero-world .rib-front {
  z-index: 2;
}
.hero-world.no-ribbons .rib {
  opacity: 0;
}
@keyframes planetin {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-20deg);
    filter: blur(14px) brightness(3);
  }
  60% {
    opacity: 1;
    filter: blur(0) brightness(1.2);
  }
  100% {
    transform: none;
    filter: none;
  }
}

/* The world's controls: a small glass dock under it. */
.hero-stage {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}
.globe-dock {
  position: relative;
  z-index: 3;
  margin-top: -9%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: rgba(10, 13, 25, 0.72);
  backdrop-filter: blur(10px);
  animation: rise 0.8s var(--ease-out) 1.9s both;
}
.gd-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-1), transform var(--dur-1);
}
.gd-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.gd-btn:active {
  transform: scale(0.9);
}
.gd-btn[aria-pressed="false"] {
  color: var(--text-3);
}
#gd-play[aria-pressed="false"] {
  color: var(--time);
}
.gd-speed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
}
.gd-speed input {
  width: clamp(70px, 9vw, 120px);
  accent-color: var(--time);
}
.gd-speed output {
  min-width: 3.2ch;
  font: 600 12px/1 var(--f-body);
  font-variant-numeric: tabular-nums;
  color: var(--time);
}
.gd-hint {
  padding: 0 8px 0 4px;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .gd-hint {
    display: none;
  }
}
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 84px;
    text-align: left;
  }
  .hero-world {
    width: min(100%, 92vw, 520px);
    margin-top: -10px;
  }
  .scroll-cue {
    display: none !important;
  }
}

.scroll-cue {
  position: absolute;
  left: var(--gutter);
  bottom: 28px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  animation: rise 1s var(--ease-out) 2.4s both;
}
.scroll-cue i {
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--text-3), transparent);
}

/* Sections below the fold. */
.idea,
.inside,
.for,
.safety,
.final {
  position: relative;
  z-index: 1;
  padding: clamp(70px, 10vw, 130px) var(--gutter) 0;
  max-width: 1240px;
  margin: 0 auto;
}
.section-title {
  margin: 18px 0 40px;
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 400;
}
.idea-quote {
  margin: 22px 0 44px;
  font-size: clamp(34px, 5.6vw, 76px);
  line-height: 1.04;
  max-width: 18ch;
}
.idea-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.slash-card {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 4px 22px 4px 22px;
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.4px) 0 0 / 7px 7px,
    linear-gradient(135deg, color-mix(in srgb, var(--tone) 16%, transparent), transparent 60%);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2);
}
.slash-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 40%;
  height: 180%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transition: left 0.6s var(--ease-out);
}
.slash-card:hover {
  transform: translateY(-4px) skewX(-2deg);
  border-color: var(--tone);
}
.slash-card:hover::after {
  left: 130%;
}
.slash-card h3 {
  font: 400 clamp(19px, 2vw, 26px) / 1.1 var(--f-display);
  letter-spacing: -0.03em;
  color: var(--tone);
  margin-bottom: 10px;
}
.slash-card p {
  color: var(--text-2);
}
@media (max-width: 820px) {
  .idea-cards {
    grid-template-columns: 1fr;
  }
}

/* The live world demo. */
.world-demo {
  display: grid;
  grid-template-columns: minmax(260px, 440px) 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin-bottom: 70px;
}
.wd-globe canvas {
  width: 100%;
  aspect-ratio: 1;
  cursor: grab;
}
.wd-lead {
  font: 400 clamp(20px, 2.4vw, 30px) / 1.15 var(--f-serif);
  font-style: italic;
  color: var(--text);
  margin-bottom: 18px;
}
.wd-slider {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.wd-slider span {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.wd-slider output {
  color: var(--tone);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.wd-slider small {
  color: var(--text-3);
  font-size: 12.5px;
}
.wd-slider input,
input[type="range"].range {
  width: 100%;
  accent-color: var(--tone, var(--focus));
}
@media (max-width: 820px) {
  .world-demo {
    grid-template-columns: 1fr;
  }
  .wd-globe {
    max-width: 340px;
    margin: 0 auto;
  }
}

/* The six parts, as cards with a numeral behind each. */
.systems {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.systems li {
  position: relative;
  padding: 22px 22px 24px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 4px 20px 4px 20px;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 12%, transparent), transparent 55%);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2), box-shadow var(--dur-2);
}
.systems li:hover {
  transform: translateY(-5px);
  border-color: var(--tone);
  box-shadow: -6px 0 0 -2px color-mix(in srgb, var(--tone) 40%, transparent), -12px 0 0 -4px color-mix(in srgb, var(--tone) 18%, transparent);
}
.sys-k {
  position: absolute;
  right: 10px;
  bottom: -18px;
  font: 400 96px/1 var(--f-serif);
  color: var(--tone);
  opacity: 0.12;
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.systems li:hover .sys-k {
  opacity: 0.3;
  transform: translateY(-6px) rotate(-6deg);
}
.sys-n {
  display: block;
  font: 400 clamp(19px, 2vw, 24px) / 1.2 var(--f-display);
  letter-spacing: -0.03em;
  color: var(--tone);
  margin-bottom: 10px;
}
.systems p {
  position: relative;
  color: var(--text-2);
  max-width: 30ch;
}
@media (max-width: 900px) {
  .systems {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .systems {
    grid-template-columns: 1fr;
  }
}

/* Who it's for: two rows of phrases sliding past in opposite directions. */
.marquee {
  display: grid;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.mq-row {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: mq 38s linear infinite;
}
.mq-row.rev {
  animation-direction: reverse;
  animation-duration: 44s;
}
.mq-row span {
  padding: 12px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  font: 400 clamp(16px, 1.8vw, 22px) / 1.2 var(--f-body);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.02);
}
.mq-row span:nth-child(3n + 1) {
  color: var(--focus);
}
.mq-row span:nth-child(3n + 2) {
  color: var(--time);
}
.mq-row span:nth-child(3n) {
  color: var(--drift);
}
@keyframes mq {
  to {
    transform: translateX(-50%);
  }
}
.for-not {
  margin-top: 34px;
  font-size: 18px;
  color: var(--text-2);
}
.for-not .serif {
  font-size: 1.3em;
  color: var(--drift);
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.safety-grid > div {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 4px 18px 4px 18px;
  background: radial-gradient(rgba(181, 156, 255, 0.07) 1px, transparent 1.4px) 0 0 / 7px 7px;
  transition: border-color var(--dur-2), transform var(--dur-2) var(--ease-out);
}
.safety-grid > div:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
}
.safety-grid h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.safety-grid h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px 0;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
}
.safety-grid p {
  font-size: 14.5px;
  color: var(--text-2);
}
.safety-grid a {
  color: var(--focus);
}
@media (max-width: 900px) {
  .safety-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .safety-grid {
    grid-template-columns: 1fr;
  }
}

.final {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 26px;
  padding-bottom: 120px;
  overflow: hidden;
}
/* Speed lines converging on the last call to action, turning slowly. */
.final-lines {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 62%, rgba(154, 216, 255, 0.1) 0deg 0.6deg, transparent 0.6deg 4.2deg, rgba(255, 196, 122, 0.07) 4.2deg 4.6deg, transparent 4.6deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 50% 62%, transparent 0 12%, #000 40%, transparent 75%);
  mask-image: radial-gradient(circle at 50% 62%, transparent 0 12%, #000 40%, transparent 75%);
  animation: turn 90s linear infinite;
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
.final-title {
  font-size: clamp(44px, 8vw, 110px);
  font-weight: 400;
  line-height: 1;
}
.final-note {
  font-size: 13.5px;
  color: var(--text-3);
}

/* Brush strokes between sections, drawn as they arrive. */
.brush {
  display: block;
  width: min(1240px, calc(100% - 2 * var(--gutter)));
  height: 40px;
  margin: clamp(50px, 7vw, 90px) auto 0;
  overflow: visible;
}
.brush path {
  fill: none;
  stroke: rgba(154, 216, 255, 0.32);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  transition: stroke-dashoffset 1.4s var(--ease-out);
  vector-effect: non-scaling-stroke;
}
.brush.fx-in path {
  stroke-dashoffset: 0;
}

.land-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
}
.land-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.land-foot a {
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
}
.land-foot a:hover {
  color: var(--text);
}

/* ---- The crossing ------------------------------------------------------------ */
/* Not the landing with a form in it: a different place. An event horizon
   on one side, an airlock on the other. Crossing over collapses the horizon
   into the app. */

.crossing {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.1fr minmax(360px, 480px);
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 34% 50%, rgba(255, 196, 122, 0.06), transparent 50%), rgba(3, 4, 10, 0.4);
  animation: fade-in var(--dur-3) ease both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.horizon {
  position: relative;
  justify-self: center;
  width: min(62vh, 44vw);
  aspect-ratio: 1;
}
.h-disk {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 196, 122, 0.85) 40deg, rgba(255, 120, 60, 0.4) 90deg, transparent 150deg, rgba(154, 216, 255, 0.45) 230deg, rgba(255, 196, 122, 0.8) 300deg, transparent 360deg);
  filter: blur(18px);
  transform: scaleY(0.34) rotate(0deg);
  animation: disk 26s linear infinite;
  opacity: 0.9;
}
.h-photon {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 220, 170, 0.9), 0 0 50px 12px rgba(255, 180, 100, 0.4), inset 0 0 40px 8px rgba(255, 180, 100, 0.35);
}
.h-hole {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, #000 62%, #050308 100%);
  transition: transform 1.1s var(--ease-cine);
}
@keyframes disk {
  to {
    transform: scaleY(0.34) rotate(360deg);
  }
}

/* Crossing over: the hole swallows the screen. */
.crossing.crossing-over .h-hole {
  transform: scale(9);
}
.crossing.crossing-over .airlock {
  opacity: 0;
  transform: translateX(30px);
}
.crossing.crossing-over .h-disk,
.crossing.crossing-over .h-photon {
  opacity: 0;
  transition: opacity 0.6s;
}

.crossing-back {
  position: absolute;
  top: 22px;
  left: var(--gutter);
  font-size: 13.5px;
  color: var(--text-3);
  text-decoration: none;
}
.crossing-back:hover {
  color: var(--text);
}

.airlock {
  position: relative;
  z-index: 2;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: 72px clamp(24px, 4vw, 52px) 40px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 13, 25, 0.92), rgba(7, 9, 18, 0.96));
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
}
.airlock-mark {
  margin-bottom: 32px;
}
.airlock-form {
  animation: rise 0.6s var(--ease-out) both;
}
.airlock-title {
  margin: 12px 0 8px;
  font: 400 clamp(24px, 2.6vw, 30px) / 1.15 var(--f-display);
  letter-spacing: -0.035em;
}
.airlock-lead {
  color: var(--text-2);
  margin-bottom: 26px;
  font-size: 14.5px;
}
.airlock-form .check {
  margin: 4px 0 20px;
}
.airlock-switch {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}
.airlock-switch a,
.check a {
  color: var(--focus);
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.link-btn {
  border: 0;
  padding: 0;
  background: none;
  color: var(--focus);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pw {
  position: relative;
}
.pw input {
  padding-right: 66px;
}
.pw-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-1);
  background: none;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
}
.pw-reveal:hover {
  color: var(--text);
}
.prefixed {
  position: relative;
  display: block;
}
.prefixed i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  color: var(--text-3);
}
.prefixed input {
  padding-left: 30px;
}
.otp {
  font-size: 26px !important;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.auth-message {
  min-height: 22px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--alert);
}
.auth-message[data-tone="ok"] {
  color: var(--world);
}

@media (max-width: 860px) {
  .crossing {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
  }
  .horizon {
    width: min(46vw, 210px);
    margin-top: 58px;
  }
  .airlock {
    border-left: 0;
    background: none;
    max-height: none;
    overflow: visible;
    padding-top: 24px;
    justify-content: flex-start;
  }
  .airlock-mark {
    display: none;
  }
}

/* ---- Birth ------------------------------------------------------------------- */

.birth {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #000;
  display: grid;
  place-items: center;
}
.birth-line {
  position: relative;
  z-index: 2;
  max-width: 30ch;
  padding: 0 24px;
  text-align: center;
  font: 400 clamp(26px, 4vw, 44px) / 1.15 var(--f-serif);
  font-style: italic;
  color: var(--text);
  transition: opacity 0.6s, transform 0.6s var(--ease-out);
}
.birth-line.out {
  opacity: 0;
  transform: translateY(-10px);
}
.birth-line.low {
  align-self: end;
  margin-bottom: 14vh;
}
.birth-skip {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
}
.birth-form {
  position: relative;
  z-index: 3;
  align-self: end;
  width: min(560px, calc(100vw - 32px));
  margin-bottom: max(5vh, 24px);
  padding: 26px 26px 22px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-3);
  background: rgba(10, 13, 25, 0.9);
  backdrop-filter: blur(10px);
  animation: rise 0.8s var(--ease-out) both;
}
.birth-form h2 {
  font: 400 21px/1.2 var(--f-display);
  letter-spacing: -0.03em;
  margin: 8px 0 6px;
}
.birth-form .lead {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 18px;
}
.birth-steps {
  display: flex;
  gap: 6px;
}
.birth-steps i {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
}
.birth-steps i.on {
  background: var(--world);
}
.birth-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.suggest button {
  border: 0;
  background: none;
  color: var(--focus);
  font-size: 13px;
  padding: 2px 4px;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* ---- Static pages (privacy, rules) ----------------------------------------- */

.doc {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 110px var(--gutter) 80px;
}
.doc h1 {
  font: 400 clamp(26px, 4.4vw, 42px) / 1.1 var(--f-display);
  letter-spacing: -0.04em;
  margin: 14px 0 18px;
}
.doc h2 {
  font-size: 20px;
  margin: 40px 0 10px;
  scroll-margin-top: 90px;
}
.doc p,
.doc li {
  color: var(--text-2);
  max-width: var(--measure);
}
.doc li {
  margin-bottom: 6px;
}
.doc .notice {
  padding: 16px 18px;
  border: 1px solid rgba(255, 196, 122, 0.35);
  border-radius: var(--r-2);
  color: var(--text);
  background: rgba(255, 196, 122, 0.06);
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.doc th,
.doc td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--text-2);
}
.doc th {
  color: var(--text);
}
.doc a {
  color: var(--focus);
}

.birth-globe {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(70vmin, 520px);
  height: min(70vmin, 520px);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  transition: opacity 2.4s ease, transform 3s var(--ease-out), top 1.2s var(--ease-out);
}
.birth-globe.in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.birth.asking .birth-globe {
  top: 30%;
}
/* With the title (2D fallback world), the world sinks like a horizon so
   the type has the sky above it -- as the film's own world does. */
.birth.titled:not(.asking) .birth-globe {
  top: 78%;
}
.birth.asking .birth-line {
  max-width: none;
  align-self: start;
  margin-top: max(18px, 5vh);
  font-size: clamp(16px, 2vw, 20px);
  font-family: var(--f-body);
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
/* The film (film.js): the graded frame fills the screen; its letterbox bars
   are part of the picture. Captions sit in the lower bar, like subtitles;
   the title card is set in type over the last shot. */
.film-out {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #000;
}
.film-caption {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: max(18px, calc(var(--film-bar, 0px) / 2));
  width: min(92vw, 900px);
  margin: 0;
  transform: translate(-50%, 50%);
  text-align: center;
  font: 400 clamp(17px, 1.9vw, 24px) / 1.3 var(--f-serif);
  font-style: italic;
  letter-spacing: 0.01em;
  color: rgba(244, 240, 232, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.film-caption.on {
  opacity: 1;
}
.film-title {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: start center;
  padding-top: calc(var(--film-bar, 0px) + clamp(28px, 9vh, 110px));
  justify-items: center;
  gap: 14px;
  pointer-events: none;
  opacity: 0;
}
.birth.titled .film-title {
  opacity: 1;
}
.ft-word {
  font: 300 clamp(40px, 9vw, 128px) / 1 var(--f-display);
  letter-spacing: 0.42em;
  margin-right: -0.42em;
  color: transparent;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.15) 0%, #fff 45%, #ffe2b8 50%, rgba(255, 255, 255, 0.15) 60%) 0 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(255, 210, 160, 0.35));
}
.birth.titled .ft-word {
  animation: ft-in 4.2s cubic-bezier(0.2, 0.8, 0.2, 1) both, ft-sweep 3.2s ease-in-out 0.6s both;
}
.film-title::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--film-bar, 0px) + clamp(28px, 9vh, 110px) + clamp(20px, 4.5vw, 64px));
  width: min(90vw, 1100px);
  height: 2px;
  transform: translate(-50%, -50%) scaleX(0);
  background: linear-gradient(90deg, transparent, rgba(150, 200, 255, 0.55) 30%, #fff 50%, rgba(255, 210, 160, 0.55) 70%, transparent);
  box-shadow: 0 0 24px 4px rgba(150, 200, 255, 0.25);
  opacity: 0;
}
.birth.titled .film-title::before {
  animation: ft-flare 3.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
}
@keyframes ft-flare {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(1);
  }
}
.ft-sub {
  font: 500 clamp(11px, 1.2vw, 15px) / 1 var(--f-body);
  letter-spacing: 0.9em;
  margin-right: -0.9em;
  color: rgba(255, 214, 170, 0.85);
}
.ft-num {
  margin-top: 10px;
  font: 400 clamp(13px, 1.3vw, 16px) / 1 var(--f-serif);
  font-style: italic;
  color: rgba(230, 236, 255, 0.7);
}
.birth.titled .ft-sub,
.birth.titled .ft-num {
  animation: ft-fade 2.4s ease 1.2s both;
}
@keyframes ft-in {
  0% {
    opacity: 0;
    letter-spacing: 0.2em;
    margin-right: -0.2em;
    filter: blur(14px);
  }
  40% {
    opacity: 1;
    filter: blur(0) drop-shadow(0 0 30px rgba(255, 210, 160, 0.35));
  }
  100% {
    letter-spacing: 0.5em;
    margin-right: -0.5em;
  }
}
@keyframes ft-sweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
@keyframes ft-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.birth.asking .film-title,
.birth.asking .film-caption {
  display: none;
}
.birth-sound {
  position: absolute;
  right: 90px;
  top: 18px;
  z-index: 3;
}

.birth.leaving {
  opacity: 0;
  transition: opacity 0.7s ease;
}
@media (max-height: 700px) {
  .birth.asking .birth-globe {
    top: 22%;
    width: 42vmin;
    height: 42vmin;
  }
}

/* The light panel that opens from a world's dock. */
.globe-dock {
  position: relative;
}
.gd-panel {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  z-index: 5;
  width: min(300px, 86vw);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(10, 13, 25, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: left;
  animation: rise 0.3s var(--ease-out);
}
.gd-panel[hidden] {
  display: none;
}
.gd-panel-h {
  font: 600 11px/1 var(--f-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--time);
}
.gd-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gd-modes .chip {
  --tone: var(--time);
}
.gd-slide {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.gd-slide span {
  display: flex;
  justify-content: space-between;
}
.gd-slide output {
  color: var(--time);
  font-variant-numeric: tabular-nums;
}
.gd-slide input {
  width: 100%;
  accent-color: var(--time);
}
.gd-slide input:disabled {
  opacity: 0.4;
}
.gd-note {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---- The gate, the HUD and the thread -------------------------------------- */
/* Mono eyebrows: the landing's labels read like instrument readouts. */
.landing .kicker,
.hud,
.gate-cap,
.stat dt {
  font-family: var(--f-mono);
  font-weight: 500;
  letter-spacing: 0.16em;
}

/* The gate: a count to 100 on first arrival, then it shutters shut to a
   line of light. Visual only; clicks pass straight through. */
.gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(154, 216, 255, 0.07), transparent 70%),
    var(--void);
}
html[data-gate] .gate {
  display: grid;
  /* If the script never arrives, don't stand in the way. */
  animation: gate-giveup 0.4s 6s forwards;
}
html[data-gate="out"] .gate {
  animation: gate-shut 0.75s var(--ease-cine) forwards;
}
.gate::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, var(--time), #fff, var(--focus), transparent);
  opacity: 0;
}
html[data-gate="out"] .gate::after {
  animation: gate-line 0.75s ease-out forwards;
}
.gate-core {
  display: grid;
  justify-items: center;
  gap: 14px;
}
.gate-core svg {
  animation: breathe 1.6s ease-in-out infinite;
}
.gate-n {
  font: 300 clamp(72px, 16vw, 190px) / 0.9 var(--f-display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-shadow: 0 0 40px rgba(154, 216, 255, 0.25);
}
.gate-n small {
  font-size: 0.3em;
  margin-left: 0.1em;
  color: var(--time);
  vertical-align: top;
}
.gate-cap {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
}
.gate-bar {
  display: block;
  width: min(240px, 60vw);
  height: 1px;
  background: var(--line-2);
}
.gate-bar b {
  display: block;
  height: 100%;
  background: var(--time);
  box-shadow: 0 0 10px var(--time);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
@keyframes gate-shut {
  to {
    clip-path: inset(50% 0 50% 0);
  }
}
@keyframes gate-line {
  0% { opacity: 0; transform: scaleX(0.2); }
  40% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(1.1); }
}
@keyframes gate-giveup {
  to {
    visibility: hidden;
  }
}
/* Hold the hero's entrance until the gate opens (only when the script that
   opens it is running). */
html.gate-js[data-gate="on"] .hero-copy,
html.gate-js[data-gate="on"] .hero-copy *,
html.gate-js[data-gate="on"] .ignition {
  animation-play-state: paused !important;
}

/* The HUD: four corner brackets, the chapter you're in, how far down you
   are, and a hairline of progress across the top. */
.hud {
  position: fixed;
  inset: 0;
  z-index: 21; /* above the bar, so the progress hairline shows on it */
  pointer-events: none;
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--text-3);
}
.hud-c {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--line-3);
}
.hud-c.tl { top: 80px; left: 14px; border-width: 1px 0 0 1px; }
.hud-c.tr { top: 80px; right: 14px; border-width: 1px 1px 0 0; }
.hud-c.bl { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; }
.hud-c.br { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; }
.hud-chapter,
.hud-pct {
  position: absolute;
  bottom: 22px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.hud-chapter { left: 40px; transition: opacity var(--dur-2); }
/* On the hero the scroll cue sits there instead. */
.hud.at-start .hud-chapter { opacity: 0; }
.hud-pct { right: 40px; font-variant-numeric: tabular-nums; }
.hud-no { color: var(--time); }
.hud-name { color: var(--text-2); }
.hud-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}
.hud-progress b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--focus), var(--time));
  box-shadow: 0 0 8px rgba(255, 196, 122, 0.6);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
@media (max-width: 760px) {
  .hud-c,
  .hud-chapter,
  .hud-pct {
    display: none;
  }
}

/* The thread: one line down the right edge with a star for each chapter.
   The line fills as you read; a star lights when you reach its chapter.
   Each star is a link to its chapter. */
.thread {
  position: fixed;
  z-index: 16;
  right: 26px;
  top: 50%;
  height: min(56vh, 460px);
  transform: translateY(-50%);
  width: 20px;
}
.thread-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--line-2);
}
.thread-line b {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(var(--focus), var(--time));
  box-shadow: 0 0 6px rgba(255, 196, 122, 0.7);
  transform-origin: top;
  transform: scaleY(var(--p, 0));
}
.thread-stars {
  list-style: none;
  margin: 0;
  padding: 0;
}
.thread-stars li {
  position: absolute;
  left: 50%;
  top: calc(var(--at) * 100%);
  transform: translate(-50%, -50%);
}
.thread-stars a {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: transparent;
  text-decoration: none;
}
.thread-stars a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-3);
  transition: transform var(--dur-2) var(--ease-out), background var(--dur-2), box-shadow var(--dur-2);
}
.thread-stars li.lit a::before {
  background: var(--time);
  border-color: var(--time);
  box-shadow: 0 0 8px var(--time);
}
.thread-stars li.here a::before {
  transform: scale(1.7) rotate(45deg);
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 0 10px #fff, 0 0 22px var(--time);
}
/* The chapter's name, shown beside its star on hover or focus. */
.thread-stars a span {
  position: absolute;
  right: 24px;
  white-space: nowrap;
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity var(--dur-1), transform var(--dur-1);
  pointer-events: none;
}
.thread-stars a:hover span,
.thread-stars a:focus-visible span {
  opacity: 1;
  transform: none;
}
.thread-stars a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-radius: 50%;
}
@media (max-width: 760px) {
  .thread {
    display: none;
  }
}

/* ---- In numbers ------------------------------------------------------------ */
.numbers,
.letter-wrap,
.faq {
  position: relative;
  z-index: 1;
  padding: clamp(70px, 10vw, 130px) var(--gutter) 0;
  max-width: 1240px;
  margin: 0 auto;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 12px;
  padding: 26px 20px 30px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: 0;
}
.stat dd {
  margin: 0;
  font: 300 clamp(56px, 8vw, 104px) / 0.9 var(--f-display);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
  text-shadow: 0 0 34px color-mix(in srgb, var(--tone) 35%, transparent);
}
.stat dt {
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--text-3);
  max-width: 22ch;
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

/* ---- A letter -------------------------------------------------------------- */
/* The one light page on the outside: ivory paper, ink, a serif hand. */
.letter {
  position: relative;
  margin-top: 26px;
  max-width: 760px;
  padding: clamp(30px, 6vw, 64px) clamp(24px, 6vw, 72px);
  color: #2a2418;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(rgba(90, 70, 40, 0.06) 1px, transparent 1.3px) 0 0 / 5px 5px,
    #f1e8d6;
  border-radius: 3px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}
.letter::before {
  /* A wax seal in the time hue. */
  content: "";
  position: absolute;
  right: clamp(22px, 5vw, 48px);
  top: -18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd9a3, #d9883a 55%, #8a4a17);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.letter p {
  margin: 0 0 1em;
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.65;
  color: #3b3324;
}
.letter-to {
  margin: 0 0 22px;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  color: #1d180f;
}
.letter-sign {
  display: grid;
  gap: 8px;
  margin: 26px 0 0 !important;
}
.letter-sign .serif {
  font-size: clamp(22px, 2.6vw, 30px);
  font-style: italic;
  color: #1d180f;
}
.letter-from {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a6a35;
}

/* ---- Questions, answered ---------------------------------------------------- */
.faq-list {
  max-width: 880px;
  border-top: 1px solid var(--line-2);
}
.faq details {
  border-bottom: 1px solid var(--line-2);
}
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 44px 22px 0;
  cursor: pointer;
  list-style: none;
  font: 400 clamp(17px, 2vw, 22px) / 1.3 var(--f-display);
  letter-spacing: -0.02em;
  color: var(--text);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--time), var(--time)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--time), var(--time)) center / 1.5px 100% no-repeat;
  transition: transform var(--dur-2) var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(135deg);
}
.faq summary:hover {
  color: var(--time);
}
.faq summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
.faq details p {
  margin: 0;
  padding: 0 44px 24px 0;
  max-width: 64ch;
  color: var(--text-2);
  font-size: 15.5px;
}
.faq details[open] p {
  animation: rise var(--dur-2) var(--ease-out) both;
}
.faq details a {
  color: var(--focus);
}

@media (prefers-reduced-motion: reduce) {
  .gate,
  html[data-gate] .gate {
    display: none;
  }
}
html[data-motion="reduce"] .gate {
  display: none !important;
}

/* ---- Age and a parent's consent ---------------------------------------------- */
.birth-field {
  display: grid;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  min-width: 0;
}
.birth-field legend {
  padding: 0;
  margin-bottom: 6px;
}
.birth-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
}
.birth-row select:invalid {
  color: var(--text-3);
}
.birth-row option {
  color: var(--text);
  background: var(--bg-2);
}
/* A year, not a quantity: no spinner arrows. */
.birth-row input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.birth-row input[type="number"]::-webkit-inner-spin-button,
.birth-row input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#age-form .birth-field {
  margin-bottom: 22px;
}
.guardian-wait {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--signal) 7%, transparent);
}
.guardian-status {
  margin: 0;
  font-weight: 600;
  color: var(--signal);
}
.parent-decide {
  max-height: none;
}
#parent-requests {
  display: grid;
  gap: 16px;
}
.parent-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  background: var(--surface);
}
.parent-card h2 {
  margin: 0;
  font: 500 20px/1.2 var(--f-display);
}
.parent-card .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.parent-notice ul {
  margin: 8px 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 14px;
}
.parent-notice summary {
  cursor: pointer;
  font-weight: 600;
}
.parent-card.approved {
  border-color: color-mix(in srgb, var(--world) 45%, var(--line));
}

/* ---- The intro, personal (batch 4) --------------------------------------------- */

/* Your name, in stars, under the title. */
.ft-stars {
  width: min(80vw, 560px);
  height: clamp(44px, 7vw, 84px);
  opacity: 0;
  transition: opacity 600ms ease;
}
.birth.titled .ft-stars {
  opacity: 1;
}

/* Camera language: a rack of focus at each cut, and the lens breathing
   while the world turns. (The individual `scale` property, so the fall's
   transform below is never fought.) */
.birth[data-shot="genesis"] .film-out {
  animation: rack-a 800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.birth[data-shot="worldfall"] .film-out {
  animation: rack-b 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both, breathe 7s ease-in-out 1.1s infinite alternate;
}
.birth[data-shot="title"] .film-out {
  animation: rack-c 1400ms cubic-bezier(0.2, 0.8, 0.2, 1) both, breathe 7s ease-in-out 1.4s infinite alternate;
}
@keyframes rack-a { from { filter: blur(7px) brightness(1.35); } }
@keyframes rack-b { from { filter: blur(5px); scale: 1.035; } }
@keyframes rack-c { from { filter: blur(3px); scale: 1.02; } }
@keyframes breathe { from { scale: 1; } to { scale: 1.012; } }

/* The finale: first constellations, your world's name, the fall. */
.finale {
  position: absolute;
  inset: 0;
  z-index: 6;
  cursor: pointer;
}
.finale-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.finale-const line {
  stroke: rgba(255, 226, 184, 0.55);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: const-draw 900ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--d) forwards;
}
.finale-const circle {
  fill: #fff;
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(255, 226, 184, 0.9));
  animation: const-star 500ms ease var(--d) forwards;
}
.finale-const text {
  font: 600 11px var(--f-body);
  letter-spacing: 0.24em;
  fill: rgba(255, 226, 184, 0.85);
  opacity: 0;
  animation: const-star 700ms ease calc(var(--d) + 700ms) forwards;
}
@keyframes const-draw { to { stroke-dashoffset: 0; } }
@keyframes const-star { to { opacity: 1; } }
.finale-name {
  position: absolute;
  left: 50%;
  top: var(--name-y, calc(var(--film-bar, 0px) + clamp(16px, 5vh, 56px)));
  transform: translate(-50%, -50%);
  width: min(86vw, 720px);
  height: clamp(56px, 10vw, 110px);
}
.finale-caption {
  position: absolute;
  left: 50%;
  bottom: max(18px, calc(var(--film-bar, 0px) / 2));
  transform: translate(-50%, 50%);
  margin: 0;
  font: italic 400 clamp(16px, 2vw, 22px) / 1.3 var(--f-serif);
  color: rgba(230, 236, 255, 0.85);
  animation: const-star 900ms ease 400ms both;
}
.finale-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--fall-x, 50%) var(--fall-y, 40%), #fff 0%, rgba(235, 242, 255, 0.95) 30%, rgba(200, 220, 255, 0.6) 60%, rgba(10, 14, 30, 0) 100%);
}
.birth.finale-on .birth-form,
.birth.finale-on .birth-line {
  opacity: 0;
  pointer-events: none;
}
/* The fall: the world rushes up, the clouds go white. */
.birth.falling .film-out,
.birth.falling .birth-globe {
  filter: blur(2px) brightness(1.3);
  transition: transform 1.5s cubic-bezier(0.55, 0, 0.9, 0.5), filter 1.5s ease-in;
}
.birth.falling .film-out {
  transform-origin: var(--fall-x, 50%) var(--fall-y, 40%);
  transform: scale(6);
}
/* The 2D world keeps its centring translate; it grows about its own middle. */
.birth.falling .birth-globe {
  transform: translate(-50%, -50%) scale(6);
}
.birth.falling .finale-sky,
.birth.falling .finale-name,
.birth.falling .finale-caption {
  opacity: 0;
  animation: none;
  transition: opacity 500ms ease;
}
.birth.falling .finale-fog {
  opacity: 1;
  transition: opacity 1.2s cubic-bezier(0.6, 0, 0.8, 0.4) 0.25s;
}
@media (prefers-reduced-motion: reduce) {
  .birth .film-out { animation: none !important; }
}
html[data-motion="reduce"] .birth .film-out {
  animation: none !important;
}
