/* Landing (index.html): se suma a styles.css y mantiene su identidad oscura (variables :root de styles.css).
   Contraste AA: el texto pequeño usa --text-secondary (6:1 sobre el fondo); no se usa el gris más tenue de la paleta. */

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 20000;
    background: var(--primary); color: #04121a; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Foco visible en toda la landing */
.landing-body :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
.btn-cta:focus-visible, .btn-cta-sec:focus-visible { outline-offset: 4px; border-radius: 50px; }

.landing-body main { display: block; }

/* ── Hero ── */
.hero-section { min-height: auto; padding: 90px 5% 70px; text-align: left; justify-content: center; }
.hero-grid {
    position: relative; z-index: 1; width: 100%; max-width: 1180px;
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center;
}
.hero-content { max-width: none; }
.hero-content h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.hero-content .hero-lead { margin: 0 0 32px; max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 22px; }
.btn-cta-sec {
    display: inline-block; padding: 15px 30px; border-radius: 50px; font-weight: 600; font-size: 1rem; text-decoration: none;
    color: var(--accent); border: 1px solid var(--accent); transition: background 0.2s;
}
.btn-cta-sec:hover { background: var(--accent-dim); }
.hero-content .hero-oferta { margin: 0 0 8px; font-size: 0.95rem; color: var(--text-secondary); max-width: 520px; }

.hero-stats { list-style: none; justify-content: flex-start; flex-wrap: wrap; gap: 28px 40px; margin-top: 40px; padding-top: 28px; }
.hero-content .hero-stat p { color: var(--text-secondary); margin: 0; font-size: 0.72rem; max-width: none; }
.hero-stat span { font-size: 1.5rem; }

