:root {
  --bg-deep: #0b1320;
  --bg-card: rgba(224, 242, 254, 0.86);
  --bg-card-elevated: rgba(235, 247, 248, 0.98);
  --emerald-primary: #059669;
  --emerald-dark: #064e3b;
  --emerald-aaa: #047857;
  --emerald-border: #10b981;
  --mint-bg: #d1fae5;
  --mint-calm: #065f46;
  --amber-aaa: #b45309;
  --amber-bg: #fef08a;
  --red-aaa: #be123c;
  --text-pure: #000000;
  --text-high: #0f172a;
  --text-muted: #334155;
  --text-soft: #64748b;
  --border-subtle: rgba(16, 185, 129, 0.45);
  --border-glass: rgba(15, 23, 42, 0.14);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  min-height: 100%;
  background-color: #e0f2fe;
  color: var(--text-high);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-lock {
  overflow: hidden;
}

.hidden, .cookie-banner-hidden {
  display: none !important;
}

/* CAPA 1: Video / Poster de Fondo (Cielos abiertos y nubes en desplazamiento) */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #bae6fd url('../fallback.webp') center center / cover no-repeat;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  filter: brightness(1.06) contrast(1.05) saturate(1.18);
}

.bg-video.video-suspended {
  display: none;
}

/* CAPA 2: Vignette Oscura Radial Suave */
.vignette-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 38%,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.18) 60%,
    rgba(15, 23, 42, 0.40) 100%
  );
}

/* CAPA 3: Contenedor Principal Tunnel Landing */
.tunnel-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem 2rem;
  max-width: 1020px;
  margin: 0 auto;
  gap: 1.5rem;
}

/* Barra Superior Micro-Switch Inter-Dominio (Igual a Captura Creador) */
.tunnel-header {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mesias-nav-switch {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border-glass);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.switch-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.switch-pill:hover, .switch-pill:focus-visible {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-pure);
}

/* Píldora Inactiva Auditoría en Creador: Crema suave con borde cálido */
.switch-pill:not(.active-creator) {
  background: #fef9c3;
  border-color: #fde047;
  color: #713f12;
}

/* Píldora Activa Creador: Verde menta con borde esmeralda */
.switch-pill.active-creator {
  background: #dcfce7;
  border-color: var(--emerald-border);
  color: #064e3b;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.switch-divider {
  color: rgba(15, 23, 42, 0.25);
  font-size: 0.85rem;
  user-select: none;
}

.dot-amber, .dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-amber {
  background-color: #d97706;
  box-shadow: 0 0 6px #f59e0b;
}

.dot-green {
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.btn-faq-top {
  background: rgba(255, 255, 255, 0.88);
  color: #047857;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 0.48rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.btn-faq-top:hover, .btn-faq-top:focus-visible {
  background: #dcfce7;
  border-color: var(--emerald-border);
  color: #064e3b;
}

/* Tarjeta Flotante Transaccional (Frosted Glass Claro) */
.frosted-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 35px rgba(56, 189, 248, 0.15);
}

@media (max-width: 768px) {
  .frosted-card {
    padding: 1.5rem 1.15rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-pure);
  margin-bottom: 0.65rem;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 780px;
  margin-bottom: 1.5rem;
}

/* Barra de Navegación de 5 Pasos Secuenciales */
.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
  .wizard-stepper {
    grid-template-columns: 1fr;
  }
}

