/* ═══════════════════════════════════════
   IPSOO Legal Pages — Shared Styles
   Matches platform design system (stone + brand)
   ═══════════════════════════════════════ */

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.legal-fade { animation: fadeInUp 0.5s ease-out both; }
.legal-fade-d1 { animation-delay: 0.1s; }
.legal-fade-d2 { animation-delay: 0.2s; }

/* Hero — clean style matching platform */
.legal-hero {
    background: #fff;
    padding: 5rem 0 2.5rem;
    border-bottom: 1px solid #e7e5e4;
}
.legal-hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #15ab92;
    margin-bottom: 0.75rem;
}
.legal-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #1c1917;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
}
.legal-hero p {
    font-size: 1.0625rem;
    color: #78716c;
    line-height: 1.6;
    max-width: 540px;
}

/* Last updated badge */
.legal-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f5f5f4;
    color: #78716c;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    margin-bottom: 2rem;
}
.legal-updated i { color: #a8a29e; }

/* Content area */
.legal-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

/* Headings */
.legal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1c1917;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid #e7e5e4;
    letter-spacing: -0.02em;
}
.legal-content h2 .legal-num {
    color: #15ab92;
    margin-right: 0.25rem;
}
.legal-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #44403c;
    margin: 1.75rem 0 0.625rem;
}

/* Body text */
.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.85;
    color: #57534e;
    font-size: 0.9375rem;
}
.legal-content ul,
.legal-content ol {
    margin: 0 0 1rem 1.5rem;
    line-height: 1.85;
    color: #57534e;
    font-size: 0.9375rem;
}
.legal-content li { margin-bottom: 0.375rem; }
.legal-content strong { color: #1c1917; font-weight: 600; }
.legal-content a { color: #15ab92; text-decoration: underline; text-underline-offset: 2px; }
.legal-content a:hover { color: #0e8a76; }

/* Highlight box */
.legal-highlight {
    background: #f5f5f4;
    border-left: 3px solid #15ab92;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    color: #57534e;
    line-height: 1.7;
}
.legal-highlight strong { color: #1c1917; }
.legal-highlight i { color: #15ab92; }

/* Warning / info box */
.legal-warning {
    background: #fefce8;
    border-left: 3px solid #eab308;
    padding: 1.25rem 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    color: #713f12;
    line-height: 1.7;
}
.legal-warning i { color: #ca8a04; }

/* Tables */
.legal-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e7e5e4;
}
.legal-content th {
    background: #f5f5f4;
    color: #1c1917;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.legal-content td {
    padding: 0.75rem 1rem;
    color: #57534e;
    border-top: 1px solid #e7e5e4;
}
.legal-content tr:hover td { background: #fafaf9; }

/* Table of contents */
.legal-toc {
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
.legal-toc-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a8a29e;
    margin-bottom: 0.75rem;
}
.legal-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}
.legal-toc li {
    counter-increment: toc;
    margin-bottom: 0.375rem;
}
.legal-toc li::before {
    content: counter(toc) ".";
    color: #15ab92;
    font-weight: 600;
    margin-right: 0.5rem;
    font-size: 0.8125rem;
}
.legal-toc a {
    color: #44403c;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.15s;
}
.legal-toc a:hover { color: #15ab92; }

/* Footer nav between legal pages */
.legal-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e7e5e4;
}
.legal-nav a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    color: #44403c;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.legal-nav a:hover {
    background: #f0fdfa;
    border-color: #15ab92;
    color: #15ab92;
}
.legal-nav a i {
    color: #a8a29e;
    font-size: 0.75rem;
    transition: color 0.2s;
}
.legal-nav a:hover i { color: #15ab92; }
.legal-nav a.current {
    background: #f0fdfa;
    border-color: #15ab92;
    color: #15ab92;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
    .legal-hero { padding: 3rem 0 1.5rem; }
    .legal-content { padding: 1.5rem 0 3rem; }
    .legal-content h2 { font-size: 1.25rem; }
    .legal-toc { padding: 1rem 1.25rem; }
    .legal-nav { grid-template-columns: 1fr; }
}
