/* ---------- Fonts ---------- */
@font-face { font-family: "Satoshi"; src: url("assets/fonts/Satoshi-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/Satoshi-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/Satoshi-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("assets/fonts/Satoshi-Black.otf") format("opentype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #060509;
  --bg-2: #0c0912;
  --ink: #f4f1fa;
  --muted: #a49db8;
  --purple: #a020f0;
  --purple-lite: #c46bff;
  --purple-deep: #6a0dad;
  --edge: rgba(160, 32, 240, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow-x: hidden;            /* no sideways scroll */
  overscroll-behavior: none;     /* no rubber-band bounce on mobile */
  max-width: 100%;
  touch-action: pan-y;           /* allow vertical scroll, block pinch + double-tap zoom */
}

body {
  font-family: "Satoshi", system-ui, sans-serif;
  background: radial-gradient(120% 90% at 50% -10%, #140a22 0%, var(--bg-2) 38%, var(--bg) 100%);
  color: var(--ink);
  height: 100vh;
  height: 100dvh; /* respects mobile browser chrome so the bottom CTA stays visible */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background layers ---------- */
#stars {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.glow-orb {
  position: fixed;
  top: 42%; left: 50%;
  width: 60vw; height: 60vw;
  max-width: 900px; max-height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(160,32,240,0.16) 0%, rgba(106,13,173,0.06) 40%, transparent 68%);
  z-index: 0; pointer-events: none;
  filter: blur(10px);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.08); }
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 22px;
  padding: 26px clamp(28px, 5vw, 72px);
}

