/* ==========================================================================
   CRED Obsidian Neo-Brutalist Legal & Compliance Styling (Digital Vault)
   ========================================================================== */
:root {
    --cred-bg: #080808;
    --cred-surface: #0e0e11;
    --cred-surface-card: #121215;
    --cred-surface-hover: #17171c;
    --cred-acid-lime: #E4FF1A;
    --cred-acid-lime-hover: #ccee10;
    --cred-electric-neon: #00F5D4;
    --cred-border-subtle: #1a1a1f;
    --cred-border-strong: #27272e;
    --text-white: #ffffff;
    --text-sub: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

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

.legal-body {
    background-color: var(--cred-bg);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(228, 255, 26, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 10% 30%, rgba(0, 245, 212, 0.03) 0%, transparent 45%),
        radial-gradient(circle at 90% 70%, rgba(228, 255, 26, 0.03) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-sub);
    font-family: var(--font-body);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Precision Dot Mesh Overlay */
.legal-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   STICKY GLASSMORPHISM HEADER (With Digital Vault Branding & Back Button)
   ========================================================================== */
.legal-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(8, 8, 8, 0.75);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border-bottom: 1px solid rgba(228, 255, 26, 0.28);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 12px 0;
    transition: background 0.2s ease;
}

.legal-nav {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.legal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-img {
    height: 32px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.brand-edition-badge {
    background: rgba(228, 255, 26, 0.08);
    border: 1px solid rgba(228, 255, 26, 0.35);
    color: var(--cred-acid-lime);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 4px 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* CRED Tactile Back Button */
.legal-back-btn {
    background: var(--cred-acid-lime);
    color: #080808;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 9px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-bottom: 3px solid #a3be00;
    border-right: 1px solid #a3be00;
    cursor: pointer;
    transition: transform 0.1s ease, border 0.1s ease, background 0.15s ease;
    user-select: none;
    white-space: nowrap;
}

.legal-back-btn:hover {
    background: var(--cred-acid-lime-hover);
}

.legal-back-btn:active {
    transform: translateY(2px) translateX(1px);
    border-bottom: 1px solid #a3be00;
    border-right: 1px solid #a3be00;
}

.legal-back-btn .back-arrow {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.legal-back-btn:hover .back-arrow {
    transform: translateX(-3px);
}

/* ==========================================================================
   LEGAL CONTAINER & TYPOGRAPHY
   ========================================================================== */
.legal-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 70px;
    flex: 1;
    width: 100%;
    position: relative;
    z-index: 1;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(228, 255, 26, 0.06);
    border: 1px solid rgba(228, 255, 26, 0.25);
    color: var(--cred-acid-lime);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 5px 12px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.legal-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--text-white);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.legal-updated {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 36px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--cred-border-strong);
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-updated::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--cred-acid-lime);
}

/* Sections */
.legal-section {
    margin-bottom: 32px;
    background: var(--cred-surface);
    border: 1px solid var(--cred-border-subtle);
    padding: 28px 28px;
    position: relative;
}

.legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    transition: background 0.2s ease;
}

.legal-section:hover::before {
    background: var(--cred-acid-lime);
}

.legal-section h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.legal-section h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cred-electric-neon);
    margin: 20px 0 10px;
}

.legal-section p {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 16px;
}

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

.legal-section strong {
    color: var(--text-white);
    font-weight: 700;
}

.legal-section ul {
    margin: 14px 0 18px 20px;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

.legal-section li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.legal-section li::marker {
    color: var(--cred-acid-lime);
}

.legal-section a {
    color: var(--cred-acid-lime);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.legal-section a:hover {
    color: #ffffff;
}

/* Highlight / Callout Box */
.legal-highlight-box {
    background: #000000;
    border: 1px solid var(--cred-border-strong);
    border-left: 3px solid var(--cred-acid-lime);
    padding: 18px 22px;
    margin: 20px 0;
}

.legal-highlight-box p {
    color: var(--text-sub);
    font-size: 0.94rem;
    margin-bottom: 0;
    line-height: 1.65;
}

/* ==========================================================================
   CONTACT PAGE CARDS (Obsidian Neo-Brutalist)
   ========================================================================== */
.contact-box {
    background: var(--cred-surface);
    border: 1px solid var(--cred-border-subtle);
    padding: 36px 32px;
    margin-bottom: 28px;
    position: relative;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cred-acid-lime);
}

.contact-box-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cred-border-subtle);
    letter-spacing: -0.02em;
}

.contact-box-desc {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.info-badge {
    background: #000000;
    border: 1px solid var(--cred-border-strong);
    padding: 18px 22px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.info-badge:hover {
    border-color: var(--cred-acid-lime);
}

.info-badge:last-child {
    margin-bottom: 0;
}

.info-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--cred-acid-lime);
    text-transform: uppercase;
}

.info-value {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
}

.info-link {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cred-electric-neon);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
    word-break: break-all;
}

.info-link:hover {
    color: var(--cred-acid-lime);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 768px) {
    .legal-nav {
        padding: 0 16px;
    }
    .brand-logo-img {
        height: 24px;
        max-width: 150px;
    }
    .brand-edition-badge {
        display: none;
    }
    .legal-back-btn {
        padding: 7px 12px;
        font-size: 0.75rem;
    }
    .legal-container {
        padding: 32px 16px 50px;
    }
    .legal-title {
        font-size: 1.9rem;
    }
    .legal-section {
        padding: 22px 18px;
    }
    .contact-box {
        padding: 24px 18px;
    }
    .info-value, .info-link {
        font-size: 1.05rem;
    }
}

@media (max-width: 440px) {
    .brand-logo-img {
        height: 20px;
        max-width: 130px;
    }
    .legal-back-btn {
        padding: 6px 10px;
        font-size: 0.70rem;
    }
}
