/* SEAVEN AWWWARDS-LEVEL DESIGN SYSTEM */
:root {
    --bg: #050505;
    --fg: #f5f5f7;
    --fg-muted: #a1a1a6;
    --primary: #9d4edd;
    --primary-light: #c77dff;
    --primary-glow: rgba(157, 78, 221, 0.5);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.25);
    --card-bg: rgba(20, 20, 20, 0.6);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
    overflow-x: hidden;
    overflow-x: clip; /* clip keeps position: sticky working */
    width: 100%;
    position: relative;
}
body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--primary); color: #fff; }
/* Scrollbar: brand gradient thumb, floating on the page background */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 55%, #7b2cbf 100%) padding-box;
    border: 2px solid transparent; border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e0b3ff 0%, var(--primary-light) 55%, var(--primary) 100%) padding-box;
}
/* Firefox only: Chrome 121+ ignores the ::-webkit rules above when scrollbar-color is set */
@supports (-moz-appearance: none) {
    html { scrollbar-color: var(--primary) var(--bg); scrollbar-width: thin; }
}

/* Abstract Glow & Grid */
.glow-bg {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.08) 0%, transparent 40%);
    z-index: -2; pointer-events: none;
}
.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 100px 100px; opacity: 0.2;
    z-index: -1; pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 2rem; }
.narrow { max-width: 900px; }

/* Nav */
.floating-nav {
    position: fixed; top: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; justify-content: space-between;
    width: calc(100% - 4rem); max-width: 1000px;
    padding: 0.75rem 1.5rem;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 999px;
    z-index: 1000;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    animation: slideDown 1s var(--ease-out-expo) forwards;
}
.logo { font-weight: 900; letter-spacing: 0.15em; color: #fff; text-decoration: none; font-size: 1.1rem; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a { color: var(--fg-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: #fff; }
.btn-primary-small {
    background: #fff; color: #000; padding: 0.6rem 1.25rem; border-radius: 999px;
    font-weight: 600; font-size: 0.85rem; text-decoration: none; transition: all 0.3s var(--ease-out-expo);
}
.btn-primary-small:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,255,255,0.3); }

