/* =============================================================
 FILE: Legal.css
 PURPOSE: Global CSS include for Legal, shared across multiple pages.

 USED BY:
   - /Legal/Cookies/index.php
   - /Legal/Privacy.php
   - /Legal/Terms.php
 ============================================================= */
/* ============================================
   Legal Pages Stylesheet
   Dark theme matching Polis-Forge aesthetic
   ============================================ */

:root {
    --legal-bg: #0a0a0a;
    --legal-surface: #111111;
    --legal-border: #1a1a1a;
    --legal-text: #e0e0e0;
    --legal-text-secondary: #a0a0a0;
    --legal-text-muted: #666666;
    --legal-heading: #ffffff;
    --legal-accent: #ffffff;
    --legal-accent-dim: #cccccc;
    --legal-link: #cccccc;
    --legal-link-hover: #ffffff;
    --legal-nav-bg: #000000;
    --legal-footer-bg: #000000;
    --legal-radius: 7px;
    --legal-font-body: 'Playfair Display', Georgia, serif;
    --legal-font-mono: 'DM Serif Display', Georgia, serif;
    --legal-max-width: 860px;
    --legal-transition: color 280ms cubic-bezier(0.4, 0.0, 0.2, 1), background-color 280ms cubic-bezier(0.4, 0.0, 0.2, 1), border-color 280ms cubic-bezier(0.4, 0.0, 0.2, 1), box-shadow 280ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 280ms cubic-bezier(0.4, 0.0, 0.2, 1), transform 280ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #0a0a0a;
    overflow-x: hidden;
}

body {
    font-family: var(--legal-font-body);
    background: var(--legal-bg);
    color: var(--legal-text);
    line-height: 1.7;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Navigation --- */
.legal-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--legal-nav-bg);
    border-bottom: 1px solid var(--legal-border);
    backdrop-filter: blur(12px);
}

.legal-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--legal-heading);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.legal-nav-brand img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.legal-nav-links {
    display: flex;
    gap: 24px;
}

.legal-nav-links a {
    color: var(--legal-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: var(--legal-transition);
}

.legal-nav-links a:hover {
    color: var(--legal-heading);
}

.legal-nav-links a.active {
    color: var(--legal-heading);
    border-bottom-color: var(--legal-accent);
}

/* --- Main Container --- */
.legal-container {
    flex: 1;
    max-width: var(--legal-max-width);
    margin: 0 auto;
    padding: 48px 32px 80px;
    width: 100%;
}

/* --- Header --- */
.legal-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--legal-border);
}

.legal-header h1 {
    font-family: var(--legal-font-body);
    font-size: 32px;
    font-weight: 700;
    color: var(--legal-heading);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.legal-effective,
.legal-updated {
    font-size: 13px;
    color: var(--legal-text-muted);
    font-family: var(--legal-font-mono);
    letter-spacing: 0.3px;
}

.legal-effective {
    margin-bottom: 4px;
}

/* --- Content --- */
.legal-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Sections --- */
.legal-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--legal-border);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--legal-heading);
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.legal-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--legal-accent-dim);
    margin-top: 20px;
    margin-bottom: 10px;
}

.legal-section p {
    margin-bottom: 12px;
    color: var(--legal-text);
}

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

/* --- Lists --- */
.legal-section ul {
    margin: 8px 0 16px 24px;
    list-style: none;
}

.legal-section ul li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
    color: var(--legal-text);
    line-height: 1.6;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background: var(--legal-text-muted);
    border-radius: 50%;
}

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

.legal-section ul li strong {
    color: var(--legal-heading);
    font-weight: 600;
}

/* --- Links --- */
.legal-section a {
    color: var(--legal-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--legal-transition);
}

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

/* --- Responsive Tables --- */
.legal-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
}

.legal-section table,
.legal-table {
    width: 100%;
    border-collapse: collapse;
}

/* --- Contact Block --- */
.legal-contact {
    background: var(--legal-surface);
    border: 1px solid var(--legal-border);
    border-radius: var(--legal-radius);
    padding: 20px 24px;
    margin-top: 12px;
}

.legal-contact p {
    margin-bottom: 4px;
    font-size: 14px;
}

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

/* --- Uppercase Legal Text --- */
.legal-section p:has(+ ul),
.legal-section > p {
    text-transform: none;
}

/* Warranty / Liability disclaimers are uppercase in source HTML */

/* --- Footer --- */
.legal-footer {
    background: var(--legal-footer-bg);
    border-top: 1px solid var(--legal-border);
    padding: 24px 32px;
}

.legal-footer-inner {
    max-width: var(--legal-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--legal-text-muted);
}

.legal-footer-links {
    display: flex;
    gap: 20px;
}

.legal-footer-links a {
    color: var(--legal-text-muted);
    text-decoration: none;
    font-size: 12px;
    transition: var(--legal-transition);
}

.legal-footer-links a:hover {
    color: var(--legal-heading);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .legal-nav {
        padding: 12px 20px;
    }

    .legal-nav-links {
        gap: 16px;
    }

    .legal-nav-links a {
        font-size: 12px;
    }

    .legal-container {
        padding: 32px 20px 60px;
    }

    .legal-header h1 {
        font-size: 26px;
    }

    .legal-section {
        padding: 24px 0;
    }

    .legal-section h2 {
        font-size: 18px;
    }

    .legal-footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .legal-nav {
        padding: 10px 16px;
    }

    .legal-nav-brand span {
        display: none;
    }

    .legal-container {
        padding: 24px 16px 48px;
    }

    .legal-header h1 {
        font-size: 22px;
    }

    .legal-section h2 {
        font-size: 16px;
    }

    .legal-section ul {
        margin-left: 12px;
    }
}

@media (max-width: 320px) {
    .legal-nav {
        padding: 8px 10px;
    }

    .legal-nav-links {
        gap: 10px;
    }

    .legal-nav-links a {
        font-size: 11px;
    }

    .legal-container {
        padding: 16px 10px 36px;
    }

    .legal-header h1 {
        font-size: 19px;
    }

    .legal-section h2 {
        font-size: 15px;
    }

    .legal-section h3 {
        font-size: 14px;
    }

    .legal-section p,
    .legal-section ul li {
        font-size: 13px;
    }

    .legal-contact {
        padding: 14px 12px;
    }

    .legal-footer {
        padding: 16px 10px;
    }

    .legal-footer-inner {
        font-size: 11px;
    }

    .legal-footer-links a {
        font-size: 11px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .legal-nav-links a {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }

    .legal-section a {
        display: inline-block;
        min-height: 48px;
        line-height: 48px;
    }

    .legal-footer-links a {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Translation Disclaimer Banner */
.translation-disclaimer {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 7px;
    padding: 12px 20px;
    margin: 0 auto 24px;
    max-width: 800px;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    color: #664d03;
}
