html {
    scroll-behavior: smooth;
}

body.lock-scroll {
    overflow: hidden;
}

:root {
    /* Color Palette */
    --bg-dark: #0a0a0c;
    --card-bg: rgba(255, 255, 255, 0.03);
    --accent-blue: #00d2ff;
    --accent-purple: #9d50bb;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: var(--transition);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

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

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

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1002;
    padding: 0.5rem;
    position: relative;
    width: 40px;
    height: 40px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px auto;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Language Selector */
.lang-selector {
    position: relative;
    margin-left: 1.5rem;
}

.lang-btn {
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.05);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 120px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.lang-dropdown.show {
    display: flex;
}

.lang-dropdown button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.8rem 1.2rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-dropdown button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

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

/* Hero & Spline Sections */
.hero,
.spline-hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.05) 0%, transparent 50%);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.spline-hero-section {
    height: 70vh;
}

.spline-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: all;
}

.spline-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Ensure hero content stays above spline and has proper padding */
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 10%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    pointer-events: none;
    /* Allows clicking through to the model below */
}

.hero-content * {
    pointer-events: all;
    /* Content itself should be clickable */
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
}

/* Section Styling */
section {
    padding: 8rem 10%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Anchor padding for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    perspective: 1000px;
}

.card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 210, 255, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-dark), transparent);
    opacity: 0.8;
}

.card-content {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Footer */
footer {
    padding: 4rem 10%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 5%;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: visibility 0.4s, opacity 0.4s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.75rem;
        font-weight: 800;
        letter-spacing: -1px;
    }

    .lang-selector {
        margin-left: 0;
        margin-top: 1rem;
    }

    .lang-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: calc(100% + 10px);
        top: auto;
    }

    section {
        padding: 5rem 6%;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }

    .hero-content {
        padding: 0 6%;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-image {
        height: 180px;
    }

    .spline-hero-section {
        height: 50vh;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
        max-width: 60%;
        line-height: 1.2;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

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

    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }
}

/* Archive Section */
.archive-section {
    padding: 4rem 10% 8rem;
    text-align: center;
}

.archive-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem;
    margin-top: 2rem;
    position: relative;
}

.archive-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
}

.btn-archive {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 1rem 3rem;
    border-radius: 50px;
}

.btn-archive:hover {
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
    transform: translateY(-2px);
}

/* Wide Button for Policy Lists */
.btn-wide {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.5rem 2.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.btn-wide:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 210, 255, 0.15);
}

.btn-wide .arrow {
    font-size: 1.25rem;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

.btn-wide:hover .arrow {
    transform: translateX(10px);
}

.btn-wide span {
    color: inherit;
    font-weight: 500;
}

/* Policy Document Styling */
.policy-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.policy-content h3 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-left: 3px solid var(--accent-blue);
    padding-left: 1rem;
}

.policy-content p {
    margin-bottom: 1.5rem;
}

.policy-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style-type: disc;
}

.policy-content li {
    margin-bottom: 0.8rem;
}

.policy-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 3rem 0;
}

.policy-content a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

.policy-content a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.toc-list {
    list-style: none !important;
    margin-left: 0 !important;
}

.toc-list li {
    margin-bottom: 1rem;
}