/* ============================================================
   REGISTRO V4 — Sistema de Amazon (estética del funnel de
   referencia: negro puro, highlights naranja, CTA verde).
   Mobile-first: diseñada para 375×812 y escalada a desktop.
   ============================================================ */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #c9c9c9;
  --naranja: #f5a81c;
  --rojo: #e02b20;
  --rojo-oscuro: #c42320;
  --verde: #3fc93c;
  --verde-oscuro: #2ca829;
  --line: rgba(255, 255, 255, 0.14);
  --card: #0c0c0c;
  --r-lg: 16px;
  --r-md: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }

::selection { background: rgba(245, 168, 28, 0.35); }

.hl { color: var(--naranja); }

.hl-red {
  background: var(--rojo);
  color: #fff;
  padding: 0 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ---------- Animación de entrada ---------- */
[data-anim] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
  transition-delay: var(--anim-delay, 0s);
}

[data-anim].in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding-bottom: 44px;
}

.hero__portada {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  max-height: 104vw;
  overflow: hidden;
}

@media (min-width: 780px) {
  .hero__portada { max-height: 600px; }
}

.hero__portada img { width: 100%; }

.hero__portada-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72) 66%, #000 88%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  margin-top: -42vw;
  padding: 0 18px;
  z-index: 2;
}

@media (min-width: 780px) {
  .hero__content { margin-top: -230px; }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(46, 46, 46, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 96%;
}

.hero__badge-text { line-height: 1.35; }

.hero__badge-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rojo);
  box-shadow: 0 0 0 4px rgba(224, 43, 32, 0.28);
  animation: pulse 1.6s infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 43, 32, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(224, 43, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 43, 32, 0); }
}

.hero__title {
  margin: 20px auto 0;
  max-width: 720px;
  font-size: clamp(26px, 6.4vw, 44px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

/* Header más compacto en celular: el copy largo a 26px formaba una
   pared de ~10 líneas; a ~22px con más aire respira y entra junto
   al CTA en el primer viewport. */
@media (max-width: 480px) {
  .hero__title {
    margin-top: 14px;
    font-size: clamp(20px, 5.9vw, 24px);
    line-height: 1.24;
    letter-spacing: -0.012em;
    padding: 0 6px;
  }
  .hl-red { padding: 0 6px; }
}

/* ---------- CTA verde ---------- */
.cta-wrap { margin-top: 26px; text-align: center; }

.btn-cta {
  display: inline-block;
  background: linear-gradient(180deg, var(--verde) 0%, var(--verde-oscuro) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(15px, 4vw, 18px);
  letter-spacing: 0.02em;
  padding: 17px 34px;
  border: 0;
  border-radius: var(--r-md);
  box-shadow: 0 14px 34px -12px rgba(63, 201, 60, 0.55);
  cursor: pointer;
  transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease);
  animation: breath 2.6s ease-in-out infinite;
}

.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 44px -12px rgba(63, 201, 60, 0.7);
}

@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

/* ---------- Countdown ---------- */
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 6vw, 42px);
  margin-top: 30px;
}

.countdown__cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.countdown__num {
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.countdown__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Secciones ---------- */
.section {
  padding: 54px 18px 0;
  max-width: 1010px;
  margin: 0 auto;
  text-align: center;
}

.proof__lead,
.testis__lead {
  font-size: clamp(17px, 4.6vw, 22px);
  line-height: 1.45;
  max-width: 640px;
  margin: 0 auto 26px;
  font-weight: 400;
}

.proof__lead strong,
.testis__lead strong { font-weight: 800; }

.proof__collage { max-width: 833px; margin: 0 auto; }

.testis__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 420px;
  margin: 0 auto 8px;
}

@media (min-width: 760px) {
  .testis__grid { grid-template-columns: 1fr 1fr; max-width: 760px; }
}

.testis__item {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}

/* ---------- Agenda (3 días) ---------- */
.agenda__divider {
  width: 120px;
  height: 3px;
  margin: 0 auto 40px;
  background: var(--naranja);
  border-radius: 2px;
}

.agenda__title {
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.agenda__sub {
  margin: 12px auto 34px;
  color: var(--muted);
  font-size: clamp(14px, 3.8vw, 17px);
  max-width: 560px;
}

.agenda__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 10px;
}

@media (min-width: 860px) {
  .agenda__grid { grid-template-columns: repeat(3, 1fr); }
}

.dia-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  overflow: hidden;
  text-align: center;
}

.dia-card__media {
  position: relative;
  aspect-ratio: 950 / 470;
  overflow: hidden;
}

/* La imagen original trae fechas viejas quemadas en su banda
   inferior — el recorte las esconde y el overlay pone las nuestras */
.dia-card__media img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: top;
}

.dia-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.82) 92%);
}

