/* ---------- Palette pulled from Utilities/ColorExtensions.swift ---------- */
:root {
  --bg: #121212;        /* appBackground */
  --surface: #A0C3D9;   /* appSurface */
  --text: #F2F0E6;      /* appTextPrimary */
  --text-soft: rgba(242, 240, 230, 0.6); /* appTextSecondary */
  --accent: #FF7689;    /* appAccent */

  --bg-1: #0E0E0E;
  --bg-2: #161616;
  --border: rgba(242, 240, 230, 0.08);
  --border-strong: rgba(242, 240, 230, 0.18);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  --max: 1200px;
  --pad-x: clamp(20px, 5vw, 56px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
  touch-action: manipulation;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ---------- Brand logo (top-left, outside the pill nav) ---------- */
.brand-logo {
  position: fixed;
  top: -4px;
  left: var(--pad-x);
  z-index: 60;
  display: inline-flex;
  align-items: center;
}
.nav-wordmark-img {
  height: 112px;
  width: auto;
  display: block;
}

/* ---------- Mini-navbar (port of 21st.dev mini-navbar) ---------- */
.mini-navbar {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 10px 10px 22px;
  background: rgba(31, 31, 31, 0.34);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid #333;
  border-radius: 999px;
  transition: border-radius 0.3s var(--ease);
}

.mini-navbar-links {
  display: flex; align-items: center; gap: 28px;
}

/* Animated link: two stacked spans, hover slides the stack up to reveal white */
.mini-nav-link {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  height: 20px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.mini-nav-link span {
  display: block;
  transition: transform 0.4s var(--ease);
  white-space: nowrap;
}
.mini-nav-link span:nth-child(1) { color: rgba(242, 240, 230, 0.7); }
.mini-nav-link span:nth-child(2) { color: var(--text); }
.mini-nav-link:hover span { transform: translateY(-100%); }

.mini-navbar-cta-wrap {
  position: relative;
  display: inline-block;
}
.mini-navbar-cta-halo {
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: rgba(255, 118, 137, 0.45);
  filter: blur(16px);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), inset 0.3s var(--ease);
}
.mini-navbar-cta-wrap:hover .mini-navbar-cta-halo {
  opacity: 0.85;
  filter: blur(22px);
  inset: -14px;
}
.mini-navbar-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #1A0A0E;
  background: linear-gradient(135deg, #FF7689 0%, #FF8FA0 100%);
  border-radius: 999px;
  transition: transform 0.2s var(--ease);
}
.mini-navbar-cta:hover { transform: translateY(-1px); }

@media (max-width: 880px) {
  .nav-wordmark-img { height: 96px; }
  .brand-logo { top: -2px; }
  .mini-navbar {
    gap: 16px;
    padding: 8px;
    top: 18px;
    left: auto;
    right: var(--pad-x);
    transform: none;
  }
  .mini-navbar-links { display: none; }
}
@media (max-width: 480px) {
  .nav-wordmark-img { height: 78px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 130px var(--pad-x) 60px;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-glow {
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(closest-side, rgba(255, 118, 137, 0.22), rgba(255, 118, 137, 0) 70%);
  z-index: -2;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hero-lightrays {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.95;
}
.hero-lightrays canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.hero-task {
  position: absolute;
  top: calc(var(--ground-y) - var(--ball-size));
  left: 40%;
  transform: translate(-50%, calc(-100% - 18px));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text);
  border: 1px solid rgba(255, 118, 137, 0.32);
  border-radius: 999px;
  background: rgba(20, 14, 18, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: taskPulse 2.4s ease-in-out infinite;
  white-space: nowrap;
  z-index: 6;
}
.hero-task::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid rgba(255, 118, 137, 0.55);
  filter: drop-shadow(0 0 6px rgba(255, 118, 137, 0.45));
}
.hero-task-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
@keyframes taskPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 118, 137, 0); }
  50%      { box-shadow: 0 0 24px 4px rgba(255, 118, 137, 0.18); }
}
.game-scene[data-state="bouncing"] .hero-task,
.game-scene[data-state="settled"] .hero-task,
.game-scene[data-state="done"] .hero-task,
body.is-transitioned .hero-task { opacity: 0; transition: opacity 200ms ease; pointer-events: none; }

/* Downward chevron cascade (race-car turn marker rotated 90°) */
.hero-chevrons {
  position: absolute;
  top: calc(var(--ground-y) - var(--hole-h));
  right: calc(28% + var(--hole-w) / 2);
  transform: translate(50%, calc(-100% - 22px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 6;
}
.chev {
  width: 16px;
  height: 16px;
  border-right: 3.5px solid var(--accent);
  border-bottom: 3.5px solid var(--accent);
  transform: rotate(45deg);
  opacity: 0.18;
  filter: drop-shadow(0 0 7px rgba(255, 118, 137, 0.65));
  animation: chevCascade 3.9s ease-in-out infinite;
}
.hero-chevrons .chev:nth-child(1) { animation-delay: 0s; }
.hero-chevrons .chev:nth-child(2) { animation-delay: 1.3s; }
.hero-chevrons .chev:nth-child(3) { animation-delay: 2.6s; }
@keyframes chevCascade {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 1; }
}
.game-scene[data-state="bouncing"] .hero-chevrons,
.game-scene[data-state="settled"] .hero-chevrons,
.game-scene[data-state="done"] .hero-chevrons,
body.is-transitioned .hero-chevrons { opacity: 0; transition: opacity 200ms ease; pointer-events: none; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 7px 14px;
  border: 1px solid rgba(255, 118, 137, 0.35);
  border-radius: 999px;
  margin: 0 0 28px;
}

.hero-title {
  font-size: clamp(54px, 9vw, 110px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 auto;
  max-width: 14ch;
}
.hero-title-italic {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 1.05em;
  margin-top: 4px;
}

.hero-sub {
  margin: 28px auto 0;
  max-width: 56ch;
  font-size: clamp(16px, 1.9vw, 19px);
  color: var(--text-soft);
  line-height: 1.55;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 40px 0 64px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: #1A0A0E;
  box-shadow: 0 8px 28px rgba(255, 118, 137, 0.28);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(255, 118, 137, 0.42);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: rgba(242,240,230,0.05);
  border-color: rgba(242,240,230,0.3);
}

/* ---------- Gamified scene (full-bleed, ball / hole / flag) ---------- */
.game-scene {
  --ball-size: 110px;
  --hole-w: 160px;
  --hole-h: 22px;
  --ground-y: 70%;
  position: relative;
  z-index: 1;
  width: 100vw;
  max-width: 100vw;
  height: 340px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  user-select: none;
  touch-action: manipulation;
}

.game-ground {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--ground-y);
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(242, 240, 230, 0.18) 18%, rgba(242, 240, 230, 0.32) 50%, rgba(242, 240, 230, 0.18) 82%, transparent 100%);
  z-index: 1;
}
.game-ground::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 90px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, transparent 100%);
}

