/* Reconquista Inversa — static funnel, shared stylesheet */

* { box-sizing: border-box; }

:root {
  --bg: #000000;
  --card-bg: #0a0a0a;
  --card-bg-alt: #18181b;
  --border: #27272a;
  --text: #ffffff;
  --text-muted: #d1d5db;
  --text-dim: #9ca3af;
  --gold: #2563eb;
  --green: #16a34a;
  --green-hover: #15803d;
  --blue: #2563eb;
  --red: #dc2626;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100%;
  overflow-x: hidden;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  min-height: 100vh;
}

.page--wide { max-width: 640px; }

/* ---- Quiz "etapa" screen: one step = one locked viewport, no page scroll ---- */
body.quiz-body {
  height: 100%;
  overflow: hidden;
}

.quiz-screen {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.quiz-progress { flex: 0 0 auto; padding-bottom: clamp(12px, 3.5vh, 32px); }

/* Content is centered as one block in the middle of the screen — consistent
   across every step. If a step has more content than fits (e.g. the
   testimonials step), it fills the screen and scrolls internally instead of
   clipping — "safe center" falls back to top-aligned only in that case, so
   the start of the content is never pushed off-screen. */
.quiz-content {
  flex: 1 1 auto;
  min-height: 0; /* lets this box shrink/scroll instead of pushing the screen taller */
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  gap: clamp(16px, 3.5vh, 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.quiz-footer { flex: 0 0 auto; padding-top: clamp(12px, 3vh, 24px); }

.quiz-content img.fluid {
  max-height: 32vh;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: cover;
}

/* Progress bar */
.progress-track {
  height: 6px;
  background: #27272a;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 16px; }
h1 { font-size: clamp(26px, 7.5vw, 34px); font-weight: 800; text-align: center; }
h2 { font-size: clamp(24px, 7vw, 30px); font-weight: 800; text-align: center; }
h3 { font-size: clamp(20px, 5.5vw, 23px); font-weight: 700; }
p { color: var(--text-muted); font-size: clamp(16px, 4.2vw, 18px); margin: 0 0 16px; }

.quiz-content h1, .quiz-content h2, .quiz-content h3, .quiz-content p { margin: 0; }

.accent { color: var(--blue); font-size: 1.12em; }

.center { text-align: center; }

/* Answer buttons (single choice quiz steps) */
.options { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #e5e7eb;
  color: #111827;
  border: none;
  border-radius: 12px;
  padding: 18px 20px;
  font-size: clamp(16px, 4.3vw, 18px);
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.option-btn:hover { background: #d1d5db; }
.option-btn .arrow { float: right; color: #6b7280; }

/* Form element resets — some UA stylesheets give <form> a default margin */
form.options { margin: 0; }

/* More than 4 options on one screen: still bigger than before, just not as
   roomy as the default — the screen fills/scrolls internally rather than
   clipping if this still doesn't fit a short phone. */
.options--compact { gap: 10px; }
.options--compact .option-btn,
.options--compact .check-item { padding: 13px 16px; font-size: clamp(15px, 4vw, 16px); }

/* Checkbox (multi-select) quiz steps */
.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #e5e7eb;
  color: #111827;
  border-radius: 12px;
  padding: 18px 20px;
  font-size: clamp(16px, 4.3vw, 18px);
  line-height: 1.35;
  font-weight: 600;
  cursor: pointer;
}
.check-item input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--gold); cursor: pointer; }

/* Scale (1-4) buttons */
.scale-row { display: flex; gap: 12px; margin: 0; }
.scale-row .option-btn { text-align: center; flex: 1; }
.scale-labels { display: flex; justify-content: space-between; color: var(--text-dim); font-size: clamp(13px, 3.5vw, 15px); }

/* Primary CTA button/link */
.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--gold);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 19px 20px;
  font-size: clamp(17px, 4.5vw, 19px);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-green {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 19px 20px;
  font-size: clamp(17px, 4.5vw, 19px);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-green:hover { background: var(--green-hover); }

.btn-disabled-look {
  opacity: 0.5;
}

img.fluid { max-width: 100%; display: block; border-radius: 12px; }

/* Loading / auto-advance screens */
.loading-wrap { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid #27272a;
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar-track {
  height: 10px;
  background: #27272a;
  border-radius: 5px;
  overflow: hidden;
  margin: 24px 0;
}
.loading-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 5px;
  width: 0%;
  animation: fillbar 3.5s ease-out forwards;
}
@keyframes fillbar { to { width: 100%; } }

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.badge {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 6px;
  margin: 0 auto 16px;
}
.badge-wrap { text-align: center; }

.offer-line { text-align: center; margin: 10px 0; }
.offer-line .label { color: var(--text-muted); }
.offer-line .strike { text-decoration: line-through; color: #6b7280; }
.price-old { text-decoration: line-through; color: var(--red); }
.price-new { font-size: 40px; font-weight: 900; color: var(--green); }
.price-sub { color: var(--text-dim); font-size: 14px; }

.timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  padding: 10px 20px;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.timer-bar .label { color: #60a5fa; font-size: 13px; }
.timer-bar .time { font-size: 20px; font-weight: 800; color: #60a5fa; }
.timer-btn {
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
}

/* Testimonials */
.testimonial {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}
.testimonial-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.testimonial-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testimonial-name { font-weight: 700; }
.testimonial-meta { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.stars { color: var(--gold); letter-spacing: 1px; }

/* Rating squares (testimonial cards): green rounded squares with a white
   star each, instead of plain gold text stars. */
.rating-squares { display: flex; gap: 4px; }
.rating-squares span {
  width: 20px;
  height: 20px;
  background: var(--green);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin-top: 10px; }

.list-check { list-style: none; padding: 0; margin: 0 0 16px; }
.list-check li { padding-left: 30px; position: relative; margin-bottom: 10px; color: var(--text-muted); }
.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Offer/bonus lists where every line already carries its own emoji (🎁, ♾️…)
   — no green checkmark bullet, just indent to match the surrounding lists. */
.list-plain { list-style: none; padding: 0; margin: 0 0 16px; }
.list-plain li { margin-bottom: 10px; color: var(--text-muted); }

.footer-note {
  text-align: center;
  color: #52525b;
  font-size: 12px;
  margin-top: 32px;
}

.support-box {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.support-box a { color: var(--green); font-weight: 700; text-decoration: underline; }

.downloads-box {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  text-align: left;
}
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--card-bg-alt);
  margin-bottom: 10px;
}
.download-item:last-child { margin-bottom: 0; }
.download-item span { font-size: 14px; font-weight: 600; color: #f4f4f5; }
.download-item a {
  flex-shrink: 0;
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.download-item a:hover { background: var(--green-hover); }

.warning-banner {
  background: #7f1d1d;
  color: #fecaca;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

/* Photo-choice options (e.g. gender step: a picture card per answer) */
.photo-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-option {
  display: block;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: #111827;
}
.photo-option img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-option .label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: clamp(14px, 3.8vw, 16px);
}
.radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9ca3af; flex-shrink: 0; }

.aviso-wrap { text-align: center; }
.aviso-badge {
  display: inline-block;
  background: var(--gold);
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(15px, 4vw, 17px);
  padding: 7px 18px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Progress timeline chart (plan-ready screen): curved line rising from
   "now" to "21 days", with a callout bubble at each milestone. */
.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 12px 8px;
}
.chart-wrap { position: relative; width: 100%; aspect-ratio: 480 / 330; }
.chart-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-label {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background: #18181b;
  border: 1px solid var(--border);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  padding: 5px 8px;
  border-radius: 8px;
  white-space: nowrap;
  text-align: center;
}
.chart-label--first { transform: translate(-6%, calc(-100% - 10px)); text-align: left; }
.chart-label--last { transform: translate(-98%, calc(-100% - 46px)); text-align: right; }
.chart-label--3rd { transform: translate(-85%, calc(-100% - 10px)); text-align: right; }
.chart-axis {
  position: relative;
  height: 16px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.chart-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.chart-axis span:first-child { transform: translateX(0); }
.chart-axis span:last-child { transform: translateX(-100%); }

/* Checkout popup: Stripe's embedded Checkout mounted in a near-fullscreen
   overlay, shared by every page that sells (resultado, recuperacion, ...). */
.checkout-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  padding: 10px;
}
.checkout-modal--open { display: flex; }
.checkout-modal-inner {
  position: relative;
  width: 100%; max-width: 480px;
  height: 96vh; height: 96dvh;
  background: #000;
  border-radius: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 44px 4px 12px;
}
.checkout-modal-close {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border-radius: 50%;
  background: #27272a; color: #fff; border: none;
  padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.checkout-modal-close svg { display: block; width: 16px; height: 16px; }
.checkout-modal-loading { text-align: center; padding: 60px 20px; color: var(--text-dim); }
