/* ---------- Brand font: Discovery Fs ---------- */
@font-face { font-family: "Discovery Fs"; src: url("assets/fonts/Discovery_Fs-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Discovery Fs"; src: url("assets/fonts/Discovery_Fs-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Discovery Fs"; src: url("assets/fonts/Discovery_Fs-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Discovery Fs"; src: url("assets/fonts/Discovery_Fs-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

/* ---------- Brand tokens (from Figma "kickstart brand") ---------- */
:root {
  --ink: #1a1a1a;
  --blue: #1751ff;
  --blue-light: #7fa3ff;
  --white: #ffffff;
  --paper: #f7f7f7;
  --line: rgba(255, 255, 255, 0.14);
  --muted: rgba(255, 255, 255, 0.62);
  --radius: 18px;
  --font: "Discovery Fs", "Heebo", "Assistant", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Background ----------
   .bg__stage is the 1920x1080 Figma frame, scaled to cover the viewport.
   The gradient is Figma's own render of the "gradient" layer, placed where it sits in the frame. */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: var(--ink); }

.bg__stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%);
}

.bg__gradient {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 68.98%; /* 745 of 1080 — the Figma render covers y 335 → 1080 */
  object-fit: cover;
  max-width: none;
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s;
  will-change: transform, opacity;
  animation: rise 1.6s cubic-bezier(.16,.8,.2,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12%); }
  to   { opacity: 1; transform: none; }
}

body[data-screen="quiz"] .bg__gradient { transform: translateY(12%); opacity: .55; }

.bg__grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; mix-blend-mode: overlay; }

/* overlay barely shows on near-black, so a faint second pass carries the grain over the dark area */
.bg__grain--dark { opacity: .14; mix-blend-mode: normal; }

/* deepens the dark top half only; fades out before the blue starts */
.bg__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.32) 0%, rgba(0,0,0,.22) 40%, rgba(0,0,0,0) 62%);
}

/* balanced line breaks: no single-word orphan lines */
h1, h2, .hero__sub { text-wrap: balance; }

/* logo and images can't be selected, dragged or long-pressed */
img, svg, .logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.logo { pointer-events: none; }

/* ---------- Layout ---------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.screen {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 640px;
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


.screen.is-active { display: flex; animation: enter .4s cubic-bezier(.2,.7,.2,1) both; }

/* Hero intro: each element comes in one after the other */
.screen--hero.is-active { animation: none; }
.screen--hero > * { animation: intro .9s cubic-bezier(.16,.8,.2,1) both; }
.screen--hero > .logo       { animation-delay: .15s; animation-name: intro-logo; }
.screen--hero > .hero__title { animation-delay: .35s; }
.screen--hero > .hero__sub   { animation-delay: .47s; }
.screen--hero > .btn         { animation-delay: .6s; }
body.has-intro .screen--hero > * { animation-delay: 0s; animation-duration: .5s; }

@keyframes intro {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes intro-logo {
  from { opacity: 0; transform: scale(.94); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.logo { display: block; width: min(240px, 52vw); height: auto; direction: ltr; }
.logo--small { width: 118px; }

.hero__title {
  margin: 40px 0 0;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -0.01em;
}

.hero__sub {
  margin: 16px 0 0;
  max-width: 460px;
  font-size: clamp(16px, 2.6vw, 19px);
  line-height: 1.55;
  color: var(--muted);
}

.hero__note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- No system highlight on click ----------
   Clicking an answer shouldn't select its text or draw the browser focus ring;
   keyboard users still get a ring via :focus-visible. */
button, .btn, .option {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus:not(:focus-visible), .btn:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(127, 163, 255, .35); color: inherit; }

/* ---------- Squircle (Apple-style continuous corners) ----------
   Browsers with corner-shape get a real squircle; others fall back to a plain radius. */
.squircle { border-radius: 18px; }
@supports (corner-shape: squircle) {
  .squircle { border-radius: 26px; corner-shape: superellipse(1.6); }
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s, background-color .15s, box-shadow .15s, opacity .15s;
}

.btn:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }

.btn--primary, .btn--whatsapp {
  margin-top: 36px;
  padding: 18px 34px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 10px 40px -14px rgba(255, 255, 255, .45);
}

.btn--primary:hover, .btn--whatsapp:hover { transform: translateY(-2px); background: #eef2ff; box-shadow: 0 14px 50px -14px rgba(255, 255, 255, .6); }
.btn--primary:active, .btn--whatsapp:active { transform: translateY(0); }

.btn__arrow { transition: transform .2s; }
.btn--primary:hover .btn__arrow { transform: translateX(-4px); }

.btn--ghost {
  border-radius: 10px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}
.btn--ghost:hover { color: var(--white); }
.btn--ghost[hidden] { display: inline-flex; visibility: hidden; }

/* ---------- Quiz ---------- */
.screen--quiz { align-items: stretch; text-align: right; }

.quiz__top { display: flex; align-items: center; gap: 16px; }

.progress {
  flex: 1;
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
/* bar */
.progress__bar {
  height: 100%;
  width: 33%;
  background: linear-gradient(90deg, var(--blue-light), var(--blue));
  border-radius: inherit;
  transition: width .3s ease-out;
}

.quiz__count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }

.quiz__body { margin-top: 48px; }
.quiz__body.is-swapping { animation: swap .22s ease-out both; }
@keyframes swap { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

.quiz__question {
  margin: 0 0 28px;
  font-size: clamp(24px, 4.6vw, 34px);
  font-weight: 400;
  line-height: 1.25;
}

.options { display: grid; gap: 10px; }

.option {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05);
  color: var(--white);
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  text-align: right;
  cursor: pointer;
  transition: border-color .12s, background-color .12s, transform .1s;
}

.option:hover { border-color: rgba(127, 163, 255, .6); background: rgba(127, 163, 255, .08); }
.option:active { transform: scale(.99); }
.option:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

.option__dot {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .35);
  display: grid; place-items: center;
  transition: border-color .12s, background-color .12s;
}

.option[aria-checked="true"] { border-color: var(--blue); background: rgba(23, 81, 255, .18); }
.option[aria-checked="true"] .option__dot { border-color: var(--blue); background: var(--blue); }
.option[aria-checked="true"] .option__dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }

.quiz__nav { margin-top: 24px; display: flex; justify-content: flex-start; }

/* ---------- Done ---------- */
.done__check {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  background: var(--white);
  color: var(--blue);
  font-size: 34px;
  font-weight: 700;
  box-shadow: 0 10px 50px -10px rgba(127, 163, 255, .7);
}

.done__title { margin: 28px 0 0; font-size: clamp(28px, 5.4vw, 42px); font-weight: 400; }

.btn--whatsapp svg { color: #25d366; }

@media (max-width: 520px) {
  .btn--primary, .btn--whatsapp { width: 100%; padding: 18px 20px; font-size: 17px; }
  .quiz__body { margin-top: 36px; }
  .option { padding: 16px 16px; font-size: 16px; }
}

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