/* Genesis Media · Landing template · site.css
 *
 * Esqueleto de componentes. Mobile-first. Consume las variables de
 * tokens.css — NO meter colores/fuentes hardcodeados aquí; si necesitas
 * una variante nueva, créala en tokens.css.
 *
 * Estructura del archivo:
 *   1. @font-face (self-host obligatorio · NUNCA @import Google Fonts)
 *   2. Reset · base
 *   3. Layout · section · container
 *   4. Typography
 *   5. Buttons · CTAs (pill, gradient, pulse)
 *   6. Forms (input, error)
 *   7. Cards
 *   8. Hero
 *   9. Countdown
 *  10. Sticky bars (top urgency, bottom CTA)
 *  11. FAQ accordion
 *  12. Video frame / placeholder
 *  13. Replay gate (post-video lock + unlock)
 *  14. Lead-magnet CTA reveal
 *  15. Reveal animations
 *  16. Utilities
 *  17. Media queries (desktop ≥768)
 */

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  1. @font-face — Fraunces (display) + Mulish (body) · self-host  ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@font-face {
  font-family: 'Fraunces';
  src: url('/shared/fonts/fraunces-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/shared/fonts/fraunces-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/shared/fonts/fraunces-italic-400.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('/shared/fonts/mulish-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('/shared/fonts/mulish-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  2. Reset · base                                                 ║
   ╚══════════════════════════════════════════════════════════════════╝ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text-on-light);
  background: var(--surface-light);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button { font: inherit; cursor: pointer; }

::selection { background: var(--brand-primary); color: var(--text-on-dark); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  3. Layout                                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.section { padding-block: var(--section-py); }
.section + .section { padding-top: 0; }  /* evita doble padding entre secciones consecutivas */

.section.is-dark   { background: var(--surface-dark);  color: var(--text-on-dark); }
.section.is-warm   { background: var(--surface-warm); }
.section.is-cream  { background: var(--surface-cream); }
.section.is-light  { background: var(--surface-light); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

.container.is-text { max-width: var(--container-text); }

.stack > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  4. Typography                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0; }
.muted { color: var(--text-muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  color: var(--brand-primary);
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  5. Buttons · CTAs                                               ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.75rem;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-quick) var(--ease-smooth),
              box-shadow var(--t-base) var(--ease-smooth),
              background var(--t-base) var(--ease-smooth);
  box-shadow: var(--shadow-cta);
}
.cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-cta-hover); text-decoration: none; }
.cta:active { transform: translateY(0) scale(0.99); }
.cta.is-full { width: 100%; }
.cta.is-pulse { animation: pulse 2.4s var(--ease-smooth) infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: var(--shadow-cta); }
  50% { box-shadow: var(--shadow-cta-hover); }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  6. Forms                                                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.form { display: grid; gap: 0.75rem; }
.form .field { display: grid; gap: 0.35rem; }
.form label { font-size: var(--fs-small); font-weight: 600; }
.form input[type="text"],
.form input[type="email"] {
  width: 100%;
  padding: 0.95rem 1.05rem;
  min-height: 52px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: var(--radius-input);
  font: inherit;
  background: #fff;
  color: var(--text-on-light);
  transition: border-color var(--t-quick), box-shadow var(--t-quick);
}
.form input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.form-error {
  display: none;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(197, 48, 48, 0.08);
  color: var(--error);
  font-size: var(--fs-small);
}
.form-error.show { display: block; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  7. Cards                                                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.card {
  background: var(--surface-warm);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-base) var(--ease-smooth);
}
.card:hover { transform: translateY(-4px); }

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  8. Hero                                                         ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: clamp(4rem, 12vw, 6rem);
  isolation: isolate;
  color: var(--text-on-dark);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: var(--hero-bg, none);
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%);
  z-index: -1;
}
.hero .container { padding-block: 2rem; }
.hero h1 { max-width: 18ch; }
.hero p.lead { max-width: 38ch; font-size: clamp(1rem, 2.6vw, 1.25rem); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  9. Countdown                                                    ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.countdown {
  display: inline-flex;
  gap: 0.75rem;
  margin-block: 1.25rem;
}
.countdown .unit {
  display: grid;
  place-items: center;
  min-width: 64px;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
}
.countdown .num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.countdown .lbl { font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.72; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  10. Sticky bars                                                 ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.sticky-top {
  position: sticky; top: 0;
  z-index: 50;
  padding: 0.5rem 1rem;
  background: var(--brand-primary);
  color: var(--text-on-dark);
  font-size: var(--fs-small);
  text-align: center;
}
.sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--surface-dark);
  color: var(--text-on-dark);
  display: none;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
}
.sticky-bottom.show { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
body.has-sticky-bottom { padding-bottom: 96px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  11. FAQ accordion                                               ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-block: 1rem;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
  padding-right: 1rem;
  position: relative;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  line-height: 1;
  transition: transform var(--t-base);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 0.5rem; color: var(--text-muted); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  12. Video frame / placeholder                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface-dark);
  box-shadow: var(--shadow-card);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center; gap: 0.75rem;
  color: var(--text-on-dark);
  background: linear-gradient(135deg, var(--surface-dark), #000);
}
.video-placeholder .play-icon { width: 64px; height: 64px; }
.video-placeholder .label { font-size: var(--fs-small); letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.85; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  13. Replay gate                                                 ║
   ║  El bloque post-vídeo se oculta hasta que el visitante acumula   ║
   ║  N minutos en página (sessionStorage). Ver site.js#initReplayGate ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.post-video-locked { display: none; }
.post-video-locked.is-unlocked {
  display: block;
  animation: fadeUp 0.6s var(--ease-smooth);
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  14. Lead-magnet CTA reveal                                      ║
   ║  El CTA al webinar se oculta hasta N minutos en página o         ║
   ║  ?cta=1 (debug). Ver site.js#initLmCtaGate                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
#cta-block { opacity: 0; transform: translateY(20px); transition: opacity var(--t-slow) var(--ease-smooth), transform var(--t-slow) var(--ease-smooth); pointer-events: none; }
#cta-block.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  15. Reveal animations                                           ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease-smooth), transform var(--t-slow) var(--ease-smooth); }
.reveal.in { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  16. Utilities                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.no-escape { /* marker class para landings sin nav/footer links — solo visual cue */ }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  17. Media queries · desktop                                     ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .card-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
  .hero { min-height: 88vh; }
}

@media (min-width: 1100px) {
  .card-grid.is-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  18. Landing-specific · María de Lluc «Verano Sin Culpa»         ║
   ║  Capa por encima del sistema. NO toca el esqueleto base.         ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* Eyebrow neutro (branding MDL: NO terracotta — gris/cream con borde sutil) */
.eyebrow {
  display: inline-block;
  color: var(--text-muted);
  border: 1px solid rgba(34, 36, 35, 0.14);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.4);
}
.section.is-dark .eyebrow,
.hero .eyebrow {
  color: var(--text-on-dark);
  border-color: rgba(245, 244, 242, 0.28);
  background: rgba(245, 244, 242, 0.08);
}

/* Italic taupe — destaca 1-2 palabras dentro de un heading (truco de marca) */
.ec-italic { font-style: italic; color: var(--brand-accent); }

/* Hero: gradiente más cálido + alineado a la izquierda en desktop */
.hero h1 { max-width: 22ch; }
.hero p.lead { max-width: 46ch; }
.hero .meta-line {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: rgba(245, 244, 242, 0.82);
  text-transform: none;
}
.hero .meta-line strong { color: var(--brand-accent); }

/* Quote emocional (italic Fraunces sobre warm) */
.ec-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 3.4vw, 1.6rem);
  line-height: 1.5;
  max-width: 30ch;
  margin-inline: auto;
}
.ec-quote .sig { display: block; margin-top: 1rem; font-style: normal; font-size: var(--fs-small); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* Checklist "¿Es para ti?" */
.ec-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; max-width: 640px; margin-inline: auto; }
.ec-checklist li { position: relative; padding-left: 2rem; line-height: 1.55; }
.ec-checklist li::before {
  content: '\2713';
  position: absolute; left: 0; top: 0;
  color: var(--brand-accent);
  font-weight: 700;
}

/* Tarjeta de CLASE (día 1 / día 2) */
.ec-class-card { background: var(--surface-light); border: 1px solid rgba(34,36,35,0.08); }
.ec-class-card .day-tag {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 0.4rem;
}
.ec-class-card ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.75rem; }
.ec-class-card ul li { position: relative; padding-left: 1.6rem; color: var(--text-muted); line-height: 1.5; }
.ec-class-card ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--brand-accent); font-weight: 700; }

