:root {
    --bg-primary: #040914;
    --bg-secondary: #0a1122;
    --bg-card: rgba(16, 26, 48, 0.4);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #0EEDB4;
    --accent-glow: rgba(14, 237, 180, 0.3);
    --border: rgba(255, 255, 255, 0.08);
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

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

.text-glow {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.kicker {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.metrics-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

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

.metric-number {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.metric-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(4, 9, 20, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 5%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo span {
    font-weight: 400;
    opacity: 0.7;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-outline {
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(14, 237, 180, 0.05);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    min-height: 500px;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 5%;
}

/* Mobile: let hero be tall enough for content */
@media (max-width: 768px) {
    .hero {
        aspect-ratio: unset;
        min-height: 100svh;
        padding: 6rem 5% 3rem;
    }
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 9, 20, 0.65);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s 0.2s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-weight: 300;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text-primary);
    color: var(--bg-primary);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(14, 237, 180, 0.05);
}

/* Base Sections */
section {
    padding: 8rem 0;
}

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

.section-header h2,
.section-header-center h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.section-header p,
.section-header-center p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.border-top {
    border-top: 1px solid var(--border);
    padding-top: 8rem;
}

/* Problem Section */
.problem-section {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

.bento-hero {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3rem !important;
}

.bento-side {
    grid-column: 2 / 3;
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-hero, .bento-side {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    .bento-hero {
        padding: 2rem 1.5rem !important;
    }
    .bento-hero h3 {
        font-size: 1.75rem;
    }
}

.feature-card {
    background: rgba(16, 26, 48, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.bento-hero h3 {
    font-size: 2.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Solution Section */
.solution-section {
    background: var(--bg-secondary);
    text-align: center;
}

.solution-content {
    max-width: 800px;
    margin: 0 auto;
}

.solution-content h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.solution-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Capabilities Section */
.capabilities-section {
    background: var(--bg-primary);
}

.edge-to-edge {
    padding-left: 0;
    padding-right: 0;
}

.section-header-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    padding: 0 5%;
}

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

.cinematic-grid {
    gap: 3rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .cinematic-grid {
        gap: 2rem;
        grid-template-columns: 1fr;
    }
}

.demo-card {
    background: rgba(16, 26, 48, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}

.demo-video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10; /* Slightly wider than 1:1 to keep them "smaller" vertically */
    background: transparent;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .demo-video-wrapper {
        aspect-ratio: 16 / 9; /* Even smaller vertically on mobile */
    }
}

.demo-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Preserve original 1:1 square format */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 0.8; /* slightly boost opacity for letterbox look */
    background: transparent;
}

.demo-card:hover .demo-video {
    transform: scale(1.05);
    opacity: 0.9;
}

.demo-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
}

.demo-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.demo-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* About Us Section */
.about-section {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.about-section .border-top {
    padding-top: 4rem;
}

.about-section .section-header {
    margin-bottom: 2.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

.team-card {
    background: rgba(16, 26, 48, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
}

.team-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid var(--border);
}

.team-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.team-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.team-title {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.team-bio {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.team-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.team-link:hover {
    color: var(--accent);
}

/* Philosophy Callout */
.philosophy-callout {
    background: var(--bg-primary);
    margin-top: 4rem;
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.philosophy-callout::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(14, 237, 180, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.callout-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 0 5%;
}

.callout-inner h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.callout-inner p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Why Us Section */
.why-section {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

/* Partner Section CTA */
.partner-section {
    background-color: var(--bg-secondary);
}

.partner-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: flex-start;
}

.partner-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.partner-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.8;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(14, 237, 180, 0.02);
}

.cmd-btn {
    width: 100%;
    cursor: pointer;
    border: none;
    font-family: var(--font-heading);
    font-size: 1rem;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-logo span {
    font-weight: 400;
    opacity: 0.7;
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ─── Hamburger Toggle ─────────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 110;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Mobile Nav Overlay ─────────────────────────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #040914 !important; /* Force background to be sure */
    background: rgba(4, 9, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999; /* Maximize z-index to be sure */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-nav.open {
    display: flex !important;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 0;
    margin: 0;
}

.mobile-nav li a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.mobile-nav li a:hover {
    color: var(--accent);
}

/* ─── Responsive Breakpoints ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .partner-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    /* Global section spacing */
    section {
        padding: 4rem 0;
    }
    .border-top {
        padding-top: 4rem;
    }
    .section-header {
        margin-bottom: 2.5rem;
    }
    .section-header h2 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    /* Navigation: show hamburger, hide desktop nav */
    .nav-toggle {
        display: flex;
    }
    .nav-desktop {
        display: none;
    }
    .nav-container {
        position: relative;
        z-index: 110;
    }

    /* Hero */
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }

    /* Metrics bar */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 5%;
    }

    /* Feature cards */
    .feature-card {
        padding: 2rem 1.5rem;
    }

    /* All grid layouts collapse to single column */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }

    /* Cinematic video grid: stack on mobile */
    .cinematic-grid {
        grid-template-columns: 1fr;
    }

    /* About section */
    .about-section {
        padding-top: 2rem;
    }
    .about-section .border-top {
        padding-top: 3rem;
    }
    .philosophy-callout {
        margin-top: 2rem;
        padding: 3rem 0;
    }

    /* Partner / Contact form */
    .partner-text h2 {
        font-size: 2rem;
    }
    .contact-form {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    .col-span-2 {
        grid-column: span 1;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1.25rem 5%;
    }
    .metrics-grid {
        padding: 1.5rem 5%;
    }
    .section-header-center {
        margin-bottom: 2rem;
    }
    .demo-info h3 {
        font-size: 1.1rem;
    }
    .demo-info p {
        font-size: 0.85rem;
    }
    .contact-form {
        padding: 1.25rem;
    }
}
