@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Colors */
    --bg-deep: #030303;
    --bg-surface: #09090b;
    --bg-card: rgba(15, 15, 18, 0.6);
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --primary: #594ae2;
    --primary-glow: rgba(89, 74, 226, 0.15);
    
    /* Text Colors */
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #48484a;
    
    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    /* Glassmorphism */
    --glass-blur: 24px;
    
    /* Layout Constants */
    --container-width: 1200px;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

#features,
#showcase {
    scroll-margin-top: 80px;
}

@media (max-width: 768px) {
    #features,
    #showcase {
        scroll-margin-top: 60px;
    }
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-secondary);
}

/* Ambient Background Lights */
.ambient-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .ambient-glow {
        width: 380px;
        height: 380px;
    }
    
    .glow-top-right {
        top: -120px;
        right: -120px;
    }
    
    .glow-bottom-left {
        bottom: 10%;
        left: -180px;
    }
}

.glow-top-right {
    top: -200px;
    right: -200px;
}

.glow-bottom-left {
    bottom: 20%;
    left: -300px;
}

/* Grid & Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.pillars-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.flex {
    display: flex;
}

.hero-actions {
    gap: 1.25rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-padding {
    padding: 8rem 0;
}

.text-center {
    text-align: center;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition-smooth);
}

.header-inner {
    justify-content: space-between;
    align-items: center;
}

header.scrolled {
    background: rgba(3, 3, 3, 0.7);
    backdrop-filter: blur(15px);
    border-color: var(--border);
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    text-decoration: none;
}

.logo img {
    height: 36px;
    width: 36px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(89, 74, 226, 0.25);
}

nav {
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

nav a:hover {
    color: var(--accent);
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    cursor: pointer;
    position: relative;
    z-index: 1200;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 3.5px 0;
    transition: 0.25s ease;
    border-radius: 2px;
}

/* Animated X when open */
.nav-toggle.open span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
    border: 1px solid var(--accent);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-download {
    padding: 0.7rem 1.75rem;
    border-radius: 12px;
    background: var(--accent);
    color: var(--bg-deep);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    transition: var(--transition-smooth);
}

.btn-download:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.25);
}

.btn-download svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    position: relative;
}

.hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 4rem;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 30%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 580px;
    line-height: 1.6;
}

.hero-mockup-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-mockup-glow {
    position: absolute;
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    background: radial-gradient(circle, rgba(89, 74, 226, 0.18) 0%, transparent 65%);
    filter: blur(40px);
    z-index: -1;
}

.phone-frame {
    width: clamp(260px, 80vw, 320px);
    height: clamp(520px, 160vw, 640px);
    background: #000;
    border-radius: 44px;
    padding: 10px;
    box-shadow: 
        0 0 0 4px #2c2c2e,
        0 25px 60px -15px rgba(0,0,0,0.9);
    position: relative;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 36px;
    overflow: hidden;
    background: var(--bg-deep);
    position: relative;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-notch {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 30px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

.float-animation {
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}

/* Feature Grid Section */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 40%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1.75rem;
    }
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
    border: 1px solid var(--border);
}

.glass-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.glass-card p {
    font-size: 0.975rem;
}

/* Interactive Tabs Section */
.interactive-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.tabs-container {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 4rem;
}

.tab-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tab-btn h4 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.tab-btn p {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tab-btn.active {
    background: var(--bg-card);
    border-color: var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tab-btn.active h4 {
    color: var(--accent);
}

.tab-btn.active p {
    color: var(--text-secondary);
}

.tab-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 520px;
}

.tab-image {
    position: absolute;
    width: clamp(210px, 70vw, 270px);
    height: clamp(420px, 155vw, 540px);
    border-radius: 36px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    border: 4px solid #1a1a1e;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    pointer-events: none;
    transition: 
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-image.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    z-index: 5;
}

.tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Call to Action Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-box {
    background: radial-gradient(circle at top right, rgba(89, 74, 226, 0.12), transparent 50%), var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 5rem 3rem;
    backdrop-filter: blur(var(--glass-blur));
}

.cta-box h2 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.15rem;
    max-width: 550px;
    margin: 0 auto 3rem auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    background: #020203;
}

.footer-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-brand .copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 5rem;
    }
    
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-mockup-wrapper {
        order: 2;
    }
    
    .tabs-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .tab-showcase {
        min-height: 480px;
    }
    
    .tab-image {
        width: 240px;
        height: 480px;
    }
}

/* Intermediate responsive for header/nav (e.g. VSCode preview panes) */
@media (max-width: 900px) {
    nav {
        gap: 1rem;
    }
    
    nav a {
        font-size: 0.85rem;
    }
    
    .btn-download {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }
    
    .lang-toggle-simple {
        gap: 0.35rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .section-padding {
        padding: 5rem 0;
    }
    
    header {
        padding: 1.5rem 0;
        background: var(--bg-deep);
        z-index: 1100;
    }

    .logo img {
        height: 30px;
        width: 30px;
    }

    .logo span {
        font-size: 1rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    #main-nav {
        display: flex;
        position: fixed;
        inset: 0;
        width: 100%;
        background: var(--bg-deep);
        padding: 5.5rem 1.25rem 2rem;
        border-top: none;
        box-shadow: none;
        gap: 0.25rem;
        flex-direction: column;
        align-items: flex-start;
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
        overflow-y: auto;
        transition: opacity 0.2s ease;
    }
    
    #main-nav.mobile-open {
        opacity: 1;
        pointer-events: auto;
    }
    
    #main-nav a {
        font-size: 1.05rem;
        padding: 0.65rem 0.25rem;
        width: 100%;
        border-radius: 6px;
    }
    
    #main-nav a:hover {
        color: var(--accent);
        background: rgba(255, 255, 255, 0.03);
    }
    
    /* Light divider before lang section in mobile menu */
    #main-nav > a:nth-of-type(2) {
        margin-bottom: 0.4rem;
    }
    
    /* Language toggle in mobile menu */
    .lang-toggle-simple {
        order: 3;
        margin: 0.5rem 0 0.25rem;
        gap: 0.75rem;
        font-size: 0.95rem;
    }
    
    .lang-toggle-simple .lang-btn {
        padding: 0.3rem 0.6rem !important;
        opacity: 0.7 !important;
        font-size: 0.9rem;
    }
    
    .lang-toggle-simple .lang-btn.active {
        opacity: 1 !important;
        font-weight: 600;
    }
    
    .btn-download {
        order: 4;
        margin-top: 0.4rem;
        width: 100%;
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    /* Improved mobile showcase + hero */
    .hero-grid {
        gap: 3rem;
    }
    
    .tab-showcase {
        min-height: 360px;
    }
    
    .tab-image {
        width: min(200px, 55vw);
        height: min(400px, 110vw);
    }
    
    .phone-frame {
        width: min(260px, 72vw);
        height: min(520px, 144vw);
    }
    
    .tab-btn {
        padding: 1rem;
    }
    
    .tab-btn h4 {
        font-size: 1.1rem;
    }
    
    .tab-btn p {
        font-size: 0.85rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.25rem;
    }

    .cta-box {
        padding: 3rem 1.5rem;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
