/* ==========================================================================
   styles.css — landing de ventas Omar Benvenuto
   Mobile-first. Breakpoints: 640px (tablet) y 960px (desktop).
   ========================================================================== */

/* Coolvetica: solo en la sección de precios (ver bloque 6). */
@font-face {
  font-family: "Coolvetica";
  src: url("../assets/fonts/Coolvetica%20Rg.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta (ajustable) */
  --bg: #0f0b1e;
  --surface: #1d1535;
  --surface-2: #2a1f4a;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --border: #6b1a8a;
  --accent-cyan: #67e8f9;
  --accent-lime: #d9f99d;
  --text: #f5f3ff;
  --muted: #a8a3c4;
  --box-top: #4D2D85;      /* caja de cursos: centro del radial (arriba) */
  --box-bottom: #1A152C;   /* caja de cursos: abajo y bordes */

  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 32px;
  --maxw: 1100px;
  --gutter: 16px;
  --glow: 0 0 0 1px rgba(167, 139, 250, 0.35), 0 10px 34px rgba(124, 58, 237, 0.45);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(124, 58, 237, 0.28), transparent 62%),
    radial-gradient(800px 600px at 100% 45%, rgba(107, 26, 138, 0.16), transparent 60%),
    radial-gradient(800px 600px at 0% 80%, rgba(124, 58, 237, 0.12), transparent 60%),
    var(--bg);
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: 12px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 40px 0; }
@media (min-width: 960px) { .section { padding: 56px 0; } }  /* antes 104px: secciones más juntas */

.section-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: center;
}

/* Subtítulo bajo un h2.section-title */
.section-sub {
  margin-top: 8px;
  text-align: center;
  font-size: clamp(1rem, 2.6vw, 1.15rem);
  font-weight: 500;
  color: var(--muted);
}
.pricing-title { margin-bottom: 32px; }

/* Placeholder de texto visible: [ASÍ] */
.ph {
  color: var(--accent-lime);
  background: rgba(217, 249, 157, 0.08);
  border: 1px dashed rgba(217, 249, 157, 0.45);
  border-radius: 6px;
  padding: 0 0.25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Caja gris para assets que todavía no existen */
.missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 10px;
  text-align: center;
  background: repeating-linear-gradient(135deg, #2b2840 0 12px, #312d48 12px 24px);
  color: var(--muted);
}
.missing-label { color: var(--text); font-weight: 700; font-size: 1rem; }
.missing-path {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.3;
  word-break: break-all;
  opacity: 0.85;
}
.missing-play {
  width: 56px; height: 56px;
  padding: 14px 12px 14px 16px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.85);
  fill: #fff;
  box-shadow: var(--glow);
}

/* ---------- Botones ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  color: #fff;
  box-shadow: var(--glow);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(168, 163, 196, 0.45);
  color: var(--text);
}
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.9rem; }
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.5), 0 14px 40px rgba(124, 58, 237, 0.6); }
  .btn-secondary:hover { background: rgba(255, 255, 255, 0.09); }
}

.round-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(29, 21, 53, 0.85);
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}
.round-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.round-btn:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) { .round-btn:not(:disabled):hover { background: var(--surface-2); } }

/* ---------- 1. Navbar ---------------------------------------------------- */
.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: calc(100% - 2 * var(--gutter));
  max-width: 920px; /* mismo ancho que el video del hero */
  margin: 12px auto 0;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: #17112c; /* sólido, sin efecto vidrio */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.nav-logo { display: flex; align-items: center; height: 36px; text-decoration: none; flex: none; }
