/* ═══════════════════════════════════════════════════════════════
   OppEngine — Legal Pages CSS (Premium Edition)
   Shared by: terms.html, privacy.html, cookies.html
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
    --bg:          #03040c;
    --bg-card:     rgba(255,255,255,0.02);
    --bg-glass:    rgba(255,255,255,0.04);
    --bg-glass2:   rgba(255,255,255,0.06);
    --accent:      #3B82F6;
    --accent-lite: rgba(59,130,246,0.15);
    --purple:      #8B5CF6;
    --green:       #10B981;
    --gold:        #F59E0B;
    --text:        #F1F5F9;
    --text-sub:    #94A3B8;
    --text-faint:  #475569;
    --border:      rgba(255,255,255,0.06);
    --border-glow: rgba(59,130,246,0.25);
    --radius:      14px;
    --radius-sm:   8px;
    --shadow-lg:   0 24px 60px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    /* Subtle radial backdrop */
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(59,130,246,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 30% at 100% 80%, rgba(139,92,246,0.05) 0%, transparent 60%);
    background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Fixed Top Nav ──────────────────────────────────────────── */
.legal-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: rgba(3,4,12,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.legal-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.3px;
}
.legal-logo:hover { text-decoration: none; }
.legal-logo-icon { color: var(--accent); font-size: 16px; }

.legal-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 99px;
    transition: all 0.2s;
    text-decoration: none;
}
.legal-nav-back:hover {
    color: var(--text);
    background: var(--bg-glass2);
    border-color: var(--border-glow);
    text-decoration: none;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.legal-hero {
    position: relative;
    padding: 120px 32px 70px;
    text-align: center;
    overflow: hidden;
}
.legal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 50% 0%, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}
/* Grid lines in hero */
.legal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, black 20%, transparent 75%);
    pointer-events: none;
}

.legal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    padding: 5px 14px;
    border-radius: 99px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}
.legal-hero-badge::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0.3 } }

.legal-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(38px, 6vw, 62px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.08;
    background: linear-gradient(135deg, #ffffff 30%, rgba(148,163,184,0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 700px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.legal-hero-meta {
    font-size: 13px;
    color: var(--text-sub);
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.legal-hero-meta strong { color: var(--text); }

/* ─── Layout: sidebar + content ─────────────────────────────── */
.legal-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 32px 80px;
    align-items: start;
}

/* ─── TOC Sidebar ────────────────────────────────────────────── */
.legal-toc {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: none;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.legal-toc::-webkit-scrollbar { display: none; }

.legal-toc-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.legal-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.legal-toc-list li { position: relative; }
.legal-toc-list a {
    display: block;
    font-size: 12.5px;
    color: var(--text-sub);
    padding: 7px 10px 7px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-decoration: none;
    position: relative;
    line-height: 1.4;
}
.legal-toc-list a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 0;
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.2s;
}
.legal-toc-list a:hover {
    color: var(--text);
    background: var(--bg-glass);
    text-decoration: none;
}
.legal-toc-list a.active {
    color: var(--accent);
    background: rgba(59,130,246,0.08);
    font-weight: 500;
}
.legal-toc-list a.active::before { height: 18px; }

/* ─── Main Content ───────────────────────────────────────────── */
.legal-content { min-width: 0; }

/* ─── Sections ───────────────────────────────────────────────── */
.legal-section {
    padding-bottom: 48px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.legal-section:last-child { border-bottom: none; }

.legal-section-num {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.18);
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 14px;
}

.legal-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}
.legal-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 24px 0 10px;
}
.legal-section p {
    color: #CBD5E1;
    margin-bottom: 14px;
    line-height: 1.8;
    font-size: 14.5px;
}
.legal-section ul, .legal-section ol {
    padding-left: 20px;
    color: #CBD5E1;
    font-size: 14.5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.legal-section li { line-height: 1.7; }
.legal-section a { font-weight: 500; }

/* ─── Callout Box ────────────────────────────────────────────── */
.legal-callout {
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.2);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    font-size: 14px;
    color: #94A3B8;
    margin-bottom: 28px;
    line-height: 1.7;
}
.legal-callout strong { color: var(--text); }
.legal-callout a { color: var(--accent); }

