/* --- 1. CORE VARIABLES (Web3 Theme) --- */
:root {
    --bg: #06070D;
    --text: #F5F9FF;
    --muted: #AAB4C7;
    --card: #0C1227;
    --input: #151B2D;
    --glass: rgba(255, 255, 255, .05);
    --bdr: rgba(255, 255, 255, .08);
    
    /* Primary Gradients */
    --grad1: #00FFC6; /* Teal */
    --grad2: #007BFF; /* Blue */
    --grad3: #7C5CFF; /* Purple */
    --grad4: #21D1FF; /* Cyan */
    
    --accent: #31E2B6;
    --danger: #FF4D4D;
    --warning: #F59E0B;
    --success: #10B981;
    --radius: 16px;
    --shadow: 0 0 1px rgba(255, 255, 255, .15) inset, 0 10px 30px rgba(0, 0, 0, .4);
    --hover-glow: 0 0 20px rgba(0, 255, 198, .2);

    /* Fonts */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Demo Specifics */
    --primary: #00FFC6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    /* Subtle radial gradient for depth */
    background-image: radial-gradient(circle at 50% 0%, #111827 0%, #03050C 60%);
    color: var(--text);
    font-family: var(--font-sans);
    scroll-behavior: smooth;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

a { color: inherit; text-decoration: none; transition: 0.2s; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.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); } }

/* --- 2. HEADER --- */
header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(6, 7, 13, .85); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bdr);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; position: relative; }
.brand-logo, .logo {
    height: 40px; width: auto; font-family: var(--font-heading); font-weight: 800; font-size: 24px;
    background: linear-gradient(90deg, var(--grad1), var(--grad2));
    -webkit-background-clip: text; color: transparent;
    display: flex; align-items: center; gap: 10px;
}
.logo-icon { width: 80px; height: 80px; border-radius: 8px; }

.links { display: flex; align-items: center; gap: 24px; font-weight: 600; font-size: 15px; }
.links a { opacity: .8; white-space: nowrap; }
.links a:hover { opacity: 1; color: var(--grad1); }

/* Buttons */
.cta, .btn {
    padding: 10px 20px; border-radius: 12px; font-weight: 700;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--bdr);
    color: var(--text); transition: transform .2s ease;
    display: inline-block; cursor: pointer; font-size: 14px; text-align: center;
}
.cta:hover, .btn:hover { transform: translateY(-2px); box-shadow: var(--hover-glow); border-color: var(--grad1); }
.cta, .btn.primary { 
    background: linear-gradient(90deg, var(--grad1), var(--grad2)); 
    color: var(--card); border: none; 
    box-shadow: 0 0 20px rgba(0, 255, 198, 0.2);
}

/* Mobile Menu */
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 28px; cursor: pointer; padding: 8px; }
.mobile-menu {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(6, 7, 13, .98); backdrop-filter: blur(20px); z-index: 110;
    padding: 80px 24px 24px; transform: translateX(100%); transition: transform .3s ease;
}
.mobile-menu.active { transform: translateX(0); display: flex; flex-direction: column; }
.mobile-menu-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: var(--text); font-size: 32px; cursor: pointer; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 24px; }
.mobile-menu nav a { font-size: 24px; font-weight: 700; padding: 12px 0; border-bottom: 1px solid var(--bdr); }

/* --- 3. SECTIONS --- */
section { padding: 80px 0; }
.section-title { font-family: var(--font-heading); font-size: clamp(28px, 5vw, 36px); margin: 0 0 12px; font-weight: 800; line-height: 1.2; }
.section-subtitle { color: var(--muted); font-size: clamp(16px, 2.5vw, 18px); max-width: 800px; margin-bottom: 40px; line-height: 1.6; }
.muted { color: var(--muted); }

/* Hero */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden; padding: 40px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; width: 100%; }
.title { margin: 16px 0 12px; font-family: var(--font-heading); font-size: clamp(40px, 7vw, 80px); line-height: 1.1; font-weight: 800; }
.title .g { background: linear-gradient(90deg, var(--grad1), var(--grad2)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.subtitle { color: var(--muted); font-size: clamp(16px, 2.5vw, 22px); max-width: 520px; margin: 0 0 24px; font-weight: 300; line-height: 1.6; }
.chips { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 600; background: rgba(255, 255, 255, .06); border: 1px solid var(--bdr); font-size: 14px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.hero-graphic-wrap { display: grid; gap: 20px; }
.hero-graphic {
    padding: 30px; background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius);
    display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center;
    min-height: 140px; position: relative; overflow: hidden;
}
.hero-graphic::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%); }
.graphic-title { font-family: var(--font-heading); font-size: 28px; font-weight: 800; z-index: 1; }
.graphic-label { font-size: 14px; font-weight: 600; z-index: 1; }