.nav-logo .logo-img { height: 24px; width: auto; }
@media (min-width: 640px) { .nav-logo .logo-img { height: 28px; } }
.nav-logo .missing { width: 92px; height: 32px; min-height: 0; padding: 2px 6px; border-radius: 999px; }
.nav-logo .missing-path { font-size: 0.55rem; }
/* Título + subtítulo junto al logo (estilo Ultimate Editors). Oculto en móvil. */
.nav-title { display: none; }
@media (min-width: 860px) {
  .nav { display: grid; grid-template-columns: auto 1fr auto; column-gap: 18px; }
  .nav-title {
    display: block;
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid rgba(167, 139, 250, 0.25);
    text-align: left;
    line-height: 1.2;
  }
  .nav-name {
    font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif;
    font-size: 1.2rem;
    color: var(--text);
  }
  .nav-tag {
    margin-top: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav .btn { justify-self: end; }
}

/* ---------- 2. Hero ------------------------------------------------------ */
.hero { padding-top: 48px; text-align: center; }
.hero-title {
  max-width: 1100px;
  margin: 0 auto;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.6rem); /* 2 líneas en desktop */
  font-weight: 400; /* Coolvetica solo tiene Regular: evita la negrita falsa */
  line-height: 1.05;
  letter-spacing: 0;
  text-wrap: balance;
}
.hero-sub {
  max-width: 640px;
  margin: 16px auto 0;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  letter-spacing: 0.01em;
  color: var(--muted);
  text-wrap: balance;
}
.hero-video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 920px;
  margin: 32px auto 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.45);
  background: #000;
  box-shadow: 0 30px 80px rgba(124, 58, 237, 0.25);
}
.hero-video video { width: 100%; height: 100%; object-fit: cover; }
/* Los dos botones ocupan juntos el ancho del video (mismo max-width), ~50% cada uno */
/* Un solo botón "Obtener": ~mitad del ancho del video, centrado */
.hero-ctas {
  display: flex;
  justify-content: center;
  margin: 28px auto 0;
}
.hero-ctas .btn {
  width: min(460px, 80%);
  min-height: 64px;
  font-size: clamp(1.4rem, 3.6vw, 1.75rem);
}
@media (min-width: 640px) { .hero-ctas .btn { min-height: 72px; } }

/* Cápsula sólida lila con texto del color del fondo (referencia de Omar) */
.btn-solid {
  background: #DB70FF;
  color: var(--bg);
  border: 0;
  border-radius: 999px;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  box-shadow: none;
}
@media (hover: hover) { .btn-solid:hover { background: #E68CFF; } }
.btn-nav { min-height: 42px; padding: 8px 26px; font-size: 1.15rem; }

/* ---------- 3. Testimonios: cilindro 3D ---------------------------------- */
/* Arco de cilindro: cada tarjeta se coloca en su ranura --o (la pone main.js;
   0 = frente, ±1 = laterales, el resto ocultas detrás) a --step grados sobre
   un cilindro de radio --r. El número de tarjetas sale de data.js: con 4 o con
   5 este CSS no cambia. NO se usa step = 360/N: con 4 videos las laterales
   quedarían a 90°, de canto (0% de cara); con 5 a 72° (31%). A 35° se ve ~65%
   y queda un hueco entre la central y las laterales. Interpolar rotateY mueve
   la tarjeta por el arco. */
.testimonials { overflow: hidden; } /* el arco es algo más ancho que el móvil */
.cyl {
  --w: min(40vw, 230px);
  --h: calc(var(--w) * 16 / 9);
  --r: calc(var(--w) * 1.8);
  --step: 35deg;
  position: relative;
  max-width: var(--maxw);
  margin: 32px auto 0;
  outline: none;
}
@media (min-width: 960px) { .cyl { --w: 260px; } }

.cyl-stage {
  position: relative;
  height: calc(var(--h) + 24px);
  perspective: 900px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 960px) { .cyl-stage { perspective: 1200px; } }
.cyl-ring {
  position: absolute;
  top: 12px;
  left: 50%;
  width: var(--w);
  height: var(--h);
  margin-left: calc(var(--w) / -2);
  transform-style: preserve-3d;
}
.cyl-card {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transform: translateZ(calc(var(--r) * -1)) rotateY(calc(var(--o, 0) * var(--step))) translateZ(var(--r));
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  /* Sin filter (blur/brightness): era pesado y daba tirones. Las laterales se
     oscurecen con el ::after de abajo. 450ms = MS en initCylinder(). */
  transition: transform 0.45s cubic-bezier(.22, 1, .36, 1), opacity 0.45s ease, box-shadow 0.45s ease;
}
/* Velo oscuro de las laterales: solo cambia su opacity (barato de animar). */
.cyl-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.45);
  opacity: 1;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.cyl-card.is-front::after { opacity: 0; }
.cyl-card.is-front {
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.4);
}
.cyl-card.is-hidden { opacity: 0; pointer-events: none; }
.cyl-card.no-anim, .cyl-card.no-anim::after { transition: none; }
.cyl-media, .cyl-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.cyl-media video { object-fit: cover; pointer-events: none; }
.cyl-media .missing-label { font-size: 1.15rem; }

