/* AMI · página principal */
body { overflow-x: hidden; }

/* Tejido de fondo: trama sutil + halos de luz */
.fabric {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(232, 192, 125, 0.16), transparent 65%),
    radial-gradient(700px 500px at 88% 38%, rgba(114, 224, 207, 0.05), transparent 70%),
    radial-gradient(800px 600px at 8% 78%, rgba(201, 143, 69, 0.07), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    var(--bg);
}

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.85), rgba(9, 9, 11, 0));
  backdrop-filter: blur(6px);
}
.nav { gap: 16px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 6px 28px; margin: 0 auto 0 clamp(18px, 4vw, 52px); font-size: 13.5px; font-weight: 600; color: var(--muted); }
.nav-links a { padding: 8px 0; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--gold); }

/* Menú desplegable (móvil y tableta) */
.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.burger { width: 14px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: min(280px, calc(100vw - 32px));
  display: grid; gap: 2px; padding: 8px; border-radius: 18px;
  background: #15151b; border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.95);
  animation: rise 0.25s var(--ease) both;
}
.nav-panel a { padding: 13px 14px; border-radius: 11px; font-size: 15px; font-weight: 600; }
.nav-panel a:hover, .nav-panel a[aria-current] { background: rgba(255, 255, 255, 0.06); color: var(--gold); }
.nav-panel a[data-login] { margin-top: 6px; border-top: 1px dashed var(--line-2); border-radius: 0 0 11px 11px; padding-top: 16px; }
.nav-panel .nav-panel-cta { margin-top: 4px; text-align: center; color: #1b1307; background: linear-gradient(135deg, #f8dfa8, var(--gold) 45%, var(--gold-2)); }
.nav-panel .nav-panel-cta:hover { color: #1b1307; background: linear-gradient(135deg, #fbe7b9, #efcb8d 45%, #d39a51); }
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
}
@media (max-width: 400px) {
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav-actions { gap: 7px; }
  .nav-actions .btn-sm { padding: 0 11px; }
}

/* Hero */
.hero { max-width: 1120px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) clamp(20px, 5vw, 56px) 40px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
  padding: 8px 16px; border-radius: 999px; border: 1px dashed rgba(232, 192, 125, 0.4); background: var(--gold-soft);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(232, 192, 125, 0.7); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(232, 192, 125, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 192, 125, 0); } }

