@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Sora:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* =====================================================================
   LITTLE DANI QUIZ — LOOK & FEEL
   =====================================================================
   Plain white, no card/frame around the content, generous spacing,
   big type. Nothing here should compete with the questions, the video,
   or the CTA for attention.
   ===================================================================== */

:root {
  --bg: #ffffff;
  --text: #16181c;
  --text-muted: #6f7378;
  --line: #e6e3db;
  --line-strong: #d8d4c9;
  --gold: #fbaf1b;
  --gold-dim: #e0973a;
  --gold-tint: #fff6e6;
  --coral: #ff6f91;
  --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", system-ui, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px;
  touch-action: manipulation;
}

button, input {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: no-preference) {
  .frame { animation: frame-in 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
  .option-btn { transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
  .progress-fill { transition: width 0.4s ease; }
}

@keyframes frame-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* .frame is just a max-width content column now — no card, no border,
   no shadow. .frame-inner carries the per-screen vertical spacing. */
.frame {
  width: 100%;
  max-width: 640px;
}

.frame-inner {
  padding: 0;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--text-muted);
}

.frame-counter {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin-bottom: 40px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
}

.question-text {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 36px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-btn {
  display: flex;
  align-items: center;
  text-align: left;
  padding: 22px 24px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 17px;
  line-height: 1.4;
  cursor: pointer;
}

.option-text { flex: 1; }

.option-btn:hover {
  border-color: var(--gold-dim);
  background: #fdfbf7;
}

.option-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.option-btn--selected {
  border-color: var(--gold);
  background: var(--gold-tint);
  transform: scale(0.99);
}

.hint {
  color: var(--coral);
  font-size: 14px;
  margin-top: 16px;
}

/* ---- language select screen ------------------------------------- */

.frame--lang .frame-inner { padding-top: 8px; }

.lang-title {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.4;
  margin: 0 0 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.lang-divider { color: var(--gold-dim); font-weight: 400; }

.lang-options {
  display: flex;
  gap: 16px;
}

.lang-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.lang-btn:hover { border-color: var(--gold-dim); background: #fdfbf7; }
.lang-flag { font-size: 30px; }

/* ---- result screen ------------------------------------------------- */

.frame--result .frame-inner { padding-top: 8px; }

.result-title {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 40px;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: center;
}

/* ---- intro screen -------------------------------------------------- */

.frame--intro .frame-inner { padding-top: 8px; }

.intro-headline {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.35;
  margin: 8px 0 14px;
  letter-spacing: -0.01em;
}

.intro-subhead {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.intro-bullets-label {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.intro-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-bullets li {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
}

.cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 20px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--gold), #e0973a);
  color: #1a1509;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 16px;
}

.cta-btn:hover { filter: brightness(1.06); }

/* ---- transition screen ------------------------------------------------ */

.frame--transition .frame-inner { padding-top: 8px; padding-bottom: 8px; }

.transition-text {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text);
  margin: 10px 0 36px;
}

/* ---- loading screen ----------------------------------------------------- */

.frame--loading .frame-inner {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}

.loading-text {
  font-family: "Fraunces", serif;
  font-size: 24px;
  margin: 0 0 26px;
}

.loading-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  max-width: 240px;
  margin: 0 auto;
}

.loading-bar-fill {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 2px;
  animation: loading-sweep 1.1s ease-in-out infinite;
}

@keyframes loading-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---- result: vertical video + CTA --------------------------------- */

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 380px; /* keeps the vertical video from getting huge on desktop */
  aspect-ratio: 9 / 16; /* vertical video, matches the sales page VSL */
  border-radius: 16px;
  overflow: hidden;
  background: #16181c;
  margin: 0 auto 40px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- result: extra sales-page blocks (Tier A BR) -----------------------
   Only rendered when a result's config has "extraContent" (see
   renderExtraContent in quiz.js). Everything here lives inside the same
   .frame-inner as the headline/video/CTA above it — no separate page,
   no redirect, just more content on the same result screen. --------- */

.result-section {
  padding-top: 44px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.result-section:first-of-type { border-top: none; }

.section-heading {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 10px;
}

.section-subhead {
  font-size: 15.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 28px;
}

.placeholder-box {
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  background: #fdfbf7;
}

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

.steps {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-video-wrap {
  position: relative;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: #16181c;
  margin: 0 0 18px;
}

/* YouTube step videos are landscape, not the vertical clips this block
   was originally built for — this modifier widens the box to match. */
.step-video-wrap--16x9 {
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.step-video-wrap video,
.step-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.step-number {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  margin: 0 0 6px;
}

.step-title {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 8px;
}

.step-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 320px;
}

.included-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.included-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 15px;
  line-height: 1.4;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}

.included-list .item-price {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.price-block { text-align: center; }

.price-lead {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.price-old {
  font-family: "Fraunces", serif;
  font-size: 22px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin: 0 0 4px;
}

.price-today {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.price-value {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 48px;
  color: var(--text);
  margin: 0 0 6px;
}

.price-installments {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.price-guarantee {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 14px;
  text-align: center;
}

.story-text {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
}

.story-text p { margin: 0 0 18px; }
.story-text p:last-child { margin-bottom: 0; }

.bio-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.bio-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.bio-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
}

.bio-text p { margin: 0 0 14px; }
.bio-text p:last-child { margin-bottom: 0; }

.animations-gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.animations-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #16181c;
}

.animations-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- mobile-first tuning ------------------------------------------------
   90% of traffic is expected to be on phones, so these rules matter more
   than the desktop styles above — desktop is the "bonus," not the target. */

@media (max-width: 480px) {
  body { padding: 36px 20px; padding-top: max(36px, env(safe-area-inset-top)); padding-bottom: max(36px, env(safe-area-inset-bottom)); }

  .question-text { font-size: 26px; line-height: 1.3; margin-bottom: 28px; }
  .lang-title { font-size: 23px; }
  .result-title { font-size: 28px; margin-bottom: 28px; }
  .intro-headline { font-size: 24px; }

  /* bigger, thumb-friendly tap targets */
  .option-btn {
    padding: 18px 18px;
    font-size: 16px;
    min-height: 56px;
  }

  .lang-options { flex-direction: column; }
  .lang-btn { flex-direction: row; justify-content: center; padding: 18px; min-height: 56px; }

  .cta-btn { min-height: 56px; }

  /* result screen on phones: let the vertical video fill the screen
     edge-to-edge, headline above it and CTA pinned below. quiz.js adds
     "qz-result" to <body> only on this screen (see renderResult in
     quiz.js). Scoped to :not(.frame--result-extended) — results that
     carry extra sales-page content (see renderExtraContent in quiz.js)
     scroll normally instead, using the same layout as desktop. */
  body.qz-result { padding: 0; }

  .frame--result:not(.frame--result-extended) {
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .frame--result:not(.frame--result-extended) .frame-inner {
    padding: max(20px, env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .frame--result:not(.frame--result-extended) .result-title {
    font-size: 22px;
    margin: 0 0 16px;
    flex: none;
  }

  .frame--result:not(.frame--result-extended) .video-wrap {
    flex: 1;
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto; /* height comes from flex, not the ratio, so it fills the screen */
    margin: 0 0 16px;
  }

  .frame--result:not(.frame--result-extended) .cta-btn {
    flex: none;
    margin-bottom: 0;
  }

  .frame--result-extended .result-title { font-size: 26px; }
}

@media (max-width: 360px) {
  .question-text { font-size: 23px; }
}