/* Overlay propio de play/pausa (sin controles nativos) */
.cyl-overlay {
  position: absolute;
  top: 50%; left: 50%;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.85);
  box-shadow: var(--glow);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.cyl-overlay svg { width: 28px; height: 28px; fill: #fff; }
.cyl-overlay .i-play { margin-left: 4px; }
.cyl-overlay .i-pause { display: none; }
.cyl-card.is-front .cyl-overlay { opacity: 1; }
.cyl-card.is-playing .cyl-overlay { opacity: 0; }
.cyl-card.is-playing .i-play { display: none; }
.cyl-card.is-playing .i-pause { display: block; }
.cyl-card.is-missing .cyl-overlay { display: none; }
@media (hover: hover) { .cyl-card.is-front.is-playing:hover .cyl-overlay { opacity: 0.9; } }

.cyl-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 36px 12px 14px;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  background: linear-gradient(to top, rgba(10, 6, 24, 0.9), transparent);
  pointer-events: none;
}
.cyl-card.is-missing .cyl-name { display: none; } /* la caja gris ya lleva el nombre */

.cyl-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}
.cyl-dots { display: flex; justify-content: center; gap: 4px; }
.cyl-dot {
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.cyl-dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(168, 163, 196, 0.4);
  transition: transform 0.3s, background-color 0.3s;
}
.cyl-dot[aria-current="true"]::after { background: var(--accent-cyan); transform: scale(1.3); }

/* ---------- 4. Reseñas: carrusel horizontal ------------------------------ */
.rv { position: relative; margin-top: 32px; }
.rv-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  padding: 8px 24px 12px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  cursor: grab;
}
.rv-track::-webkit-scrollbar { display: none; }
.rv-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.rv-track:focus-visible { outline-offset: -3px; }