/* ─── Warning Box ────────────────────────────────────────────── */
.legal-warning {
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.2);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    font-size: 14px;
    color: #94A3B8;
    margin: 18px 0;
    line-height: 1.7;
}
.legal-warning strong { color: #FCD34D; }

/* ─── Tables ─────────────────────────────────────────────────── */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 18px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.legal-table thead tr {
    background: rgba(255,255,255,0.04);
}
.legal-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-sub);
    border-bottom: 1px solid var(--border);
}
.legal-table td {
    padding: 12px 16px;
    color: #CBD5E1;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: top;
    line-height: 1.6;
}
.legal-table td a { font-size: 13px; }
.legal-table tbody tr:last-child td { border-bottom: none; }
.legal-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.legal-table strong { color: var(--text); font-weight: 600; }

/* ─── Contact Box ────────────────────────────────────────────── */
.legal-contact-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}
.legal-contact-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 60% at 0% 0%, rgba(59,130,246,0.06), transparent);
    pointer-events: none;
}
.legal-contact-box h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px !important;
    margin-top: 0 !important;
}
.legal-contact-box p {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 6px !important;
    line-height: 1.6 !important;
}
.legal-contact-box strong { color: var(--text); }
.legal-contact-box a { font-weight: 500; }

/* ─── Footer ─────────────────────────────────────────────────── */
.legal-footer {
    background: rgba(255,255,255,0.015);
    border-top: 1px solid var(--border);
    padding: 40px 32px;
    text-align: center;
}
.legal-footer-inner { max-width: 1080px; margin: 0 auto; }
.legal-footer-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.legal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
    margin-bottom: 20px;
}
.legal-footer-links a {
    font-size: 13px;
    color: var(--text-sub);
    transition: color 0.2s;
    text-decoration: none;
}
.legal-footer-links a:hover { color: var(--text); text-decoration: none; }
.legal-footer-copy {
    font-size: 12px;
    color: var(--text-faint);
}

/* ═══════════════════════════════════════════════════════════════
   Cookie Consent Banner
   ═══════════════════════════════════════════════════════════════ */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 720px;
    width: calc(100% - 40px);
    background: rgba(10, 12, 28, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
    transition: transform 0.5s cubic-bezier(0.34,1.3,0.64,1), opacity 0.4s ease;
    opacity: 0;
}
.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.cookie-banner-icon {
    font-size: 26px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(245,158,11,0.4));
}
.cookie-banner-text { flex: 1; min-width: 0; }
.cookie-banner-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #F1F5F9;
    margin-bottom: 3px;
}
.cookie-banner-sub {
    font-size: 12.5px;
    color: #64748B;
    line-height: 1.5;
}
.cookie-banner-sub a { color: #3B82F6; text-decoration: none; font-weight: 500; }
.cookie-banner-sub a:hover { text-decoration: underline; }
.cookie-banner-btns {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.cookie-btn {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.cookie-btn-decline {
    background: rgba(255,255,255,0.06);
    color: #94A3B8;
    border: 1px solid rgba(255,255,255,0.08);
}
.cookie-btn-decline:hover { background: rgba(255,255,255,0.1); color: #F1F5F9; }
.cookie-btn-accept {
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    color: white;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.cookie-btn-accept:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.4); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .legal-layout {
        grid-template-columns: 1fr;
        padding: 0 20px 60px;
    }
    .legal-toc {
        position: static;
        max-height: none;
        overflow: visible;
    }
    .legal-toc-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }
    .legal-hero { padding: 100px 20px 50px; }
    .legal-hero-title { font-size: clamp(30px, 7vw, 44px); }
    .legal-nav { padding: 0 20px; }
}
@media (max-width: 580px) {
    .legal-toc-list { grid-template-columns: 1fr; }
    .cookie-banner { flex-wrap: wrap; }
    .cookie-banner-btns { width: 100%; justify-content: flex-end; }
    .legal-section h2 { font-size: 21px; }
}
