/* Modern Reset & Variables */
:root {
    /* Light Mode Defaults (Improved Premium Palette) */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-hero-card: rgba(255, 255, 255, 0.95);
    --bg-card-inner: #f1f5f9;
    --bg-section-alt: #f8fafc;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #06b6d4;
    --accent: #f43f5e;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --gradient-heading: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-body: #0f172a;
        --bg-surface: #1e293b;
        --bg-surface-hover: #334155;
        --bg-navbar: rgba(15, 23, 42, 0.8);
        --bg-hero-card: rgba(30, 41, 59, 0.8);
        --bg-card-inner: rgba(255, 255, 255, 0.05);
        --bg-section-alt: rgba(30, 41, 59, 0.3);
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --border: #334155;
        --gradient-heading: linear-gradient(to right, #fff, #94a3b8);
        --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
}

/* Manual Dark Mode Override */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    --bg-navbar: rgba(15, 23, 42, 0.8);
    --bg-hero-card: rgba(30, 41, 59, 0.8);
    --bg-card-inner: rgba(255, 255, 255, 0.05);
    --bg-section-alt: rgba(30, 41, 59, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --gradient-heading: linear-gradient(to right, #fff, #94a3b8);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Manual Light Mode Override */
[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-navbar: rgba(255, 255, 255, 0.95);
    --bg-hero-card: rgba(255, 255, 255, 0.95);
    --bg-card-inner: #f1f5f9;
    --bg-section-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient-heading: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --shadow-glow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

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

h1 {
    font-size: 3.5rem;
    background: var(--gradient-heading);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

/* Hero Section */
.hero {
    padding-top: 8rem;
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
}

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

.hero-content h1 {
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero-image {
    position: relative;
    perspective: 1000px;
}

.hero-card {
    background: var(--bg-hero-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
    backdrop-filter: blur(10px);
}

.hero-card:hover {
    transform: rotateY(0) rotateX(0);
}

/* Stats */
.stats-section {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-section-alt);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Features */
.features-section {
    padding: 8rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Pricing */
.pricing-section {
    padding: 8rem 0;
    background: var(--bg-section-alt);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.check-icon {
    color: var(--success);
    flex-shrink: 0;
}

/* Roadmap */
.roadmap-section {
    padding: 8rem 0;
}

.timeline {
    max-width: 1000px;
    margin: 4rem auto 0;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.timeline-item {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.timeline-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    position: relative;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.timeline-date {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.timeline-dot {
    display: none;
    /* Hide dots for the card-based layout */
}

/* Desktop Snake Layout */
@media (min-width: 992px) {
    .timeline {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 2rem;
    }

    .timeline-item {
        margin-bottom: 0;
    }

    /* Positioning for Snake Flow: 1 -> 2 -> 3 -> 4 */
    .timeline-item:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .timeline-item:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
    }

    .timeline-item:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        margin-top: 0;
    }

    .timeline-item:nth-child(4) {
        grid-column: 1;
        grid-row: 2;
        margin-top: 0;
    }

    /* Connector Lines */
    .timeline-item::after {
        content: '';
        position: absolute;
        background: var(--border);
        z-index: 1;
        transition: background 0.3s ease;
    }

    .timeline-item:hover::after {
        background: var(--primary);
    }

    /* 1 -> 2 (Right Arrow) */
    .timeline-item:nth-child(1)::after {
        top: 50%;
        right: -4rem;
        width: 4rem;
        height: 2px;
        transform: translateY(-50%);
    }

    /* 2 -> 3 (Down Arrow) */
    .timeline-item:nth-child(2)::after {
        bottom: -4rem;
        left: 50%;
        width: 2px;
        height: 4rem;
        transform: translateX(-50%);
    }

    /* 3 -> 4 (Left Arrow) */
    .timeline-item:nth-child(3)::after {
        top: 50%;
        left: -4rem;
        width: 4rem;
        height: 2px;
        transform: translateY(-50%);
    }

    /* Arrow Heads */
    .timeline-item::before {
        content: '';
        position: absolute;
        border: solid var(--border);
        border-width: 0 3px 3px 0;
        display: inline-block;
        padding: 3px;
        z-index: 1;
        transition: border-color 0.3s ease;
    }

    .timeline-item:hover::before {
        border-color: var(--primary);
    }

    /* Arrow Head 1 -> 2 */
    .timeline-item:nth-child(1)::before {
        top: 50%;
        right: -2rem;
        /* Halfway through the connector */
        transform: translateY(-50%) rotate(-45deg);
    }

    /* Arrow Head 2 -> 3 */
    .timeline-item:nth-child(2)::before {
        bottom: -2rem;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }

    /* Arrow Head 3 -> 4 */
    .timeline-item:nth-child(3)::before {
        top: 50%;
        left: -2rem;
        transform: translateY(-50%) rotate(135deg);
    }
}

/* Footer */
footer {
    background: var(--bg-surface);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--text-muted);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }

    .nav-links {
        display: none;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column;
        padding-left: 50px;
    }

    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-dot {
        left: 20px;
    }

    h1 {
        font-size: 2.5rem;
    }
}