/* ==========================================================================
   PÁGINAS SECUNDARIAS · legal, gracias y pago cancelado
   Se apoya en los tokens y componentes de style.css
   ========================================================================== */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 172px 0 76px;
    background: var(--grad-deep);
    color: #fff;
}

.page-hero::before {
    content: "";
    position: absolute;
    top: -180px;
    right: -140px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 107, 242, .38) 0%, transparent 68%);
    pointer-events: none;
}

.page-hero::after {
    content: "";
    position: absolute;
    left: -160px;
    bottom: -220px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, .3) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 820px;
    margin: 14px 0 18px;
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    color: #fff;
}

.page-hero h1 em {
    color: var(--purple-300);
    font-style: italic;
}

.page-hero p {
    max-width: 660px;
    color: rgba(255, 255, 255, .74);
    font-size: 1rem;
    line-height: 1.8;
}

.page-hero .eyebrow {
    color: var(--purple-300);
}

.page-body {
    padding: 68px 0 100px;
    background: var(--grad-soft);
}

.body-narrow {
    max-width: 820px;
    margin: 0 auto;
}

/* --- LEGAL --- */
.legal-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 52px;
    align-items: start;
}

.legal-toc {
    position: sticky;
    top: 120px;
    padding: 24px;
    border: 1px solid var(--grey-200);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow-soft);
}

.legal-toc h2 {
    margin-bottom: 12px;
    color: var(--grey-500);
    font-family: var(--font-body);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.legal-toc a {
    display: block;
    padding: 6px 0;
    color: var(--grey-700);
    font-size: .78rem;
    line-height: 1.45;
    transition: color .2s ease;
}

.legal-toc a:hover {
    color: var(--purple-600);
}

.legal-content {
    padding: clamp(26px, 4vw, 52px);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-large);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.legal-meta {
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--grey-200);
    color: var(--grey-700);
    font-size: .74rem;
    line-height: 1.7;
}

.legal-content h2 {
    margin: 40px 0 14px;
    padding-top: 28px;
    border-top: 1px solid var(--grey-200);
    font-size: clamp(1.22rem, 2.2vw, 1.55rem);
    scroll-margin-top: 130px;
}

.legal-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-content h3 {
    margin: 24px 0 8px;
    font-size: 1rem;
}

.legal-content p {
    margin-bottom: 14px;
    color: var(--grey-700);
    font-size: .88rem;
    line-height: 1.85;
}

.legal-content ul,
.legal-content ol {
    margin: 0 0 16px 20px;
    color: var(--grey-700);
    font-size: .88rem;
    line-height: 1.85;
}

.legal-content li {
    margin-bottom: 7px;
}

.legal-content strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-content a {
    color: var(--purple-600);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-content a:hover {
    color: var(--purple-800);
}

.legal-note {
    margin: 22px 0;
    padding: 18px 20px;
    border: 1px solid rgba(124, 58, 237, .18);
    border-left: 3px solid var(--purple-500);
    border-radius: 12px;
    background: var(--grad-card);
}

.legal-note p {
    margin: 0;
    color: var(--purple-800);
    font-size: .82rem;
}

.legal-note p + p {
    margin-top: 8px;
}

.legal-todo {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 200, 87, .32);
    color: var(--ink);
    font-weight: 600;
}

/* --- ESTADO / GRACIAS --- */
.status-hero {
    text-align: center;
}

.status-hero .container {
    max-width: 760px;
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--grad-cta);
    color: #fff;
    box-shadow: 0 18px 44px rgba(124, 58, 237, .38);
}

.status-icon svg {
    width: 34px;
    height: 34px;
    stroke-width: 2;
}

.status-icon.is-muted {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .32);
    box-shadow: none;
}

.status-hero h1 {
    margin: 0 auto 16px;
}

.status-hero p {
    margin: 0 auto;
}

.status-card {
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-large);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.status-card h2 {
    margin-bottom: 18px;
    font-size: 1.35rem;
}

.status-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 26px;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 14px;
    background: var(--grad-card);
    overflow: hidden;
}

.status-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(124, 58, 237, .1);
    font-size: .82rem;
}

.status-row:last-child {
    border-bottom: 0;
}

.status-row span {
    color: var(--grey-700);
}

.status-row strong {
    color: var(--purple-800);
    text-align: right;
}

.status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.status-list {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.status-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    color: var(--grey-700);
    font-size: .88rem;
    line-height: 1.8;
}

.status-list li::before {
    content: "";
    position: absolute;
    top: .72em;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple-400);
}

.status-list li:last-child {
    margin-bottom: 0;
}

.next-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.next-step {
    padding: 22px;
    border: 1px solid var(--grey-200);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
}

.next-step .step-number {
    display: block;
    margin-bottom: 8px;
    color: var(--purple-400);
    font-family: var(--font-heading);
    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .06em;
}

.next-step h3 {
    margin-bottom: 6px;
    font-family: var(--font-body);
    font-size: .82rem;
    font-weight: 700;
}

.next-step p {
    margin: 0;
    color: var(--grey-700);
    font-size: .74rem;
    line-height: 1.65;
}

.status-loading {
    margin-top: 8px;
    color: var(--grey-700);
    font-size: .78rem;
}

.status-loading[hidden] {
    display: none;
}

.status-fallback {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 200, 87, .18);
    color: var(--grey-700);
    font-size: .78rem;
    line-height: 1.6;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .legal-toc {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px 24px;
        padding: 20px 22px;
    }

    .legal-toc h2 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .page-hero {
        padding: 146px 0 56px;
    }

    .page-body {
        padding: 44px 0 72px;
    }

    .next-steps {
        grid-template-columns: 1fr;
    }

    .status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .status-row strong {
        text-align: left;
    }

    .legal-toc {
        grid-template-columns: 1fr;
    }

    .legal-content {
        padding: 24px 20px;
    }

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

@media (prefers-reduced-motion: reduce) {
    .legal-toc {
        position: static;
    }
}