/* Regalos (bonos) */
.ec-gift { display: flex; gap: 0.9rem; align-items: flex-start; }
.ec-gift .ic { font-size: 1.4rem; line-height: 1.2; flex-shrink: 0; }
.ec-gift h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.ec-gift p { color: var(--text-muted); font-size: 1rem; }
.ec-bonus-special {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px dashed var(--brand-accent);
  border-radius: var(--radius-card);
  background: var(--surface-cream);
}

/* Bloque precio */
.ec-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 1;
  margin-block: 0.5rem 0.25rem;
}
.ec-price-list { list-style: none; padding: 0; margin: 0 auto 1.5rem; max-width: 520px; display: grid; gap: 0.5rem; text-align: left; }
.ec-price-list li { position: relative; padding-left: 1.6rem; color: var(--text-on-dark); opacity: 0.9; }
.ec-price-list li::before { content: '\2713'; position: absolute; left: 0; color: var(--brand-accent); font-weight: 700; }

/* Bio María — split foto + texto */
.ec-bio { display: grid; gap: 2rem; align-items: center; }
.ec-bio img { border-radius: var(--radius-card); box-shadow: var(--shadow-card); }

/* Opciones finales (¿qué eliges?) */
.ec-options { display: grid; gap: 1.25rem; }
.ec-option { padding: 1.5rem; border-radius: var(--radius-card); }
.ec-option.is-no { background: var(--surface-warm); border: 1px solid rgba(34,36,35,0.08); }
.ec-option.is-yes { background: var(--surface-light); border: 2px solid var(--brand-accent); }
.ec-option .label { font-size: var(--fs-eyebrow); letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); }
.ec-option.is-yes .label { color: var(--brand-accent); }