.rv-card {
  flex: 0 0 80%;            /* móvil: ~1.2 tarjetas visibles */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.rv-stars { color: #facc15; letter-spacing: 3px; font-size: 1.1rem; }
.rv-text { flex: 1; color: var(--text); }
.rv-name { font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.rv-btn { display: none; }
@media (min-width: 640px) {
  .rv-card { flex-basis: calc((100% - 16px) / 2); }
}
@media (min-width: 960px) {
  .rv { padding: 0 60px; }
  .rv-card { flex-basis: calc((100% - 32px) / 3); }   /* ~3 visibles */
  .rv-btn { display: grid; position: absolute; top: 50%; margin-top: -24px; }
  .rv-prev { left: 0; }
  .rv-next { right: 0; }
}
/* En móvil los botones van debajo, centrados */
@media (max-width: 959px) {
  .rv { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .rv-track { grid-column: 1 / -1; grid-row: 1; }
  .rv-btn { display: grid; grid-row: 2; }
  .rv-prev { justify-self: end; }
  .rv-next { justify-self: start; }
}

/* ---------- 5. Oferta / value stack ------------------------------------- */
#oferta { scroll-margin-top: 80px; }
.offer-head { text-align: center; }
.offer-value {
  margin-top: 14px;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 800;
}
.offer-amount {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.offer-years { margin-top: 6px; color: var(--muted); font-size: clamp(0.95rem, 2.4vw, 1.1rem); }
.offer-years strong { color: var(--text); }

/* Bloque base: contenedor con borde morado (mockup-cursos.png) */
.base-block {
  position: relative;
  z-index: 1;
  margin-top: 36px;
  padding: 24px 14px;
  border-radius: var(--radius-lg);
  border: 3px solid #9F0DB5;
  /* radial ramp como en After Effects: centro arriba al medio → oscuro abajo y bordes */
  background: radial-gradient(ellipse 120% 80% at 50% 0%, var(--box-top) 0%, var(--box-bottom) 75%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 12px;
  align-items: start;
}
@media (min-width: 640px) {
  .base-block { padding: 40px 36px; }
  .course-grid { gap: 36px 32px; }
}
@media (min-width: 960px) {
  .base-block { max-width: 920px; margin-left: auto; margin-right: auto; padding: 52px 64px; }
  .course-grid { gap: 44px 48px; }
}

/* Tarjeta que gira: <button> con frente (portada) y reverso (imagen) */
.flip-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  cursor: pointer;
  perspective: 1000px;
  border-radius: 18px;
  transition: transform 0.3s ease-out;
}
.flip-inner {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}
.flip-card[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
/* Las caras se ocultan SOLO con backface-visibility. (Antes había además un
   truco de visibility con transition-delay, pero .cover —misma especificidad,
   declarada después— le pisaba el transition: la portada desaparecía al
   instante y la primera mitad del giro no se veía ninguna cara. CAMBIOS-03.)
   Entre .flip-inner y las caras no debe haber overflow:hidden, filter ni
   opacity < 1: aplanan el preserve-3d. El overflow de .cover está en la cara
   misma, eso no molesta. */
.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-front { transform: rotateY(0deg); } /* explícito: Chrome la trata como capa 3D */
/* El reverso es una .cover más (misma proporción, recorte y esquinas que la
   portada): se superpone a ella y se ve girado 180°. */
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
}

.cover {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s ease-out;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-name {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  font-size: clamp(0.85rem, 2.6vw, 1.3rem);
  line-height: 1.2;
}


@media (min-width: 640px) {
  .cover { border-radius: 18px; }
}

/* Hover solo con mouse: sube suave + glow morado leve */
@media (hover: hover) and (pointer: fine) {
  .flip-card:hover, .tile:hover { transform: translateY(-8px); }
  .flip-card:hover .cover:not(:has(.missing)),
  .tile:hover .cover:not(:has(.missing)) {
    box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.55), 0 16px 40px rgba(124, 58, 237, 0.45);
  }
}

/* Caja Penthouse (CAMBIOS-04): copia de .base-block (mismo radial, esquinas,
   padding, sombra) separada de la de cursos, con borde más claro. Sus 3
   portadas son .tile: misma tarjeta que los cursos pero sin giro. */
.pent-label {
  margin-top: 28px;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-lime);
}
.pent-label strong, .pent-sub { white-space: nowrap; }
.pent-sub { color: var(--muted); }
.pent-sep { display: none; color: var(--muted); }
@media (max-width: 479px) { .pent-label strong { display: block; } }
@media (min-width: 480px) { .pent-sep { display: inline; } }
.base-block.pent-block { margin-top: 14px; border-color: #9F0DB5; }
.pent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 2 columnas también en móvil */
  gap: 24px 12px;
  align-items: start;
}
.tile { display: block; text-align: center; cursor: default; transition: transform 0.3s ease-out; }
/* Las tarjetas pueden ser .tile (fija) o .flip-card (gira): el layout va por posición. */
.pent-grid > * { justify-self: center; width: 92%; }        /* fila 2: ~40% de la caja cada una */
.pent-grid > .tile-main { grid-column: 1 / -1; width: 90%; } /* fila 1: sola y grande */
@media (min-width: 640px) {
  .pent-grid { gap: 36px 32px; }
  .pent-grid > * { width: 85%; }
  .pent-grid > .tile-main { width: 70%; }
}
@media (min-width: 960px) { .pent-grid { gap: 44px 48px; } }

/* ---------- 6. Precios --------------------------------------------------- */
/* Copia de referencias/precio-penthouse-ref.png y precio-studio-ref.png.
   Fondo = degradado ya recortado (assets/precios/*-fondo.jpg) estirado a la
   tarjeta; borde y esquinas van en CSS, NO en la imagen. Coolvetica SOLO aquí:
   nombres de plan, precios, cápsulas y frases (lista y botón siguen en Jakarta).
   Coolvetica solo tiene Regular (que ya es pesada): font-synthesis: none para
   que el navegador no le invente una negrita en los <strong>. */
.pricing { padding-top: 24px; }
.plans {
  display: grid;
  gap: 16px;
  justify-items: center;
}
.plan {
  --plan-pad: clamp(20px, 6vw, 40px);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  padding: var(--plan-pad);
  border-radius: 28px;
  color: #fff;
}
.plan-penthouse {
  background: url("../assets/precios/penthouse-fondo.jpg") center / 100% 100% no-repeat, #1a0e24;
  border: 3px solid #9F0DB5;
  box-shadow: 0 0 50px rgba(159, 13, 181, 0.3);
  --divider: #6F0D7F;
}
.plan-studio {
  background: url("../assets/precios/studio-fondo.jpg") center / 100% 100% no-repeat, #16191d;
  border: 3px solid #7EFFE6;
  --divider: #56A598;
}

.plan-name, .plan-price, .plan-pill, .plan-urgency, .plan-tagline, .plan-bonus-tag {
  font-family: "Coolvetica", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 400;
  font-synthesis: none;
}

/* Cápsulas rosadas del Penthouse (cupos y ahorro) */
.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #F090FF;
  color: #1A0E24;
  line-height: 1;
}
.plan-pill strong { font-weight: 400; }

.plan-top {
  display: flex;
  flex-wrap: wrap;            /* en móvil puede pasar a 2 líneas */
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}
.plan-cap { gap: 8px; padding: 8px 18px; font-size: clamp(1rem, 3.6vw, 1.3rem); }
.plan-cap-num { font-size: clamp(1.5rem, 5.5vw, 1.95rem); }
.plan-urgency { font-size: clamp(0.95rem, 3.4vw, 1.15rem); line-height: 1.2; }
.plan-tagline { font-size: clamp(1.05rem, 3.8vw, 1.3rem); line-height: 1.2; }

.plan-name {
  margin-top: clamp(14px, 4vw, 26px);
  font-size: clamp(2rem, 8vw, 2.9rem);
  line-height: 1.05;
}

.plan-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-top: clamp(10px, 3vw, 18px);
}
.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  line-height: 1;
}
.plan-old { color: #8C8299; font-size: clamp(1.15rem, 4vw, 1.5rem); text-decoration-thickness: 2px; }
.plan-amount { font-size: clamp(2.8rem, 11vw, 3.6rem); letter-spacing: -0.01em; }
.plan-period { color: #8C8299; font-size: clamp(1.1rem, 3.6vw, 1.35rem); }
.plan-note { color: #B9BCC4; font-size: clamp(1.05rem, 3.6vw, 1.3rem); }
.plan-save {
  flex-direction: column;
  gap: 2px;
  padding: 9px 18px;
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
}
.plan-save strong { font-size: clamp(1.05rem, 3.6vw, 1.25rem); }

.plan-divider {
  display: block;
  height: 2px;
  margin-top: clamp(12px, 3vw, 18px);
  background: var(--divider);
}

/* Lista con puntos blancos (círculos sólidos, no checks) */
.plan-list { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 12px; }
.plan-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: clamp(0.98rem, 3.4vw, 1.08rem); }
.plan-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: #fff; }
.plan-bonus-tag {
  padding: 4px 10px 3px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  background: rgba(126, 255, 230, 0.12);
  border: 1px solid rgba(126, 255, 230, 0.6);
  color: #7EFFE6;
}
.plan-cta { margin-top: auto; width: 100%; }

/* Botón del Studio en verde agua, para combinar con su borde */
.btn-studio {
  background: rgba(126, 255, 230, 0.06);
  border: 2px solid #7EFFE6;
  color: #7EFFE6;
}
@media (hover: hover) { .btn-studio:hover { background: rgba(126, 255, 230, 0.16); } }

.plans-or {
  visibility: hidden; /* la "o" y el círculo ya no se ven, pero conservan su espacio */
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid rgba(168, 163, 196, 0.3);
  color: var(--muted);
  font-weight: 700;
}
@media (min-width: 860px) {
  .plans { grid-template-columns: 1fr auto 1fr; align-items: stretch; justify-items: stretch; gap: 20px; }
  .plan { max-width: none; border-radius: 40px; }
  .plans-or { align-self: center; }
}

/* ---------- 7. Footer ---------------------------------------------------- */
.footer { padding: 32px 0 40px; border-top: 1px solid rgba(124, 58, 237, 0.2); margin-top: 16px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-logo { display: block; }
.footer-logo .logo-img { height: 44px; width: auto; margin: 0 auto; }
.footer-logo .missing { width: 110px; height: 36px; min-height: 0; padding: 2px 6px; border-radius: 999px; }
.footer-logo .missing-path { font-size: 0.55rem; }
.footer-copy { color: var(--muted); font-size: 0.9rem; }
.footer-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-socials a { color: var(--text); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
@media (hover: hover) { .footer-socials a:hover { color: var(--accent-cyan); } }

/* ---------- Fade-in al hacer scroll -------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Movimiento reducido: sin animaciones ------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .flip-card:hover, .tile:hover { transform: none; }
}

/* Palabras resaltadas (*texto* en data.js): mismo degradado que "$2,497" */
.hl {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-lime));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Botón del Penthouse: solo borde fucsia, texto blanco rosado, glow muy sutil */
.btn-penthouse {
  background: transparent;
  border: 3px solid #9F0DB5;
  color: #FFF0FC;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  text-shadow: 0 0 6px rgba(255, 140, 240, 0.35);
  box-shadow: 0 0 10px rgba(159, 13, 181, 0.35), inset 0 0 8px rgba(159, 13, 181, 0.2);
}
@media (hover: hover) { .btn-penthouse:hover { background: rgba(159, 13, 181, 0.12); } }
.base-block.course-block { margin-top: 36px; } /* separación entre la caja Penthouse y la de cursos */

/* ---------- Ventana del formulario (pop) ---------------------------------- */
.no-scroll { overflow: hidden; }
.fmodal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.fmodal[hidden] { display: none; }
.fmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 5, 18, 0.86);   /* sin blur: el desenfoque recalculaba toda la página en cada cuadro */
  opacity: 0; transition: opacity 0.25s ease;
}
.fmodal-card {
  position: relative;
  display: flex; flex-direction: column;
  width: min(720px, 100%);
  height: min(780px, calc(100dvh - 32px));
  padding: 64px 40px 20px;    /* aire alrededor; arriba deja espacio a la X */
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  contain: layout paint;      /* lo que pasa dentro no obliga a repintar la página */
  opacity: 0;
  transform: translateY(24px) scale(0.86);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  will-change: transform, opacity;
}
.fmodal.is-open .fmodal-backdrop { opacity: 1; }
.fmodal.is-open .fmodal-card { opacity: 1; transform: none; }
/* El iframe es 24px más ancho que el clip: su barra de scroll queda escondida
   (el scroll con rueda / dedo sigue funcionando). */
.fmodal-clip { flex: 1; min-height: 0; overflow: hidden; }
.fmodal-frame {
  display: block; width: calc(100% + 24px); height: 100%; border: 0;
  opacity: 0; transition: opacity 0.3s ease;
}
.fmodal.is-loaded .fmodal-frame { opacity: 1; }

/* Modo normal (Tally estiró el iframe): el scroll lo hace el clip, con barra propia:
   canal del color del fondo, barra y flechas en gris más claro. */
.fmodal.is-dynamic .fmodal-clip {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);      /* scroll en su propia capa = más fluido */
  overscroll-behavior: contain;
  margin-right: -26px;           /* la barra queda pegada al borde derecho de la ventana */
  padding-right: 12px;
  scrollbar-width: auto;         /* Firefox */
  scrollbar-color: #6b6580 #17112c;
}
.fmodal.is-dynamic .fmodal-frame { width: 100%; }
.fmodal-clip::-webkit-scrollbar { width: 14px; }
.fmodal-clip::-webkit-scrollbar-track { background: #17112c; }
.fmodal-clip::-webkit-scrollbar-thumb {
  background: #6b6580; border-radius: 8px;
  border: 3px solid #17112c;     /* deja la barra más delgada que el canal */
}
.fmodal-clip::-webkit-scrollbar-thumb:hover { background: #8a849e; }
.fmodal-clip::-webkit-scrollbar-button:single-button {
  display: block; height: 14px; background-color: #17112c;
  background-repeat: no-repeat; background-position: center; background-size: 8px 8px;
}
.fmodal-clip::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 1.5 7.5 6.5h-7z' fill='%238a849e'/%3E%3C/svg%3E");
}
.fmodal-clip::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M4 6.5 .5 1.5h7z' fill='%238a849e'/%3E%3C/svg%3E");
}
.fmodal-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 0.95rem; pointer-events: none;
}
.fmodal.is-loaded .fmodal-loading { display: none; }
.fmodal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(23, 17, 44, 0.9);
  color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