/* --- 4. PHONE MOCKUP --- */
.section-sticky-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; }
.sticky-graphic-col { position: sticky; top: 120px; height: fit-content; display: grid; place-items: center; padding: 20px 0; }
.scrolling-content-col { display: flex; flex-direction: column; gap: 20px; padding: 0; }

.content-step-card {
    background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow); cursor: pointer; opacity: 0.6; transition: all .3s ease; filter: grayscale(0.8);
}
.content-step-card:hover, .content-step-card.active {
    opacity: 1; filter: grayscale(0); border-color: var(--grad1);
    box-shadow: var(--shadow), var(--hover-glow); transform: translateY(-2px);
}
.content-step-card h3 { font-family: var(--font-heading); font-size: clamp(20px, 3vw, 24px); margin: 0 0 10px; }

.phone-mockup {
    width: 280px; height: 560px; background: #111; border: 12px solid #000;
    border-radius: 40px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 2px #333;
    position: relative; z-index: 1;
}
.phone-screen { width: 100%; height: 100%; background: var(--bg); border-radius: 28px; overflow: hidden; position: relative; }
.screen-content {
    position: absolute; inset: 0; padding: 24px 18px; opacity: 0;
    transform: scale(0.98); transition: all 0.5s ease; z-index: 1;
    display: flex; flex-direction: column;
}
.screen-content.active { opacity: 1; transform: scale(1); z-index: 2; }

/* Mockup Internal UI */
.mock-header { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 40px; text-transform: uppercase; }
.mock-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.mock-body { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 30px; }
.mock-card { background: var(--card); border-radius: 12px; padding: 16px; border: 1px solid var(--bdr); margin-bottom: 20px;}
.mock-card .label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.mock-card .value { font-size: 16px; font-weight: 600; color: var(--accent); }
.mock-button { 
    display: block; text-align: center; width: 100%; padding: 14px; border-radius: 12px;
    font-weight: 700; background: var(--grad1); color: var(--card); font-size: 16px; margin-top: auto;
}
.mock-button.secondary { background: var(--card); color: var(--text); border: 1px solid var(--bdr); margin-top: 10px; }
.mock-notification { 
    background: rgba(30, 30, 35, 0.9); backdrop-filter: blur(10px);
    border-radius: 16px; padding: 16px; border: 1px solid rgba(255, 255, 255, 0.1); 
}

/* --- 5. ARCHITECTURE --- */
.arch-core-wrap {
    position: relative; width: min(400px, 90vw); height: min(400px, 90vw);
    display: grid; place-items: center; margin: 40px auto;
}
.arch-ring { position: absolute; border-radius: 50%; border: 1px solid var(--bdr); transition: all 0.5s ease; opacity: 0.8; }
.arch-ring-text {
    position: absolute; font-size: clamp(11px, 2vw, 14px); font-weight: 700;
    color: var(--muted); transition: all 0.5s ease; text-align: center; max-width: 150px;
}
#ring-l2 { width: 100%; height: 100%; border-color: var(--grad1); }
#ring-protocol { width: 75%; height: 75%; border-color: var(--grad2); }
#ring-issuer { width: 50%; height: 50%; border-color: var(--grad3); }
#ring-sdk { width: 25%; height: 25%; border-color: var(--grad4); }
.arch-center { position: absolute; font-family: var(--font-heading); font-weight: 800; font-size: clamp(14px, 3vw, 20px); color: var(--text); text-align: center; padding: 0 20px; }
.arch-ring.active { box-shadow: 0 0 20px rgba(0, 255, 198, 0.5); transform: scale(1.05); }
.arch-ring-text.active { color: var(--accent); font-size: clamp(12px, 2.2vw, 16px); transform: scale(1.1); }

/* --- 6. TIMELINE --- */
.roadmap-graphic-wrap { position: relative; width: 100%; height: 80px; margin-bottom: 24px; }
.roadmap-line-wrap.horizontal {
    position: relative; height: 16px; width: 100%; background: var(--card);
    border: 1px solid var(--bdr); border-radius: 999px; margin-top: 20px;
}
.roadmap-progress {
    height: 100%; width: 0; background: linear-gradient(90deg, var(--grad1), var(--grad2));
    box-shadow: 0 0 10px rgba(0, 255, 198, .5); border-radius: 999px; transition: width 0.6s ease-out;
}
.roadmap-dot {
    position: absolute; top: 50% !important; transform: translate(-50%, -50%) !important;
    width: 24px; height: 24px; background: var(--bg); border: 3px solid var(--bdr);
    border-radius: 50%; transition: all 0.4s ease; cursor: pointer; z-index: 2;
}
.roadmap-dot-label {
    position: absolute; top: 30px !important; left: 50% !important; transform: translateX(-50%) !important;
    font-weight: 700; color: var(--muted); transition: all 0.4s ease; white-space: nowrap; text-align: center; font-size: 14px;
}
.roadmap-dot.active {
    background: var(--accent); border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.1); box-shadow: var(--hover-glow);
}
.roadmap-dot.active .roadmap-dot-label { color: var(--text); transform: translateX(-50%); }
.roadmap-content-wrap .content-step-card { display: none; opacity: 0; animation: stepFadeIn 0.5s ease forwards; cursor: default; }
.roadmap-content-wrap .content-step-card.active { display: block; opacity: 1; border-color: var(--grad1); box-shadow: var(--shadow), var(--hover-glow); filter: none; }