/* CTA en sección clara: dark fill, texto cream (branding MDL) */
.section:not(.is-dark) .cta {
  background: var(--brand-primary);
  color: var(--text-on-dark);
}
.section:not(.is-dark) .cta:hover { background: var(--brand-secondary); }
/* CTA en sección oscura: se invierte → fondo cream, texto dark */
.section.is-dark .cta, .hero .cta {
  background: var(--surface-light);
  color: var(--brand-primary);
}
.section.is-dark .cta:hover, .hero .cta:hover { background: var(--surface-warm); }

/* CTA sub-label (debajo del botón) */
.cta-note { font-size: var(--fs-small); color: var(--text-muted); margin-top: 0.85rem; }
.section.is-dark .cta-note, .hero .cta-note { color: rgba(245, 244, 242, 0.75); }

/* Urgency / fecha pill bar (sticky top) */
.sticky-top { letter-spacing: 0.02em; font-weight: 600; }
.sticky-top .countdown { margin: 0; }

/* Desktop refinements */
@media (min-width: 768px) {
  .ec-bio { grid-template-columns: 0.8fr 1.2fr; }
  .ec-options { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.6rem); }
}

/* Galería de transformaciones reales (activo nº1 de marca) */
.ec-transforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.ec-transforms img {
  width: 100%;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .ec-transforms { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
