/* DESIGN SYSTEM VARIABLES */
:root {
    --cream: #f2eee5;
    --cream-mid: #e9e4d9;
    --cream-deep: #dbd5c7;
    --ink: #0d1117;
    --ink-soft: #161b22;
    --ink-muted: #4b5563;
    --white: #ffffff;
    --accent: #10b981; /* Emerald conversion green */
    
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    width: 100%;
    overflow-x: hidden;
}
body {
    background-color: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

/* FILM GRAIN SYSTEM Overlay */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    opacity: 0.025;
    z-index: 9999;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* FIXED WEBGL CANVAS TREE */
#hero-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 2;
    pointer-events: none;
}
#hero-canvas.drag-enabled {
    pointer-events: all;
    cursor: grab;
}
#hero-canvas.drag-enabled:active { cursor: grabbing; }

/* GLASSMORPHISM UTILITIES */
.glass-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 10px 30px rgba(0,0,0,0.03);
    border-radius: 24px;
}
.glass-pill {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
}

/* SECTION NAVIGATION CONTAINER */
.floating-nav {
    position: fixed;
    top: 1.5rem; left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    width: 90%;
    max-width: 1200px;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(32px) saturate(220%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 4px 20px rgba(0,0,0,0.02);
}
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 2px; }
.nav-links a {
    text-decoration: none;
    color: var(--ink-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 1.25rem;
    transition: color 0.3s;
}
.nav-links a:hover { color: var(--ink); }

.profile-btn {
    display: flex; align-items: center;
    padding: 0.5rem 1.25rem; text-decoration: none; color: var(--ink); font-size: 0.85rem; font-weight: 600;
}
.pulse-dot {
    width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-right: 8px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* CORE SCROLL VIEWPORTS */
.scroll-section {
    position: relative;
    min-height: 100vh;
    padding: 8rem 4rem 4rem;
    display: flex;
    align-items: center;
    z-index: 10;
    overflow: hidden; /* Prevent absolute watermarks from causing horizontal overflow */
}

/* HERO ELEMENT LAYOUT */
#hero-section { justify-content: space-between; background: transparent; }
.event-card-wrapper {
    position: relative;
    width: 400px;
    z-index: 100; /* Promoted above Three.js canvas */
    transform: translate3d(0, 0, 0); /* Force isolated hardware stacking context */
}

#event-card {
    position: relative; border-radius: 32px; overflow: hidden; padding: 2rem;
}
.ec-bend {
    display: none !important; /* Hide buggy backdrop filter causing browser blurry compositing */
}
.ec-edge {
    position: absolute; top:0; left:0; width:100%; height:100%; z-index: 2;
    background: var(--white); /* Solid white to prevent 3D background noise */
    border: 1.5px solid var(--cream-deep);
    border-radius: 32px;
    box-shadow: 0 20px 45px rgba(13, 17, 23, 0.08); /* Stronger drop shadow for desktop pop */
}
.ec-content { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 1.5rem; }

.card-header { display: flex; justify-content: space-between; align-items: center; }
.pill-tag { background: var(--ink); color: var(--white); font-size: 0.7rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 99px; text-transform: uppercase; }
.live-dot { color: var(--ink-soft); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.query-prompt {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.45;
    background: rgba(13, 17, 23, 0.05);
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    border: 1px solid rgba(13, 17, 23, 0.08);
    border-left: 5px solid var(--accent);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.query-prompt::before {
    content: "USER INTERROGATION";
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ink-muted);
    margin-bottom: 0.35rem;
}
.card-divider { border: none; height: 1px; background: rgba(0,0,0,0.1); }
.ai-response-mock {
    background: rgba(255, 255, 255, 0.85);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(13, 17, 23, 0.08);
    box-shadow: 0 4px 12px rgba(13, 17, 23, 0.02);
}
.bot-badge { font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 1px; color: var(--ink-muted); display: block; margin-bottom: 0.25rem; }
.response-text { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; }
.highlight-text { color: #0284c7; font-weight: 700; background: rgba(14, 165, 233, 0.1); padding: 0.1rem 0.3rem; border-radius: 4px; }

.card-footer-buttons { display: flex; gap: 1rem; }
.btn-ghost { text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--ink); padding: 0.75rem 1rem; border: 1px solid var(--ink); border-radius: 14px; text-align: center; flex: 1; transition: background 0.3s; }
.btn-ghost:hover { background: rgba(0,0,0,0.05); }
.btn-fill { text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--white); background: var(--ink); padding: 0.75rem 1rem; border-radius: 14px; text-align: center; flex: 1; transition: background 0.3s; }
.btn-fill:hover { background: var(--ink-soft); }

#hero-text {
    position: relative;
    z-index: 12;
    transform: translate3d(0, 0, 0); /* Force hardware stacking context above canvas */
    max-width: 50%;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.section-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 4px; color: var(--ink-muted); text-transform: uppercase; margin-bottom: 1rem; }