/* --- 7. TOKEN & TABS --- */
.fund-segment-list { list-style: none; padding: 0; margin-top: 20px; }
.fund-segment-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px dashed rgba(255, 255, 255, .05); font-weight: 600; gap: 12px;
}
.percent { font-family: var(--font-heading); font-weight: 800; color: var(--grad1); }
.segment-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.tab-nav { display: flex; gap: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--bdr); overflow-x: auto; }
.tab-btn {
    background: none; border: none; color: var(--muted); font-weight: 700; padding: 12px 16px;
    cursor: pointer; position: relative; transition: color .3s; white-space: nowrap; font-size: 15px;
}
.tab-btn.active { color: var(--accent); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px;
    background: var(--accent); border-radius: 2px 2px 0 0;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.token-bar {
    display: flex; width: 100%; height: 40px; border-radius: 8px;
    overflow: hidden; margin-bottom: 24px; border: 1px solid var(--bdr); flex-wrap: wrap;
}
.token-bar .seg {
    display: grid; place-items: center; font-size: clamp(10px, 1.8vw, 12px); font-weight: 700;
    color: var(--card); cursor: pointer; transition: transform .2s ease, filter .2s ease;
    padding: 4px; text-align: center; min-height: 40px;
}
.token-bar .seg:hover { transform: scaleY(1.1); filter: brightness(1.1); }
.token-bar .seg.active { box-shadow: 0 0 0 3px var(--text) inset; }

/* --- 8. DEMO PAGE SPECIFICS --- */
.demo-wrapper { display: grid; grid-template-columns: 300px 1fr; gap: 40px; max-width: 1100px; margin: 40px auto; padding: 0 24px; align-items: start; }
.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 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); font-weight: 700; margin-bottom: 12px; display: block; }
.guide-title { font-family: var(--font-heading); font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.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); }

.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); }

/* Demo Themes */
.theme-a .app-logo { background: #3B82F6; box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4); }
.theme-a .btn.primary { background: #3B82F6; box-shadow: none; }
.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); box-shadow: none; }

/* --- 9. MODALS & FORMS --- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(12px);
    display: none; align-items: center; justify-content: center; z-index: 120;
    padding: 20px; opacity: 0; transition: opacity 0.3s;
}
.modal-backdrop.active { display: flex; opacity: 1; }
.modal-card {
    background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius);
    padding: 24px; width: min(600px, 100%); max-height: 90vh; overflow: auto;
    position: relative; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, 0.1);
}
.close-btn { position: absolute; right: 20px; top: 20px; background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; transition: color 0.2s; }
.close-btn:hover { color: var(--danger); }

/* Inputs */
.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; outline: none; transition: 0.2s;
}
.input-field:focus { border-color: var(--primary); background: rgba(255, 255, 255, 0.05); }
input, select, textarea { 
    width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--bdr);
    background: rgba(255, 255, 255, .04); color: var(--text); font-family: inherit; font-size: 16px;
}

/* FAQ */
details { background: var(--card); border: 1px solid var(--bdr); border-radius: 12px; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all .2s; }
details:hover { border-color: var(--grad1); }
summary { font-weight: 700; font-size: 17px; list-style: none; cursor: pointer; user-select: none; }
summary::after { content: '+'; float: right; font-size: 24px; font-weight: 700; color: var(--grad1); }
details[open] summary::after { content: '−'; }
.ans { margin-top: 12px; color: var(--muted); line-height: 1.6; }

/* Grid Utils */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--bdr); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: all .25s ease; }

/* --- 10. FOOTER --- */
footer { border-top: 1px solid var(--bdr); padding: 32px 0; }
footer .container { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* --- 11. RESPONSIVE --- */
@media (max-width: 980px) {
    .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; }
    .phone-mockup { width: 240px; height: 480px; }
    .demo-wrapper { grid-template-columns: 1fr; gap: 20px; }
    .guide-panel { position: relative; top: 0; }
    .nav .links { display: none; }
    .mobile-menu-btn { display: block; }
}