/* ============================================================
   LIQUID FLOW — Design System & Styles
   ============================================================ */

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
    /* Colors */
    --bg-primary: #060612;
    --bg-secondary: #0c0c24;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #f0f0ff;
    --text-secondary: rgba(240, 240, 255, 0.6);
    --text-muted: rgba(240, 240, 255, 0.35);

    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;

    --gradient-primary: linear-gradient(135deg, var(--accent-purple), var(--accent-blue), var(--accent-pink));
    --gradient-text: linear-gradient(135deg, var(--accent-purple), var(--accent-pink), var(--accent-cyan));

    --border-color: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(168, 85, 247, 0.3);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    --container-width: 1200px;
    --container-padding: 0 24px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Canvas (Liquid Animation Background) ---------- */
#liquid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* All content sits above the canvas */
.navbar, .hero, .features, .about, .contact, .footer {
    position: relative;
    z-index: 1;
}

/* ---------- Utilities ---------- */
.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: var(--transition-medium);
    backdrop-filter: blur(0px);
}

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

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
}

.logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.logo-accent {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: var(--transition-medium);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ---------- HERO SECTION ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    position: relative;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 24px rgba(168, 85, 247, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45),
                0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--bg-glass);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1rem;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-purple);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-color);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.mouse-wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ---------- FEATURES SECTION ---------- */
.features {
    padding: var(--section-padding);
    background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.02), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}

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

.feature-card {
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-medium);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(168, 85, 247, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-purple);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- ABOUT / HOW IT WORKS ---------- */
.about {
    padding: var(--section-padding);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tech-pill {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.tech-pill:hover {
    border-color: var(--border-glow);
    color: var(--accent-purple);
    background: rgba(168, 85, 247, 0.08);
}

/* Code Block */
.about-visual {
    perspective: 1000px;
}

.code-block {
    background: rgba(10, 10, 30, 0.8);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.03);
    transform: rotateY(-5deg) rotateX(2deg);
    transition: var(--transition-slow);
}

.code-block:hover {
    transform: rotateY(0deg) rotateX(0deg);
    box-shadow: 0 32px 80px rgba(168, 85, 247, 0.12),
                0 0 0 1px rgba(168, 85, 247, 0.15);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28c840; }

.code-filename {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-content {
    padding: 24px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    color: var(--text-secondary);
}

.code-keyword { color: #c084fc; }
.code-func { color: #60a5fa; }
.code-num { color: #f59e0b; }
.code-comment { color: rgba(255, 255, 255, 0.25); font-style: italic; }

/* ---------- CONTACT / CTA ---------- */
.contact {
    padding: var(--section-padding);
}

.cta-card {
    text-align: center;
    padding: 80px 40px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, 0.12), transparent 60%),
        var(--bg-card);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: var(--gradient-primary);
}

.cta-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
}

.cta-actions {
    display: flex;
    justify-content: center;
}

/* ---------- FOOTER ---------- */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for children */
.features-grid .feature-card:nth-child(1) { transition-delay: 0.05s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.15s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.25s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.35s; }

.hero-stats .stat:nth-child(1) { transition-delay: 0s; }
.hero-stats .stat:nth-child(3) { transition-delay: 0.1s; }
.hero-stats .stat:nth-child(5) { transition-delay: 0.2s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.8rem;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 48px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .code-block {
        transform: none;
    }

    .cta-card {
        padding: 48px 24px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