/* Buttons */
.btn-primary {
    display: inline-block;
    background: #fff; color: #000;
    padding: 1.2rem 2.5rem; border-radius: 999px;
    font-weight: 600; font-size: 1.1rem; text-decoration: none;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 0 30px rgba(255,255,255,0.15);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(255,255,255,0.4); color: #000; }
.btn-secondary {
    display: inline-block;
    background: transparent; color: #fff;
    padding: 1.2rem 2.5rem; border-radius: 999px; border: 1px solid var(--border);
    font-weight: 600; font-size: 1.1rem; text-decoration: none;
    transition: all 0.4s var(--ease-out-expo);
}
.btn-secondary:hover { border-color: var(--primary-light); background: rgba(157, 78, 221, 0.1); box-shadow: 0 0 30px var(--primary-glow); }

/* Hero */
.hero {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; position: relative; padding-top: 6rem;
}
.hero-content { position: relative; z-index: 10; }
.badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 0.6rem 1.2rem; border-radius: 999px;
    border: 1px solid rgba(157, 78, 221, 0.3); background: rgba(157, 78, 221, 0.1);
    color: var(--primary-light); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em;
    margin-bottom: 2.5rem;
    animation: fadeUp 1s var(--ease-out-expo) forwards;
}
.pulse-dot {
    width: 8px; height: 8px; background: var(--primary-light); border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-light);
    animation: pulse 2s infinite;
}
.hero-title {
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: clamp(2.2rem, 10vw, 7.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.05em; margin-bottom: 2rem;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.1s forwards;
}
.hero-title span {
    background: linear-gradient(135deg, #fff 0%, #a86cf0 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--fg-muted); max-width: 680px; margin: 0 auto 3.5rem; line-height: 1.6;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}
.hero-actions { 
    display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
}

.scroll-indicator {
    position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%);
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 1s forwards;
}
.mouse {
    width: 24px; height: 36px; border: 2px solid var(--border); border-radius: 12px; position: relative;
}
.mouse::before {
    content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; background: var(--fg-muted); border-radius: 50%;
    animation: scroll 2s infinite;
}

/* Manifesto */
.manifesto { padding: 12rem 0; text-align: center; }
.manifesto-text {
    font-size: clamp(1.4rem, 6vw, 3.5rem); font-weight: 500; line-height: 1.3; color: #444; letter-spacing: -0.03em;
    transition: color 1s;
}
.manifesto-text:hover { color: var(--fg-muted); }
.manifesto-text .highlight { color: #fff; font-weight: 700; background: linear-gradient(90deg, #fff, var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}

/* Bento Grid */
.section { padding: 8rem 0; }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.section-header p { color: var(--fg-muted); font-size: 1.25rem; max-width: 600px; margin: 0 auto; }

.grid { display: grid; gap: 1.5rem; }
.bento-grid { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 0 auto; }
.col-span-2 { grid-column: span 2; }

.bento-item {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 32px;
    padding: 3.5rem 2.5rem; transition: translate 0.5s var(--ease-out-expo), border-color 0.5s, box-shadow 0.5s;
    position: relative; overflow: hidden; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.bento-glow {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0; transition: opacity 0.5s; pointer-events: none;
}
.bento-item:hover { border-color: var(--border-hover); translate: 0 -8px; box-shadow: 0 30px 60px -15px rgba(0,0,0,0.8); }
.bento-item:hover .bento-glow { opacity: 1; }
.bento-item .icon { color: var(--primary-light); margin-bottom: 2rem; }
.bento-item h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: -0.02em; }
.bento-item p { color: var(--fg-muted); font-size: 1.1rem; line-height: 1.7; }

/* Stats */
.stats-grid { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 0 auto; }
.stat-card {
    text-align: center; padding: 4rem 2rem; border-top: 1px solid var(--border);
    transition: translate 0.5s var(--ease-out-expo), border-color 0.5s, background 0.5s;
}
.stat-card:hover { border-color: var(--primary-light); background: linear-gradient(180deg, rgba(157, 78, 221, 0.05), transparent); translate: 0 -10px; }
.stat-value { font-size: clamp(3rem, 10vw, 6.5rem); font-weight: 900; color: #fff; line-height: 1; margin-bottom: 1.5rem; letter-spacing: -0.05em; }
.stat-label { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--primary-light); }
.stat-context { font-size: 1rem; color: var(--fg-muted); line-height: 1.6; }

/* CTA */
.cta-box {
    background: linear-gradient(145deg, rgba(20,20,20,0.8), rgba(10,10,10,0.9));
    border: 1px solid var(--border); border-radius: 40px;
    padding: 8rem 2rem; text-align: center; max-width: 1100px; margin: 0 auto;
    position: relative; overflow: hidden;
}
.cta-box::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 100%, rgba(157, 78, 221, 0.15) 0%, transparent 50%);
    pointer-events: none;
}
.cta-box h2 { font-size: clamp(2rem, 8vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 2rem; line-height: 1.05; }
.cta-box p { color: var(--fg-muted); max-width: 600px; margin: 0 auto 4rem; font-size: 1.25rem; }

/* Footer */
footer { padding: 6rem 2rem 4rem; border-top: 1px solid var(--border); background: #000; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 6rem; }
.footer-brand { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; letter-spacing: 0.1em; color: #fff; line-height: 1; }
.footer-links { display: flex; gap: 3rem; }
.footer-links a { color: var(--fg-muted); text-decoration: none; font-size: 1.1rem; font-weight: 500; transition: color 0.3s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; color: var(--fg-muted); font-size: 0.95rem; border-top: 1px solid var(--border); padding-top: 2rem; }
.legal { display: flex; gap: 2rem; }
.legal a { color: var(--fg-muted); text-decoration: none; transition: color 0.3s; }
.legal a:hover { color: #fff; }



/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -100%); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(199, 125, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0); }
}
@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* ==========================================================================
   IMPECCABLE RESPONSIVE DESIGN (All Formats)
   ========================================================================== */

@media (max-width: 1024px) {
    /* Tablets and small laptops */
    .hero-title {
    overflow-wrap: break-word;
    word-break: break-word; font-size: clamp(3.5rem, 6vw, 5rem); }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .col-span-2 { grid-column: span 2; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
    .section { padding: 6rem 0; }
}

@media (max-width: 768px) {
    /* Mobile landscape and smaller tablets */
    .floating-nav { width: 95%; padding: 0.75rem 1.5rem; gap: 1rem; }
    .logo { font-size: 1rem; }
    .btn-primary-small { padding: 0.5rem 1rem; font-size: 0.8rem; }
    .nav-links { display: none; }
    
    .hero-title {
    overflow-wrap: break-word;
    word-break: break-word; font-size: clamp(2.5rem, 8vw, 4rem); }
    
    .col-span-2 { grid-column: span 1; }
    .bento-grid, .stats-grid { grid-template-columns: 1fr; }
    .stat-card { border-top: 1px solid var(--border); }
    
    .footer-top { flex-direction: column; align-items: flex-start; gap: 2rem; }
    .footer-bottom { flex-direction: column-reverse; gap: 1.5rem; align-items: flex-start; }
}

@media (max-width: 480px) {
    /* Small Mobile (Smartphones) */
    .hero { padding-top: 7rem; min-height: 80vh; }
    .hero-title {
    overflow-wrap: break-word;
    word-break: break-word; font-size: clamp(2.2rem, 10vw, 3.5rem); margin-bottom: 1rem; }
    .hero-subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; gap: 1rem; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; padding: 1rem 1.5rem; }
    
    .section { padding: 4rem 0; }
    .section-header h2 { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 0.75rem; }
    .manifesto { padding: 5rem 0; }
    .manifesto-text { font-size: clamp(1.4rem, 6vw, 2.2rem); }
    
    .bento-grid { gap: 1rem; }
    .bento-item { padding: 2rem 1.5rem; border-radius: 20px; }
    .bento-item h3 { font-size: 1.4rem; }
    .bento-item p { font-size: 1rem; }
    
    .stat-value { font-size: clamp(2.5rem, 12vw, 3.5rem); }
    .stat-card { padding: 2.5rem 1.5rem; }
    
    .cta-box { padding: 3rem 1.5rem; border-radius: 20px; }
    .cta-box h2 { font-size: clamp(1.8rem, 8vw, 2.8rem); margin-bottom: 1rem; }
    
    .footer-links { flex-direction: column; gap: 1rem; }
}

/* Animations that apply everywhere */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -100%); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(199, 125, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(199, 125, 255, 0); }
}
@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* Methodology Section */
.methodology { padding: 10rem 0; background: linear-gradient(180deg, var(--bg), rgba(157, 78, 221, 0.05), var(--bg)); }
.methodology-wrapper { display: flex; align-items: flex-start; gap: 4rem; position: relative; }
.methodology-left { flex: 1; position: sticky; top: 9rem; } /* native sticky: no layout jump, plays nice with Lenis */
.methodology-left h2 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.04em; margin-bottom: 1.5rem; line-height: 1.1; }
.methodology-intro { font-size: 1.25rem; color: var(--fg-muted); max-width: 400px; }
.methodology-right { flex: 1.2; display: flex; flex-direction: column; gap: 4rem; margin-top: 5rem;}

