@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-base: #0a0f1d;
    --bg-surface: rgba(255, 255, 255, 0.82);
    --border-color: rgba(226, 232, 240, 0.8);
    --text-main: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --accent-primary: #4f46e5;
    --accent-glow: rgba(79, 70, 229, 0.12);
    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --card-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Page Container */
.legal-page-wrapper {
    width: min(840px, 92%);
    margin: 60px auto;
    position: relative;
}

/* Nav Header */
.legal-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-home:hover {
    color: var(--accent-primary);
    border-color: #c7d2fe;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.08);
}

/* Main Card */
.legal-card {
    background-color: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 56px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

/* Subtle Top Accent Line */
.legal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

/* Header Area */
.legal-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 36px;
}

.brand-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: var(--accent-glow);
    border: 1px solid rgba(79, 70, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--accent-primary);
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
}

.legal-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 6px;
}

.legal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.meta-separator {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

/* Content & Reading Experience */
.legal-content {
    font-size: 16px;
    color: var(--text-body);
}

/* Heading with interactive accent */
.legal-content h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 44px 0 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.legal-content h2::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 18px;
    border-radius: 99px;
    background: var(--accent-primary);
}

.legal-content p {
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.8;
}

/* Bullet Points */
.legal-content ul, 
.legal-content ol {
    margin: 16px 0 24px;
    padding-left: 0;
    list-style: none;
}

.legal-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.legal-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.legal-content ol {
    counter-reset: legal-counter;
}

.legal-content ol li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    counter-increment: legal-counter;
}

.legal-content ol li::before {
    content: counter(legal-counter);
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Links */
.legal-content a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1.5px solid rgba(79, 70, 229, 0.3);
    transition: all 0.2s ease;
}

.legal-content a:hover {
    border-bottom-color: var(--accent-primary);
    background-color: var(--accent-glow);
    border-radius: 3px;
    padding: 1px 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-page-wrapper {
        margin: 24px auto;
    }
    
    .legal-card {
        padding: 32px 20px;
        border-radius: 20px;
    }

    .legal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .legal-header h1 {
        font-size: 25px;
    }

    .legal-content h2 {
        font-size: 18px;
        margin-top: 32px;
    }
}