/* CSS Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent: #ffffff;
    --accent-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(255, 255, 255, 0.1);
    --positive: #22c55e;
    --negative: #ef4444;
    --font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

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

a:hover {
    opacity: 0.8;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-svg {
    height: 30px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    opacity: 1;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

.backers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.backer-logos {
    display: flex;
    gap: 24px;
}

.backer {
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-title-fade {
    opacity: 0.5;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
    50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* Section Styles */
section {
    padding: 120px 0;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    text-align: center;
    margin-bottom: 60px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.capability-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.capability-video {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

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

.capability-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.capability-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.capability-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Zero Downtime Section */
.zero-downtime {
    background: var(--bg-primary);
}

.zero-downtime-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 40px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.feature-check {
    color: var(--positive);
    font-weight: 700;
    font-size: 18px;
}

/* RaaS Section */
.raas {
    background: var(--bg-secondary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
}

.comparison-card h3 {
    font-size: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.comparison-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparison-card li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.comparison-card .negative {
    color: var(--negative);
    font-weight: 700;
}

.comparison-card .positive {
    color: var(--positive);
    font-weight: 700;
}

.comparison-card.inloop {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
}

/* Gallery Section */
.gallery {
    background: var(--bg-primary);
}

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

.gallery-item {
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

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

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 16px;
    font-weight: 500;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: border-color 0.3s ease;
}

.gallery-item:hover .gallery-placeholder {
    border-color: rgba(255, 255, 255, 0.3);
}

/* FAQ Section */
.faq {
    background: var(--bg-secondary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Demo Section */
.demo {
    background: var(--bg-primary);
}

.demo .container {
    max-width: 800px;
}

.demo-label {
    color: #f97316;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.demo .section-title {
    margin-bottom: 16px;
}

.demo-instructions {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

.demo-game-container {
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.demo-game-container canvas {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 0 auto;
    cursor: pointer;
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.demo-placeholder {
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.demo-robot {
    font-size: 80px;
    animation: robotBounce 3s ease-in-out infinite;
}

@keyframes robotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.demo-placeholder p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-info > p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item a,
.contact-item span {
    font-size: 16px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-contact a {
    color: var(--text-secondary);
}

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

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

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Skill Explorer Page */
.skill-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding-top: 100px;
}

.skill-hero-content {
    text-align: center;
    max-width: 600px;
}

.skill-hero-content h1 {
    font-size: clamp(36px, 6vw, 56px);
    margin-bottom: 24px;
}

.skill-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.skills-section {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.skill-video {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

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

.skill-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.skill-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.skill-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.cta-section {
    background: var(--bg-primary);
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        padding: 24px;
        gap: 16px;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-contact {
        align-items: center;
    }

    section {
        padding: 80px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .capabilities-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
