/* ==========================================================================
   Ruta al Millón — Design System
   Prototipo de website comercial. Tokens de color/tipografía en :root
   para facilitar el reemplazo por los recursos de marca oficiales.
   ========================================================================== */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=Fraunces:ital,opsz,wght@0,9..144,340..620;1,9..144,340..620&display=swap');

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Design tokens ---- */
:root {
  /* Base surfaces */
  --rm-bg: #07070f;
  --rm-bg-alt: #0b0b18;
  --rm-surface: #12121f;
  --rm-surface-2: #171728;
  --rm-surface-elevated: #1d1d33;
  --rm-border: rgba(255,255,255,0.09);
  --rm-border-strong: rgba(255,255,255,0.16);

  /* Text */
  --rm-text: #f6f6fb;
  --rm-text-secondary: #b7b7cf;
  --rm-text-muted: #82829e;

  /* Brand */
  --rm-blue: #4361ee;
  --rm-violet: #7c5cff;
  --rm-purple: #a24dff;
  --rm-magenta: #ec4ec2;
  --rm-green: #2fd480;
  --rm-green-bg: rgba(47,212,128,0.12);
  --rm-amber: #f5b942;

  --rm-gradient-brand: linear-gradient(135deg, #4361ee 0%, #8b4dff 50%, #ec4ec2 100%);
  --rm-gradient-brand-hover: linear-gradient(135deg, #5372ff 0%, #9c5eff 50%, #ff5fd4 100%);
  --rm-gradient-text: linear-gradient(135deg, #7c9dff 0%, #b98bff 50%, #ff8ce0 100%);
  --rm-gradient-border: linear-gradient(135deg, rgba(124,92,255,0.6), rgba(236,78,194,0.6));

  /* Type */
  --rm-font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --rm-font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --rm-font-serif: 'Fraunces', 'Georgia', 'Times New Roman', serif;

  /* Layout */
  --rm-container: 1200px;
  --rm-radius-sm: 10px;
  --rm-radius-md: 16px;
  --rm-radius-lg: 24px;
  --rm-radius-full: 999px;
  --rm-shadow-card: 0 20px 60px -20px rgba(0,0,0,0.6);
  --rm-shadow-glow: 0 0 80px -10px rgba(124,92,255,0.35);
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  background-color: var(--rm-bg);
  color: var(--rm-text);
  font-family: var(--rm-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient corner tint, fixed to the viewport so it reads consistently at
   any scroll position — sits beneath the animated particle canvas. */
.bg-ambient {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  /* Distribución asimétrica: cyan a la izquierda, violeta/azul al centro, magenta a la derecha */
  background:
    radial-gradient(48vw 55vh at 4% 8%,   rgba(76,209,255,0.20), transparent 62%),
    radial-gradient(46vw 55vh at 50% -6%, rgba(124,92,255,0.20), transparent 62%),
    radial-gradient(50vw 58vh at 98% 12%, rgba(236,78,194,0.20), transparent 62%),
    radial-gradient(52vw 55vh at 0% 100%,  rgba(67,97,238,0.16), transparent 60%),
    radial-gradient(52vw 55vh at 100% 100%, rgba(162,77,255,0.15), transparent 60%);
}

/* Vigas de luz verticales/diagonales — mezcla de líneas nítidas (tipo láser,
   como la referencia) y difusas, más glows localizados. */
.bg-beams {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.7;
  background-image:
    linear-gradient(180deg, rgba(140,220,255,0.5) 0%, rgba(76,209,255,0.14) 30%, transparent 62%),
    linear-gradient(180deg, rgba(255,170,235,0.4) 0%, rgba(236,78,194,0.12) 34%, transparent 66%),
    linear-gradient(180deg, rgba(76,209,255,0.16) 0%, transparent 58%),
    linear-gradient(180deg, rgba(236,78,194,0.14) 0%, transparent 62%),
    linear-gradient(180deg, rgba(139,92,255,0.11) 0%, transparent 50%),
    linear-gradient(200deg, rgba(124,92,255,0.09) 0%, transparent 45%),
    radial-gradient(30vw 32vh at 8% 22%, rgba(76,209,255,0.14), transparent 70%),
    radial-gradient(32vw 34vh at 94% 28%, rgba(236,78,194,0.14), transparent 70%),
    radial-gradient(26vw 30vh at 50% 90%, rgba(139,92,255,0.12), transparent 72%);
  background-repeat: no-repeat;
  background-size: 1.5px 40vh, 1.5px 46vh, 3px 66vh, 3px 74vh, 2px 58vh, 2px 50vh, 100% 100%, 100% 100%, 100% 100%;
  background-position: 6% 0, 95% 0, 10% 0, 90% 0, 50% 0, 68% 0, 0 0, 0 0, 0 0;
  filter: blur(0.5px);
}

/* Bokeh: pequeñas partículas de luz difusas, estáticas, muy sutiles */
.bg-bokeh {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(3px 3px at 12% 18%, rgba(180,230,255,0.9), transparent),
    radial-gradient(2.5px 2.5px at 22% 62%, rgba(255,190,240,0.8), transparent),
    radial-gradient(3.5px 3.5px at 85% 15%, rgba(200,170,255,0.85), transparent),
    radial-gradient(2px 2px at 92% 55%, rgba(140,220,255,0.8), transparent),
    radial-gradient(3px 3px at 68% 8%, rgba(255,200,235,0.75), transparent),
    radial-gradient(2.5px 2.5px at 40% 30%, rgba(170,200,255,0.7), transparent),
    radial-gradient(2px 2px at 78% 75%, rgba(220,160,255,0.75), transparent),
    radial-gradient(3px 3px at 15% 85%, rgba(140,220,255,0.7), transparent);
  filter: blur(0.3px);
  animation: rm-bokeh-drift 14s ease-in-out infinite;
}
@keyframes rm-bokeh-drift {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-10px); opacity: 0.7; }
}

.bg-network { position: fixed; inset: 0; z-index: -1; display: block; pointer-events: none; opacity: 0.24; }
.scroll-particles-canvas { position: fixed; inset: 0; z-index: -1; display: block; pointer-events: none; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1, h2 {
  font-family: var(--rm-font-serif); font-weight: 480; line-height: 1.08; letter-spacing: -0.015em;
  font-optical-sizing: auto;
}
h3, h4 { font-family: var(--rm-font-display); }
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
p { color: var(--rm-text-secondary); }

h1 .text-gradient, h2 .text-gradient { font-style: italic; font-weight: 560; }

.container { max-width: var(--rm-container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }

/* Separador entre secciones: línea degradada + resplandor, en vez de un
   corte seco de fondo a fondo. Solo entre secciones consecutivas (no antes
   de la primera, que ya tiene su propio remate del hero). */
.hero + .section::before,
.section + .section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(760px, 70%); height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(76,209,255,0.45), rgba(124,92,255,0.55), rgba(236,78,194,0.45), transparent);
}
.hero + .section::after,
.section + .section::after {
  content: ''; position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 360px; height: 120px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124,92,255,0.16), transparent 72%);
  filter: blur(18px);
}
.section-tight { padding: 64px 0; }
@media (max-width: 780px) {
  .section { padding: 64px 0; }
  .section-tight { padding: 48px 0; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--rm-font-display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--rm-violet);
  background: rgba(124,92,255,0.1); border: 1px solid rgba(124,92,255,0.25);
  padding: 6px 14px; border-radius: var(--rm-radius-full); margin-bottom: 20px;
}

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 16px; font-size: 1.0625rem; }

