/* ==========================================================================
   CSS Variables & Theming
   ========================================================================== */
:root {
  --bg-main: #0C0A1D; --bg-card: #131127; --text-main: #FFFFFF; --text-muted: #94A3B8;
  --primary: #A5B4FC; --primary-foreground: #1E1B4B; --accent: #1E293B; --accent-foreground: #C7D2FE;
  --border-color: rgba(226, 232, 240, 0.1); --primary-glow: rgba(165, 180, 252, 0.6);
  --nav-bg: rgba(12, 10, 29, 0.85); --grid-color: rgba(255, 255, 255, 0.05);
  
  --radius-pill: 99px; --radius-xl: 32px; --radius-lg: 24px;
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-main: #F1F5F9; --bg-card: #FFFFFF; --text-main: #0F172A; --text-muted: #64748B;
  --primary: #4F46E5; --primary-foreground: #FFFFFF; --accent: #EEF2FF; --accent-foreground: #3730A3;
  --border-color: #E2E8F0; --primary-glow: rgba(79, 70, 229, 0.4);
  --nav-bg: rgba(241, 245, 249, 0.85); --grid-color: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; line-height: 1.6; transition: background-color 0.3s ease, color 0.3s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Buttons & Elements */
.theme-btn { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); font-size: 1.2rem; width: 44px; height: 44px; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: all 0.3s; box-shadow: var(--shadow-sm); cursor: pointer;}
.theme-btn:hover { background: var(--accent); border-color: var(--primary); }
.futuristic-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }

/* HUGE TYPOGRAPHY FIXES */
.hero-title { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.04em; margin-bottom: 24px; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 550px; line-height: 1.6; margin-bottom: 40px;}