.hero h1 {
  font-size: clamp(54px, 10.5vw, 148px); line-height: 0.92; letter-spacing: -0.025em;
  margin: 28px 0 26px;
  background: linear-gradient(180deg, #fffaf0 30%, #b9b2a4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 em, .section-head h2 em, .step h3 em {
  font-style: italic;
  background: linear-gradient(120deg, #f8dfa8, var(--gold) 45%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}
.lead { font-size: clamp(17px, 2.1vw, 22px); color: #cfc9bd; max-width: 620px; margin: 0 auto; }
.chip-inline {
  font-size: 0.86em; color: var(--gold); padding: 3px 10px; border-radius: 8px;
  background: var(--gold-soft); border: 1px solid rgba(232, 192, 125, 0.28);
}
.lead-note { font-size: 14.5px; color: var(--muted); max-width: 660px; margin: 14px auto 0; }
.lead-note .mono { color: var(--gold); font-size: 0.92em; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* Escenario del bordado */
.stage {
  position: relative; margin: clamp(48px, 8vh, 84px) auto 0; max-width: 980px;
  border-radius: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(26, 26, 33, 0.9), rgba(14, 14, 18, 0.92));
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.95), 0 0 120px -30px rgba(232, 192, 125, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.stage::before { /* pespunte perimetral */
  content: ''; position: absolute; inset: 9px; border-radius: 18px; border: 1px dashed rgba(232, 192, 125, 0.16); pointer-events: none; z-index: 2;
}
.stage-bar, .stage-foot { display: flex; align-items: center; gap: 12px; padding: 18px 28px; font-size: 12px; color: var(--muted); }
.stage-bar { justify-content: space-between; border-bottom: 1px solid var(--line); }
.stage-dots { display: flex; gap: 6px; }
.stage-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.stage-file { color: var(--teal); transition: color 0.5s; }
.stage-file.out { color: var(--gold); }
.stage-count { min-width: 120px; text-align: right; }
.stage-count span { color: var(--text); }
.stage-canvas {
  position: relative; aspect-ratio: 820 / 400;
  background:
    radial-gradient(60% 80% at 50% 50%, rgba(232, 192, 125, 0.06), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 5px);
}
.stage-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-foot { justify-content: center; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fmt { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line-2); letter-spacing: 0.08em; }
.fmt.in { color: var(--teal); border-color: rgba(114, 224, 207, 0.25); background: rgba(114, 224, 207, 0.05); }
.fmt.out { color: var(--gold); border-color: rgba(232, 192, 125, 0.4); background: var(--gold-soft); font-weight: 500; }
.fmt-arrow { width: 54px; height: 1px; margin: 0 6px; background-image: linear-gradient(90deg, var(--muted) 50%, transparent 50%); background-size: 8px 1px; position: relative; animation: march 0.8s linear infinite; }
.fmt-arrow::after { content: ''; position: absolute; right: -1px; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); transform: rotate(45deg); }
@keyframes march { to { background-position: 8px 0; } }

/* Pasos */
.steps {
  max-width: 1120px; margin: clamp(64px, 12vh, 130px) auto 0; padding: 0 clamp(20px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
}
.step { display: flex; align-items: baseline; gap: 14px; }
.step-n { font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.step h3 { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.1; }
.step-line { flex: 1; min-width: 30px; height: 1px; background-image: linear-gradient(90deg, rgba(232, 192, 125, 0.5) 55%, transparent 55%); background-size: 10px 1px; }

/* Bonos */
.plans { max-width: 1120px; margin: 0 auto; padding: clamp(80px, 14vh, 150px) clamp(20px, 5vw, 56px) 110px; scroll-margin-top: 20px; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(40px, 6vw, 76px); line-height: 1; margin: 22px 0 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 34px 30px 30px; border-radius: 24px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(26, 26, 33, 0.85), rgba(15, 15, 19, 0.9));
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.45s;
}
.plan:hover { transform: translateY(-8px); border-color: rgba(232, 192, 125, 0.45); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 70px -24px rgba(232, 192, 125, 0.35); }
.plan.hot {
  border-color: rgba(232, 192, 125, 0.55);
  background: radial-gradient(120% 70% at 50% 0%, rgba(232, 192, 125, 0.16), transparent 62%), linear-gradient(180deg, rgba(30, 27, 24, 0.95), rgba(15, 15, 19, 0.95));
  box-shadow: 0 30px 80px -30px rgba(232, 192, 125, 0.35);
}
.plan.hot::before { content: ''; position: absolute; inset: 8px; border-radius: 17px; border: 1px dashed rgba(232, 192, 125, 0.32); pointer-events: none; }
.plan-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); min-height: 17px; }
.plan-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin-top: 8px; }
.plan-price { font-family: var(--serif); font-size: 84px; line-height: 1; letter-spacing: -0.03em; margin: 22px 0 10px; }
.plan-desc { color: var(--muted); font-size: 14.5px; min-height: 44px; }
.plan-features { list-style: none; padding: 22px 0 0; margin: 22px 0 28px; border-top: 1px dashed var(--line-2); display: grid; gap: 11px; flex: 1; align-content: start; }
.plan-features li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; color: #d8d2c6; }
.plan-features li::before { content: ''; flex: none; width: 14px; height: 8px; margin-top: 5px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg) scale(0.8); }
.plan-skeleton { height: 420px; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(100deg, rgba(255,255,255,.02) 40%, rgba(255,255,255,.05) 50%, rgba(255,255,255,.02) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.footer {
  max-width: 1120px; margin: 0 auto; padding: 34px clamp(20px, 5vw, 56px) 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); font-size: 13px;
}
/* Barra de menú del pie */
.footer-links {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 26px;
  margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line-2);
  font-weight: 600; color: var(--muted);
}
.footer-links a { padding: 8px 0; transition: color 0.2s; }
.footer-links a:hover, .footer-links a[aria-current] { color: var(--gold); }
@media (max-width: 960px) {
  .footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
  .footer-links a { padding: 11px 0; }
}
@media (max-width: 520px) {
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tarifa junto a los bonos */
.fare {
  max-width: 900px; margin: 30px auto 0; padding: 22px 26px 20px; border-radius: 20px;
  border: 1px dashed rgba(232, 192, 125, 0.4); background: var(--gold-soft);
  display: grid; gap: 14px; justify-items: center; font-size: 14.5px;
}
.fare-lead { color: #d8d2c6; }
.fare-row { display: flex; align-items: center; justify-content: center; gap: 12px 24px; }
.fare-item { display: flex; align-items: baseline; gap: 12px; text-align: left; color: #d8d2c6; }
.fare-item b { font-size: 42px; line-height: 1; font-weight: 400; color: var(--gold); white-space: nowrap; }
.fare-item strong { color: var(--text); font-weight: 700; }
.fare-plus { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--muted); }
@media (max-width: 860px) {
  .fare { padding: 20px 18px 18px; }
  .fare-row { flex-direction: column; gap: 8px; }
  .fare-item { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
}

/* Tablas de las páginas de texto (ejemplos de precio, bonos) */
.legal-table { margin: 4px 0 18px; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.legal-table th, .legal-table td { padding: 11px 16px; text-align: left; white-space: nowrap; }
.legal-table th { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.legal-table td { border-top: 1px solid var(--line); }
.legal-table td:nth-child(4) { white-space: normal; }
.legal-table td b { color: var(--gold); white-space: nowrap; }
@media (max-width: 560px) {
  .legal-table table { font-size: 13.5px; }
  .legal-table th, .legal-table td { padding: 10px 9px; }
  .legal-table th, .legal-table td:nth-child(4) { white-space: normal; }
  .legal-table th { font-size: 10.5px; letter-spacing: 0.04em; }
}

/* Textos legales */
/* Ancho completo: cabecera, índice fijo a la izquierda y apartados en tarjetas a dos columnas */
.legal { max-width: 1480px; margin: 0 auto; padding: clamp(28px, 5vh, 60px) clamp(20px, 5vw, 56px) 80px; }
.legal-head { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px dashed var(--line-2); }
.legal h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; }
.legal-date { margin-top: 14px; font-size: 12px; color: var(--dim); letter-spacing: 0.04em; }
.legal-intro { margin-top: 22px; max-width: 900px; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; color: #d8d2c6; }
.legal-intro p + p { margin-top: 12px; }
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: start; }
.legal-toc {
  position: sticky; top: 92px; max-height: calc(100vh - 116px); overflow-y: auto;
  display: grid; gap: 2px; padding: 18px 14px; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-size: 13.5px;
}
.legal-toc-title { padding: 0 10px 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.legal-toc a { padding: 8px 10px; border-radius: 9px; color: var(--muted); line-height: 1.35; transition: color 0.2s, background 0.2s; }
.legal-toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.legal-body {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  color: #d8d2c6; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere;
}
.legal-sec {
  padding: 26px 28px 22px; border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(26, 26, 33, 0.7), rgba(15, 15, 19, 0.75));
  scroll-margin-top: 92px;
}
.legal-sec.wide { grid-column: 1 / -1; }
.legal-sec:target { border-color: rgba(232, 192, 125, 0.5); }
.legal-body h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.2; color: var(--text); }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.legal-body li::marker { color: var(--gold); }
.legal-sec > :last-child { margin-bottom: 4px; }
/* en un apartado ancho, dos tablas o tabla y texto se reparten en columnas */
.legal-sec.wide > p, .legal-sec.wide > ul { max-width: 980px; }
@media (min-width: 1181px) {
  /* apartado con tabla: el texto a la izquierda y la tabla a la derecha */
  .legal-sec.wide:has(.legal-table) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-content: start; }
  .legal-sec.wide:has(.legal-table) > * { grid-column: 1; }
  .legal-sec.wide:has(.legal-table) > h2 { grid-column: 1 / -1; }
  .legal-sec.wide:has(.legal-table) > .legal-table { grid-column: 2; grid-row: 2 / span 12; align-self: start; margin: 0; }
}
@media (max-width: 1180px) {
  .legal-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .legal-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 14px; }
  .legal-toc-title { flex-basis: 100%; padding: 0 2px 4px; }
  .legal-toc a { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; }
  .legal-sec { padding: 22px 18px 18px; }
}
.check-legal { align-items: flex-start; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.check-legal input { flex: none; margin-top: 2px; }

.footer .brand { font-size: 20px; }
.footer .brand-mark { width: 22px; height: 22px; }
.footer .brand-mark::after { width: 6px; height: 6px; }

/* Entrada escalonada */
.reveal { animation: reveal 1s var(--ease) both; }
.d1 { animation-delay: 0.08s; } .d2 { animation-delay: 0.18s; } .d3 { animation-delay: 0.28s; } .d4 { animation-delay: 0.42s; }
@keyframes reveal { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

/* Modal de acceso */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); margin-bottom: 26px; }
.auth-tabs button { height: 38px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: background 0.25s, color 0.25s; }
.auth-tabs button.on { background: var(--text); color: #121212; }
.plan-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.plan-picker label { position: relative; cursor: pointer; }
.plan-picker input { position: absolute; opacity: 0; inset: 0; }
.plan-picker .opt { display: grid; gap: 2px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); text-align: center; transition: border-color 0.2s, background 0.2s; }
.plan-picker .opt b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.1; }
.plan-picker .opt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-picker input:checked + .opt { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(232, 192, 125, 0.12); }
.plan-picker input:focus-visible + .opt { outline: 2px solid var(--gold); outline-offset: 2px; }
.forgot-link { justify-self: center; font-size: 13.5px; }
.secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.secure::before { content: ''; width: 9px; height: 8px; border-radius: 2px; background: var(--dim); box-shadow: 0 -5px 0 -2.5px var(--bg), 0 -5px 0 -1px var(--dim); }

@media (max-width: 760px) {
  .steps { flex-direction: column; align-items: flex-start; gap: 14px; }
  .step-line { display: none; }
  .stage-bar, .stage-foot { padding: 14px 18px; }
  .stage-dots { display: none; }
  .plan-price { font-size: 68px; }
  .fmt-arrow { width: 28px; }
}
.modal .auth-tabs { margin-top: 18px; }

/* pasos y formatos editables desde ADMIN: pueden ser más de tres */
.steps { flex-wrap: wrap; row-gap: 18px; }