.back-btn {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  cursor: pointer;
  transition: all .25s ease;
}
.back-btn:not(:disabled):hover { color: var(--ink); border-color: var(--edge); background: rgba(160,32,240,0.08); }
.back-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.progress-track {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: var(--p);
  border-radius: 99px;
  background: linear-gradient(90deg, var(--purple-deep), var(--purple), var(--purple-lite));
  box-shadow: 0 0 14px rgba(160,32,240,0.7);
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.brand {
  flex: 0 0 auto;
  height: clamp(59px, 5.2vw, 79px);
  width: auto;
  opacity: 0.95;
  margin: -12px 0 -12px 10px; /* absorb the PNG's transparent padding so it reads larger without inflating the bar */
  cursor: pointer;
  transition: opacity .2s ease, filter .2s ease;
}
.brand:hover { opacity: 1; filter: drop-shadow(0 0 10px rgba(160,32,240,0.4)); }
.brand-link { flex: 0 0 auto; display: inline-flex; line-height: 0; }

/* ---------- App container ---------- */
#app {
  position: relative; z-index: 2;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 0;
  overflow-y: auto;               /* safety net: tall screens scroll here, CTA stays pinned */
  overflow-x: hidden;             /* but never sideways */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Screen ---------- */
.screen {
  position: relative; z-index: 2;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
  gap: 8px;
  transition: opacity .34s ease, transform .34s cubic-bezier(.4,0,.2,1);
}
/* slide transitions */
.screen.enter-right { opacity: 0; transform: translateX(60px); }
.screen.enter-left  { opacity: 0; transform: translateX(-60px); }
.screen.leave-left  { opacity: 0; transform: translateX(-60px); }
.screen.leave-right { opacity: 0; transform: translateX(60px); }

/* ---------- Education / value slide ---------- */
.edu-stage {
  position: relative;
  width: min(760px, 92vw);
  height: clamp(230px, 30vh, 320px);
  margin-bottom: 34px;
  display: grid; place-items: center;
}
.edu-stage .mascot-stage { margin-bottom: 0; }

.chips { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  border-radius: 99px;
  font-size: .92rem; font-weight: 600;
  color: var(--ink);
  background: rgba(20, 16, 28, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  white-space: nowrap;
  animation: chipIn .5s cubic-bezier(.2,.7,.2,1) both,
             chipFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--n) * .09s), calc(var(--n) * .5s);
}
.chip i {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.chip--warn i { background: #f5a524; color: #f5a524; }
.chip--hot  i { background: #ff5c7c; color: #ff5c7c; }
.chip--cool i { background: var(--purple-lite); color: var(--purple-lite); }

.chip:nth-child(1) { top: 4%;  left: 4%; }
.chip:nth-child(2) { top: -2%; right: 6%; }
.chip:nth-child(3) { top: 42%; left: -2%; }
.chip:nth-child(4) { top: 40%; right: -2%; }
.chip:nth-child(5) { bottom: 6%; left: 10%; }
.chip:nth-child(6) { bottom: 2%; right: 8%; }

@keyframes chipIn {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

@media (max-width: 720px) {
  .chip { font-size: .8rem; padding: 8px 12px; }
  .chip:nth-child(1) { left: -2%; }
  .chip:nth-child(2) { right: -2%; }
}

/* ---------- Stat callout (value slide) ---------- */
.stat {
  display: inline-flex; align-items: baseline; gap: 12px;
  margin: 22px auto 4px;
  padding: 12px 22px;
  border-radius: 16px;
  background: rgba(160,32,240,0.08);
  border: 1px solid var(--edge);
  max-width: 90vw;
  animation: rise .6s cubic-bezier(.2,.7,.2,1) .12s both;
}
.stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1;
  color: var(--purple-lite);
  text-shadow: 0 0 18px rgba(196,107,255,0.45);
  white-space: nowrap;
}
.stat-cap {
  font-size: clamp(.9rem, 1.2vw, 1rem);
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  line-height: 1.3;
}
@media (max-width: 560px) {
  .stat { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .stat-cap { text-align: center; }
}

/* ---------- Question screen ---------- */
.screen--question {
  justify-content: flex-start;
  text-align: left;
  padding-top: clamp(20px, 6vh, 60px);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.q-head {
  display: flex; align-items: center; gap: 20px;
  width: 100%;
  margin-bottom: 34px;
}
.q-avatar {
  flex: 0 0 auto;
  width: 74px; height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(160,32,240,0.5));
  animation: float 5s ease-in-out infinite;
}
.question {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.hint {
  margin-top: 8px;
  font-size: .98rem;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Options ---------- */
.options {
  display: flex; flex-direction: column;
  gap: 14px;
  width: 100%;
}
.option {
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--ink);
  font-family: "Satoshi", sans-serif;
  font-size: 1.12rem; font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .12s ease, box-shadow .25s ease;
  animation: rise .55s cubic-bezier(.2,.7,.2,1) both;
}
.option:nth-child(1) { animation-delay: .04s; }
.option:nth-child(2) { animation-delay: .10s; }
.option:nth-child(3) { animation-delay: .16s; }
.option:nth-child(4) { animation-delay: .22s; }
.option:nth-child(5) { animation-delay: .28s; }
.option:nth-child(6) { animation-delay: .34s; }
.option:hover {
  border-color: var(--edge);
  background: rgba(160,32,240,0.06);
  transform: translateY(-2px);
}
.option-ic {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(160,32,240,0.10);
  color: var(--purple-lite);
  transition: all .2s ease;
}
.option-ic svg { width: 22px; height: 22px; }
.option-label { flex: 1 1 auto; }
.option-check {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  color: transparent;
  transition: all .2s ease;
}
.option-check svg { width: 15px; height: 15px; }

/* ---------- Slider screen ---------- */
.screen--slider {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
}
.mascot-stage--sm {
  width: clamp(140px, 15vw, 180px);
  height: clamp(140px, 15vw, 180px);
  margin-bottom: 24px;
}
.mascot-pop { width: 100%; height: 100%; display: grid; place-items: center; }
.mascot-pop.pop { animation: pop .4s cubic-bezier(.2,.7,.2,1); }
@keyframes pop {
  0%   { transform: scale(.86); }
  55%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.question--center { text-align: center; max-width: 20ch; }
.hint--center { text-align: center; margin-top: 10px; }

.slider-value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  letter-spacing: -0.02em;
  margin: 26px 0 30px;
  background: linear-gradient(100deg, #fff 0%, var(--purple-lite) 120%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  min-height: 1.1em;
}
.slider-wrap { width: min(560px, 88vw); }
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 10px;
  border-radius: 99px;
  touch-action: none;            /* element handles its own drag; no zoom/scroll hijack */
  background: linear-gradient(90deg,
    var(--purple) var(--fill, 50%), rgba(255,255,255,0.09) var(--fill, 50%));
  outline: none; cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--purple-lite) 45%, var(--purple) 100%);
  border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(160,32,240,0.22), 0 0 20px rgba(160,32,240,0.85);
  cursor: grab;
  transition: transform .12s ease;
}
.slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.12); }
.slider::-moz-range-thumb {
  width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, var(--purple-lite) 45%, var(--purple) 100%);
  box-shadow: 0 0 0 4px rgba(160,32,240,0.22), 0 0 20px rgba(160,32,240,0.85);
  cursor: grab;
}
.slider::-moz-range-progress { background: var(--purple); height: 10px; border-radius: 99px; }
.slider::-moz-range-track { background: rgba(255,255,255,0.09); height: 10px; border-radius: 99px; }
.slider-ends {
  display: flex; justify-content: space-between;
  margin-top: 14px;
  font-size: .92rem; font-weight: 600;
  color: var(--muted);
}
.slider-feedback {
  margin-top: 30px;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 600;
  color: var(--purple-lite);
  min-height: 1.4em;
  transition: opacity .2s ease;
}

