/* ========================================
   LEGAL PAGES — Prolifik (Plant science, MB)
   ======================================== */
:root {
    --primary: #120403;
    --secondary: #8e4c44;
    --surface: #fdf9f5;
    --surface-lowest: #ffffff;
    --surface-low: #f7f3ef;
    --surface-high: #ebe7e4;
    --accent: #F7A399;
    --coral-gradient-start: #2F1A17;
    --coral-gradient-end: #5C4B48;
    --on-surface: #120403;
    --on-surface-muted: #6b5e5a;
    --outline-variant: rgba(18, 4, 3, 0.15);
    --shadow-tinted: rgba(47, 26, 23, 0.06);

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-label: 'Inter', sans-serif;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.75rem;
    --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--on-surface);
    line-height: 1.7;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* Navigation */
.legal-nav {
    position: sticky;
    top: 0;
    background: rgba(253, 249, 245, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline-variant);
    z-index: 100;
    padding: 1rem 0;
}
.legal-nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.legal-nav-logo img {
    height: 28px;
    width: auto;
    filter: brightness(0);
}
.legal-nav-back {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #181111, #CB6056);
    color: #F5F2ED;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 12px -4px rgba(203, 96, 86, 0.3);
    transition: transform 0.3s;
}
.legal-nav-back:hover {
    transform: translateY(-1px);
}

/* Layout */
.legal-container {
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 2.5rem);
}

.legal-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--outline-variant);
}
.legal-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #181111, #CB6056);
    color: #F5F2ED;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 12px -4px rgba(203, 96, 86, 0.3);
    margin-bottom: 1.25rem;
}
.legal-title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.legal-meta {
    font-family: var(--font-label);
    font-size: 0.875rem;
    color: var(--on-surface-muted);
}

/* Table of contents */
.legal-toc {
    background: var(--surface-low);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 3rem;
}
.legal-toc-title {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-surface-muted);
    margin-bottom: 0.75rem;
}
.legal-toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.5rem 1.5rem;
}
.legal-toc ol li {
    counter-increment: toc;
    font-size: 0.9375rem;
}
.legal-toc ol li::before {
    content: counter(toc, decimal-leading-zero) ". ";
    color: var(--secondary);
    font-weight: 600;
}
.legal-toc ol li a {
    color: var(--on-surface);
    transition: color 0.2s;
}
.legal-toc ol li a:hover {
    color: var(--secondary);
}

/* Sections */
.legal-section {
    margin-bottom: 2.5rem;
    scroll-margin-top: 6rem;
}
.legal-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}
.legal-section h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.legal-section p {
    font-size: 1rem;
    color: var(--on-surface);
    margin-bottom: 1rem;
}
.legal-section ul, .legal-section ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.legal-section li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.legal-section strong {
    font-weight: 600;
}
.legal-section a {
    color: var(--secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.legal-section a:hover {
    color: var(--primary);
}

/* Entity box */
.entity-box {
    background: var(--surface-low);
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin: 1.5rem 0;
}
.entity-box dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9375rem;
}
.entity-box dt {
    font-weight: 600;
    color: var(--on-surface-muted);
}
.entity-box dd {
    color: var(--on-surface);
}

/* Footer */
.legal-footer {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem clamp(1.5rem, 4vw, 2.5rem) 3rem;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--on-surface-muted);
}
.legal-footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.legal-footer-links a:hover {
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 640px) {
    .entity-box dl {
        grid-template-columns: 1fr;
        gap: 0.25rem 0;
    }
    .entity-box dt {
        margin-top: 0.5rem;
    }
    .entity-box dt:first-child { margin-top: 0; }
    .legal-toc ol {
        grid-template-columns: 1fr;
    }
}
