/*
  TryMyDays home page. Loaded only by the home route (never by a registered
  legal route; see render/layout.ts). Tokens come from main.css.

  Composition rules (Web refresh V2): one display-sized moment (the hero
  headline); every other section is kicker → title (30–46 px) → one line →
  content. Colour stays restrained: cobalt glow, bubblegum for a single word
  or marker, sun only for tiny in-app details inside the phones.

  Motion: orbits, sparkles, the Day player and reveals run only for
  prefers-reduced-motion: no-preference (main.css switches every animation
  and transition off otherwise; the reduce block at the end restores final
  states). Content never depends on script: reveal styles apply only under
  `.js`, which the page sets before first paint.
*/

.home main.wrap.page {
  max-width: none;
  padding: 0;
  /* Orbits may hang past the edge; clip (not hidden) keeps the sticky header working. */
  overflow-x: clip;
}

/* ---------- Sky: sparse four-point sparkles, never dots ---------- */

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cg fill='%23dfe6ff'%3E%3Cpath opacity='.55' transform='translate(64 88) scale(.9)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3Cpath opacity='.35' transform='translate(300 40) scale(.6)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3Cpath opacity='.5' transform='translate(452 214) scale(.75)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3Cpath opacity='.3' transform='translate(186 300) scale(.5)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3Cpath opacity='.45' transform='translate(380 432) scale(.65)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3Cpath opacity='.28' transform='translate(40 470) scale(.55)' d='M0-6C.8-1 1-.8 6 0 1 .8.8 1 0 6-.8 1-1 .8-6 0-1-.8-.8-1 0-6z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 520px 520px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  animation: sky-drift 120s linear infinite;
}