/* ---------- Contact form ---------- */
.form-fields {
  display: flex; flex-direction: column;
  gap: 16px;
  width: 100%;
}
.field {
  display: flex; flex-direction: column;
  gap: 8px;
  text-align: left;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.field:nth-child(1) { animation-delay: .04s; }
.field:nth-child(2) { animation-delay: .10s; }
.field:nth-child(3) { animation-delay: .16s; }
.field:nth-child(4) { animation-delay: .22s; }
.field-label {
  font-size: .92rem; font-weight: 600;
  color: var(--muted);
  padding-left: 2px;
}
.field-label .req { color: var(--purple-lite); font-style: normal; margin-left: 3px; }
.field-input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--ink);
  font-family: "Satoshi", sans-serif;
  font-size: 1.05rem; font-weight: 500;
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
textarea.field-input { resize: vertical; min-height: 84px; line-height: 1.5; }
.field-input::placeholder { color: rgba(164,157,184,0.55); }
.field-input:focus {
  outline: none;
  border-color: var(--purple);
  background: rgba(160,32,240,0.06);
  box-shadow: 0 0 0 1px var(--purple), 0 8px 26px rgba(160,32,240,0.18);
}

.form-error {
  margin-top: 14px;
  font-size: .95rem; font-weight: 600;
  color: #ff7a93;
  text-align: center;
}

/* selected state */
.option.is-active {
  border-color: var(--purple);
  background: linear-gradient(100deg, rgba(160,32,240,0.16), rgba(106,13,173,0.10));
  box-shadow: 0 0 0 1px var(--purple), 0 8px 26px rgba(160,32,240,0.25);
}
.option.is-active .option-ic {
  background: var(--purple);
  color: #fff;
}
.option.is-active .option-check {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

/* ---------- Protect brand imagery (no drag / no save / no select) ---------- */
.mascot, .q-avatar, .brand {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.mascot, .q-avatar { pointer-events: none; } /* right-click passes through, can't target the image */

/* ---------- Mascot ---------- */
.mascot-stage {
  position: relative;
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  margin-bottom: 46px;
  display: grid; place-items: center;
}
.mascot {
  position: relative; z-index: 2;
  width: 100%; height: 100%;
  object-fit: contain;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 34px rgba(160,32,240,0.45));
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-16px) rotate(1.5deg); }
}
.mascot-halo {
  position: absolute; inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(160,32,240,0.35) 0%, transparent 62%);
  z-index: 1;
  animation: haloPulse 5s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
.mascot-shadow {
  position: absolute; bottom: -6%; left: 50%;
  transform: translateX(-50%);
  width: 58%; height: 22px;
  background: radial-gradient(ellipse, rgba(160,32,240,0.28) 0%, transparent 70%);
  z-index: 0;
  animation: shadowPulse 5s ease-in-out infinite;
}
@keyframes shadowPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .55; }
  50%      { transform: translateX(-50%) scale(0.82); opacity: .3; }
}