/* Gráfico de ejemplo */
.hero-grafico {
    position: relative; margin: 0; padding: 22px 18px 14px; background: var(--bg-card);
    border: 1px solid var(--border-bright); border-radius: var(--radius-lg); box-shadow: var(--shadow-card), var(--shadow-glow);
}
.etiqueta-ejemplo {
    position: absolute; top: 14px; right: 14px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--warning); border: 1px solid rgba(255, 181, 71, 0.45); background: var(--warning-dim);
    padding: 2px 10px; border-radius: 50px;
}
.grafico-svg { display: block; width: 100%; height: auto; }
.g-texto { fill: var(--text-secondary); font: 500 12px var(--font-body); }
.g-alerta { fill: #ff7a92; font-weight: 600; }
.g-cero { stroke: var(--border-bright); stroke-width: 1.5; stroke-dasharray: 3 4; }
.g-area-neg { fill: rgba(255, 77, 109, 0.16); }
.g-linea { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: g-dibujar 2.6s ease-out 0.3s forwards; }
.g-linea-ok { stroke: var(--primary); }
.g-linea-neg { stroke: var(--danger); }
.g-punto { fill: var(--danger); stroke: var(--bg-card); stroke-width: 2; opacity: 0; animation: g-aparecer 0.4s ease 2.2s forwards; }
.g-alerta, .g-texto.g-alerta { opacity: 0; animation: g-aparecer 0.4s ease 2.3s forwards; }
@keyframes g-dibujar { to { stroke-dashoffset: 0; } }
@keyframes g-aparecer { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .g-linea { animation: none; stroke-dashoffset: 0; }
    .g-punto, .g-alerta { animation: none; opacity: 1; }
    .logo::before { animation: none; }
}
.hero-grafico figcaption { margin-top: 10px; color: var(--text-secondary); font-size: 0.8rem; text-align: center; }

/* ── Íconos SVG de las tarjetas ── */
.icono { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 16px;
    border-radius: var(--radius-md); background: var(--primary-dim); color: var(--primary); }
.feature-icon .icono { width: 26px; height: 26px; }

/* ── Cómo empezar ── */
.pasos { list-style: none; counter-reset: paso; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1000px; margin: 28px auto 0; text-align: left; }
.pasos li { counter-increment: paso; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.pasos li::before { content: counter(paso); font-family: var(--font-mono); font-weight: 600; color: var(--primary); font-size: 1.3rem; }
.pasos strong { font-size: 1.02rem; }
.pasos span { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }
.pasos a { color: var(--primary); }

/* ── Planes ── */
.seccion-planes .seccion-sub { margin-bottom: 10px; }
.plan-card { position: relative; }
.plan-etiqueta { margin: 0; }
.plan-precio { margin: 0 0 8px; }
.plan-equivalente { color: var(--accent); font-family: var(--font-mono); font-size: 0.95rem; margin-bottom: 8px; }
.ahorro-detalle { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.5; margin-bottom: 22px; }
.ahorro-detalle strong { color: var(--accent); }
.plan-card:not(.destacado) .plan-precio { margin-bottom: 26px; }
.plan-lista li { display: flex; gap: 10px; line-height: 1.5; padding: 4px 0; }
.plan-lista li::before { content: "✓" / ""; color: var(--accent); font-weight: 700; flex: none; }
.btn-plan { display: block; text-align: center; text-decoration: none; }
a.btn-calcular { color: #000; }
.garantias { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center; margin-top: 30px; color: var(--text-secondary); font-size: 0.92rem; }
.garantias li { display: inline-flex; align-items: center; gap: 8px; }
.garantias .icono { color: var(--accent); width: 20px; height: 20px; }
.garantia-negocio { margin-top: 12px; color: var(--text-secondary); }

/* ── Testimonios (ocultos hasta tener casos reales) ── */
.testimonios { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 1000px; margin: 24px auto 0; text-align: left; }
.testimonio { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.testimonio blockquote p { margin: 0 0 14px; line-height: 1.6; }
.testimonio-autor { color: var(--text-secondary); font-size: 0.85rem; }

/* ── Preguntas frecuentes ── */
.faq { padding-bottom: 20px; }
.faq-lista { max-width: 780px; margin: 24px auto 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.faq details[open] { border-color: var(--border-bright); }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-radius: var(--radius-md); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.faq details a { color: var(--primary); }

/* ── Pie de página ── */
.pie-pagina { flex-direction: column; align-items: center; gap: 14px; margin-top: 70px; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: center; }
.pie-pagina a { color: var(--text-secondary); }
.pie-redes { list-style: none; display: flex; gap: 16px; }
.pie-nota { color: var(--text-secondary); font-size: 0.8rem; text-align: center; max-width: 560px; }

/* ── Barra inferior móvil con el CTA ── */
.barra-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(10, 13, 20, 0.96); border-top: 1px solid var(--border-bright);
}
.barra-cta .btn-cta { display: block; text-align: center; padding: 14px 20px; }
@media (max-width: 768px) {
    .barra-cta:not([hidden]) { display: block; }
    body.con-barra-cta { padding-bottom: 84px; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .hero-section { padding-top: 56px; }
    .pasos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .features { padding: 40px 5%; }
    .planes { flex-direction: column; flex-wrap: nowrap; gap: 28px; }          /* planes apilados */
    .plan-card { flex: none; width: 100%; min-width: 0; padding: 32px 22px; }
    .plan-precio { font-size: 2.1rem; }
    .hero-stats { gap: 20px 28px; }
    .hero-ctas .btn-cta, .hero-ctas .btn-cta-sec { flex: 1 1 100%; text-align: center; }
    .nav-links { gap: 4px; }
    .nav-links > a:not(.btn-login) { display: none; }
}

/* ── Páginas legales (privacidad) ── */
.legal { max-width: 820px; margin: 36px auto 0; padding: 0 5%; }
.legal .card { padding: 36px; }
.legal h1 { font-family: var(--font-display); color: var(--primary); font-weight: 400; margin-bottom: 6px; }
.legal-fecha { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 18px; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 10px; border: 0; padding: 0; }
.legal p, .legal li { color: var(--text-secondary); line-height: 1.75; }
.legal ul { padding-left: 22px; margin: 8px 0 12px; }
.legal a { color: var(--primary); }
.legal strong { color: var(--text-primary); }
.legal code { font-family: var(--font-mono); color: var(--text-primary); }

/* Tablas: ocupan solo el ancho de su tarjeta. styles.css fuerza min-width, no-wrap y alineación a la derecha en las
   celdas (pensado para las tablas numéricas del simulador), por eso aquí se anulan explícitamente. */
.tabla-legal { margin: 8px 0 14px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.legal table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 0.9rem; }
.legal th, .legal td { text-align: left; white-space: normal; overflow-wrap: anywhere; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text-secondary); font-weight: 400; }
.legal tbody tr:last-child > * { border-bottom: 0; }
.legal thead th { color: var(--text-primary); font-weight: 600; background: var(--bg-surface); }
.legal thead th:first-child { width: 28%; }   /* con table-layout: fixed el ancho lo define la fila de encabezado */
.legal th, .legal td { font-family: var(--font-body); }
.legal thead th { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }
.legal tbody th { color: var(--text-primary); font-weight: 600; }
.legal tbody td:first-child { color: var(--text-secondary); font-weight: 400; }   /* anula la regla global de la primera columna */

@media (max-width: 640px) {
    .legal { padding: 0 4%; }
    .legal .card { padding: 22px 18px; }
    /* en pantallas angostas cada fila pasa a ser un bloque: título arriba y detalle debajo */
    .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; width: 100%; }
    .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .legal tbody tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
    .legal tbody tr:last-child { border-bottom: 0; }
    .legal tbody th, .legal tbody td { border: 0; padding: 3px 14px; width: 100%; }
}