.step-card { 
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 24px;
    padding: 3rem; backdrop-filter: blur(10px);
    transition: translate 0.3s, border-color 0.3s;
}
.step-card:hover { border-color: var(--primary-light); translate: -10px 0; }
.step-num { font-size: 1rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; letter-spacing: 0.1em; }
.step-card h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 1rem; }
.step-card p { color: var(--fg-muted); font-size: 1.1rem; }

/* Filter Section */
.filter-section { padding: 8rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.filter-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 1.5rem; }
.filter-desc { font-size: 1.25rem; color: var(--fg-muted); max-width: 700px; margin: 0 auto; line-height: 1.8; }
.text-center { text-align: center; }

/* Hero Typography fixes for GSAP */
.hero-title .line { overflow: hidden; display: block; }
.hero-title .word { display: inline-block; }
.highlight-word { background: linear-gradient(135deg, #fff 0%, #a86cf0 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

@media (max-width: 900px) {
    .methodology-wrapper { flex-direction: column; align-items: stretch; gap: 2rem; }
    .methodology-left { position: static; }
    .methodology-right { margin-top: 2rem; gap: 2rem; }
    .step-card { padding: 2rem; }
}

/* Custom Cursor — the native cursor is only hidden once main.js has the custom one running */
html.has-custom-cursor body,
html.has-custom-cursor a,
html.has-custom-cursor button { cursor: none; }
.custom-cursor, .custom-cursor-follower { opacity: 0; }
html.cursor-visible .custom-cursor,
html.cursor-visible .custom-cursor-follower { opacity: 1; }
.custom-cursor {
    width: 8px; height: 8px; background: #fff; border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); transition: width 0.2s, height 0.2s, opacity 0.3s;
}
.custom-cursor-follower {
    width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.3); border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9998;
    transform: translate(-50%, -50%); transition: all 0.1s ease-out;
}
.custom-cursor.hover { width: 12px; height: 12px; background: var(--primary-light); }
.custom-cursor-follower.hover { width: 60px; height: 60px; border-color: var(--primary-light); background: rgba(157, 78, 221, 0.1); }

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
    .custom-cursor, .custom-cursor-follower { display: none; }
}