/* ---------- Copy ---------- */
.headline {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.grad {
  background: linear-gradient(100deg, var(--purple-lite) 0%, var(--purple) 45%, #e9d8ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subhead {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  max-width: 46ch;
}

/* ---------- CTA ---------- */
.cta-bar {
  position: relative; z-index: 3;
  display: flex; justify-content: center;
  padding: 0 24px clamp(34px, 6vh, 64px);
}
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Satoshi", sans-serif;
  font-weight: 700; font-size: 1.15rem;
  color: #fff;
  padding: 20px 56px;
  border: none; border-radius: 99px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-deep) 100%);
  box-shadow: 0 10px 30px rgba(160,32,240,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .2s ease, box-shadow .3s ease;
}
.cta svg { transition: transform .25s ease; }
.cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(160,32,240,0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.cta:hover svg { transform: translateX(5px); }
.cta:active { transform: translateY(-1px) scale(0.99); }
.cta.is-disabled {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.cta.is-disabled svg { transform: none; opacity: .5; }

/* ---------- Entrance ---------- */
.mascot-stage, .headline, .subhead, .cta { animation-fill-mode: both; }
.mascot-stage { animation: rise .9s cubic-bezier(.2,.7,.2,1) both, float 5s ease-in-out 1s infinite; }
.headline { animation: rise .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.subhead  { animation: rise .9s cubic-bezier(.2,.7,.2,1) .28s both; }
.cta      { animation: rise .9s cubic-bezier(.2,.7,.2,1) .42s both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile pass (fit each screen without scrolling) ---------- */
@media (max-width: 640px) {
  .topbar { padding: 14px 18px; gap: 14px; }
  .back-btn { width: 40px; height: 40px; }
  .brand { height: 46px; margin: -8px 0 -8px 6px; }
  .progress-track { height: 6px; }

  /* message / welcome screens */
  .screen { padding: 8px 20px; }
  .screen--message .mascot-stage { width: 132px; height: 132px; margin-bottom: 20px; }
  .headline { font-size: clamp(2rem, 8vw, 2.6rem); max-width: 18ch; }
  .subhead { font-size: 1rem; margin-top: 14px; max-width: 40ch; }

  /* question screens */
  .screen--question { padding-top: 14px; justify-content: center; }
  .q-head { gap: 14px; margin-bottom: 20px; }
  .q-avatar { width: 54px; height: 54px; }
  .question { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .hint { font-size: .88rem; }
  .options { gap: 10px; }
  .option { padding: 14px 15px; font-size: 1rem; gap: 14px; border-radius: 15px; }
  .option-ic { width: 36px; height: 36px; border-radius: 10px; }
  .option-ic svg { width: 19px; height: 19px; }
  .option-check { width: 22px; height: 22px; }

  /* value slide */
  .edu-stage { height: clamp(200px, 34vh, 260px); margin-bottom: 20px; }
  .stat { margin: 16px auto 4px; padding: 10px 16px; }

  /* slider screen */
  .mascot-stage--sm { width: 120px; height: 120px; margin-bottom: 16px; }
  .slider-value { margin: 16px 0 20px; }
  .slider-feedback { margin-top: 20px; }

  /* contact form */
  .field-input { padding: 13px 15px; font-size: 1rem; }
  textarea.field-input { min-height: 68px; }
  .form-fields { gap: 12px; }

  /* CTA */
  .cta { padding: 16px 40px; font-size: 1.05rem; }
  .cta-bar { padding: 12px 18px 20px; }
}

/* very short viewports (small phones / landscape): trim further */
@media (max-height: 720px) and (max-width: 640px) {
  .screen--message .mascot-stage { width: 108px; height: 108px; margin-bottom: 14px; }
  .headline { font-size: clamp(1.8rem, 7.5vw, 2.3rem); }
  .subhead { margin-top: 10px; }
  .option { padding: 12px 15px; }
  .options { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
