/* ================================================================
   legal.css — Styles for Terms of Service and Privacy Policy pages.
   Obsidian & Copper Design System (Stitch)
   ================================================================ */

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

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('/fonts/material-symbols.woff2') format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0B0E14;
    color: #C6C6CB;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
h1, h2, h3 { line-height: 1.25; font-family: 'Newsreader', Georgia, serif; }

/* ── Scrollbar ─────────────────────────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #1D2026; border-radius: 10px; }

/* ── Header ────────────────────────────────────────────────────── */
.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 1.5rem 1rem 1rem;
    border-bottom: 1px solid rgba(69, 71, 75, 0.3);
    background: rgba(11, 14, 20, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.legal-header-inner {
    max-width: 56rem;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Back button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(69, 71, 75, 0.5);
    font-size: 0.75rem;
    font-weight: 600;
    color: #E1E2EB;
    white-space: nowrap;
    transition: background 0.15s ease;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}
.back-link:hover { background: #1D2026; }
.back-link svg { width: 18px; height: 18px; }

/* Centered page title */
.header-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    pointer-events: none;
    padding: 0 2.5rem;
    color: #E1E2EB;
}

/* ── Main Content ──────────────────────────────────────────────── */
.legal-main {
    flex: 1;
    overflow-y: auto;
    padding: 3rem 1.5rem;
}

.legal-container {
    max-width: 56rem;
    margin: 0 auto;
}

.legal-container > * + * { margin-top: 2rem; }

/* ── Intro / Meta ──────────────────────────────────────────────── */
.legal-intro { margin-bottom: 3rem; }

.legal-intro .page-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #E1E2EB;
    margin-bottom: 0.5rem;
}

.legal-date {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #909095;
    margin-top: 1rem;
}

.legal-date-center { text-align: center; }

.legal-intro-text {
    margin-top: 1.5rem;
    color: #C6C6CB;
    line-height: 1.75;
}

/* ── Sections ──────────────────────────────────────────────────── */
.legal-section + .legal-section { margin-top: 2rem; }

.section-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFB77B;
    margin-bottom: 0.75rem;
}

.section-text {
    color: #C6C6CB;
    line-height: 1.75;
}

.section-text + .section-text { margin-top: 1rem; }

/* ── Numbered Section Headers (Privacy) ────────────────────────── */
.numbered-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(255, 183, 123, 0.1);
    color: #FFB77B;
}

.numbered-heading h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #E1E2EB;
}

/* ── Highlighted Callout Boxes (Disclaimers) ──────────────────── */
.legal-callout {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: #10131A;
    border: 1px solid rgba(69, 71, 75, 0.3);
}

.legal-callout .callout-heading {
    font-size: 1.125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    color: #E1E2EB;
    margin-bottom: 0.75rem;
}

.legal-callout .callout-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #909095;
    line-height: 1.75;
    text-transform: uppercase;
}

/* ── Featured Callout (Privacy section 1) ─────────────────────── */
.legal-callout-featured {
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: rgba(255, 183, 123, 0.04);
    border: 1px solid rgba(255, 183, 123, 0.15);
}

.legal-callout-featured .number-badge {
    background: #FFB77B;
    color: #4D2700;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .legal-main { padding: 2rem 1rem; }
    .legal-intro .page-title { font-size: 1.5rem; }
    .header-title { font-size: 1rem; }
}

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE — Legal Pages
   ═══════════════════════════════════════════════════════════ */

[data-theme="light"] body {
    background: #F9FAFB;
    color: #374151;
}

[data-theme="light"] .legal-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: #E5E7EB;
}

[data-theme="light"] .header-title {
    color: #1F2937;
}

[data-theme="light"] .back-link {
    color: #6B7280;
}

[data-theme="light"] .back-link:hover {
    color: #3B82F6;
}

[data-theme="light"] .legal-main {
    background: #F9FAFB;
}

[data-theme="light"] .legal-container {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .page-title {
    color: #1F2937;
}

[data-theme="light"] .legal-date {
    color: #6B7280;
}

[data-theme="light"] .legal-intro-text {
    color: #4B5563;
}

[data-theme="light"] .section-text {
    color: #374151;
}

[data-theme="light"] .numbered-heading h3 {
    color: #1F2937;
}

[data-theme="light"] .number-badge {
    background: #3B82F6;
    color: #FFFFFF;
}

[data-theme="light"] .legal-callout-featured {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .legal-callout-featured .number-badge {
    background: #3B82F6;
    color: #FFFFFF;
}

[data-theme="light"] .legal-section {
    border-bottom-color: #F3F4F6;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #F3F4F6;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #D1D5DB;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Theme toggle button for legal pages */
.theme-toggle-btn {
    background: none;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    color: #94A3B8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .theme-toggle-btn {
    border-color: #D1D5DB;
    color: #6B7280;
}

.theme-toggle-btn:hover {
    color: #3B82F6;
    border-color: #3B82F6;
}

.theme-toggle-btn .material-symbols-outlined {
    font-size: 20px;
}