.dia-card__num {
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.dia-card__fecha {
  background: var(--rojo);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 4px;
}

.dia-card__titulo {
  padding: 16px 18px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 70px 18px 46px;
}

.footer__logo { width: 150px; margin: 0 auto 18px; opacity: 0.95; }

.footer__links { font-size: 13px; color: var(--muted); }

.footer__links a { color: var(--muted); text-decoration: none; }

.footer__links a:hover { color: var(--text); }

.footer__copy { margin-top: 10px; font-size: 12px; color: #7a7a7a; line-height: 1.5; }

/* ---------- Modal optin (solo email) ---------- */
.form-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  /* flex-start + margin auto en la card (no align-items: center): con la
     pregunta de avatar la card puede superar el viewport (landscape,
     teclado abierto) y centrada se recortaría por ambos lados sin forma
     de llegar al botón. Así, cuando no entra, se scrollea. */
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 60;
}

.form-modal.open { opacity: 1; pointer-events: auto; }

body.modal-open { overflow: hidden; }

.form-modal__card {
  position: relative;
  width: min(100%, 520px);
  margin: auto 0;
  background: #ffffff;
  color: #111;
  border-radius: 8px;
  padding: 46px 34px 40px;
  text-align: center;
  transform: translateY(14px);
  transition: transform 0.34s var(--ease);
}

.form-modal.open .form-modal__card { transform: none; }

.form-modal__close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: 0;
  color: #444;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.form-modal__title {
  font-size: clamp(26px, 6.4vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #111;
}

.form-modal__sub {
  margin: 12px 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.form-modal__input {
  width: 100%;
  background: #fff;
  border: 1px solid #9aa2af;
  border-radius: 4px;
  color: #111;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-modal__input::placeholder { color: #8a919c; }

.form-modal__input:focus { border-color: #27a844; }

.form-modal__input.field-error { border-color: var(--rojo); }

/* Pregunta de avatar del test (oculta salvo AVATAR_TEST activo en form.js) */
.optin-avatar { margin-top: 18px; text-align: left; }

.optin-avatar__label {
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.optin-avatar__opts { display: grid; gap: 8px; }

.avopt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #9aa2af;
  border-radius: 6px;
  font-size: 15px;
  color: #111;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.avopt:hover { border-color: #27a844; }

.avopt:has(input:checked) { border-color: #27a844; background: #eefaf1; }

.avopt input { accent-color: #27a844; width: 17px; height: 17px; flex: none; margin: 0; }

.optin-avatar.field-error .avopt { border-color: var(--rojo); }

.optin-avatar__error { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--rojo); }

.form-modal__submit {
  width: 100%;
  margin-top: 22px;
  background: #27a844;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 17px 20px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease);
}

.form-modal__submit:hover { background: #1f8f38; transform: translateY(-1px); }

.form-modal__submit:disabled { opacity: 0.7; cursor: default; }

.shake { animation: shake 0.4s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============ TESTIMONIO DESTACADO (progresión $5K → $96K) ============
   La imagen trae 5 capturas en fila (1113×554): a 375px cada chat
   quedaría en ~70px e ilegible, así que en mobile se scrollea
   horizontal con un ancho mínimo legible. En desktop entra entera. */
.destacado {
  padding-left: 14px;
  padding-right: 14px;
}

.destacado__card {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(180deg, #0f0c07 0%, #0a0a0a 60%);
  border: 1px solid rgba(245, 168, 28, 0.34);
  border-radius: var(--r-lg);
  padding: 30px 18px 22px;
  text-align: center;
}

@media (min-width: 760px) {
  .destacado__card { padding: 40px 34px 30px; }
}

.destacado__badge {
  display: inline-block;
  border: 1px solid rgba(245, 168, 28, 0.5);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--naranja);
  background: rgba(245, 168, 28, 0.07);
}

.destacado__titulo {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: clamp(22px, 5.6vw, 34px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.destacado__sub {
  margin: 12px auto 0;
  max-width: 560px;
  font-size: clamp(14px, 3.7vw, 16px);
  line-height: 1.5;
  color: var(--muted);
}

.destacado__scroll {
  margin-top: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 168, 28, 0.45) transparent;
}

.destacado__scroll::-webkit-scrollbar { height: 6px; }
.destacado__scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 999px; }
.destacado__scroll::-webkit-scrollbar-thumb { background: rgba(245, 168, 28, 0.45); border-radius: 999px; }

.destacado__scroll img {
  width: 100%;
  min-width: 720px;
  border-radius: var(--r-md);
}

.destacado__hint {
  margin-top: 10px;
  font-size: 12px;
  color: #8b8b8b;
  letter-spacing: 0.03em;
}

@media (min-width: 800px) {
  .destacado__scroll img { min-width: 0; }
  .destacado__hint { display: none; }
}

/* ============ A/B de headlines (5 brazos) ============
   El script del <head> pone data-h="h3..h5" en <html> antes del
   render. Si el JS falla o no corre, se muestra el h1 por defecto:
   nunca queda el hero sin título. */
.hl-var { display: none; }

html:not([data-h]) .hl-var[data-h="h3"],
html[data-h="h3"] .hl-var[data-h="h3"],
html[data-h="h4"] .hl-var[data-h="h4"],
html[data-h="h5"] .hl-var[data-h="h5"] { display: block; }

.hero__sub {
  margin: 14px auto 0;
  max-width: 620px;
  font-size: clamp(15px, 4vw, 19px);
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
}

@media (max-width: 480px) {
  .hero__sub { margin-top: 10px; font-size: clamp(14px, 3.9vw, 16px); }
}
