/*
===============================================================================
BIG TEXAN D2C - LEGAL PAGES STYLES
===============================================================================
Shared styles for Privacy Policy and Terms of Service pages.
Clean, readable typography for legal content with scannable structure.
===============================================================================
*/

/* --- PAGE HEADER ---
   Legal pages (privacy-policy / terms-of-service) now use the canonical
   .page-header.page-header--neon shell from globals.css. Legacy
   .legal-header / .legal-title / .legal-updated rules removed
   2026-05-04 V56 to avoid drift; HTML still carries the legacy classes
   alongside the new shell classes for backwards-compat. */

/* --- TABLE OF CONTENTS --- */
.legal-toc {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.legal-toc-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--brand-maroon);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.legal-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.legal-toc-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.legal-toc-number {
    font-weight: 700;
    color: var(--brand-maroon-soft);
    min-width: 1.5rem;
}

.legal-toc-link {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.legal-toc-link:hover {
    color: var(--brand-maroon-soft);
    text-decoration: underline;
}

/* --- LEGAL CONTENT --- */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--section-spacing) 0;
}

/* --- LEGAL SECTIONS --- */
.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: calc(var(--header-height) + 40px);
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--brand-tan);
}

.legal-section-number {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--brand-maroon-soft);
    line-height: 1;
}

.legal-section-title {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    color: var(--brand-maroon);
    margin: 0;
}

/* --- TEXT CONTENT --- */
.legal-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section strong {
    color: var(--text-primary);
}

.legal-section a {
    color: var(--brand-maroon-soft);
    text-decoration: underline;
}

.legal-section a:hover {
    color: var(--brand-maroon);
}

/* --- LISTS --- */
.legal-section ul,
.legal-section ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.5rem;
}

.legal-section li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.legal-section li:last-child {
    margin-bottom: 0;
}

/* --- SUBSECTIONS --- */
.legal-subsection {
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--brand-tan);
}

.legal-subsection-title {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--brand-maroon);
    margin-bottom: 0.75rem;
}

/* --- CONTACT BLOCK --- */
.legal-contact-block {
    background: var(--brand-cream);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.legal-contact-block address {
    font-style: normal;
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-contact-block strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* --- HIGHLIGHTED TEXT --- */
.legal-highlight {
    background: var(--bg-surface);
    border-left: 4px solid var(--brand-maroon-soft);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.legal-highlight p {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- CAPS WARNING --- */
.legal-caps-warning {
    text-transform: uppercase;
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    line-height: 1.8;
}

/* --- BACK TO TOP --- */
.legal-back-to-top {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: var(--border-light);
}

.legal-back-to-top a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-maroon-soft);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 0.02em;
}

.legal-back-to-top a:hover {
    color: var(--brand-maroon);
}

/* --- HELP SECTION --- */
.legal-help {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--shadow-sm);
}

.legal-help h3 {
    font-size: var(--text-xl);
    color: var(--brand-maroon);
    margin-bottom: 0.5rem;
}

.legal-help p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.legal-help-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legal-help-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-maroon-soft);
}

.legal-help-item a {
    font-weight: 600;
    text-decoration: none;
}

.legal-help-item a:hover {
    text-decoration: underline;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .legal-title {
        font-size: var(--text-3xl);
    }

    .legal-toc {
        padding: 1.5rem;
    }

    .legal-section-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .legal-section-number {
        font-size: var(--text-lg);
    }

    .legal-section-title {
        font-size: var(--text-xl);
    }

    .legal-section p,
    .legal-section li {
        font-size: var(--text-sm);
    }

    .legal-help-contact {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- PRINT STYLES --- */
@media print {
    .legal-toc {
        break-after: page;
    }

    .legal-section {
        break-inside: avoid;
    }

    .legal-back-to-top,
    .legal-help {
        display: none;
    }
}
