/* ---------- Global Styles ---------- */
:root {
    --bg: #070A14;
    --bg2: #0B1020;
    --text: #E9EDFF;
    --muted: rgba(233, 237, 255, .72);
    --muted2: rgba(233, 237, 255, .56);
    --border: rgba(255, 255, 255, .12);
    --panel: rgba(255, 255, 255, .05);
    --panel2: rgba(255, 255, 255, .07);

    --accent: rgba(255, 255, 255, .92);
    --accentText: #0B1020;

    --radius: 18px;
    --radius2: 24px;

    --shadow: 0 18px 60px rgba(0, 0, 0, .36);
    --shadow2: 0 12px 34px rgba(0, 0, 0, .26);

    --max: 1120px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(900px 560px at 12% 8%, rgba(255, 255, 255, .10), transparent 55%),
    radial-gradient(900px 560px at 88% 0%, rgba(255, 255, 255, .08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 55%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

.muted {
    color: var(--muted);
}

.muted2 {
    color: var(--muted2);
}

.small {
    font-size: 13px;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- Reusable UI ---------- */
.card {
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
    user-select: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .04);
}

.btn:active {
    transform: translateY(0);
    opacity: .92;
}

.btn.primary {
    background: var(--accent);
    color: var(--accentText);
    border-color: transparent;
}

.btn.ghost {
    background: rgba(255, 255, 255, .06);
}

.btn.full {
    width: 100%;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    font-weight: 900;
    font-size: 13px;
}

.pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

.tag {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .2px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.tag.solid {
    background: rgba(255, 255, 255, .92);
    color: var(--accentText);
    border-color: transparent;
}

.badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 1000;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    white-space: nowrap;
}

.badge.high {
    background: rgba(255, 255, 255, .92);
    color: var(--accentText);
    border-color: transparent;
}

.badge.med {
    background: rgba(255, 255, 255, .10);
    color: var(--text);
}

.badge.low {
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
}

.section {
    padding: 44px 0;
}

section {
    scroll-margin-top: 84px;
}

.head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 14px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--muted2);
    font-weight: 1000;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .14em;
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 4.3vw, 56px);
    line-height: 1.03;
    letter-spacing: -.9px;
}

h2 {
    margin: 0;
    font-size: clamp(24px, 2.7vw, 36px);
    letter-spacing: -.5px;
}

h3 {
    margin: 0 0 8px;
    letter-spacing: -.2px;
}

p {
    margin: 0;
}

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(7, 10, 20, .55);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 1000;
    letter-spacing: .2px;
}

.brand .mark {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .12);
}

.links {
    display: flex;
    gap: 18px;
    color: var(--muted);
    font-weight: 800;
    font-size: 14px;
}

.links a:hover {
    color: var(--text);
}

.actions {
    display: flex;
    gap: 10px;
}

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 28px;
}

.heroGrid {
    display: grid;
    grid-template-columns:1.08fr .92fr;
    gap: 22px;
    align-items: center;
}

.lead {
    margin-top: 6px;
    font-size: 16px;
    line-height: 1.65;
    max-width: 62ch;
    color: var(--muted);
}

.heroCtas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.kpis {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}

.kpi {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    padding: 12px;
}

.kpi strong {
    display: block;
    font-weight: 1000;
    letter-spacing: .2px;
    margin-bottom: 4px;
}

.kpi span {
    color: var(--muted);
    font-weight: 800;
    font-size: 13px;
}

.delivery {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .04));
    box-shadow: var(--shadow2);
}

.file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .18);
    color: var(--muted);
    font-weight: 1000;
    font-size: 12px;
    letter-spacing: .2px;
    white-space: nowrap;
}

.delivery svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 2;
    fill: none;
}

/* ---------- Preview ---------- */
.preview {
    border-radius: var(--radius2);
    border: 1px solid rgba(255, 255, 255, .12);
    background: var(--panel2);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.previewTop, .previewBottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.previewBottom {
    border-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
}

.previewBody {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 6px 0;
}

.finding {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
}

.finding p {
    margin-top: 4px;
}

.score {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .10);
    font-weight: 1000;
}

/* ---------- Grids ---------- */
.grid3 {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 12px;
}

.grid2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px;
}