.text-gradient {
  background: var(--rm-gradient-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Focus states (accessibility) ---- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--rm-violet);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--rm-surface-elevated); color: var(--rm-text);
  padding: 12px 20px; border-radius: var(--rm-radius-sm); border: 1px solid var(--rm-border-strong);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--rm-font-display); font-weight: 600; font-size: 0.9375rem;
  padding: 14px 26px; border-radius: var(--rm-radius-full); border: 1px solid transparent;
  min-height: 48px; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--rm-gradient-brand); color: #fff;
  box-shadow: 0 8px 30px -8px rgba(124,92,255,0.55);
}
.btn-primary:hover { background: var(--rm-gradient-brand-hover); box-shadow: 0 10px 36px -6px rgba(236,78,194,0.55); }
.btn-secondary {
  background: rgba(255,255,255,0.04); color: var(--rm-text);
  border-color: var(--rm-border-strong);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.28); }
.btn-ghost { background: transparent; color: var(--rm-text-secondary); padding: 10px 16px; }
.btn-ghost:hover { color: var(--rm-text); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 20px; min-height: 40px; font-size: 0.875rem; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,15,0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rm-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--rm-font-display); font-weight: 700; font-size: 1.125rem; white-space: nowrap; }
.nav-logo-mark {
  height: 34px; width: auto; display: block; object-fit: contain; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.nav-links a {
  padding: 10px 12px; border-radius: var(--rm-radius-sm); font-size: 0.9375rem; font-weight: 500;
  color: var(--rm-text-secondary); transition: color .15s ease, background .15s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--rm-text); background: rgba(255,255,255,0.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-sm);
  width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--rm-text);
}
.nav-mobile-panel { display: none; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-actions .btn-secondary { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-mobile-panel.open {
    display: block; position: fixed; inset: 76px 0 0 0; background: var(--rm-bg);
    padding: 24px; overflow-y: auto; z-index: 99;
  }
  .nav-mobile-panel a {
    display: block; padding: 16px 4px; font-size: 1.0625rem; font-weight: 500;
    border-bottom: 1px solid var(--rm-border); color: var(--rm-text);
  }
  .nav-mobile-panel .btn { margin-top: 20px; }
}

@media (max-width: 480px) {
  .nav { height: 64px; }
  .nav-mobile-panel.open { inset: 64px 0 0 0; }
  .container { padding: 0 16px; }
  .nav-logo { font-size: 0.8125rem; gap: 6px; }
  .nav-logo-mark { height: 24px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-primary.btn-sm { padding: 8px 12px; font-size: 0.75rem; }
  .nav-toggle { width: 34px; height: 34px; }
}

/* ---- Hero ---- */
.hero { position: relative; padding: 64px 0 32px; overflow: visible; }
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.4; pointer-events: none; z-index: 0;
}
.hero-orb--1 { width: 560px; height: 560px; background: var(--rm-violet); top: -220px; left: -200px; opacity: 0.3; }
.hero-orb--2 { width: 520px; height: 520px; background: var(--rm-magenta); top: -140px; right: -220px; opacity: 0.24; }
.hero-orb--3 { width: 480px; height: 480px; background: var(--rm-blue); bottom: -260px; left: 30%; opacity: 0.22; }

/* Corredor digital animado (canvas): streaks + vigas + partículas + reflejo */
.hero-corridor-canvas {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important;
  z-index: 0; pointer-events: none; display: block; opacity: 0.9;
}
@media (max-width: 780px) { .hero-corridor-canvas { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .hero-corridor-canvas { opacity: 0.55; } }

/* Cintas de humo/luz en la base del hero — cruzan todo el ancho, se funden
   con el glow del fuego y con el fondo, como en la referencia. */
.hero-bottom-ribbons {
  position: absolute; left: 0; right: 0; bottom: -60px; width: 100%; height: 46%; min-height: 260px;
  z-index: 0; pointer-events: none; opacity: 0.85;
  animation: rm-ribbons-drift 18s ease-in-out infinite;
}
@keyframes rm-ribbons-drift {
  0%, 100% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-1.5%) translateY(-6px); }
}
@media (max-width: 780px) { .hero-bottom-ribbons { height: 34%; min-height: 180px; opacity: 0.65; } }

@keyframes rm-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes rm-pulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes rm-glow-pulse {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.5; }
}

.hero-card-glow {
  position: absolute; inset: -14%; z-index: 0; border-radius: var(--rm-radius-lg);
  background: var(--rm-gradient-brand); filter: blur(70px); opacity: 0.28;
  animation: rm-float 8s ease-in-out infinite, rm-glow-pulse 5s ease-in-out infinite;
}

.hero-card-title { font-family: var(--rm-font-display); font-weight: 600; font-size: 0.9375rem; }
.hero-card-badge {
  font-size: 0.75rem; font-weight: 600; color: var(--rm-green); background: var(--rm-green-bg);
  padding: 4px 10px; border-radius: var(--rm-radius-full); display: inline-flex; align-items: center; gap: 7px;
}
.pulse-dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; background: currentColor;
  animation: rm-pulse 1.8s ease-out infinite;
}

.hero-float-tag {
  position: absolute; z-index: 2; background: rgba(27,27,46,0.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-sm); padding: 10px 14px; font-size: 0.8125rem; font-weight: 600;
  box-shadow: var(--rm-shadow-card); display: flex; align-items: center; gap: 8px;
  animation: rm-float 6s ease-in-out infinite;
}
.hero-float-tag--1 { top: -14px; right: 18px; color: var(--rm-magenta); animation-delay: -1s; }
@media (max-width: 780px) {
  .hero-float-tag { display: none; }
}

/* ---- Logos / trust strip ---- */
.trust-strip { padding: 32px 0; border-top: 1px solid var(--rm-border); border-bottom: 1px solid var(--rm-border); }
.trust-strip-inner { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; color: var(--rm-text-muted); font-size: 0.875rem; text-align: center; }