.headline { font-family: var(--font-display); font-size: 6.5rem; line-height: 0.9; text-transform: uppercase; margin-bottom: 1.5rem; mix-blend-mode: multiply; }
.hl-line { display: block; transition: transform 0.4s var(--ease-out); }
.hl-line:hover { transform: translateX(-15px); color: var(--accent); }
.hero-description { font-size: 1.15rem; line-height: 1.6; color: var(--ink-muted); max-width: 540px; margin-bottom: 2.5rem; }

.pricing-strip { display: flex; align-items: center; padding: 0.5rem 0.5rem 0.5rem 1.5rem; gap: 1.5rem; }
.strip-text { font-size: 0.9rem; color: var(--ink-soft); }
.strip-cta { text-decoration: none; background: var(--ink); color: var(--white); font-size: 0.85rem; font-weight: 600; padding: 0.6rem 1.25rem; border-radius: 999px; transition: background 0.3s; }
.strip-cta:hover { background: var(--accent); }

#sig-wrap { position: absolute; bottom: 3rem; left: 4rem; opacity: 0.4; }
.sp1, .sp2, .sp3 { stroke-dasharray: 400; stroke-dashoffset: 400; }

.scroll-indicator { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 0.6; }
.scroll-line { width: 1px; height: 50px; background: var(--ink); transform-origin: top; animation: scrollPulse 2s infinite; }
.scroll-indicator span { font-size: 0.65rem; font-weight: 700; letter-spacing: 2px; }
@keyframes scrollPulse {
    0% { transform: scaleY(0); opacity: 0; }
    50% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(0); opacity: 0; }
}
.drag-hint { position: absolute; bottom: 7.5rem; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--ink-muted); font-style: italic; letter-spacing: 1px; }

/* STATS SECTION CONTAINER */
#stats-section { background: transparent; gap: 4rem; overflow: hidden; }
.watermark-text { position: absolute; bottom: -4rem; left: -2rem; font-family: var(--font-display); font-size: 24rem; color: rgba(0,0,0,0.015); pointer-events: none; }
.stats-left { position: relative; z-index: 10; width: 100%; max-width: 1100px; }
.stats-left h2 { font-family: var(--font-display); font-size: 4rem; line-height: 1; margin-bottom: 1.5rem; }
.stats-left p { font-size: 1.2rem; color: var(--ink-muted); max-width: 600px; margin-bottom: 4rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; width: 100%; }
.stat-card { padding: 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; opacity: 0; transform: translateY(30px); }
.stat-num { font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--ink); }
.stat-label { font-size: 0.9rem; font-weight: 500; color: var(--ink-muted); min-height: 45px; }
.delta-badge { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 99px; width: max-content; text-transform: uppercase; }
.delta-badge.bad { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.delta-badge.good { background: rgba(16, 185, 129, 0.1); color: var(--accent); }

/* PROTOCOL SECTION LAYOUT */
#how-section { background: rgba(233, 228, 217, 0.65); justify-content: flex-end; }
#how-section .watermark-text { top: 50%; right: -4rem; transform: translateY(-50%); bottom: auto; left: auto; }
.how-content { max-width: 700px; text-align: left; position: relative; z-index: 10; }
.how-content h2 { font-family: var(--font-display); font-size: 4rem; line-height: 1; margin-bottom: 3rem; }

.step-container { display: flex; flex-direction: column; gap: 1.5rem; }
.step-item { display: flex; gap: 2rem; padding: 2rem; align-items: flex-start; opacity: 0; transform: translateX(40px); }
.step-num { font-family: var(--font-display); font-size: 3.5rem; color: rgba(0,0,0,0.1); line-height: 1; }
.step-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-info p { font-size: 0.95rem; color: var(--ink-muted); line-height: 1.6; }

/* PREMIUM SOVEREIGN FOOTER SYSTEM */
footer {
    background: var(--ink); color: rgba(255,255,255,0.7); padding: 8rem 4rem 2rem;
    position: relative; overflow: hidden; min-height: 80vh; display: flex; align-items: flex-end;
}
.footer-bg-ball {
    position: absolute; top: -10rem; left: -10rem; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.03) 0%, transparent 70%);
}
.footer-container { width: 100%; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 6rem; position: relative; z-index: 10; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1.5fr 1.2fr; gap: 4rem; width: 100%; }