.step-tab {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.step-tab:hover {
  border-color: var(--emerald-border);
  color: var(--text-pure);
  background: #ffffff;
}

.step-tab.is-active {
  background: #bbf7d0;
  border-color: var(--emerald-border);
  color: #064e3b;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #047857;
  text-transform: uppercase;
  font-weight: 700;
}

.step-name {
  font-size: 0.82rem;
  font-weight: 700;
}

/* Paneles de Paso */
.wizard-step-card {
  background: rgba(240, 248, 255, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.35rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.wizard-step-card.active-step-focus {
  border-color: var(--emerald-border);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.12);
}

.step-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.step-card-title {
  font-family: var(--font-serif);
  font-size: 1.38rem;
  font-weight: 700;
  color: var(--text-pure);
}

.step-card-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #047857;
  background: #d1fae5;
  padding: 0.24rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #86efac;
  font-weight: 600;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

@media (max-width: 720px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.field-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-label span:first-child {
  color: #064e3b;
}

.field-hint {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
}

.input-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.subdomain-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  background: #d1fae5;
  border: 1px solid #86efac;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #065f46;
  font-weight: 600;
  white-space: nowrap;
}

.tunnel-input, .tunnel-textarea {
  width: 100%;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid rgba(15, 23, 42, 0.18);
  border-radius: 10px;
  padding: 0.82rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tunnel-input.mono-input, .tunnel-textarea.mono-input {
  font-family: var(--font-mono);
}

.tunnel-input::placeholder, .tunnel-textarea::placeholder {
  color: #94a3b8;
}

.tunnel-input:focus, .tunnel-textarea:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.tunnel-input.input-valid {
  border-color: #059669;
}

.tunnel-input.input-invalid {
  border-color: var(--red-aaa);
}

.btn-action-emerald {
  background: #a7f3d0;
  color: #064e3b;
  border: 1px solid var(--emerald-border);
  border-radius: 10px;
  padding: 0.8rem 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-action-emerald:hover:not(:disabled) {
  background: #10b981;
  color: #ffffff;
}

.btn-action-emerald:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-feedback {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  min-height: 1.15rem;
}

.status-feedback.text-ok {
  color: #047857;
  font-weight: 600;
}

.status-feedback.text-err {
  color: var(--red-aaa);
  font-weight: 600;
}

.status-feedback.text-warn {
  color: #b45309;
  font-weight: 600;
}

/* Paso 2: Minuta Estructurada — Webmail Composer */
.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem;
  background: #f1f5f9;
  border: 1.5px solid rgba(15, 23, 42, 0.18);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.toolbar-btn {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  background: #d1fae5;
  border-color: var(--emerald-border);
  color: #064e3b;
}

.composer-textarea {
  border-radius: 0 0 10px 10px;
  min-height: 190px;
  resize: vertical;
  line-height: 1.6;
}

/* Paso 3: Drag & Drop + Generador IA (fal.ai) */
.dropzone-box {
  border: 2px dashed rgba(16, 185, 129, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 1.35rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #0f172a;
}

.dropzone-box:hover, .dropzone-box.drag-over {
  background: #dcfce7;
  border-color: var(--emerald-border);
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.media-thumb {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #064e3b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.media-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 0.3rem;
}

/* Paso 5: Desglose Financiero, Upsell y Clickwrap */
.pricing-ledger {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.92rem;
}

.ledger-row.discount-row {
  color: #047857;
  font-weight: 700;
}

.ledger-upsell-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem;
  margin: 0.6rem 0;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.86rem;
  color: #064e3b;
}

.ledger-upsell-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: #059669;
  flex-shrink: 0;
}

.ledger-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #047857;
}

.clickwrap-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(15, 23, 42, 0.15);
  border-radius: 12px;
  padding: 1.15rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.clickwrap-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.clickwrap-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #047857;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.84rem;
  color: #1e293b;
  cursor: pointer;
}

.check-item:last-child {
  border-bottom: none;
}

.check-item input[type="checkbox"] {
  margin-top: 0.22rem;
  width: 18px;
  height: 18px;
  accent-color: #059669;
  flex-shrink: 0;
  cursor: pointer;
}

.btn-pay-creator {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 1px solid #34d399;
  border-radius: 12px;
  padding: 1.05rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-pay-creator:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.45);
}

.btn-pay-creator:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.alert-banner {
  margin: 0.85rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #ffe4e6;
  border: 1px solid #fda4af;
  color: #9f1239;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Pie de Pantalla Tunnel */
.tunnel-footer {
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: #475569;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.footer-link-btn {
  background: none;
  border: none;
  color: #047857;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.footer-link-btn:hover {
  color: #064e3b;
}

.footer-legal-meta {
  font-size: 0.75rem;
  color: #64748b;
}

/* Modales (Fondo Claro, Borde Verde, Títulos Verdes Oscuros como Imagen 2) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 740px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-card-elevated);
  border: 2px solid var(--emerald-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-pure);
}

.modal-close {
  background: #e2e8f0;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #cbd5e1;
}

.legal-scroll-container {
  max-height: 390px;
  overflow-y: scroll;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem;
  font-size: 0.88rem;
  color: #1e293b;
  line-height: 1.65;
}

.legal-scroll-container h4 {
  color: #0f570c;
  margin: 1.1rem 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 700;
}

.legal-scroll-container p {
  margin-bottom: 0.75rem;
}

.faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1.1rem;
}

.faq-item summary {
  font-weight: 700;
  color: #065f46;
  cursor: pointer;
  font-size: 0.95rem;
}

.faq-item p, .faq-item ol {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: #1e293b;
  padding-left: 1rem;
}

/* CMP Banner Compacto */
.cmp-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 860px;
  margin: 0 auto;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid var(--emerald-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

.cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.btn-cmp {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cmp.btn-cmp-primary {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}
