/* ============================================
   Legal Pages Styles (Privacy Policy & Terms)
   ============================================ */

/* Make header logo clickable */
.logo {
    text-decoration: none;
}

/* Legal Content Container */
.legal-content {
    position: relative;
    z-index: 1;
    padding: 2rem 0 4rem;
}

.legal-article {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

/* Legal Header */
.legal-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.legal-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--w-bold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-tight);
    color: var(--foreground);
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--color-purple), var(--color-coral));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-subtitle {
    font-size: var(--text-md);
    font-weight: var(--w-regular);
    line-height: var(--lh-body);
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.legal-updated {
    font-size: var(--text-xs);
    font-weight: var(--w-regular);
    color: var(--muted-foreground);
}

.legal-intro {
    font-size: var(--text-md);
    font-weight: var(--w-regular);
    line-height: var(--lh-body);
    color: var(--foreground);
    margin-bottom: 1rem;
}

/* Table of Contents */
.legal-toc {
    background: var(--background);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.legal-toc h2 {
    font-size: var(--text-sm);
    font-weight: var(--w-semibold);
    color: var(--foreground);
    margin-bottom: 1rem;
}

.legal-toc ol {
    margin: 0;
    padding-left: 1.25rem;
    columns: 2;
    column-gap: 2rem;
}

.legal-toc li {
    margin-bottom: 0.5rem;
    break-inside: avoid;
}

.legal-toc a {
    color: var(--color-purple);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: var(--w-regular);
    transition: color 0.2s ease;
}

.legal-toc a:hover {
    color: var(--color-coral);
    text-decoration: underline;
}

/* Sections */
.legal-article section {
    margin: 2.5rem 0;
    scroll-margin-top: 2rem;
}

.legal-article h2 {
    font-size: var(--text-xl);
    font-weight: var(--w-bold);
    line-height: var(--lh-snug);
    color: var(--foreground);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-purple);
}

.legal-article h3 {
    font-size: var(--text-lg);
    font-weight: var(--w-semibold);
    line-height: var(--lh-snug);
    color: var(--foreground);
    margin: 1.5rem 0 0.75rem;
}

.legal-article h4 {
    font-size: var(--text-md);
    font-weight: var(--w-semibold);
    line-height: var(--lh-snug);
    color: var(--foreground);
    margin: 1.25rem 0 0.5rem;
}

.legal-article p {
    font-size: var(--text-sm);
    font-weight: var(--w-regular);
    line-height: var(--lh-body);
    margin-bottom: 1rem;
    color: var(--foreground);
}

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

.legal-article li {
    font-size: var(--text-sm);
    font-weight: var(--w-regular);
    line-height: var(--lh-body);
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.legal-article li strong {
    color: var(--foreground);
}

/* Links */
.legal-article a {
    color: var(--color-purple);
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-article a:hover {
    color: var(--color-coral);
    text-decoration: underline;
}

/* Address Block */
.legal-address {
    background: var(--background);
    padding: 1.5rem;
    border-radius: var(--radius);
    font-style: normal;
    line-height: 1.8;
    margin: 1rem 0;
}

/* Important Text */
.legal-important {
    background: rgba(232, 156, 140, 0.1);
    border-left: 4px solid var(--color-coral);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Legal Caps (for warranty disclaimers, etc.) */
.legal-caps {
    font-size: var(--text-xs);
    font-weight: var(--w-regular);
    line-height: var(--lh-body);
    background: var(--background);
    padding: 1rem;
    border-radius: var(--radius);
}

/* Summary Section */
.legal-summary {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 2.5rem;
}

.legal-summary h2 {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-summary h3 {
    font-size: var(--text-sm);
    margin-top: 1.25rem;
}

/* Acceptance Notice */
.legal-acceptance {
    background: linear-gradient(135deg, rgba(180, 167, 214, 0.1), rgba(232, 156, 140, 0.1));
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 2rem;
}

.legal-acceptance p {
    margin: 0;
    font-weight: 500;
}

/* Legal Footer */
.legal-footer {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.legal-footer p {
    color: var(--muted-foreground);
    font-size: var(--text-xs);
    font-weight: var(--w-regular);
    margin: 0;
}

/* Footer Link Active State */
.footer-link[aria-current="page"] {
    color: var(--color-purple);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-article {
        padding: 2rem 1.5rem;
        margin: 0 -0.5rem;
        border-radius: var(--radius-lg);
    }

    .legal-toc ol {
        columns: 1;
    }
}

@media (max-width: 480px) {
    .legal-content {
        padding: 1rem 0 3rem;
    }

    .legal-article {
        padding: 1.5rem 1rem;
    }

    .legal-toc {
        padding: 1rem 1.25rem;
    }

    .legal-address {
        padding: 1rem;
    }

    .legal-summary {
        padding: 1.5rem 1rem;
    }
}

/* Print styles */
@media print {
    .legal-article {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .legal-toc {
        background: none;
        border: 1px solid #ccc;
    }

    .legal-article a {
        color: inherit;
        text-decoration: underline;
    }

    .legal-article a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #666;
    }
}