/* ---------- Demo ---------- */
.demo {
    display: grid;
    grid-template-columns:360px 1fr;
    gap: 14px;
    align-items: start;
    margin-top: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.label {
    color: var(--muted);
    font-weight: 900;
    font-size: 13px;
}

.input {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .18);
    color: var(--text);
    outline: none;
}

.input:focus {
    border-color: rgba(255, 255, 255, .22);
}

.softDivider {
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 14px 0;
}

.toggle {
    position: relative;
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .18);
    margin-top: 8px;
}

.toggle input {
    display: none;
}

.toggle label {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 10px 8px;
    border-radius: 14px;
    font-weight: 1000;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.toggle .slider {
    position: absolute;
    inset: 6px auto 6px 6px;
    width: calc(50% - 6px);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
    transition: transform .18s ease;
}

#modePd:checked ~ label[for="modePd"],
#modeSh:checked ~ label[for="modeSh"] {
    color: var(--accentText);
}

#modeSh:checked ~ .slider {
    transform: translateX(100%);
}

.scan {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .14);
    padding: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    overflow: hidden;
    position: relative;
}

.bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .92);
    transform: translateX(-100%);
    animation: scanBar 5.2s linear infinite;
}

@keyframes scanBar {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0%);
    }
}

.steps {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 900;
    font-size: 13px;
}

.steps span {
    opacity: .55;
    animation: stepPulse 5.2s linear infinite;
}

.steps span:nth-child(2) {
    animation-delay: .6s;
}

.steps span:nth-child(3) {
    animation-delay: 1.2s;
}

.steps span:nth-child(4) {
    animation-delay: 1.8s;
}

.steps span:nth-child(5) {
    animation-delay: 2.4s;
}

@keyframes stepPulse {
    0% {
        opacity: .55;
    }
    12% {
        opacity: 1;
    }
    24% {
        opacity: .55;
    }
    100% {
        opacity: .55;
    }
}

.view {
    display: none;
}

.view.pd {
    display: block;
}

@supports selector(.demo:has(#modeSh:checked)) {
    .demo:has(#modeSh:checked) .view.pd {
        display: none;
    }

    .demo:has(#modeSh:checked) .view.sh {
        display: block;
    }
}

@supports not selector(.demo:has(#modeSh:checked)) {
    .view {
        display: block;
    }

    .view.sh {
        margin-top: 12px;
    }
}

.subcard {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    padding: 14px;
}

.subhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.rows {
    display: grid;
    gap: 8px;
}

.ctaRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.callout {
    margin-top: 12px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
}

.fine {
    margin-top: 10px;
    color: var(--muted2);
    font-size: 12px;
    line-height: 1.45;
}

/* ---------- How it works ---------- */
.howGrid {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 12px;
}

.howStep {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--radius2);
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    box-shadow: var(--shadow2);
}

.howStep .num {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    color: var(--accentText);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
}

/* ---------- Pricing ---------- */
.prices {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 12px;
    align-items: stretch;
}

.plan {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: var(--radius2);
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    box-shadow: var(--shadow2);
}

.plan.featured {
    border-color: rgba(255, 255, 255, .20);
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
    box-shadow: var(--shadow);
}

.ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--accentText);
    font-weight: 1000;
    font-size: 12px;
}

.priceLine {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 10px 0 10px;
}

.amount {
    font-size: 38px;
    font-weight: 1100;
    letter-spacing: -.8px;
    line-height: 1;
}

.per {
    color: var(--muted);
    font-weight: 900;
}

.list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 10px;
}

.list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    font-weight: 850;
    line-height: 1.35;
}

.check {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-top: 1px;
}

.check svg {
    width: 14px;
    height: 14px;
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 2.4;
    fill: none;
}

.plan.featured .check {
    background: rgba(255, 255, 255, .92);
    border-color: transparent;
}

.plan.featured .check svg {
    stroke: rgba(0, 0, 0, .85);
}

/* ---------- Payment ---------- */
.payment {
    padding: 44px 0;
}

.paymentCard {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius2);
    padding: 20px;
    box-shadow: var(--shadow2);
    backdrop-filter: blur(10px);
}

.paySteps {
    margin-top: 16px;
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payStep {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .18);
}

.payNum {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
    font-weight: 800;
    flex: 0 0 auto;
}