.game-ball {
  position: absolute;
  left: calc(40% - var(--ball-size) / 2);
  top: calc(var(--ground-y) - var(--ball-size));
  width: var(--ball-size);
  height: var(--ball-size);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 5;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.5));
  animation: ballIdle 2.6s ease-in-out infinite;
  will-change: transform;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.game-ball img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.game-ball:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
  border-radius: 50%;
}

@keyframes ballIdle {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

/* Hole: flat ellipse centered on the ground line so it reads as cut into the plane */
.game-hole {
  position: absolute;
  right: 28%;
  top: calc(var(--ground-y) - var(--hole-h) / 2);
  width: var(--hole-w);
  height: var(--hole-h);
  border-radius: 50%;
  z-index: 3;
  background:
    radial-gradient(ellipse at 50% 40%, #050505 0%, #0a0a0a 60%, #0c0c0c 100%);
  box-shadow:
    inset 0 4px 8px rgba(0,0,0,0.95),
    inset 0 -1px 3px rgba(255,255,255,0.06),
    0 6px 14px rgba(0,0,0,0.5);
  pointer-events: none;
}
.game-hole::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 22px rgba(255, 118, 137, 0.18);
  pointer-events: none;
}

/* Tron-style neon ring traced on the hole rim with a bright trail orbiting */
.hole-ring {
  position: absolute;
  right: 28%;
  top: calc(var(--ground-y) - var(--hole-h) / 2);
  width: var(--hole-w);
  height: var(--hole-h);
  overflow: visible;
  pointer-events: none;
  z-index: 4;
  transition: opacity 180ms ease-out;
}
.game-scene[data-state="done"] .hole-ring,
body.is-transitioned .hole-ring {
  opacity: 0;
}
.hole-ring-base {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 118, 137, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 118, 137, 0.16);
}
.hole-ring-trail {
  position: absolute;
  inset: -24px;
  display: block;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  pointer-events: none;
  transition: opacity 180ms ease-out;
}
.game-scene[data-state="done"] .hole-ring-trail,
body.is-transitioned .hole-ring-trail {
  opacity: 0;
}

