/* =========================================
   1. CORE VARIABLES (Global)
   ========================================= */
:root {
    --bg: #06070D;
    --text: #F5F9FF;
    --muted: #AAB4C7;
    --card: #0C1227;
    --input: #151B2D;
    --border: rgba(255, 255, 255, 0.08);
    
    /* Brand Gradients */
    --grad1: #00FFC6; /* Teal */
    --grad2: #007BFF; /* Blue */
    --grad3: #7C5CFF; /* Purple */
    --grad4: #21D1FF; /* Cyan */
    
    --primary: #00FFC6;
    --primary-grad: linear-gradient(90deg, #00FFC6 0%, #007BFF 100%);
    
    --accent: #31E2B6;
    --danger: #FF4D4D;
    --warning: #F59E0B;
    --success: #10B981;
    
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.4);
    
    --font-sans: 'Inter', sans-serif;
    --font-head: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background-color: var(--bg);
    background-image: radial-gradient(circle at 50% 0%, #111827 0%, #03050C 60%);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Utilities */
a { text-decoration: none; color: inherit; transition: 0.2s; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.material-symbols-rounded { vertical-align: middle; font-size: 20px; }

/* =========================================
   2. HEADER (Shared)
   ========================================= */
header {
    height: 70px; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 7, 13, 0.95); backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 100;
}

.logo, .brand-logo {
    font-family: var(--font-head); font-weight: 700; font-size: 20px;
    color: var(--text); display: flex; align-items: center; gap: 8px;
}
.logo-icon { width: 80px; height: 80px; border-radius: 8px; }

.close-btn {
    color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; transition: 0.2s;
}
.close-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

/* =========================================
   3. LANDING PAGE STYLES (Index)
   ========================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hero { min-height: 90vh; display: flex; align-items: center; padding: 40px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.btn { 
    padding: 12px 24px; border-radius: 12px; font-weight: 700; cursor: pointer; border:none; 
    background: rgba(255,255,255,0.06); color: var(--text); display: inline-block; text-align: center;
}
.btn.primary { background: var(--primary-grad); color: var(--card); }

/* (Include other Index specific styles like Roadmap/Token here if needed, 
    but for this task we focus on fixing the Demo styles below) */

/* =========================================
   4. DEMO PAGE STYLES (From Backup)
   ========================================= */

/* Layout: Stacked by default (Mobile First), Side-by-side on Desktop */
.wrapper {
    display: grid; grid-template-columns: 1fr;
    max-width: 1000px; margin: 40px auto; gap: 40px; padding: 0 20px;
}
@media(min-width: 800px) {
    .wrapper { grid-template-columns: 300px 1fr; align-items: start; }
}

/* Narrative Sidebar */
.guide-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; position: sticky; top: 100px;
}
.guide-step {
    text-transform: uppercase; font-size: 11px; letter-spacing: 1px;
    color: var(--primary); font-weight: 700; margin-bottom: 12px; display: block;
}
.guide-title {
    font-family: var(--font-head); font-size: 20px; font-weight: 600;
    margin: 0 0 12px; line-height: 1.3;
}
.guide-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.guide-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 600;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--muted);
}
.guide-badge.active {
    background: rgba(0, 255, 198, 0.1); border-color: var(--primary); color: var(--primary);
}

/* Phone Simulator */
.phone-frame {
    background: var(--card); border: 1px solid var(--border); border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); overflow: hidden;
    min-height: 500px; display: flex; flex-direction: column;
}

/* Progress Dots */
.progress-bar {
    display: flex; padding: 20px; justify-content: center; gap: 8px;
    border-bottom: 1px solid var(--border); background: rgba(0, 0, 0, 0.2);
}
.p-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: 0.3s; }
.p-dot.active { background: var(--primary); box-shadow: 0 0 10px var(--primary); }

/* App Content */
.app-content { padding: 32px; flex: 1; display: flex; flex-direction: column; }
.app-brand {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.app-logo {
    width: 42px; height: 42px; border-radius: 10px;
    display: grid; place-items: center; font-size: 24px; color: white;
}
.app-info h3 { margin: 0; font-size: 16px; font-weight: 600; }
.app-info p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* Themes */
.theme-a .app-logo { background: #3B82F6; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }
.theme-a .btn-primary { background: #3B82F6; }
.theme-b .app-logo { background: linear-gradient(135deg, #EC4899, #8B5CF6); box-shadow: 0 4px 20px rgba(236, 72, 153, 0.4); }
.theme-b .btn-primary { background: linear-gradient(90deg, #EC4899, #8B5CF6); }

/* Forms */
.input-group { margin-bottom: 16px; }
.input-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.input-field {
    width: 100%; padding: 12px 16px; border-radius: 10px;
    background: var(--input); border: 1px solid var(--border); color: white;
    font-size: 16px; /* Prevents iOS zoom */ outline: none; transition: 0.2s;
}
.input-field:focus { border-color: var(--primary); background: rgba(255, 255, 255, 0.05); }

/* App Buttons */
.btn-app {
    width: 100%; padding: 14px; border-radius: 10px; border: none;
    color: white; font-weight: 600; font-size: 16px; cursor: pointer;
    transition: transform 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-app:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-ghost {
    background: transparent; border: 1px solid var(--border); color: var(--muted); margin-bottom: 12px; width: 100%; padding: 14px; border-radius: 10px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* Upsell Card */
.upsell-card {
    background: linear-gradient(145deg, #111827, #0f1320);
    border: 1px solid rgba(0, 255, 198, 0.2); border-radius: 12px;
    padding: 20px; position: relative; overflow: hidden; margin-top: 10px;
}
.upsell-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%; background: var(--primary);
}

/* Consent Modal */
.consent-overlay {
    background: #131825; border-radius: 16px; padding: 24px;
    border: 1px solid var(--border); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.data-row {
    display: flex; justify-content: space-between; padding: 12px;
    background: rgba(255, 255, 255, 0.03); border-radius: 8px;
    margin: 16px 0; font-size: 13px;
}

@media (max-width: 900px) {
    /* Stack layouts */
    .hero-grid, .section-sticky-wrap { grid-template-columns: 1fr; text-align: center; }
    .hero-grid > div, .section-sticky-wrap > div { display: flex; flex-direction: column; align-items: center; }
    .sticky-graphic-col { position: relative; top: 0; padding: 20px 0; }
    .cols-2, .cols-4 { grid-template-columns: 1fr; }
    
    /* Nav */
    .nav .links { display: none; }
    .mobile-menu-btn { display: block; }
    
    /* DEMO PAGE FIX: Stack Narrative above Phone */
    .demo-wrapper {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding-top: 20px;
    }
    
    .guide-panel {
        position: relative; /* Disable sticky */
        top: auto;
        width: 100%;
        margin-bottom: 10px;
        border-left: 4px solid var(--primary); /* Visual Anchor */
    }
    
    .phone-frame {
        width: 100%;
        max-width: 450px; /* Prevent it getting too huge */
        margin: 0 auto;
        min-height: 550px;
    }
}