.sparkle {
  position: absolute;
  margin: -6px 0 0 -6px;
  background: #e4eaff;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0.5;
  animation: twinkle 4.2s ease-in-out infinite;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: clip;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: min(780px, calc(100svh - 64px));
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-meta > span:not(.status-pill) {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 11px;
  border: 1px solid rgba(248, 124, 162, 0.35);
  border-radius: 999px;
  background: rgba(248, 124, 162, 0.08);
  color: var(--text);
}

.status-pill::before {
  content: "✦";
  color: var(--bubble);
  font-size: 11px;
  letter-spacing: 0;
  animation: twinkle 2.6s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(44px, 5.3vw, 74px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.hero-line {
  display: block;
}

.try-it {
  position: relative;
  display: inline-block;
  color: var(--bubble);
}

.hero-sub {
  max-width: 34ch;
  margin: 26px 0 32px;
  color: var(--text-2);
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Stage + space (orbits around a device) ---------- */

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
  margin: 0;
}

.stage--hero {
  height: 660px;
}

.stage--side {
  height: 640px;
}

.space {
  position: relative;
  flex: none;
  transform-origin: top center;
}

.space-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 540px;
  height: 540px;
  margin: -270px 0 0 -270px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(43, 75, 242, 0.34), rgba(43, 75, 242, 0.08) 62%, transparent);
  pointer-events: none;
}

.space--sync .space-glow {
  background: radial-gradient(closest-side, rgba(248, 124, 162, 0.16), rgba(43, 75, 242, 0.08) 62%, transparent);
}

.space-sparkles,
.space-back,
.space-front {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.space-back {
  z-index: 1;
}

.space-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
}

.space-front {
  z-index: 3;
}

.orbit-layer {
  position: absolute;
  inset: 0;
}

.orbit-svg {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.orbit-ring {
  fill: none;
  stroke: rgba(142, 168, 255, 0.26);
  stroke-width: 1.2;
}

.is-faint .orbit-ring {
  stroke: rgba(142, 168, 255, 0.15);
}

.space-front .orbit-ring {
  stroke: rgba(142, 168, 255, 0.3);
}

.space-front .is-faint .orbit-ring {
  stroke: rgba(142, 168, 255, 0.2);
}

.orbit-trail {
  fill: none;
  stroke: var(--sky);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 10 90;
  stroke-dashoffset: 10;
  opacity: 0.75;
  animation-name: trail;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* The body only moves along the shared path. Nothing else that could move
   it (scale, translate) is ever applied to this element. */
.orbit-body {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  offset-rotate: 0deg;
  offset-anchor: 50% 50%;
  animation-name: travel, show-front;
  animation-timing-function: linear, step-end;
  animation-iteration-count: infinite;
}

.orbit-body--back {
  opacity: 0;
  animation-name: travel, show-back;
}

/* Halo orbits stay behind the phone the whole way round. */
.orbit-body--behind {
  animation-name: travel;
}

/* Size and dimming by depth, on a child so they cannot shift the position.
   Identical in both copies, so the front/back switch is seamless. */
.orbit-body-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  animation-name: depth;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.orbit-sticker {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.planet {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.planet--cobalt {
  background: radial-gradient(circle at 32% 30%, #b4c4ff 0, #4c69ff 24%, #2238b8 58%, #0a1146 100%);
  box-shadow: 0 0 22px rgba(43, 75, 242, 0.6), inset -3px -5px 8px rgba(0, 0, 0, 0.4);
}

.planet--rose {
  background: radial-gradient(circle at 32% 30%, #ffd3e0 0, #f87ca2 30%, #b8406a 70%, #4a1428 100%);
  box-shadow: 0 0 18px rgba(248, 124, 162, 0.45), inset -3px -4px 7px rgba(0, 0, 0, 0.35);
}

.planet--moon {
  background: radial-gradient(circle at 34% 30%, #ffffff 0, #e8e3d6 40%, #9f998b 100%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

/* Under each stage, below the orbit's near arc. */
.screen-note {
  position: absolute;
  right: 0;
  bottom: -28px;
  left: 0;
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

.screen-note--static {
  position: static;
  margin-top: 28px;
}

/* ---------- Device shell ---------- */

.device {
  position: relative;
  width: 290px;
  padding: 9px;
  border-radius: 48px;
  background: linear-gradient(150deg, #3b414e 0%, #161a22 28%, #0c0f15 72%, #272c37 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.09),
    0 0 0 1.5px #020305,
    0 50px 90px -34px rgba(0, 0, 0, 0.95),
    0 0 110px -30px rgba(43, 75, 242, 0.55);
}

.device--hero {
  transform: perspective(1400px) rotateY(calc(var(--px, 0) * 10deg)) rotateX(calc(var(--py, 0) * -7deg));
  transition: transform 0.6s var(--ease);
}

.device-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 1326;
  overflow: hidden;
  border-radius: 39px;
  background: #000;
  color: #fff;
  font-family: var(--body);
  font-size: 3.9cqw;
  line-height: 1.3;
  container-type: inline-size;
  isolation: isolate;
}

.ui-island {
  position: absolute;
  top: 3.3cqw;
  left: 50%;
  z-index: 21;
  width: 31cqw;
  height: 9.2cqw;
  margin-left: -15.5cqw;
  border-radius: 99px;
  background: #000;
}

.ui-status {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 15.8cqw;
  padding: 0 7.6cqw 0 9cqw;
  font-size: 4.3cqw;
  font-weight: 600;
}

.ui-status-icons {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
}

.ui-signal {
  display: block;
  width: 5.4cqw;
  height: 3.4cqw;
  background: #fff;
  clip-path: polygon(0 100%, 20% 100%, 20% 70%, 27% 70%, 27% 100%, 47% 100%, 47% 45%, 54% 45%, 54% 100%, 74% 100%, 74% 20%, 81% 20%, 81% 100%, 100% 100%, 100% 0, 81% 0, 81% 20%, 74% 20%, 74% 45%, 54% 45%, 47% 45%, 47% 70%, 27% 70%, 20% 70%, 0 70%);
}

.ui-battery {
  position: relative;
  display: block;
  width: 7cqw;
  height: 3.4cqw;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1.1cqw;
}

.ui-battery::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 28%;
  bottom: 1px;
  left: 1px;
  border-radius: 0.6cqw;
  background: #fff;
}

/* Tones behind mascot art (stations, rules) */

.tone-sun { background: radial-gradient(120% 75% at 50% 32%, #5c4a1d 0%, #2b2311 52%, #0e0b06 100%); }
.tone-rose { background: radial-gradient(120% 75% at 50% 32%, #5b2443 0%, #28111f 52%, #0d060b 100%); }
.tone-dusk { background: radial-gradient(120% 75% at 50% 32%, #27397a 0%, #121b40 52%, #070a18 100%); }

/* App screens. The screen keeps the image's exact aspect (status band +
   app content), so nothing is cropped or stretched; only the corners are
   rounded by the screen mask. */

.device--hero {
  width: 320px;
}

.device--mini {
  width: 100%;
  max-width: 250px;
  border-radius: 42px;
}

.device--mini .device-screen {
  border-radius: 34px;
}

.shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Sync / Chill views */

.ui-view {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
}

.section--sync[data-mode="chill"] .ui-sync,
.section--sync[data-mode="sync"] .ui-chill {
  opacity: 0;
  pointer-events: none;
}

.section--sync[data-mode="chill"] .ui-sync {
  transform: scale(0.96);
}

.section--sync[data-mode="sync"] .ui-chill {
  transform: scale(1.04);
}

.create-mascot {
  position: absolute;
  right: 6px;
  bottom: 64px;
  z-index: 5;
  width: 96px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
  animation: bob 3.2s ease-in-out infinite;
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(72px, 8.5vw, 116px) 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.section-lead {
  max-width: 44ch;
  margin: 16px 0 0;
  color: var(--text-2);
  font-size: clamp(16.5px, 1.5vw, 18px);
}

.kicker--center {
  display: flex;
  justify-content: center;
}

/* So what is it? */

.section--statement {
  padding: clamp(72px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 18, 38, 0.6), rgba(6, 7, 11, 0));
  text-align: center;
}

.statement {
  max-width: 30ch;
  margin: 8px auto 0;
  color: var(--text-2);
  font-family: var(--display);
  font-size: clamp(24px, 2.9vw, 36px);
  font-weight: 500;
  line-height: 1.35;
}

.statement .term {
  color: var(--text);
  font-weight: 600;
}

.statement em {
  color: var(--bubble);
  font-style: normal;
  font-weight: 600;
}

/* How it works */

.stations-wrap {
  position: relative;
}

.stations-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 168px;
  overflow: visible;
  pointer-events: none;
}

.stations-path path {
  stroke: rgba(142, 168, 255, 0.22);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.stations-comet {
  stroke: var(--sky) !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round;
  stroke-dasharray: 7 93;
  stroke-dashoffset: 7;
  animation: comet 6s var(--ease) infinite;
}

@keyframes comet {
  0% { stroke-dashoffset: 7; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: -93; opacity: 0; }
}

.stations {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.station {
  text-align: center;
}

.porthole {
  position: relative;
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin: 0 auto 26px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--line-strong),
    0 0 0 10px var(--ink),
    0 0 0 11px var(--line),
    0 30px 70px -30px rgba(43, 75, 242, 0.8);
}

.porthole-art {
  position: relative;
  z-index: 1;
  width: 92%;
  transition: scale 0.6s var(--spring), rotate 0.6s var(--spring);
}

.station:hover .porthole-art {
  scale: 1.08;
  rotate: -4deg;
}

.station-num {
  margin: 0 0 8px;
  color: var(--bubble);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.station h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.station p {
  max-width: 30ch;
  margin: 0 auto;
  color: var(--text-2);
  font-size: 16px;
}

.note {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: clamp(48px, 6vw, 72px) auto 0;
  padding: 8px 22px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 20, 31, 0.6);
  color: var(--text-2);
  font-size: 15.5px;
}

.note-art {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0b0f1f;
}

.note strong {
  color: var(--text);
}

/* Sync or Chill + Make a Day */

.section--sync {
  background: linear-gradient(180deg, rgba(12, 18, 38, 0), rgba(12, 18, 38, 0.55) 25%, rgba(12, 18, 38, 0.55) 75%, rgba(12, 18, 38, 0));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.split--flip {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.split--flip .split-copy {
  order: 2;
}

.split-copy .section-head {
  margin-bottom: 28px;
}

.mode-toggle {
  display: none;
  margin: 0 0 26px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(16, 20, 31, 0.8);
}

.js .mode-toggle {
  display: inline-flex;
}

.mode-btn {
  min-width: 96px;
  min-height: 42px;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.is-on {
  background: var(--text);
  color: var(--ink);
}

.mode-copy {
  max-width: 40ch;
}

.mode-copy + .mode-copy {
  margin-top: 24px;
}

.js .mode-copy + .mode-copy {
  margin-top: 0;
}

.js .section--sync .mode-copy {
  animation: fade-up 0.5s var(--ease) both;
}

.js .section--sync[data-mode="sync"] [data-copy="chill"],
.js .section--sync[data-mode="chill"] [data-copy="sync"] {
  display: none;
}

.mode-lead {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
}

.mode-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mode-points li {
  position: relative;
  margin: 8px 0;
  padding-left: 24px;
  color: var(--text-2);
  font-size: 16.5px;
}

.mode-points li::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 0;
  color: var(--bubble);
  font-size: 11px;
  line-height: 2.3;
}

/* Any kind of day */

.section--cats {
  overflow: hidden;
}

.section--cats .section-head {
  margin-bottom: 36px;
}

/* Variety: three app screens in a row, a horizontal swipe on phones. */
.screen-row-wrap {
  margin: 0 0 clamp(48px, 6vw, 72px);
}

.screen-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 44px);
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.screen-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-width: 0;
}

.screen-card:nth-child(2) {
  margin-top: 36px;
}

.screen-label {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
}

.marquee {
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee.is-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 68s;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0 5px;
  list-style: none;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 20, 31, 0.7);
  color: var(--text-2);
  font-size: 15.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.25s, color 0.25s, transform 0.4s var(--spring);
}

.cat-chip:hover {
  border-color: rgba(142, 168, 255, 0.45);
  color: var(--text);
  transform: translateY(-2px);
}

.cat-art {
  width: 38px;
  height: 38px;
  padding: 4px;
  border-radius: 50%;
  background: #0b0f1f;
}

/* Your day, your rules */

.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.rule {
  padding: 36px 32px 0 0;
}

.rule + .rule {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.rule-art {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong), 0 16px 40px -20px rgba(43, 75, 242, 0.7);
}

.rule-art img {
  width: 96%;
  transition: scale 0.5s var(--spring);
}

.rule:hover .rule-art img {
  scale: 1.1;
}

.rule h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.rule p {
  margin: 0;
  color: var(--text-2);
  font-size: 16px;
}

/* FAQ */

.section--faq {
  border-top: 1px solid var(--line);
}

.faq-wrap .section-lead a {
  color: var(--sky);
}

.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  position: relative;
  padding: 20px 52px 20px 0;
  font-family: var(--display);
  font-size: 18.5px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-item summary:hover {
  color: #fff;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Icon drawn from two bars centred on the box's exact centre (no text glyph,
   so no font baseline). Open state rotates the whole icon 45°: + becomes ×
   around the same centre, in the same box. */
.faq-icon {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-2);
  transition: transform 0.4s var(--spring), color 0.2s, border-color 0.2s;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 1px;
  background: currentColor;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item summary:hover .faq-icon {
  color: var(--text);
  border-color: rgba(238, 240, 245, 0.45);
}

.faq-item[open] .faq-icon {
  border-color: rgba(248, 124, 162, 0.5);
  color: var(--bubble);
  transform: rotate(45deg);
}

.faq-item p {
  max-width: 60ch;
  margin: 0;
  padding: 0 0 22px;
  color: var(--text-2);
  font-size: 16px;
}

/* Final call */

.section--cta {
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(760px 420px at 50% 115%, rgba(43, 75, 242, 0.38), transparent 70%),
    linear-gradient(180deg, var(--ink), var(--navy));
  text-align: center;
}

.cta-planet {
  position: absolute;
  top: 56px;
  right: -40px;
  width: clamp(150px, 20vw, 250px);
  pointer-events: none;
  animation: bob 9s ease-in-out infinite;
}

.cta-planet img {
  position: relative;
  z-index: 1;
  width: 100%;
}

.cta-ring {
  position: absolute;
  top: 34%;
  left: -70%;
  width: 240%;
  height: 34%;
  border: 1px solid rgba(142, 168, 255, 0.24);
  border-radius: 50%;
  rotate: -14deg;
}

.cta-wrap {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.cta-mascot {
  display: block;
  width: 88px;
  margin: 0 auto 20px;
  animation: fly 7s ease-in-out infinite;
}

.cta-title {
  max-width: 17ch;
  margin: 0 auto;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.cta-copy {
  max-width: 42ch;
  margin: 18px auto 32px;
  color: var(--text-2);
  font-size: clamp(16.5px, 1.5vw, 18px);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-actions .button {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ---------- Reveal + entrance ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 24px;
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

.js .station.reveal:nth-child(2),
.js .rule.reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.js .station.reveal:nth-child(3),
.js .rule.reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.js .hero-meta,
.js .hero-line,
.js .hero-sub,
.js .hero-actions {
  animation: rise 0.9s var(--ease) both;
}

.js .hero-line { animation-delay: 0.08s; }
.js .hero-line + .hero-line { animation-delay: 0.16s; }
.js .hero-sub { animation-delay: 0.26s; }
.js .hero-actions { animation-delay: 0.36s; }

.js .stage--hero .space {
  animation: fade-in 1.2s 0.2s var(--ease) both;
}

/* ---------- Keyframes ---------- */

@keyframes travel {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

@keyframes depth {
  0%, 50%, 100% { scale: 0.9; filter: brightness(0.86); }
  25% { scale: 1.12; filter: brightness(1); }
  75% { scale: 0.66; filter: brightness(0.62); }
}

/* With step-end timing each value holds for its whole interval: the front
   copy shows on the near half (0–50 % of the path), the back copy on the far
   half (50–100 %). Both switch at the ends of the ellipse, beside the phone. */
@keyframes show-front {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes show-back {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes trail {
  from { stroke-dashoffset: 10; }
  to { stroke-dashoffset: -90; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 0.95; transform: scale(1); }
}

@keyframes sky-drift {
  from { background-position: 0 0; }
  to { background-position: -520px 260px; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes ken-burns {
  from { transform: scale(1.06) translateY(1.5%); }
  to { transform: scale(1) translateY(0); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes fly {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  50% { transform: translate(18px, -10px) rotate(4deg); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .stage--hero {
    height: 594px;
  }

  .space--hero {
    scale: 0.9;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .stage--hero {
    height: 620px;
  }

  .space--hero {
    scale: 0.94;
  }

  .split,
  .split--flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .split--flip .split-copy {
    order: 0;
  }

  .faq-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  .rule,
  .rule + .rule {
    display: grid;
    grid-template-columns: 76px 1fr;
    column-gap: 20px;
    padding: 24px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .rule-art {
    grid-row: 1 / span 2;
    margin: 0;
  }
}

@media (max-width: 720px) {
  .screen-row {
    display: flex;
    gap: 16px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 8px;
    scroll-padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .screen-row::-webkit-scrollbar {
    display: none;
  }

  .screen-card {
    flex: 0 0 62%;
    scroll-snap-align: center;
  }

  .screen-card:nth-child(2) {
    margin-top: 0;
  }

  .stations-path {
    display: none;
  }

  .stations {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .station {
    display: grid;
    grid-template-columns: 104px 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 20px;
    text-align: left;
  }

  .porthole {
    grid-row: 1 / span 3;
    width: 104px;
    height: 104px;
    margin: 0;
    box-shadow:
      0 0 0 1px var(--line-strong),
      0 0 0 7px var(--ink),
      0 0 0 8px var(--line),
      0 20px 50px -24px rgba(43, 75, 242, 0.8);
  }

  .station-num {
    margin-top: 6px;
  }

  .station p {
    margin: 0;
  }
}

@media (max-width: 620px) {
  .stage--hero {
    height: 460px;
  }

  .space--hero {
    scale: 0.68;
  }

  .stage--side {
    height: 470px;
  }

  .space--sync,
  .space--day,
  .space--create {
    scale: 0.72;
  }

  .hero-actions .button,
  .cta-actions .button {
    width: 100%;
  }

  .note {
    align-items: flex-start;
    border-radius: 22px;
    padding: 14px 18px 14px 14px;
  }

  .cta-planet {
    top: 24px;
    right: -60px;
  }
}

@media (max-width: 380px) {
  .stage--hero {
    height: 410px;
  }

  .space--hero {
    scale: 0.6;
  }

  .stage--side {
    height: 430px;
  }

  .space--sync,
  .space--day,
  .space--create {
    scale: 0.66;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    translate: none;
  }

  .orbit-body--front.is-far {
    opacity: 0;
  }

  .orbit-body--back.is-far {
    opacity: 1;
  }

  .marquee-track {
    flex-wrap: wrap;
    width: auto;
  }

  .marquee-list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  .marquee-list[aria-hidden="true"],
  .marquee.is-reverse {
    display: none;
  }

  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
}
