/* 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                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
/* Hanken Grotesk · variable font (cubre weights 100-900 con un solo archivo 34KB) */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('/shared/fonts/HankenGrotesk.woff2') format('woff2-variations'),
       url('/shared/fonts/HankenGrotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Quintessential · font-script (acentos mystic puntuales) */
@font-face {
  font-family: 'Quintessential';
  src: url('/shared/fonts/Quintessential-Regular.woff2') format('woff2');
  font-weight: 400 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. Choice section · "Ahora tienes dos opciones"                ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.choice-section .container { display: flex; flex-direction: column; gap: clamp(2.5rem, 6vw, 3.5rem); }
.choice-section h2 { text-align: center; margin: 0; }

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 0.5rem;
}

.choice-card {
  position: relative;
  padding: 2.4rem 1.4rem 1.6rem;
  border-radius: var(--radius-card);
  border: 1px solid rgba(245, 239, 227, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.choice-card p {
  margin: 0;
  color: rgba(245, 239, 227, 0.72);
  font-size: 1rem;
  line-height: 1.65;
  text-align: center;
}

.choice-card--good {
  border-color: var(--brand-accent);
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.12), rgba(201, 169, 97, 0.02));
  box-shadow:
    0 0 0 1px rgba(201, 169, 97, 0.35),
    0 14px 44px rgba(201, 169, 97, 0.18),
    0 0 60px rgba(201, 169, 97, 0.10);
}

.choice-card--good p { color: var(--text-on-dark); }

.choice-pill {
  position: absolute;
  top: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.choice-pill--bad {
  background: #1a1024;
  color: var(--text-on-dark);
  border: 1px solid rgba(245, 239, 227, 0.14);
}

.choice-pill--good {
  background: var(--text-on-dark);
  color: var(--surface-dark);
  border: 1px solid var(--brand-accent);
}

.choice-guarantee h3 {
  font-size: clamp(1.2rem, 3.2vw, 1.65rem);
  line-height: 1.4;
  margin: 0 auto;
  max-width: 740px;
  text-align: center;
}

.closer-copy {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.closer-copy p {
  color: rgba(245, 239, 227, 0.78);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

.closer-copy p strong { color: var(--text-on-dark); }

.choice-section .cta { align-self: center; margin-top: 0.5rem; }

@media (min-width: 768px) {
  .choice-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .choice-card { padding: 2.75rem 2rem 2rem; }
}
