/* --- Variables --- */
:root {
    --bg-dark: #0a0a0a;
    --bg-light: #141414;
    --accent: #0078D6;
    --accent-glow: rgba(0, 120, 214, 0.3);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    margin: 0;
    overflow-x: hidden;
}

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

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

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

/* --- Sections --- */
.section-dark {
    background: var(--bg-dark);
    padding: 6rem 0;
}

.section-light {
    background: var(--bg-light);
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* --- Hero --- */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    /* Mobile first */
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a1b2e 0%, #0a0a0a 70%);
    padding-top: 80px;
}

@media(min-width: 1024px) {
    .hero {
        padding: 0 5%;
    }

    .hero-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 1400px;
        /* Limit width on ultra-wide */
        margin: 0 auto;
    }

    .hero-content {
        max-width: 50%;
        text-align: left;
    }

    .hero-visual {
        max-width: 45%;
    }
}

.hero h1 {
    font-size: 3.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.highlight {
    color: var(--accent);
    font-weight: 700;
}

.tech-stack-hero {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tech-stack-hero span {
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    border: 1px solid var(--border);
}

.hero-visual img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s;
}

.hero-visual:hover img {
    transform: perspective(1000px) rotateY(0deg);
}

/* --- Features --- */
.feature-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.feature-card h3 {
    color: white;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.feature-card .icon {
    font-size: 2rem;
}

.feature-list li {
    margin-bottom: 1.5rem;
    list-style: none;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.feature-list strong {
    display: block;
    color: white;
    margin-bottom: 0.3rem;
}

.feature-list span {
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* --- Split Layout --- */
.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-direction: column;
}

@media(min-width: 768px) {
    .split-layout {
        flex-direction: row;
    }

    .split-layout.reverse {
        flex-direction: row-reverse;
    }
}

.image-content img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* --- Codec Tags --- */
.codec-grid {
    margin-top: 4rem;
    text-align: center;
}

.codec-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.codec-tags span {
    padding: 8px 16px;
    background: #111;
    border: 1px solid #333;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tag-avx2 {
    color: #f1c40f;
}

.tag-jxl {
    color: #3498db;
}

.tag-av1 {
    color: #e74c3c;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    padding: 0;
}

.nav-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

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

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

.nav-links {
    display: none;
}

@media(min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 2rem;
    }
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-dim);
    transition: 0.2s;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: white;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-cta {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    height: auto;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta:hover {
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-1px);
    background: #0086f0;
}

.btn-secondary {
    color: var(--text-dim);
    margin-left: 1rem;
    text-decoration: underline;
}

/* --- Language Switcher --- */
.lang-switcher {
    position: relative;
    margin-right: 1rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
    font-family: var(--font-mono);
}

.lang-btn:hover {
    color: white;
    border-color: var(--accent);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 140px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    overflow: visible;
}

.lang-dropdown::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.lang-switcher:hover .lang-dropdown {
    display: flex;
}

.lang-option {
    padding: 10px 15px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-option.active {
    color: var(--accent);
    font-weight: 600;
}

/* --- Footer --- */
footer {
    padding: 4rem;
    text-align: center;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}