/* ===== LEGAL PAGES STYLES ===== */

/* Typography: Fluid typography with clamp() */
.legal-hero h1 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* Fluid heading sizes */
.legal-hero h1 {
    font-size: clamp(2.5rem, 5vw + 1rem, 3.75rem);
}

.legal-section h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.2px;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border);
    line-height: 1.2;
}

/* Fluid h2 sizes */
.legal-section h2 {
    font-size: clamp(1.25rem, 2vw + 1rem, 1.625rem);
}

.legal-section h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.15px;
    line-height: 1.3;
}

/* Fluid h3 sizes */
.legal-section h3 {
    font-size: clamp(1rem, 1vw + 0.85rem, 1.25rem);
}

.legal-section p {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 0.5vw + 0.8rem, 0.95rem);
    line-height: 1.8;
    margin-bottom: 1rem;
    max-width: 100%;
}

.legal-section ul {
    list-style: none;
    margin: 0.5rem 0 1rem 0;
}

.legal-section ul li {
    color: var(--text-secondary);
    font-size: clamp(0.875rem, 0.5vw + 0.8rem, 0.95rem);
    line-height: 1.8;
    padding: 0.35rem 0 0.35rem 1.4rem;
    position: relative;
}

.legal-section ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--primary);
    opacity: 0.7;
}

/* ===== INTERACTIVE STATES ===== */

/* Focus states for accessibility */
.legal-section h2 a,
.legal-back,
.legal-contact-email {
    outline: none;
}

.legal-section h2 a:focus,
.legal-back:focus,
.legal-contact-email:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Back Button */
.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.legal-back:hover,
.legal-back:focus {
    color: var(--primary);
    text-decoration: underline;
}

.legal-back svg {
    width: 16px;
    height: 16px;
}


/* ===== LEGAL HERO ===== */

.legal-hero {
    text-align: center;
    margin-bottom: 5rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.legal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--at-08);
    border: 1px solid var(--at-20);
    color: var(--primary);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: clamp(0.7rem, 0.3vw + 0.65rem, 0.8rem);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 1.5rem;
}

.legal-hero p {
    color: var(--text-muted);
    font-size: clamp(0.8125rem, 0.35vw + 0.75rem, 0.9rem);
}

/* ===== LEGAL CONTACT BOX ===== */

.legal-contact-box {
    background: var(--at-04);
    border: 1px solid var(--at-15);
    border-radius: 14px;
    padding: 2rem;
    margin-top: 3rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal-contact-box:hover {
    background: var(--at-07);
    border-color: var(--at-25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.legal-contact-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 0.5vw + 0.85rem, 1.2rem);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.legal-contact-box p {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 0.4vw + 0.8rem, 0.92rem);
    line-height: 1.7;
    margin: 0;
}

.legal-contact-email {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
    text-decoration: none;
}

.legal-contact-email:hover {
    color: var(--at-40);
    text-decoration: underline;
}

/* ===== LEGAL PAGE LAYOUT ===== */

.legal-page {
    max-width: 780px;
    margin: 0 auto;
    padding: 9rem 2rem 6rem;
}

/* ===== DARK MODE SUPPORT ===== */

/* Explicit dark mode for better control */
@media (prefers-color-scheme: dark) {
    .legal-page {
        padding-top: 10rem;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    .legal-page {
        padding: 4rem 2rem 6rem;
        max-width: none;
    }

    .legal-hero {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }


    .legal-contact-box {
        box-shadow: none;
        border: 1px solid var(--border);
        background: var(--print-bg);
    }

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

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .legal-page {
        padding: 7rem 1.5rem 4rem;
    }

    .legal-hero {
        margin-bottom: 3.5rem;
    }

    .legal-hero h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        letter-spacing: -0.5px;
    }

    .legal-section h2 {
        font-size: clamp(1.1rem, 2.5vw, 1.4rem);
        letter-spacing: -0.1px;
    }

    .legal-section h3 {
        font-size: clamp(0.9rem, 1vw, 1.05rem);
    }

    .legal-section p,
    .legal-section ul li {
        font-size: clamp(0.825rem, 0.4vw + 0.75rem, 0.9rem);
    }

    .legal-contact-box {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .legal-contact-box h3 {
        font-size: clamp(0.95rem, 0.8vw, 1.1rem);
    }

    .legal-contact-box p {
        font-size: clamp(0.825rem, 0.35vw + 0.7rem, 0.875rem);
    }

}

/* ===== UTILITY: SKIP LINK ===== */

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: var(--at-08);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== ACCESSIBILITY: REDUCED MOTION ===== */

@media (prefers-reduced-motion: reduce) {
    .legal-contact-box {
        transition: none;
    }

    .legal-contact-box:hover {
        transform: none;
        box-shadow: none;
    }
}