@media (hover: hover) { .fmodal-close:hover { background: #2a1f4a; transform: rotate(90deg); } }
@media (max-width: 520px) {
  .fmodal { padding: 10px; }
  .fmodal-card { height: calc(100dvh - 20px); border-radius: 22px; padding: 58px 18px 14px; }
  .fmodal-close { top: 12px; right: 12px; width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .fmodal-card, .fmodal-backdrop { transition: none; }
}

/* ---------- Pantalla previa al cuestionario ------------------------------- */
.fintro {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px clamp(24px, 6vw, 64px) 40px;
  background: var(--bg);
  overflow-y: auto;
  transition: opacity 0.3s ease, transform 0.35s ease;
}
.fmodal.is-started .fintro { opacity: 0; transform: translateY(-16px); pointer-events: none; visibility: hidden;
  transition: opacity 0.3s ease, transform 0.35s ease, visibility 0s linear 0.35s; }
/* El formulario carga por detrás mientras se ve la presentación */
.fmodal:not(.is-started) .fmodal-clip,
.fmodal:not(.is-started) .fmodal-loading { visibility: hidden; }
.fmodal.is-started .fmodal-clip { animation: fintroIn 0.4s ease both; }
@keyframes fintroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateZ(0); } }

.fintro-kicker {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.fintro-title {
  margin-top: 6px;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif; font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 3.4rem); line-height: 1.05;
}
.fintro-lead { margin-top: 14px; max-width: 46ch; color: #d9d4ea; font-size: clamp(1rem, 2.4vw, 1.12rem); }
.fintro-spots { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; }
.fintro-pill {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 14px; border-radius: 999px; background: #F090FF; color: #1A0E24;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif; font-size: 1rem;
}
.fintro-pill strong { font-size: 1.25rem; font-weight: 400; }
.fintro-left { font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif; font-size: 1.05rem; }
.fintro-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.fintro-steps li { display: flex; gap: 14px; align-items: flex-start; color: #cfc9e0; line-height: 1.45; }
.fintro-steps li span {
  flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(219, 112, 255, 0.5); color: #DB70FF;
  font-family: "Coolvetica", "Plus Jakarta Sans", sans-serif; font-size: 1rem;
}
.fintro-steps strong { color: #fff; font-weight: 600; }
.fintro-start { margin-top: 30px; align-self: flex-start; min-height: 58px; padding: 12px 34px; font-size: 1.35rem; }
.fintro-note { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
@media (max-width: 520px) {
  .fintro { justify-content: flex-start; padding-top: 64px; }
  .fintro-start { align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .fintro, .fmodal.is-started .fmodal-clip { transition: none; animation: none; }
}