/* ---- Cards grid (generic) ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: minmax(0,1fr); } }

.card {
  position: relative;
  background-image:
    radial-gradient(220px circle at var(--spot-x,50%) var(--spot-y,20%), rgba(124,92,255,0.16), transparent 68%),
    linear-gradient(175deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 45%),
    linear-gradient(190deg, rgba(26,26,44,0.68), rgba(12,12,22,0.82));
  background-origin: border-box; background-clip: padding-box, border-box, border-box;
  border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-lg);
  padding: 30px;
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: 0 18px 44px -24px rgba(0,0,0,0.65);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: 0; padding: 1px; border-radius: inherit;
  background: linear-gradient(135deg, rgba(124,92,255,0.95), rgba(236,78,194,0.75), rgba(67,97,238,0.85));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.card::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; z-index: 1;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: skewX(-20deg); transition: left .75s ease; pointer-events: none;
}
.card:hover {
  transform: translateY(-7px) scale(1.015);
  box-shadow: 0 30px 64px -24px rgba(0,0,0,0.7), 0 0 54px -20px rgba(139,92,255,0.5), 0 0 30px -10px rgba(76,209,255,0.35);
}
.card:hover::before { opacity: 1; }
.card:hover::after { left: 130%; }
.card-icon {
  position: relative; z-index: 2;
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  background: linear-gradient(150deg, rgba(124,92,255,0.28), rgba(236,78,194,0.18));
  border: 1px solid rgba(255,255,255,0.16);
  margin-bottom: 20px; color: var(--rm-violet);
  box-shadow: 0 10px 24px -12px rgba(124,92,255,0.55);
  transition: transform .35s ease;
}
.card:hover .card-icon { transform: scale(1.08) rotate(-4deg); }
.card h3 { position: relative; z-index: 2; margin-bottom: 10px; }
.card p { position: relative; z-index: 2; font-size: 0.9375rem; }

/* Problem list */
.problem-card { display: flex; gap: 16px; align-items: flex-start; }
.problem-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(236,78,194,0.1); border: 1px solid rgba(236,78,194,0.25); color: var(--rm-magenta); font-weight: 700;
}

/* Solution checklist */
.checklist-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--rm-border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--rm-green-bg); color: var(--rm-green);
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.checklist-item h4 { font-family: var(--rm-font-display); font-size: 1rem; font-weight: 600; margin-bottom: 4px; color: var(--rm-text); }
.checklist-item p { font-size: 0.9375rem; margin: 0; }

/* ---- How it works (steps) ---- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; counter-reset: step; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .steps { grid-template-columns: minmax(0,1fr); } }
.step-card { position: relative; padding-top: 8px; }
.step-num {
  font-family: var(--rm-font-display); font-weight: 800; font-size: 1.75rem;
  background: var(--rm-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}
.step-card h4 { font-family: var(--rm-font-display); font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 0.875rem; }
.step-connector {
  position: absolute; top: 20px; left: -20px; width: 20px; height: 1px; background: var(--rm-border-strong);
}
@media (max-width: 960px) { .step-connector { display: none; } }

/* ---- Tools grid ---- */
.tool-card { position: relative; }
.tool-badge-soon {
  position: absolute; top: 20px; right: 20px; z-index: 2; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--rm-amber); background: rgba(245,185,66,0.12);
  border: 1px solid rgba(245,185,66,0.3); padding: 3px 9px; border-radius: var(--rm-radius-full);
}

/* ---- Differentiator ---- */
.diff-panel {
  background: linear-gradient(135deg, rgba(67,97,238,0.12), rgba(162,77,255,0.12), rgba(236,78,194,0.1));
  border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-lg);
  padding: 56px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; align-items: center;
}
@media (max-width: 860px) { .diff-panel { grid-template-columns: minmax(0,1fr); padding: 32px; } }
.diff-badge {
  display: inline-block; font-family: var(--rm-font-display); font-size: 0.8125rem; font-weight: 600;
  color: var(--rm-text-secondary); border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-full);
  padding: 8px 16px; margin-bottom: 20px;
}
.diff-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 480px) { .diff-stats { grid-template-columns: minmax(0,1fr); } }
.diff-stat { text-align: center; background: rgba(0,0,0,0.2); border: 1px solid var(--rm-border); border-radius: var(--rm-radius-md); padding: 24px 12px; }
.diff-stat b { display: block; font-family: var(--rm-font-display); font-size: 1.5rem; background: var(--rm-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.diff-stat span { font-size: 0.8125rem; color: var(--rm-text-muted); }

/* ---- Pricing ---- */
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 48px; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 28px; align-items: stretch; padding-top: 16px; }
@media (max-width: 960px) { .pricing-grid { grid-template-columns: minmax(0,1fr); max-width: 440px; margin: 0 auto; } }
@media (min-width: 640px) and (max-width: 960px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: none; } .plan-card--recommended { grid-column: 1 / -1; max-width: 440px; margin: 0 auto; } }

@keyframes rm-shine-sweep {
  0%   { top: -80%; }
  42%  { top: 130%; }
  100% { top: 130%; }
}