/* ---------- Bouncing state ---------- */
.game-scene[data-state="bouncing"] .game-ball,
.game-scene[data-state="settled"] .game-ball,
.game-scene[data-state="done"] .game-ball {
  animation: none;
}

.game-scene[data-state="done"] .game-hole {
  animation: holePulse 900ms ease-out forwards;
}
@keyframes holePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); box-shadow:
           inset 0 6px 12px rgba(0,0,0,0.95),
           0 0 70px rgba(255, 118, 137, 0.75); }
  100% { transform: scale(1); }
}

/* ---------- Fullscreen CRT transition ---------- */
.hero-transition {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 350ms ease, visibility 0s linear 350ms;
}
.hero-transition.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 280ms ease, visibility 0s linear 0s;
}
.hero-transition.is-fading {
  opacity: 0;
  transition: opacity 400ms ease, visibility 0s linear 400ms;
}

.hero-transition-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Hide hero so transition can scroll into next section cleanly */
body.is-transitioned .hero {
  filter: brightness(0.4);
}

@media (max-width: 880px) {
  .game-scene {
    --ball-size: 88px;
    --hole-w: 116px;
    --hole-h: 16px;
    --ground-y: 68%;
    height: 280px;
    margin-top: clamp(24px, 5vw, 40px);
  }
  .game-ball { left: calc(28% - var(--ball-size) / 2); }
  .game-hole { right: 8%; }
  .hero-task { font-size: 11px; padding: 8px 16px; letter-spacing: 0.16em; gap: 10px; left: 28%; transform: translate(-50%, calc(-100% - 14px)); }
  .hero-chevrons {
    right: calc(8% + var(--hole-w) / 2);
    transform: translate(50%, calc(-100% - 18px));
    gap: 3px;
  }
  .hero-chevrons .chev {
    width: 13px;
    height: 13px;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }
  .hole-ring {
    right: 8%;
  }
}

/* ---------- Feature sections ---------- */
.feature {
  padding: 100px var(--pad-x);
  position: relative;
}
.feature-alt {
  background: var(--bg-1);
  border-block: 1px solid var(--border);
}
.feature-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature-reverse .feature-text { order: 2; }
.feature-reverse .feature-media { order: 1; }

@media (max-width: 880px) {
  .feature-inner { grid-template-columns: 1fr; }
  .feature-reverse .feature-text,
  .feature-reverse .feature-media { order: initial; }
}

.feature-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.feature-title {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.feature-title em {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  color: var(--surface);
}
.feature-body {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 28px;
  max-width: 50ch;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.feature-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 118, 137, 0.18);
}

.feature-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 16 / 9;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.55),
    0 0 0 1px var(--border-strong);
}
.feature-video {
  width: 100%; height: 100%; object-fit: cover;
}

/* ---------- Proof / stats strip ---------- */
.proof {
  padding: 100px var(--pad-x);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
  border-top: 1px solid var(--border);
}
.proof-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.proof-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 56px;
  max-width: 24ch;
  margin-inline: auto;
}
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}
.proof-cell {
  padding: 36px 18px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.proof-stat {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}
.proof-label {
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* ---------- Waitlist ---------- */
.waitlist {
  padding: 120px var(--pad-x);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.waitlist-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.waitlist-mascot {
  display: block;
  width: clamp(160px, 20vw, 220px);
  height: auto;
  margin: 0 auto 36px;
}
.waitlist-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 28px;
}
.waitlist-eyebrow-bar {
  display: block;
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.waitlist-title {
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 28px;
  width: 100%;
  text-align: center;
}
.waitlist-title-line {
  display: block;
  color: var(--text);
  text-align: center;
}
.waitlist-title-line--accent {
  color: var(--accent);
}
.waitlist-sub {
  color: var(--text-soft);
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.55;
  margin: 0 auto 40px;
  max-width: 52ch;
}
.waitlist-form {
  display: flex;
  gap: 10px;
  background: rgba(22, 22, 22, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  align-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.waitlist-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 118, 137, 0.18);
}
.waitlist-form input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 16px;
  padding: 14px 0;
  color: var(--text);
  min-width: 0;
}
.waitlist-form input::placeholder { color: var(--text-soft); }
.waitlist-form button {
  border: 0;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .waitlist-form {
    flex-direction: column;
    border-radius: var(--r-md);
    padding: 16px;
    gap: 12px;
  }
  .waitlist-form input { width: 100%; }
  .waitlist-form button { width: 100%; }
}
.waitlist-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--accent);
  min-height: 1.2em;
}

/* ---------- Footer ---------- */
.footer {
  padding: 56px var(--pad-x);
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-soft);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
