/* --- Core Variables & Theming --- */
:root {
    --bg-base: #0a0a0e;
    --bg-surface: rgba(25, 25, 35, 0.6);
    --bg-surface-hover: rgba(35, 35, 50, 0.8);
    
    --text-primary: #ffffff;
    --text-secondary: #9494a8;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.5);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --glass-blur: 16px;
    --transition-snappy: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Resets & Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Background Effects --- */
.bg-gradient {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.4;
    animation: floatBlob 20s infinite alternate linear;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    opacity: 0.2;
    animation-delay: -10s;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.05); }
    66% { transform: translate(-5%, 8%) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

/* --- Glassmorphism Utilities --- */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 10, 14, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--accent-primary);
}

.logo-icon.small {
    width: 20px;
    height: 20px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

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

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-primary);
}

.nav-links a.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
    transform: translateY(-2px);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-snappy);
    border: none;
    outline: none;
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    position: relative;
}

.primary-glow {
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-alt {
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    padding: 10px 20px;
    font-size: 0.9rem;
    box-shadow: none;
}

.btn-alt i {
    width: 16px;
    height: 16px;
}

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

/* --- Hero Section --- */
.hero {
    padding: 180px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 100px;
    color: #a5b4fc;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background-color: #a5b4fc;
    border-radius: 50%;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(165, 180, 252, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(165, 180, 252, 0); }
    100% { box-shadow: 0 0 0 0 rgba(165, 180, 252, 0); }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-action-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.alt-download {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}

.alt-download p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

.hero-cta-split {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-info i {
    width: 16px;
    height: 16px;
}

/* --- Visual Mockup --- */
.phone-mockup {
    border-radius: 36px;
    padding: 6px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -20px 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color) inset;
    background: linear-gradient(145deg, rgba(30,30,40,0.8) 0%, rgba(15,15,20,0.9) 100%);
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.phone-mockup:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) translateY(-10px);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.action-icon {
    color: #10b981;
    fill: #10b981;
}

.mockup-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.code-editor {
    flex: 2;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    overflow: hidden;
}

.code-editor .keyword { color: #c678dd; }
.code-editor .class-name { color: #e5c07b; }
.code-editor .method { color: #61afef; }
.code-editor .string { color: #98c379; }
.code-editor .indent-1 { margin-left: 20px; }
.code-editor .indent-2 { margin-left: 40px; }

.console-output {
    flex: 1;
    background: #0d1117;
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    display: flex;
    flex-direction: column;
}

.console-header {
    padding: 10px 24px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.console-body {
    padding: 16px 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #98c379;
    line-height: 1.5;
}

/* --- Features Section --- */
.features {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px;
    border-radius: 24px;
    transition: var(--transition-snappy);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    background: var(--bg-surface-hover);
}

.feature-icon-wrapper {
    width: 54px;
    height: 54px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition-snappy);
}

.feature-card:hover .feature-icon-wrapper {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.feature-icon {
    width: 24px;
    height: 24px;
    color: #a5b4fc;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Download Banner --- */
.download-banner {
    padding: 60px 0 120px;
}

.box-banner {
    border-radius: 32px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, rgba(99,102,241,0.1) 0%, rgba(30,30,40,0.6) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.box-banner::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 50%; height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.banner-content h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 8px;
}

.banner-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.banner-action {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-alt {
    align-items: center;
    margin-top: 24px;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 0;
    background: rgba(10, 10, 14, 0.8);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 300px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-info {
        justify-content: center;
    }
    
    .box-banner {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 40px 24px;
    }
    
    .hero-cta-split {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta-split .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .hero {
        padding: 120px 0 60px;
    }
    .phone-mockup {
        height: 500px;
    }
}