.footer-brand h2 { font-family: var(--font-display); font-size: 3.5rem; color: var(--white); letter-spacing: 2px; margin-bottom: 1rem; }
.footer-brand p { font-size: 1rem; margin-bottom: 2rem; max-width: 320px; }
.social-pills { display: flex; gap: 0.75rem; }
.social-pills .glass-pill { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--white); padding: 0.5rem 1rem; font-size: 0.8rem; text-decoration: none; transition: background 0.3s, transform 0.3s; }
.social-pills .glass-pill:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

.footer-links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.link-col h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.4); margin-bottom: 1.5rem; }
.link-col a { display: block; text-decoration: none; color: rgba(255,255,255,0.6); font-size: 0.95rem; margin-bottom: 0.85rem; transition: transform 0.3s, color 0.3s; }
.link-col a:hover { color: var(--white); transform: translateX(4px); }

.newsletter-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); padding: 2.5rem; border-radius: 24px; backdrop-filter: blur(12px); display: flex; flex-direction: column; gap: 1rem; }
.newsletter-card h4 { font-size: 1.2rem; color: var(--white); font-weight: 700; }
.newsletter-card p { font-size: 0.85rem; line-height: 1.5; color: rgba(255,255,255,0.5); }
.w-full { width: 100%; }

.footer-bottom { display: flex; flex-direction: column; gap: 2rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.ticker-wrap { width: 100%; overflow: hidden; background: rgba(255,255,255,0.02); padding: 0.75rem 0; border-radius: 8px; }
.cities-ticker { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 3px; color: rgba(255,255,255,0.15); white-space: nowrap; animation: tickerScroll 25s linear infinite; }
@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* RESPONSIVE RENDERING BREAKPOINTS */
@media(max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    #hero-section { flex-direction: column-reverse; justify-content: center; gap: 4rem; padding: 8rem 2rem 4rem; text-align: center; }
    #hero-text { max-width: 100%; align-items: center; text-align: center; }
    .headline { font-size: 4.5rem; mix-blend-mode: normal; }
    .pricing-strip { margin-top: 2rem; }
    .footer-top { grid-template-columns: 1fr; gap: 3rem; }
    .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
    .floating-nav {
        display: block;
        width: 95%;
        padding: 0.6rem 1.2rem;
        top: 1rem;
    }
    .nav-links { display: none; }
    .nav-logo { font-size: 1.3rem; }
    .drag-hint { display: none !important; } /* Hide interactive rotate prompts on touch devices */
}

@media(max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .headline { font-size: 3.5rem; }
    .event-card-wrapper { width: 100%; max-width: 340px; }
    .card-footer-buttons { flex-direction: column; }
    .scroll-section { padding: 6rem 1.5rem 3rem; }
    
    .floating-nav {
        padding: 0.5rem 1rem;
        top: 0.5rem;
    }
    .nav-logo { font-size: 1.15rem; letter-spacing: 1px; }
    .profile-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
    .pulse-dot { width: 6px; height: 6px; margin-right: 6px; }
}

/* INFO MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(242, 238, 229, 0.45); /* Warm cream semi-transparent overlay */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-card {
    position: relative;
    width: 90%;
    max-width: 500px;
    padding: 3rem 2.5rem 2.5rem;
    background: var(--white); /* Solid white background for high contrast */
    border: 1px solid var(--cream-deep);
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(13, 17, 23, 0.08);
    transform: translateY(40px) scale(0.95);
    transition: transform 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}
.modal-close {
    position: absolute;
    top: 1.25rem; right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink-muted);
    transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }
.modal-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--ink);
    margin-top: 0.5rem;
    text-transform: uppercase;
}
.modal-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink-soft); /* Dark charcoal text for readability */
}
.modal-footer-buttons {
    display: flex;
    margin-top: 0.5rem;
}