.plan-card {
  position: relative;
  border-radius: var(--rm-radius-lg);
  display: flex; flex-direction: column;
  background-image:
    radial-gradient(240px circle at var(--spot-x,50%) var(--spot-y,20%), rgba(76,209,255,0.14), transparent 68%),
    linear-gradient(175deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 42%),
    linear-gradient(190deg, rgba(30,30,50,0.62), rgba(14,14,25,0.78));
  background-origin: border-box;
  background-clip: padding-box, padding-box, border-box;
  border: 1px solid var(--rm-border-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 24px 60px -26px rgba(0,0,0,0.65);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.plan-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 30px 70px -26px rgba(0,0,0,0.7), 0 0 46px -16px rgba(76,209,255,0.4);
}

.plan-card--recommended {
  background-image:
    linear-gradient(175deg, rgba(255,255,255,0.03), rgba(255,255,255,0) 42%),
    linear-gradient(190deg, rgba(16,14,28,0.96), rgba(7,6,13,0.98)),
    linear-gradient(150deg, #8b5cf6 0%, #c14ee0 45%, #ec4ec2 100%);
  background-origin: border-box, border-box, border-box;
  background-clip: padding-box, padding-box, border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: 0 34px 80px -22px rgba(0,0,0,0.8), 0 0 80px -18px rgba(162,77,255,0.5), 0 0 0 1px rgba(236,78,194,0.12);
  transform: scale(1.035);
}
.plan-card--recommended:hover { transform: scale(1.035) translateY(-5px); }
@media (max-width: 960px) { .plan-card--recommended { transform: none; } .plan-card--recommended:hover { transform: translateY(-5px); } }

.plan-card-shine {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit; overflow: hidden; pointer-events: none;
}
.plan-card-shine::after {
  content: ''; position: absolute; left: -40%; right: -40%; height: 60%; top: -80%;
  background: linear-gradient(180deg, transparent 0%, rgba(236,180,255,0.28) 45%, rgba(236,180,255,0.1) 55%, transparent 100%);
  animation: rm-shine-sweep 4.2s ease-in-out infinite; animation-delay: 1.1s;
  transform: skewY(-6deg);
}

.plan-badge-recommended {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%); z-index: 3;
  background: var(--rm-gradient-brand); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 7px 18px; border-radius: var(--rm-radius-full); white-space: nowrap;
  box-shadow: 0 10px 26px -6px rgba(162,77,255,0.75);
}

.plan-card-body { position: relative; z-index: 2; display: flex; flex-direction: column; flex: 1; padding: 32px; }

.plan-name { font-family: var(--rm-font-display); font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.plan-tagline { font-size: 0.875rem; margin-bottom: 20px; min-height: 42px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.plan-price b {
  font-family: var(--rm-font-display); font-size: 2.75rem; font-weight: 800;
}
.plan-card--recommended .plan-price b {
  background: linear-gradient(135deg, #cdbbff, #ff9be3); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan-price span { color: var(--rm-text-muted); font-size: 0.9375rem; }
.plan-credits { font-size: 0.875rem; color: var(--rm-violet); font-weight: 600; margin-bottom: 24px; }
.plan-card--recommended .plan-credits { color: #ff9be3; }
.plan-cta { margin-bottom: 28px; }
.plan-card--recommended .btn-primary { box-shadow: 0 12px 34px -8px rgba(236,78,194,0.65); }
.plan-features { display: flex; flex-direction: column; gap: 13px; flex: 1; }
.plan-feature { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; }
.plan-feature .icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.plan-feature.excluded { color: var(--rm-text-muted); }
.plan-feature.excluded .icon { color: var(--rm-text-muted); }
.plan-feature:not(.excluded) .icon { color: var(--rm-green); }

/* Comparison table */
.compare-wrap { overflow-x: auto; overflow-y: hidden; border-radius: var(--rm-radius-lg); border: 1px solid var(--rm-border); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--rm-surface); }
table.compare th, table.compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--rm-border); font-size: 0.9375rem; }
table.compare thead th { font-family: var(--rm-font-display); background: var(--rm-surface-2); position: sticky; top: 0; }
table.compare td:not(:first-child), table.compare th:not(:first-child) { text-align: center; }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare .row-label { color: var(--rm-text-secondary); font-weight: 500; }
table.compare .yes { color: var(--rm-green); font-weight: 700; }
table.compare .no { color: var(--rm-text-muted); }

/* Staggered row entrance: rows fade + slide in one after another once the
   table's wrapper scrolls into view (wrapper uses the shared [data-reveal]
   mechanism from main.js). */
table.compare tbody tr {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.compare-wrap.is-visible table.compare tbody tr { opacity: 1; transform: translateY(0); }
table.compare tbody tr:nth-child(1)  { transition-delay: 0.04s; }
table.compare tbody tr:nth-child(2)  { transition-delay: 0.08s; }
table.compare tbody tr:nth-child(3)  { transition-delay: 0.12s; }
table.compare tbody tr:nth-child(4)  { transition-delay: 0.16s; }
table.compare tbody tr:nth-child(5)  { transition-delay: 0.20s; }
table.compare tbody tr:nth-child(6)  { transition-delay: 0.24s; }
table.compare tbody tr:nth-child(7)  { transition-delay: 0.28s; }
table.compare tbody tr:nth-child(8)  { transition-delay: 0.32s; }
table.compare tbody tr:nth-child(9)  { transition-delay: 0.36s; }
table.compare tbody tr:nth-child(10) { transition-delay: 0.40s; }
table.compare tbody tr:nth-child(11) { transition-delay: 0.44s; }
table.compare tbody tr:nth-child(12) { transition-delay: 0.48s; }
table.compare tbody tr:nth-child(13) { transition-delay: 0.52s; }
table.compare tbody tr:nth-child(14) { transition-delay: 0.56s; }

/* On narrow screens, drop the horizontal-scroll data table in favor of
   stacked cards — one per row, one line per plan — so the page only ever
   scrolls vertically. */
@media (max-width: 700px) {
  .compare-wrap { overflow-x: visible; border: none; border-radius: 0; }
  table.compare { min-width: 0; width: 100%; display: block; background: none; border-spacing: 0 12px; border-collapse: separate; }
  table.compare thead { display: none; }
  table.compare tbody { display: block; }
  table.compare tr {
    display: block;
    background: linear-gradient(190deg, rgba(26,26,44,0.7), rgba(12,12,22,0.85));
    border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-md);
    padding: 6px 18px; margin-bottom: 14px;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  table.compare td { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: right; padding: 12px 0; border-bottom: 1px solid var(--rm-border); }
  table.compare tr td:last-child { border-bottom: none; }
  table.compare td.row-label {
    display: block; text-align: left; color: var(--rm-text); font-weight: 700;
    padding-top: 16px; padding-bottom: 8px; border-bottom: none;
  }
  table.compare td[data-label]::before {
    content: attr(data-label); color: var(--rm-text-muted); font-weight: 500; font-size: 0.8125rem; text-align: left;
  }
}

/* ---- Resultados (triple marquee) ---- */
@keyframes rm-marquee-rtl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rm-marquee-ltr { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.results-marquee {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.results-row { overflow: hidden; width: 100%; }
.results-track {
  display: flex; gap: 16px; width: max-content;
  animation: rm-marquee-rtl 46s linear infinite;
}
.results-row--ltr .results-track { animation-name: rm-marquee-ltr; }
.results-row:hover .results-track { animation-play-state: paused; }

.results-card {
  position: relative; flex-shrink: 0; width: 150px; aspect-ratio: 9 / 16;
  border-radius: var(--rm-radius-md); overflow: hidden; border: 1px solid var(--rm-border-strong);
  box-shadow: 0 14px 30px -18px rgba(0,0,0,0.6);
}
.results-card img { width: 100%; height: 100%; object-fit: cover; }
.results-card-views {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(10,10,18,0.72); backdrop-filter: blur(6px);
  color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 4px 9px; border-radius: var(--rm-radius-full);
}
.results-card--placeholder { display: flex; align-items: center; justify-content: center; }
.results-card--placeholder::before {
  content: ''; position: absolute; inset: 0; opacity: 0.9;
}
.results-tone-0::before { background: linear-gradient(160deg, #4361ee, #7c5cff); }
.results-tone-1::before { background: linear-gradient(160deg, #7c5cff, #ec4ec2); }
.results-tone-2::before { background: linear-gradient(160deg, #a24dff, #4361ee); }
.results-tone-3::before { background: linear-gradient(160deg, #ec4ec2, #a24dff); }
.results-tone-4::before { background: linear-gradient(160deg, #4361ee, #ec4ec2); }
.results-tone-5::before { background: linear-gradient(160deg, #7c5cff, #4361ee); }

@media (max-width: 640px) {
  .results-card { width: 118px; }
}

/* ---- FAQ ---- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--rm-surface); border: 1px solid var(--rm-border); border-radius: var(--rm-radius-md); overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: none; border: none; text-align: left;
  font-family: var(--rm-font-display); font-weight: 600; font-size: 1rem; color: var(--rm-text);
}
.faq-icon { flex-shrink: 0; width: 24px; height: 24px; transition: transform .2s ease; color: var(--rm-violet); }
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-answer-inner { padding: 0 24px 22px; font-size: 0.9375rem; color: var(--rm-text-secondary); }

/* ---- Final CTA ---- */
.cta-final {
  border-radius: var(--rm-radius-lg); padding: 72px 40px; text-align: center; position: relative; overflow: hidden;
  background-image:
    linear-gradient(175deg, rgba(255,255,255,0.07), rgba(255,255,255,0) 45%),
    linear-gradient(190deg, rgba(26,26,44,0.55), rgba(12,12,22,0.72));
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.08);
}
.cta-final::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(45% 65% at 12% 10%, rgba(76,209,255,0.16), transparent 60%),
    radial-gradient(50% 70% at 88% 100%, rgba(236,78,194,0.16), transparent 60%),
    radial-gradient(40% 60% at 90% 0%, rgba(139,92,255,0.14), transparent 60%);
}
.cta-final h2 { color: #fff; margin-bottom: 14px; position: relative; }
.cta-final p { color: var(--rm-text-secondary); max-width: 560px; margin: 0 auto 32px; position: relative; }
.cta-final .btn-primary {
  background: rgba(255,255,255,0.08); color: #fff; position: relative;
  font-weight: 700; padding: 16px 34px;
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 18px 44px -18px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.25), 0 0 34px -14px rgba(139,92,255,0.6);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, background .2s ease, border-color .2s ease;
}
.cta-final .btn-primary::after { content: '\2192'; display: inline-block; transition: transform .25s ease; }
.cta-final .btn-primary:hover {
  background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.55); transform: translateY(-3px);
  box-shadow: 0 26px 56px -18px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.5), 0 0 40px -10px rgba(255,255,255,0.5);
}
.cta-final .btn-primary:hover::after { transform: translateX(4px); }
.cta-final .btn-primary:active { transform: translateY(-1px) scale(0.98); }
.cta-final .btn-secondary { border-color: rgba(255,255,255,0.5); color: #fff; position: relative; }
.cta-final .btn-secondary:hover { background: rgba(255,255,255,0.15); }
.cta-final-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--rm-border); padding: 64px 0 32px; background: var(--rm-bg-alt); }
.footer-grid { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3, minmax(0,1fr)); gap: 32px; margin-bottom: 48px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: minmax(0,1fr); } }
.footer-brand p { font-size: 0.875rem; max-width: 280px; margin-top: 14px; }
.footer-col h5 { font-family: var(--rm-font-display); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rm-text-muted); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9375rem; color: var(--rm-text-secondary); }
.footer-col a:hover { color: var(--rm-text); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding-top: 28px; border-top: 1px solid var(--rm-border); font-size: 0.8125rem; color: var(--rm-text-muted);
}
.footer-bottom a { color: var(--rm-text-muted); }
.footer-bottom a:hover { color: var(--rm-text-secondary); }

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 200; max-width: 560px; margin: 0 auto;
  background: var(--rm-surface-elevated); border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-md);
  padding: 20px 22px; box-shadow: var(--rm-shadow-card);
  display: flex; flex-direction: column; gap: 14px;
  transform: translateY(140%); transition: transform .3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { font-size: 0.875rem; margin: 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Social proof toast ---- */
.social-proof-toast {
  position: fixed; top: 92px; left: 20px; z-index: 90; max-width: 320px;
  display: flex; align-items: center; gap: 12px;
  background: var(--rm-surface-elevated); border: 1px solid rgba(47,212,128,0.35); border-radius: var(--rm-radius-md);
  padding: 14px 18px; box-shadow: var(--rm-shadow-card);
  opacity: 0; pointer-events: none; transform: translateX(-24px) scale(0.96);
  transition: opacity .45s cubic-bezier(.34,1.56,.64,1), transform .45s cubic-bezier(.34,1.56,.64,1);
}
.social-proof-toast.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.social-proof-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--rm-green-bg); color: var(--rm-green); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 0.9375rem;
}
.social-proof-text { font-size: 0.875rem; color: var(--rm-text); line-height: 1.4; }
.social-proof-text strong { color: var(--rm-green); }
@media (max-width: 480px) {
  .social-proof-toast { left: 12px; right: 12px; max-width: none; top: 84px; }
}

/* ---- Mobile collapsible sections ----
   On phones, a heading marked [data-collapse-toggle] becomes a tappable bar
   that shows/hides its matching [data-collapse-body]. Desktop/tablet are
   untouched — the chevron only exists inside this media query. */
.mobile-collapse-chevron { display: none; }
@media (max-width: 780px) {
  [data-collapse-toggle] {
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--rm-surface); border: 1px solid var(--rm-border); border-radius: var(--rm-radius-md);
    padding: 16px 20px; margin-bottom: 0 !important; user-select: none;
  }
  .mobile-collapse-chevron {
    display: inline-flex; flex-shrink: 0; transition: transform .25s ease;
  }
  [data-collapse-toggle].is-collapsed .mobile-collapse-chevron { transform: rotate(-90deg); }
  [data-collapse-body] { margin-top: 20px; }
  [data-collapse-body].is-collapsed { display: none; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-note { font-size: 0.8125rem; color: var(--rm-text-muted); }
.badge-live { display:inline-flex; align-items:center; gap:6px; font-size:0.75rem; color:var(--rm-green); }
.badge-live .dot { width:6px; height:6px; border-radius:50%; background:var(--rm-green); }

/* ---- Page header (interior pages) ---- */
.page-hero { padding: 64px 0 24px; text-align: center; }
.page-hero .eyebrow { margin-left: auto; margin-right: auto; }
.page-hero p { max-width: 620px; margin: 16px auto 0; font-size: 1.0625rem; }

/* ---- Reveal on scroll ---- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="scale"] { transform: translateY(12px) scale(0.96); }
[data-reveal="scale"].is-visible { transform: translateY(0) scale(1); }
@media (max-width: 720px) {
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(16px); }
  [data-reveal="left"].is-visible, [data-reveal="right"].is-visible { transform: translateY(0); }
}

/* ==========================================================================
   Hero — Cohete 3D, propulsión, continuidad de energía, coverflow y
   gráfica de retención. Todo animado con transform/opacity para 60fps,
   con fallback estático en prefers-reduced-motion.
   ========================================================================== */

/* ---- Continuidad: la energía del hero se filtra hacia la sección siguiente ---- */
.hero { overflow: visible; }
.hero-trail {
  position: absolute; left: 50%; bottom: -280px; width: min(1100px, 130vw); height: 380px;
  transform: translateX(-50%); z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(76,209,255,0.16), transparent 70%),
    radial-gradient(38% 55% at 38% 10%, rgba(124,92,255,0.14), transparent 70%),
    radial-gradient(38% 55% at 64% 12%, rgba(236,78,194,0.12), transparent 70%);
  filter: blur(6px);
  animation: rm-trail-breathe 7s ease-in-out infinite;
}
@keyframes rm-trail-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* ==========================================================================
   Hero scene — reconstrucción 1:1 (grid porcentual) de la referencia visual:
   un gran panel de vidrio central, cohete protagonista atravesándolo de
   arriba a abajo, título+análisis a la izquierda, gráfica a la derecha,
   Viral Score y carrusel sobresaliendo del borde superior.
   Mobile-first: por defecto todo se apila en flujo normal; a partir de
   1080px cada pieza se posiciona de forma absoluta dentro de .hero-scene
   usando las proporciones medidas sobre la referencia.
   ========================================================================== */
.hero-scene {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 28px;
}

/* Gran panel de vidrio: la superficie principal de la composición */
.hero-main-panel {
  display: none; /* solo existe como capa de fondo en la composición desktop */
}

.hero-title {
  font-family: var(--rm-font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.85rem, 1.5rem + 1vw, 2.5rem); line-height: 1.08; margin-bottom: 16px;
  white-space: nowrap;
}
.hero-title .text-gradient { font-style: normal; }
.hero-subtitle { font-size: 1.0625rem; max-width: 380px; margin-bottom: 26px; line-height: 1.45; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-trust { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--rm-text-muted); }
.hero-trust span.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rm-green); display: inline-block; }

.hero-headline-block { position: relative; z-index: 3; }

/* ---- Viral Score: badge flotante pequeño ---- */
.hero-viral-score {
  position: relative; z-index: 4; align-self: flex-start;
  display: flex; align-items: center; gap: 12px;
  background: rgba(16,16,28,0.5); border: 1px solid var(--rm-border-strong);
  border-radius: var(--rm-radius-full); padding: 10px 18px 10px 16px;
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--rm-shadow-card);
  animation: rm-float 7.5s ease-in-out infinite; animation-delay: -1.5s;
}
.hero-viral-score-label { font-size: 0.6875rem; color: var(--rm-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-viral-score-num { font-family: var(--rm-font-display); font-size: 1.375rem; font-weight: 800; }
.hero-viral-score-num span { font-size: 0.8125rem; font-weight: 500; color: var(--rm-text-muted); }
.hero-viral-score-row { display: flex; align-items: center; gap: 10px; }
.hero-viral-bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.hero-viral-bars span {
  width: 4px; height: var(--h); border-radius: 2px; transform-origin: bottom;
  background: linear-gradient(180deg, #c9b3ff, #8b5cf6 60%, #ec4ec2);
  animation: rm-bar-grow-sm 0.6s cubic-bezier(.22,1,.36,1) both;
}
.hero-viral-bars span:nth-child(1) { animation-delay: .2s; }
.hero-viral-bars span:nth-child(2) { animation-delay: .28s; }
.hero-viral-bars span:nth-child(3) { animation-delay: .36s; }
.hero-viral-bars span:nth-child(4) { animation-delay: .44s; }
.hero-viral-bars span:nth-child(5) { animation-delay: .52s; }
@keyframes rm-bar-grow-sm { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---- Cohete: asset PNG oficial, protagonista central ---- */
.hero-rocket-stage {
  position: relative; z-index: 2; width: 260px; height: 420px; margin: 0 auto;
  pointer-events: none;
}
.hero-rocket-png {
  position: relative; z-index: 3; display: block; width: 100%; height: auto; margin: 0 auto;
  filter: drop-shadow(0 30px 50px rgba(20,10,60,0.55)) drop-shadow(0 0 40px rgba(124,92,255,0.25));
  animation: rm-rocket-float 6s ease-in-out infinite;
}
@keyframes rm-rocket-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---- Giro sutil del cohete sobre su propio eje + brillo que lo recorre ----
   Dos wrappers anidados porque un rotateY en 3D necesita "perspective" en el
   padre y "preserve-3d" en el hijo que rota; así el <img> conserva su propia
   animación de flotación (translateY) sin pelearse con estas otras. */
.hero-rocket-turn {
  position: relative; z-index: 3; width: 100%; height: 100%;
  perspective: 1800px;
  animation: rm-rocket-tilt 10s ease-in-out infinite;
}
.hero-rocket-spin {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: rm-rocket-spin 5s ease-in-out infinite;
}
@keyframes rm-rocket-tilt {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2.5deg); }
  75% { transform: rotate(-2.5deg); }
}
@keyframes rm-rocket-spin {
  0%, 100% { transform: rotateY(0deg); }
  25% { transform: rotateY(16deg); }
  75% { transform: rotateY(-16deg); }
}

/* Canvas de la llama: se posiciona/dimensiona por JS, anclado a la base
   real de la imagen (hero-rocket-flame.js calcula el punto exacto). */
.hero-flame-canvas {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; display: block;
}

/* Glow ambiental detrás de la llama: sutil, ilumina el entorno inmediato
   sin lavar el panel ni tapar el resto de la composición. */
.hero-flame-glow-ambient {
  position: absolute; left: 50%; bottom: 4%; width: 160%; height: 42%; transform: translateX(-50%);
  z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 60% at 50% 65%, rgba(124,197,255,0.16), transparent 100%),
    radial-gradient(ellipse 34% 50% at 50% 72%, rgba(139,92,255,0.12), transparent 100%),
    radial-gradient(ellipse 46% 45% at 50% 82%, rgba(236,78,194,0.08), transparent 100%);
  filter: blur(20px);
  animation: rm-ambient-pulse 3.4s ease-in-out infinite;
}
@keyframes rm-ambient-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (max-width: 560px) {
  .hero { padding: 32px 0 20px; }
  .hero-scene { gap: 14px; }
  .hero-title { margin-bottom: 8px; }
  .hero-subtitle { margin-bottom: 0; }
  .hero-rocket-stage { width: 160px; height: 235px; }
}

/* ---- Coverflow: resultados virales flotando ---- */
.hero-coverflow {
  position: relative; z-index: 4; width: 100%; max-width: 400px; align-self: flex-end;
  background: rgba(16,16,28,0.5); border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-md);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--rm-shadow-card); padding: 14px 12px 16px;
  animation: rm-float 9s ease-in-out infinite; animation-delay: -4s;
}
.hero-coverflow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hero-coverflow-head span { font-family: var(--rm-font-display); font-size: 0.75rem; font-weight: 600; color: var(--rm-text-secondary); }
.hero-coverflow-nav { display: flex; gap: 6px; }
.cf-btn {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--rm-border-strong);
  background: rgba(255,255,255,0.04); color: var(--rm-text-secondary); font-size: 0.8125rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s ease, color .15s ease;
}
.cf-btn:hover { background: rgba(255,255,255,0.1); color: var(--rm-text); }

.hero-coverflow-track {
  position: relative; height: 156px; perspective: 700px;
  touch-action: pan-y;
}
.cf-card {
  position: absolute; top: 0; left: 50%; width: 88px; aspect-ratio: 9/16; border-radius: 12px;
  overflow: hidden; border: 1px solid var(--rm-border-strong); box-shadow: 0 14px 30px -16px rgba(0,0,0,0.75);
  transition: transform 0.5s cubic-bezier(.22,1,.36,1), opacity 0.5s ease, filter 0.5s ease;
  will-change: transform, opacity;
}
.cf-card--active { border-color: rgba(255,255,255,0.35); box-shadow: 0 18px 40px -14px rgba(139,92,255,0.55); }
.cf-card img { width: 100%; height: 100%; object-fit: cover; }
.cf-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5) 100%);
}
.cf-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1;
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.92); color: #14142a;
  display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; opacity: 0.92;
}
.cf-card--active .cf-play { background: linear-gradient(135deg, #cdbbff, #ff9be3); }

@media (max-width: 560px) {
  .hero-coverflow-track { height: 138px; }
  .cf-card { width: 80px; }
}

/* ---- Panel de análisis del video (nested card dentro del panel principal) ---- */
.hero-analysis-panel {
  position: relative; z-index: 5;
  background-image:
    linear-gradient(175deg, rgba(255,255,255,0.06), rgba(255,255,255,0) 45%),
    linear-gradient(190deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-lg);
  padding: 22px; max-width: 400px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px -24px rgba(0,0,0,0.6);
  animation: rm-float 8s ease-in-out infinite; animation-delay: -2.5s;
}
.hero-analysis-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-analysis-score { font-size: 0.9375rem; color: var(--rm-text-secondary); margin-bottom: 14px; }
.hero-analysis-score b {
  font-family: var(--rm-font-display); font-weight: 800; font-size: 1.25rem; color: var(--rm-text);
  background: var(--rm-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-analysis-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hero-analysis-chips span {
  font-size: 0.6875rem; font-weight: 600; color: var(--rm-text-secondary);
  background: rgba(255,255,255,0.05); border: 1px solid var(--rm-border-strong);
  border-radius: var(--rm-radius-full); padding: 4px 10px; white-space: nowrap;
}
.hero-analysis-desc { font-size: 0.8125rem; line-height: 1.45; margin-bottom: 18px; }
.hero-card-cta { margin-top: 4px; }

/* ---- Gráfica de retención: integrada en el panel, sin card propia ---- */
.hero-retention-panel { position: relative; z-index: 3; }

.hero-retention { position: relative; }
.retention-svg { width: 100%; height: 220px; display: block; overflow: visible; }
.retention-gridline { stroke: rgba(255,255,255,0.06); stroke-width: 1; }
.retention-area { opacity: 0; transition: opacity 0.6s ease 0.5s; }
.retention-line {
  transition: stroke-dashoffset 1.2s cubic-bezier(.22,1,.36,1), opacity 0.45s ease;
  filter: drop-shadow(0 0 10px rgba(184,158,255,0.55)) drop-shadow(0 0 22px rgba(236,78,194,0.3));
}
/* Al rotar entre variantes (mala/regular/buena retención) la línea se
   TRANSFORMA punto a punto (ver retention-chart.js) — no hay corte. Solo
   la esfera se oculta mientras dura el morph, para no verla "teletransportarse"
   a la nueva posición; reaparece ya recorriendo el path nuevo. */
.hero-retention.is-morphing .retention-dot {
  opacity: 0 !important; transition: opacity 0.35s ease;
}
.hero-retention.is-drawn .retention-area { opacity: 1; }
.retention-dashline {
  stroke: rgba(255,255,255,0.3); stroke-width: 1.5; stroke-dasharray: 4 5;
  opacity: 0; transition: opacity 0.6s ease 0.9s;
}
.hero-retention.is-drawn .retention-dashline { opacity: 1; }
.retention-dot {
  position: absolute; top: 0; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #fff; opacity: 0;
  box-shadow: 0 0 0 3px rgba(184,158,255,0.28), 0 0 18px 5px rgba(184,158,255,0.7);
  transition: opacity 0.3s ease;
}
.hero-retention.is-drawn .retention-dot { opacity: 1; }
.retention-tooltip {
  position: absolute; z-index: 4; top: 0; left: 0; transform: translate(-50%, -130%);
  background: rgba(20,20,36,0.92); border: 1px solid var(--rm-border-strong); border-radius: 8px;
  padding: 6px 10px; font-size: 0.6875rem; font-weight: 600; color: var(--rm-text);
  white-space: nowrap; box-shadow: var(--rm-shadow-card); opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.retention-tooltip span { display: block; font-weight: 500; color: var(--rm-text-muted); font-size: 0.625rem; margin-top: 1px; }
.retention-tooltip.is-visible { opacity: 1; transform: translate(-50%, -145%); }

/* ---- Punto destacado fijo: "Retención 78% / Punto de caída" ---- */
.retention-featured {
  /* left/top se fijan por JS según la curva activa (varía entre variantes) */
  position: absolute; z-index: 4;
  opacity: 0; transition: opacity 0.6s ease 1.1s, left 0.5s ease, top 0.5s ease;
}
.hero-retention.is-drawn .retention-featured { opacity: 1; }
.retention-featured-dot {
  position: absolute; top: 0; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(236,78,194,0.25), 0 0 20px 6px rgba(236,78,194,0.55);
  animation: rm-pulse-ring 2.2s ease-out infinite;
}
@keyframes rm-pulse-ring {
  0%, 70%, 100% { box-shadow: 0 0 0 4px rgba(236,78,194,0.25), 0 0 20px 6px rgba(236,78,194,0.55); }
  35% { box-shadow: 0 0 0 8px rgba(236,78,194,0.12), 0 0 26px 8px rgba(236,78,194,0.65); }
}
.retention-featured-tip {
  position: absolute; top: -14px; left: 16px;
  background: rgba(20,20,36,0.92); border: 1px solid var(--rm-border-strong); border-radius: 10px;
  padding: 8px 12px; font-size: 0.75rem; font-weight: 700; color: var(--rm-text);
  white-space: nowrap; box-shadow: var(--rm-shadow-card);
}
.retention-featured-tip span { display: block; font-weight: 500; color: var(--rm-text-muted); font-size: 0.6875rem; margin-top: 2px; }

/* ---- Callout: "La retención baja en este punto" ---- */
.hero-retention-callout {
  position: relative; z-index: 5; margin-top: 16px;
  background: rgba(16,16,28,0.55); border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-md);
  padding: 14px 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--rm-shadow-card); max-width: 300px;
}
.hero-retention-callout p { font-family: var(--rm-font-display); font-weight: 700; font-size: 0.9375rem; margin: 0 0 6px; color: var(--rm-text); }
.hero-retention-callout span { font-size: 0.75rem; color: var(--rm-text-muted); line-height: 1.4; }

/* ---- "Análisis en progreso": módulo flotante inferior ---- */
.hero-progress-panel {
  position: relative; z-index: 5; align-self: center; width: 100%; max-width: 420px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(16,16,28,0.55); border: 1px solid var(--rm-border-strong); border-radius: var(--rm-radius-full);
  padding: 10px 20px 10px 10px;
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--rm-shadow-card);
}
.hero-progress-thumb {
  position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--rm-border-strong);
}
.hero-progress-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-progress-thumb .cf-play { width: 18px; height: 18px; font-size: 0.5rem; }
.hero-progress-info { flex: 1; min-width: 0; }
.hero-progress-info span { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 6px; }
.hero-progress-bar { position: relative; height: 4px; border-radius: var(--rm-radius-full); background: rgba(255,255,255,0.1); overflow: hidden; }
.hero-progress-fill {
  position: absolute; inset: 0; width: 62%; border-radius: inherit;
  background: var(--rm-gradient-brand);
  animation: rm-progress-crawl 3.4s ease-in-out infinite;
}
@keyframes rm-progress-crawl {
  0%, 100% { width: 46%; }
  50% { width: 74%; }
}

/* ==========================================================================
   Composición de escena en desktop — reconstrucción por coordenadas
   porcentuales medidas sobre la referencia (grid: % del ancho/alto de
   .hero-scene). El cohete atraviesa el gran panel de arriba a abajo;
   Viral Score y el carrusel sobresalen de su borde superior; "Análisis en
   progreso" cruza su borde inferior. Ver comentarios inline para el % que
   representa cada regla.
   ========================================================================== */
@media (min-width: 1080px) {
  .hero { padding: 48px 0 24px; }
  .hero-scene {
    position: relative; display: block; min-height: 900px;
  }

  /* Gran panel de vidrio: x 4%–96%, y 18%–86% */
  .hero-main-panel {
    display: block; position: absolute; z-index: 1;
    left: 4%; right: 4%; top: 18%; bottom: 14%;
    background:
      radial-gradient(38% 55% at 6% 8%, rgba(76,209,255,0.14), transparent 65%),
      radial-gradient(42% 60% at 96% 96%, rgba(236,78,194,0.14), transparent 65%),
      radial-gradient(50% 70% at 50% 0%, rgba(139,92,255,0.10), transparent 60%),
      radial-gradient(56% 46% at 50% 100%, rgba(124,197,255,0.22), rgba(139,92,255,0.14) 45%, transparent 72%),
      linear-gradient(175deg, rgba(255,255,255,0.07), rgba(255,255,255,0) 40%),
      rgba(12,12,22,0.4);
    border: 1px solid rgba(255,255,255,0.14); border-radius: 32px;
    backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow:
      0 50px 120px -30px rgba(0,0,0,0.7),
      0 0 90px -30px rgba(76,209,255,0.25),
      0 0 110px -30px rgba(236,78,194,0.2),
      inset 0 1px 0 rgba(255,255,255,0.09),
      inset 0 0 60px rgba(139,92,255,0.06);
  }

  /* Viral Score: x 0%–?, y 0% (sobresale del borde superior del panel) */
  .hero-viral-score { position: absolute; z-index: 4; top: 0; left: 0; }

  /* Título: dentro del panel, columna izquierda, y ~24% */
  .hero-headline-block { position: absolute; z-index: 3; top: 25%; left: 7%; width: 29%; min-width: 300px; }

  /* Cohete: centrado, la nariz sobresale por encima del panel, la llama por debajo */
  .hero-rocket-stage {
    position: absolute; z-index: 2; top: 4%; left: 50%; transform: translateX(-50%); margin: 0; height: 78%;
  }

  /* Carrusel: x 66%–96%, y 0%–27% (sobresale del borde superior del panel) */
  .hero-coverflow { position: absolute; z-index: 4; top: 0; right: 0; width: 36%; max-width: 460px; align-self: auto; }

  /* Panel de análisis: x 7%–33%, y 42%–80% */
  .hero-analysis-panel { position: absolute; z-index: 5; left: 7%; top: 47%; width: 330px; max-width: 28%; }

  /* Gráfica de retención: x 62%–93%, y 38%–70% */
  .hero-retention-panel { position: absolute; z-index: 3; right: 6%; top: 36%; width: 400px; max-width: 35%; }

  /* Análisis en progreso: cruza el borde inferior del panel, y ~84% */
  .hero-progress-panel { position: absolute; z-index: 7; left: 50%; top: 84%; transform: translateX(-50%); width: 400px; max-width: 34%; align-self: auto; }
}
@media (min-width: 1080px) and (max-width: 1360px) {
  .hero-analysis-panel { padding: 18px; max-width: 30%; }
  .hero-retention-panel { width: 300px; }
}

/* ---- Tablet (iPad y similares, 640–1079px) ----
   En este rango seguimos con el layout apilado (mobile-first), pero el
   contenedor es mucho más ancho que un teléfono: si dejamos las tarjetas
   con su max-width de teléfono y su align-self a un lado, quedan flotando
   con huecos enormes al otro lado. Centramos la composición en una columna
   cómoda para que se vea intencional, no rota. */
@media (min-width: 640px) and (max-width: 1079px) {
  .hero-scene { max-width: 540px; margin: 0 auto; }
  .hero-viral-score { align-self: center; }
  .hero-coverflow { align-self: center; max-width: 100%; }
  .hero-headline-block { text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-analysis-panel, .hero-retention-callout { max-width: 100%; }
}

/* ---- Reduced motion: neutraliza parallax, flotación y autoplay ---- */
@media (prefers-reduced-motion: reduce) {
  .hero-rocket-png { animation: none !important; transform: none !important; }
  .hero-rocket-turn, .hero-rocket-spin { animation: none !important; transform: none !important; }
  .hero-flame-glow-ambient, .hero-trail, .hero-coverflow,
  .hero-viral-score, .hero-analysis-panel, .hero-card-glow, .hero-progress-fill { animation: none !important; }
  .hero-progress-fill { width: 58% !important; }
}
