@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #03030d;
    --bg-gradient-1: rgba(124, 58, 237, 0.15);
    /* Purple tint */
    --bg-gradient-2: rgba(14, 165, 233, 0.12);
    /* Blue tint */

    --panel-bg: rgba(10, 12, 20, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    --text-main: #f8fbff;
    --text-muted: #9ca9bf;

    --primary: #7dd3ff;
    --primary-hover: #9ee0ff;
    --secondary: #f472b6;
    --accent: #b5f3ff;

    --nav-bg: rgba(5, 6, 17, 0.85);
    --nav-border: rgba(255, 255, 255, 0.06);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --radius-pill: 999px;
}

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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 20%, var(--bg-gradient-1), transparent 45%),
        radial-gradient(circle at 85% 10%, var(--bg-gradient-2), transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img {
    display: block;
    max-width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

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

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

/* Layout Utilities */
.container {
    width: min(var(--container-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: 0 1rem;
}

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

/* Navigation */
.site-nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-layout {
    width: min(var(--container-width), calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1.1rem;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #000;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    margin-left: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Reduced height */
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 2rem 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--panel-shadow);
    border: 1px solid var(--panel-border);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(2px);
}

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Scroll Sections */
.scroll-section {
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
    position: relative;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    width: 100%;
}

.content-left {
    order: 1;
}

.visual-right {
    order: 2;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cards & Panels */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    box-shadow: var(--panel-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.script-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.script-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.script-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.script-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.card-link:hover {
    color: var(--primary-hover);
    gap: 0.75rem;
    /* Slide arrow effect */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    box-shadow: 0 4px 20px rgba(125, 211, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(125, 211, 255, 0.5);
    color: #000;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.btn-ghost:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Lists */
ul.feature-list {
    list-style: none;
    padding: 0;
}

ul.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

ul.feature-list li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Comparison Slider (L.A.Cosmic) */
.compare-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    aspect-ratio: 16/9;
    /* Default aspect ratio, can be overridden */
}

.compare-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.compare-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 calc(100% - var(--position, 50%)) 0 0);
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position, 50%);
    width: 2px;
    background: var(--primary);
    cursor: ew-resize;
    z-index: 10;
}

.compare-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: var(--nav-bg);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: 6px center, 22px center;
    /* Arrows */
    background-repeat: no-repeat;
    background-size: 12px;
}

.compare-label {
    position: absolute;
    top: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    transition: opacity 0.2s;
}

.compare-label.before {
    left: 1rem;
    top: 1rem;
}

.compare-label.after {
    right: 1rem;
    top: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 2rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .nav-layout {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }

    .site-nav {
        height: auto;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-banner {
        height: auto;
        min-height: auto;
        background: var(--panel-bg);
    }

    .hero-bg {
        display: none;
    }

    .hero-content {
        background: none;
        backdrop-filter: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        text-shadow: none;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.2em;
        text-shadow: none;
    }

    .hero-description {
        font-size: 0.95rem;
        text-shadow: none;
    }

    .section-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .scroll-section {
        padding: 2rem 0;
        min-height: auto;
    }

    .visual-right {
        order: -1;
    }

    /* Larger comparison images on mobile */
    .compare-container {
        aspect-ratio: 4/3;
        min-height: 280px;
    }

    .compare-handle::after {
        width: 40px;
        height: 40px;
    }

    .compare-label {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-desc {
        font-size: 1rem;
    }
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 200px;
    box-shadow: var(--panel-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1000;
    pointer-events: none;
    /* Prevent interaction when hidden */
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: block;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    /* Ensure it inherits nav-link properties correctly if used with span */
}