/* Noise Overlay */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9997; opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Founders Section */
.founders-section { padding: 8rem 0 4rem; }
.founders-content {
    background: linear-gradient(180deg, rgba(20,20,20,0.8), rgba(5,5,5,1));
    border: 1px solid var(--border); border-radius: 32px; padding: 6rem 2rem;
    position: relative; overflow: hidden;
}
.founders-content::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 2px; background: radial-gradient(circle, var(--primary-light), transparent); opacity: 0.5;
}
.founders-content h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.5rem; line-height: 1.1; }
.founders-content p { color: var(--fg-muted); font-size: 1.2rem; max-width: 600px; margin: 0 auto; line-height: 1.7; }


/* Lenis + native anchors */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ==========================================================================
   INNER PAGES (Legal + 404)
   ========================================================================== */
.page-hero { padding: 12rem 0 4rem; text-align: center; position: relative; }
.page-hero .badge { margin-bottom: 2rem; }
.page-title {
    font-size: clamp(2.6rem, 8vw, 5.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.05em; margin-bottom: 1.5rem;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.1s forwards;
}
.page-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--fg-muted); max-width: 640px; margin: 0 auto 1.5rem; line-height: 1.6;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}
.page-meta {
    font-size: 0.9rem; color: var(--fg-muted);
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.3s forwards;
}
.legal-switcher {
    display: inline-flex; gap: 0.25rem; padding: 0.35rem; margin-top: 2.5rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--card-bg);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.4s forwards;
}
.legal-switcher a {
    padding: 0.55rem 1.1rem; border-radius: 999px; color: var(--fg-muted);
    font-size: 0.9rem; font-weight: 500; text-decoration: none; white-space: nowrap;
    transition: all 0.3s var(--ease-out-expo);
}
.legal-switcher a:hover { color: #fff; }
.legal-switcher a[aria-current="page"] { background: #fff; color: #000; font-weight: 600; }

/* Legal layout */
.legal-section { padding: 2rem 0 6rem; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 5rem; max-width: 1100px; align-items: start; }
.legal-toc { position: sticky; top: 8rem; }
.legal-toc-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--fg-muted); margin-bottom: 1rem;
}
.legal-toc ol { list-style: none; border-left: 1px solid var(--border); }
.legal-toc a {
    display: block; padding: 0.45rem 0 0.45rem 1.25rem; margin-left: -1px;
    border-left: 1px solid transparent; color: var(--fg-muted);
    font-size: 0.9rem; line-height: 1.4; text-decoration: none;
    transition: color 0.3s, border-color 0.3s;
}
.legal-toc a:hover { color: #fff; }
.legal-toc a.is-active { color: #fff; border-left-color: var(--primary-light); }

.legal-tldr {
    background: linear-gradient(145deg, rgba(157, 78, 221, 0.12), rgba(20, 20, 20, 0.6));
    border: 1px solid rgba(157, 78, 221, 0.3); border-radius: 24px;
    padding: 2rem 2.25rem; margin-bottom: 3rem;
}
.legal-tldr h2 {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--primary-light); margin-bottom: 1.25rem;
}
.legal-tldr ul { list-style: none; display: grid; gap: 0.85rem; }
.legal-tldr li { display: flex; gap: 0.85rem; font-size: 1.05rem; line-height: 1.55; color: var(--fg); }
.legal-tldr li::before {
    content: ""; flex: 0 0 22px; height: 22px; margin-top: 0.1rem; border-radius: 50%;
    background: rgba(157, 78, 221, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.legal-block { padding: 2.5rem 0; border-top: 1px solid var(--border); scroll-margin-top: 7rem; }
.legal-block h2 {
    display: flex; align-items: baseline; gap: 1rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 1rem;
}
.legal-num { font-size: 0.9rem; font-weight: 800; color: var(--primary); letter-spacing: 0.1em; }
.legal-block p, .legal-block li { color: var(--fg-muted); font-size: 1.075rem; line-height: 1.8; }
.legal-block p + p, .legal-block p + ul, .legal-block ul + p { margin-top: 1rem; }
.legal-block ul { list-style: none; display: grid; gap: 0.75rem; }
.legal-block li { position: relative; padding-left: 1.5rem; }
.legal-block li::before {
    content: ""; position: absolute; left: 0; top: 0.8em;
    width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light);
}
.legal-block strong { color: var(--fg); font-weight: 600; }
.legal-content a {
    color: var(--primary-light); text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: rgba(199, 125, 255, 0.4); transition: color 0.3s, text-decoration-color 0.3s;
}
.legal-content a:hover { color: #fff; text-decoration-color: currentColor; }

/* CTA actions (inner pages) */
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-box .cta-note { margin: 2rem auto 0; font-size: 0.9rem; color: var(--fg-muted); position: relative; }

/* 404 */
.notfound { min-height: 100vh; display: flex; align-items: center; text-align: center; padding: 10rem 0 6rem; }
.notfound-code {
    font-size: clamp(7rem, 28vw, 17rem); font-weight: 900; line-height: 0.85; letter-spacing: -0.06em;
    background: linear-gradient(180deg, #fff 0%, #a86cf0 60%, rgba(168, 108, 240, 0.1) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 60px rgba(157, 78, 221, 0.35));
    margin-bottom: 2rem;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) forwards, float 6s ease-in-out 1s infinite;
}
.notfound .page-title { font-size: clamp(2.2rem, 6vw, 4rem); }
.notfound .page-subtitle { margin-bottom: 3rem; }
.notfound-links {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    max-width: 900px; margin: 5rem auto 0; text-align: left;
    opacity: 0; animation: fadeUp 1s var(--ease-out-expo) 0.5s forwards;
}
.notfound-links-label {
    grid-column: 1 / -1; text-align: center; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--fg-muted); margin-bottom: 0.5rem;
}
.quick-link {
    display: block; padding: 1.75rem; border-radius: 24px; text-decoration: none; color: var(--fg);
    background: var(--card-bg); border: 1px solid var(--border);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: all 0.5s var(--ease-out-expo);
}
.quick-link:hover { border-color: var(--border-hover); transform: translateY(-6px); box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.8); }
.quick-link-eyebrow { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; color: var(--primary); margin-bottom: 0.75rem; text-transform: uppercase; }
.quick-link strong { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.quick-link strong::after { content: "→"; color: var(--fg-muted); transition: transform 0.3s var(--ease-out-expo), color 0.3s; }
.quick-link:hover strong::after { transform: translateX(4px); color: var(--primary-light); }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (max-width: 900px) {
    .legal-layout { grid-template-columns: 1fr; gap: 0; }
    .legal-toc { display: none; }
}

@media (max-width: 768px) {
    .page-hero { padding: 9rem 0 3rem; }
    .notfound { padding: 8rem 0 4rem; }
    .notfound-links { grid-template-columns: 1fr; margin-top: 3.5rem; }
}

@media (max-width: 480px) {
    .page-hero { padding: 8rem 0 2rem; }
    .legal-switcher { display: flex; width: 100%; justify-content: space-between; }
    .legal-switcher a { flex: 1; text-align: center; padding: 0.55rem 0.5rem; font-size: 0.8rem; }
    .legal-tldr { padding: 1.5rem; border-radius: 20px; margin-bottom: 1.5rem; }
    .legal-block { padding: 2rem 0; }
    .legal-block h2 { gap: 0.75rem; }
    .legal-block p, .legal-block li { font-size: 1rem; }
    .cta-actions { flex-direction: column; }
    .quick-link { padding: 1.5rem; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .notfound-code { animation: fadeUp 1s var(--ease-out-expo) forwards; }
}