.section-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.section-subtitle { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.text-primary { color: var(--primary); }
.text-gradient { background: linear-gradient(135deg, var(--primary), #C084FC); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.scroll-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 1001; }
.scroll-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), #C084FC); box-shadow: 0 0 15px var(--primary-glow); border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.pill-badge { display: inline-block; padding: 8px 20px; background: var(--accent); color: var(--accent-foreground); border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 24px; text-transform: uppercase; }
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; font-weight: 700; text-decoration: none; border-radius: var(--radius-pill); transition: all 0.3s; cursor: pointer;}
.btn-primary { background: linear-gradient(135deg, #4F46E5, #7C3AED); color: #FFFFFF; border: none; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5); transform: translateY(-2px); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--primary); transform: translateY(-2px); }
.huge { padding: 18px 40px; font-size: 1.2rem; }

/* HERO VISUAL & PHONES */
.hero-visual { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; overflow: visible; }

.dual-composition {
    position: relative;
    width: 450px;
    height: 650px;
    margin: 0 auto;
    cursor: pointer;
    z-index: 10;
}

.iphone-mockup {
    position: absolute;
    width: 320px;
    border-radius: 46px;
    padding: 12px;
    background: #111;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.2), 0 0 0 1.5px #333;
    transition: all 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
[data-theme="light"] .iphone-mockup { background: #e2e8f0; box-shadow: inset 0 0 4px rgba(0,0,0,0.1), 0 0 0 1px #cbd5e1; }

.iphone-screen { border-radius: 34px; overflow: hidden; background: #000; width: 100%; position: relative;}
.iphone-screen img { width: 100%; display: block; }
.dynamic-island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 100px; height: 28px; background: #000; border-radius: 20px; z-index: 10; }

/* States */
.state-front {
    z-index: 2; left: 0px; top: 50px; transform: scale(1);
    filter: brightness(1) blur(0px);
    box-shadow: inset 0 0 4px rgba(255,255,255,0.2), 0 0 0 1.5px #333, -20px 40px 60px rgba(0,0,0,0.8);
}
.state-back {
    z-index: 1; left: 130px; top: 20px; transform: scale(0.9);
    filter: brightness(0.6) blur(1px);
    box-shadow: inset 0 0 4px rgba(255,255,255,0.2), 0 0 0 1.5px #333;
}
[data-theme="light"] .state-front { box-shadow: inset 0 0 4px rgba(0,0,0,0.1), 0 0 0 1px #cbd5e1, -20px 40px 60px rgba(0,0,0,0.2); }

/* Highlight Badges */
.highlight-badge {
    position: absolute; background: rgba(19, 17, 39, 0.95); backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15); padding: 14px 22px; border-radius: 100px;
    display: flex; align-items: center; gap: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.6); z-index: 20;
}
[data-theme="light"] .highlight-badge { background: rgba(255,255,255,0.95); border-color: rgba(0,0,0,0.1); box-shadow: var(--shadow-sm); }
.hb-left { top: 20%; left: -40px; }
.hb-right { bottom: 25%; right: -40px; flex-direction: row-reverse; text-align: right; }
.hb-icon { font-size: 1.4rem; background: var(--accent); width: 44px; height: 44px; display: flex; justify-content: center; align-items: center; border-radius: 50%; }
.hb-text span { display: block; font-size: 0.7rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.hb-text strong { display: block; font-size: 1.05rem; color: var(--text-main); font-weight: 800; }

/* Badges Transition */
.state-back .highlight-badge { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.state-front .highlight-badge { opacity: 1; transition: opacity 0.5s ease 0.4s; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; background: var(--nav-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); z-index: 100; transition: all 0.4s ease; }
.navbar.nav-scrolled { box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; max-width: 1200px; margin: 0 auto; }
.brand-logo { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.3rem; color: var(--text-main); text-decoration: none; letter-spacing: -0.02em; }
.logo-icon { width: 36px; height: 36px; background: var(--primary); color: var(--primary-foreground); border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: transform 0.4s rotate; box-shadow: 0 0 15px var(--primary-glow); }
.brand-logo:hover .logo-icon { transform: rotate(15deg) scale(1.1); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }

/* Hero Section */
.hero-section { padding-top: 180px; min-height: 100vh; display: flex; align-items: center; overflow: hidden; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; z-index: 2; position: relative;}
.hero-visual { position: relative; width: 100%; display: flex; justify-content: center; align-items: center; }
.hero-bg-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(var(--grid-color) 2px, transparent 2px); background-size: 40px 40px; mask-image: linear-gradient(to bottom, black, transparent); -webkit-mask-image: linear-gradient(to bottom, black, transparent); z-index: 0; }
.hero-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 800px; height: 800px; background: radial-gradient(circle at center, var(--primary-glow), transparent 60%); opacity: 0.3; filter: blur(60px); z-index: 0; pointer-events: none;}

/* Ecosystem */
.section { padding: 120px 0; }
.section-title-wrap { margin-bottom: 64px; }
.section-title-wrap.center { text-align: center; }
.bg-card { background: var(--bg-card); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.sticky-ecosystem { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.eco-mockup-wrapper { position: sticky; top: 120px; height: 650px; display: flex; justify-content: center; align-items: center; border-radius: var(--radius-xl); background: var(--bg-main); border: 1px solid var(--border-color); box-shadow: inset var(--shadow-sm); }
.eco-features { display: flex; flex-direction: column; padding: 20vh 0 40vh 0; gap: 40vh; }
.eco-step { opacity: 0.3; transform: translateX(30px); padding: 40px; border: 1px solid transparent; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.eco-step.active { opacity: 1; transform: translateX(0); background: var(--bg-card); border-color: var(--primary); box-shadow: 0 0 30px rgba(79, 70, 229, 0.1); border-radius: var(--radius-xl); }
.step-icon { font-size: 2.2rem; background: var(--accent); width: 70px; height: 70px; display: flex; justify-content: center; align-items: center; border-radius: 16px; margin-bottom: 24px; }
.eco-step h3 { font-size: 1.6rem; margin-bottom: 12px; }
.eco-step p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.6; }

/* Philosophy */
.philosophy-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.ph-list { display: flex; flex-direction: column; gap: 32px; margin-top: 40px; }
.ph-item { display: flex; gap: 24px; padding: 24px; }
.ph-icon { font-size: 1.8rem; background: var(--accent); color: var(--primary); width: 64px; height: 64px; display: flex; justify-content: center; align-items: center; border-radius: 16px; flex-shrink: 0; }
.ph-label { display: inline-block; font-size: 0.75rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.philosophy-visual { position: relative; display: flex; justify-content: center; align-items: center; }

/* SECURITY 3D GRID */
.security-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 60px; }
.sec-card { position: relative; background: var(--bg-main); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 48px 32px; overflow: hidden; transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s; }
.sec-card:hover { border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,0,0,0.4); transform: translateY(-10px); }
[data-theme="light"] .sec-card:hover { box-shadow: var(--shadow-sm); }
.sec-card-inner { position: relative; z-index: 2; }
.sec-icon { width: 72px; height: 72px; background: rgba(79, 70, 229, 0.1); color: var(--primary); border-radius: 20px; display: flex; justify-content: center; align-items: center; margin-bottom: 24px; border: 1px solid rgba(79, 70, 229, 0.2); transition: all 0.3s; }
.sec-card:hover .sec-icon { background: var(--primary); color: var(--primary-foreground); }
.sec-icon svg { width: 32px; height: 32px; }
.sec-card h3 { font-size: 1.5rem; color: var(--text-main); margin-bottom: 12px; font-weight: 800; }
.sec-card p { font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; }

/* FAQ & Footer */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }
.faq-block { padding: 40px; }
.faq-block h4 { font-size: 1.3rem; margin-bottom: 16px; font-weight: 800; }
.faq-block p { color: var(--text-muted); font-size: 1.05rem; }
.footer { border-top: 1px solid var(--border-color); padding: 80px 0 24px; background: var(--bg-card); }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 64px; }
.footer-brand p { color: var(--text-muted); font-size: 1rem; margin-top: 12px; max-width: 300px; }
.footer-links { display: flex; gap: 32px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 1rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 32px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.9rem; }

/* Bottom Sheets / Modals */
.bottom-sheet-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 3000; opacity: 0; visibility: hidden; transition: 0.4s; }
.bottom-sheet-overlay.active { opacity: 1; visibility: visible; }

/* Desktop: Centered Modal */
.bottom-sheet {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -45%) scale(0.95);
    width: 90%; max-width: 650px; max-height: 85vh;
    background: var(--bg-card); border-radius: 24px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px var(--border-color);
    z-index: 3001; opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; overflow: hidden;
}
.bottom-sheet.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.bs-header { padding: 32px 32px 24px 32px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; position: relative; }
.bs-content { padding: 40px 32px; overflow-y: auto; flex: 1; }
.bs-handle { display: none; } /* Hidden on desktop */
.bs-close { background: var(--bg-main); border: 1px solid var(--border-color); color: var(--text-main); width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: all 0.3s; }
.bs-close:hover { background: var(--primary); border-color: var(--primary); color: white; transform: rotate(90deg); }
.bs-header h3 { font-size: 1.6rem; color: var(--text-main); font-weight: 800; margin: 0; }
.bs-content p { color: var(--text-muted); margin-bottom: 24px; line-height: 1.8; font-size: 1.1rem; }

/* Mobile: Slide-up Bottom Sheet */
@media (max-width: 768px) {
    .bottom-sheet {
        top: auto; left: 0; bottom: -100%;
        transform: none; width: 100%; max-width: 100%; height: 85vh; max-height: 85vh;
        border-radius: 0; border-top-left-radius: 32px; border-top-right-radius: 32px;
        opacity: 1; visibility: visible;
        transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .bottom-sheet.active { bottom: 0; transform: none; }
    .bs-handle { display: block; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 48px; height: 5px; background: var(--text-muted); border-radius: 10px; opacity: 0.5; }
    .bs-header { padding: 24px; justify-content: center; }
    .bs-header h3 { margin-top: 16px; font-size: 1.4rem; }
    .bs-close { position: absolute; right: 24px; top: 20px; width: 36px; height: 36px; }
}

/* Globals */
.reveal-up { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-scale { opacity: 0; transform: scale(0.9); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* Mobile adjustments */
@media (max-width: 992px) {
  .nav-links, .btn-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-title { font-size: 3rem; }
  
  .hero-visual { display: flex; justify-content: center; overflow: hidden; }
  
  
  
  
  .hero-visual { min-height: 500px; }
  
  
  
  .dual-composition { transform: scale(0.65); transform-origin: top center; height: 440px; margin-top: -30px; }
  .hb-left { left: -20px; transform: scale(0.9); }
  .hb-right { right: -20px; transform: scale(0.9); }








  
  .sticky-ecosystem { display: block; }
  .eco-mockup-wrapper { position: sticky; top: 100px; height: 480px; margin-bottom: 0; z-index: 1; background: transparent; border: none; box-shadow: none; }
  .eco-features { padding: 0; position: relative; z-index: 10; margin-top: -150px; }
  .eco-step { opacity: 1; transform: none; background: var(--bg-card); padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); margin-bottom: 70vh; }
  .eco-step:last-child { margin-bottom: 10vh; }
  .philosophy-layout { grid-template-columns: 1fr; }
  .philosophy-visual { order: -1; margin-bottom: 40px; }
  
  .security-grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 40px; text-align: center; align-items: center; }
  .bottom-sheet { height: 95vh; }
}


}