.paymentNote {
    margin-top: 12px;
    font-size: 13px;
    opacity: .78;
    line-height: 1.6;
}

/* ---------- Contact ---------- */
.cta {
    padding: 44px 0 58px;
}

.ctaBox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding: 18px;
}

.contactGrid {
    display: grid;
    grid-template-columns:1.2fr .8fr;
    gap: 12px;
    margin-top: 12px;
}

.form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.row2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px;
}

.row3 {
    display: grid;
    grid-template-columns:1fr 1fr 1fr;
    gap: 10px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.disclaimer {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .14);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

details {
    border-radius: var(--radius2);
    border: 1px solid rgba(255, 255, 255, .10);
    background: var(--panel);
    box-shadow: var(--shadow2);
    padding: 14px 16px;
}

summary {
    cursor: pointer;
    font-weight: 1000;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

summary::-webkit-details-marker {
    display: none;
}

.plus {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 1000;
    flex: 0 0 auto;
}

details[open] .plus {
    background: rgba(255, 255, 255, .92);
    color: var(--accentText);
    border-color: transparent;
}

details p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 20px 0 34px;
    color: var(--muted2);
}

.footerRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .links {
        display: none;
    }

    .heroGrid {
        grid-template-columns:1fr;
    }

    .kpis {
        grid-template-columns:1fr;
    }

    .grid3 {
        grid-template-columns:1fr;
    }

    .demo {
        grid-template-columns:1fr;
    }

    .grid2 {
        grid-template-columns:1fr;
    }

    .howGrid {
        grid-template-columns:1fr;
    }

    .prices {
        grid-template-columns:1fr;
    }

    .faq {
        grid-template-columns:1fr;
    }

    .contactGrid {
        grid-template-columns:1fr;
    }

    .row2 {
        grid-template-columns:1fr;
    }

    .row3 {
        grid-template-columns:1fr;
    }

    .paySteps {
        grid-template-columns:1fr;
    }
}

/* Mejor padding en móvil (menos margen lateral) */
@media (max-width: 520px) {
    .container {
        width: min(var(--max), calc(100% - 24px));
    }

    #langSelect {
        display: none;
    }

    .nav {
        backdrop-filter: none;
        background: rgba(7, 10, 20, .85);
    }

    .payment-card, .paymentCard {
        backdrop-filter: none;
    }

    body {
        background: rgba(7, 10, 20, .85);
    }

    /* NAV: que se reorganice en 2 filas y no desborde */
    .nav .inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 0;
    }

    .brand {
        flex: 1 1 auto;
    }

    .actions {
        flex: 1 1 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .actions .btn {
        flex: 1 1 auto;
        padding: 11px 12px;
    }

    /* HERO: tipografías + espaciado */
    .hero {
        padding: 40px 0 18px;
    }

    h1 {
        font-size: 32px;
        line-height: 1.08;
        letter-spacing: -0.6px;
        word-break: break-word;
    }

    /* Quita el salto de línea forzado en móvil (tu <br/>) */
    .hero h1 br {
        display: none;
    }

    .lead {
        font-size: 15px;
        line-height: 1.65;
    }

    /* CTAs en móvil: full width para que no “bailen” */
    .heroCtas {
        gap: 10px;
    }

    .heroCtas .btn {
        width: 100%;
        justify-content: center;
    }

    /* Delivery: en columna y bien alineado */
    .delivery {
        flex-direction: column;
        align-items: stretch;
    }

    .delivery .file {
        width: fit-content;
    }

    /* KPIs en columna */
    .kpis {
        grid-template-columns: 1fr;
    }

    /* DEMO: el aside y el main en 1 columna ya lo tienes, pero ajustamos paddings */
    .card {
        padding: 14px;
    }

    /* Formularios: tu row3 en móvil debe ser 1 columna (por si se queda colada) */
    .row3 {
        grid-template-columns: 1fr;
    }

    /* Títulos de planes: evita que “Custom” o precios rompan */
    .amount {
        font-size: 34px;
    }
}

/* Extra por si algún elemento está creando scroll horizontal */
@media (max-width: 520px) {
    .previewBody, .rows, .row {
        overflow-wrap: anywhere;
    }

    .mono {
        overflow-wrap: anywhere;
    }
}
