/* ========================================
   NthGear - Enterprise AI
   ======================================== */

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains-mono-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains-mono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-primary: #0A0A0A;
    --bg-surface: #111111;
    --bg-elevated: #1A1A1A;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --accent: #00E5FF;
    --accent-muted: rgba(0, 229, 255, 0.1);
    --accent-glow: rgba(0, 229, 255, 0.25);
    --text-primary: #F5F5F5;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

.container--narrow {
    max-width: 640px;
}

/* ========================================
   Background Effects
   ======================================== */

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(
        ellipse 60% 50% at 50% 0%,
        rgba(0,0,0,0.4) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3 {
    color: var(--text-primary);
    font-weight: 600;
}

h1 {
    font-size: clamp(2.75rem, 6vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h3 {
    font-size: clamp(1.125rem, 2vw, 1.35rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
    font-weight: 500;
}

.overline {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mono {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.section__title {
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 3.5rem;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 1100px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
}

.nav__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 6px;
}

.nav__logo-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-left: 0.35rem;
}

.nav__links {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 400;
}

.nav__link:hover {
    color: var(--text-primary);
}

.nav__cta {
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav__cta:hover {
    opacity: 0.85;
}

/* ========================================
   Buttons
   ======================================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    background: #EDEDED;
    color: #0A0A0A;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: #FFFFFF;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.btn-primary--full {
    width: 100%;
    padding: 0.9rem 1.75rem;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    box-shadow: 0 0 24px var(--accent-muted);
}

.btn-primary--full:hover {
    background: #33EAFF;
    box-shadow: 0 0 40px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
}

/* ========================================
   Dividers
   ======================================== */

.divider {
    height: 1px;
    border: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--border) 20%,
        rgba(255, 255, 255, 0.08) 50%,
        var(--border) 80%,
        transparent 100%
    );
    margin: 0;
    position: relative;
    z-index: 2;
}

.divider--glow {
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-glow),
        transparent
    );
}

/* ========================================
   Hero
   ======================================== */

.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem clamp(1.5rem, 5vw, 3rem) 4rem;
    overflow: hidden;
}

.hero__glow {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--accent-glow) 0%,
        rgba(0, 229, 255, 0.05) 40%,
        transparent 70%
    );
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}

.hero__content {
    max-width: 800px;
}

.hero__title {
    margin-bottom: 1.5rem;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero__cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Sections
   ======================================== */

.section {
    position: relative;
    z-index: 2;
    padding: clamp(4rem, 10vw, 7rem) 0;
}

/* ========================================
   Bento Grid (Capabilities)
   ======================================== */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.bento-card {
    background: var(--bg-surface);
    padding: 2rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: background 0.3s ease;
    position: relative;
}

.bento-card:hover {
    background: var(--bg-elevated);
}

.bento-card--wide {
    grid-column: span 2;
}

.bento-card__icon {
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.bento-card h3 {
    color: var(--text-primary);
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
    flex: 1;
}

.bento-card__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-muted);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    width: fit-content;
}

/* ========================================
   Approach
   ======================================== */

.approach__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(3rem, 6vw, 5rem);
    align-items: center;
}

.approach__content h2 {
    margin-bottom: 1.5rem;
}

.approach__content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.approach__stats {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 0.5rem;
}

.stat-card {
    background: var(--bg-surface);
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background 0.3s ease;
}

.stat-card:hover {
    background: var(--bg-elevated);
}

.stat-card__number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-card__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ========================================
   Contact
   ======================================== */

.contact {
    text-align: center;
}

.contact .section__subtitle {
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

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

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

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

/* ========================================
   Footer
   ======================================== */

.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__content > * {
    animation: fade-up 0.7s ease-out both;
}

.hero__content > :nth-child(1) { animation-delay: 0.1s; }
.hero__content > :nth-child(2) { animation-delay: 0.2s; }
.hero__content > :nth-child(3) { animation-delay: 0.35s; }
.hero__content > :nth-child(4) { animation-delay: 0.5s; }

/* ========================================
   Responsive
   ======================================== */

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

    .bento-card--wide {
        grid-column: span 2;
    }

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

@media (max-width: 640px) {
    .nav__links {
        display: none;
    }

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

    .bento-card--wide {
        grid-column: span 1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero {
        min-height: auto;
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    .hero__cta-group {
        flex-direction: column;
        align-items: stretch;
    }

    .approach__stats {
        margin-top: 1rem;
    }
}

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

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

.bento-card.fade-target:nth-child(1) { transition-delay: 0s; }
.bento-card.fade-target:nth-child(2) { transition-delay: 0.08s; }
.bento-card.fade-target:nth-child(3) { transition-delay: 0.16s; }
.bento-card.fade-target:nth-child(4) { transition-delay: 0.24s; }
.bento-card.fade-target:nth-child(5) { transition-delay: 0.32s; }
