/* Local Fonts */
/* We exclude numbers (U+30-39) from Coco Gothic so it falls back to Space Grotesk */
@font-face {
    font-family: 'Coco Gothic';
    src: url('font/CocoGothic_trial.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    unicode-range: U+0000-002F, U+003A-003F, U+0041-FFFF;
}

@font-face {
    font-family: 'Coco Gothic';
    src: url('font/CocoGothic-Italic_trial.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    unicode-range: U+0000-002F, U+003A-003F, U+0041-FFFF;
}

@font-face {
    font-family: 'Coco Gothic';
    src: url('font/CocoGothic-Bold_trial.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    unicode-range: U+0000-002F, U+003A-003F, U+0041-FFFF;
}

@font-face {
    font-family: 'Coco Gothic';
    src: url('font/CocoGothic-BoldItalic_trial.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    unicode-range: U+0000-002F, U+003A-003F, U+0041-FFFF;
}

@font-face {
    font-family: 'Coco Gothic';
    src: url('font/CocoGothic-Light_trial.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    unicode-range: U+0000-002F, U+003A-003F, U+0041-FFFF;
}

/* Fallback for Numbers (Coco Gothic Trial lacks numbers) */
@font-face {
    font-family: 'NumberFont';
    src: local('Space Grotesk'), local('SpaceGrotesk-Regular');
    unicode-range: U+30-39, U+25;
    /* 0-9 and % sign */
}

:root {
    /* Colors - Dark Mode Brand Theme */
    --bg-color: #0F172A;
    /* Dark */
    --text-primary: #FFFFFF;
    /* White */
    --text-secondary: #F1F5F9;
    /* Cream (for readability on dark) */
    --accent-primary: #00E5FF;
    /* Primary */
    --accent-secondary: #26C6DA;
    /* Cyan 400 */
    --accent-glow: rgba(0, 229, 255, 0.2);

    /* Typography */
    --font-main: 'Coco Gothic', 'Space Grotesk', sans-serif;
    --font-display: 'Coco Gothic', 'Space Grotesk', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 100px;
}

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

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent default scroll */
    overflow-x: hidden;
    /* Global horizontal overflow protection */
}

/* Hide Scrollbar Globally */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
    display: none;
}

body {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: hidden;
    /* Force hide vertical scroll if managed by JS, or auto if native scroll */
    height: 100vh;
    width: 100vw;
    line-height: 1.6;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Canvas Background */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Bring to front of background */
    pointer-events: none;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    /* Ensure content is above canvas */
    height: 100%;
    width: 100%;
}

/* Layer Container */
#layer-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Layer */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    /* Ensure layers don't spill */
    opacity: 0;
    visibility: hidden;
    transform: translateY(50px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Snappy easeOutExpo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
    align-items: center;
    padding-top: var(--header-height);
}

.layer.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.main-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    /* Dark glass */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
}

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

.logo img {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    filter: drop-shadow(0 0 0 rgba(0, 229, 255, 0));
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.5)) brightness(1.1);
}

nav {
    position: relative;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding-bottom: 4px;
    /* border-bottom removed for sliding indicator */
}

nav a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px var(--accent-glow);
}

nav a.active {
    color: var(--accent-primary);
    text-shadow: 0 0 12px var(--accent-glow);
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
}

.dot:hover {
    background: var(--accent-primary);
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
}

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

/* Buttons */
/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: #0F172A;
    /* Dark text on bright button */
    padding: 0.8rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 0.8rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 229, 255, 0.05);
    color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
}

.badge:hover {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.2);
    border-color: var(--accent-primary);
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-1px);
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Sections */
.section-container {
    padding: 0 5%;
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

/* Cards */
/* Cards */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    /* background: rgba(255, 255, 255, 0.05); */
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.1);
}

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

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    width: 28px;
    height: 28px;
    stroke: var(--text-secondary);
    transition: all 0.3s ease;
}

.card:hover .card-icon,
.card.active-state .card-icon {
    stroke: var(--accent-primary);
    filter: drop-shadow(0 0 5px var(--accent-glow));
    transform: scale(1.1);
}

.card:hover,
.card.active-state {
    transform: translateY(-8px) scale(1.02);
    /* background: rgba(255, 255, 255, 0.05); */
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 229, 255, 0.1);
}

.card:hover::before,
.card.active-state::before {
    opacity: 1;
}

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

/* Layer 1 Animations */
#layer-1:not(.active) .card {
    opacity: 0;
}

#layer-1.active .card {
    animation: cardEntrance 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

#layer-1.active .card:nth-child(1) {
    animation-delay: 0.1s;
}

#layer-1.active .card:nth-child(2) {
    animation-delay: 0.2s;
}

#layer-1.active .card:nth-child(3) {
    animation-delay: 0.3s;
}

#layer-1.active .card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Architecture */
/* Architecture - Unused but kept for structure if needed, reset to basic */
.architecture-diagram {
    display: none;
}

.arch-step {
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-display);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.arch-step.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.arch-arrow {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.tech-stack {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Code Block */
.code-block {
    background: #0F172A;
    /* Dark */
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: left;
}

pre {
    margin: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    nav ul {
        display: none;
    }

    .arch-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

    .architecture-diagram,
    .architecture-flow {
        flex-direction: column;
    }

    .nav-dots {
        display: none;
    }
}

/* --- New Architecture Layer 2 Styles --- */

/* Architecture Flow */
.architecture-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Snake Flow Setup */
    flex-wrap: nowrap;
    gap: 0.5rem;
    /* Reduced gap since connectors bridge it */
    margin-bottom: 4rem;
    position: relative;
    padding: 60px 0;
    /* Space for snake wave */
    overflow-x: visible;
}

/* Desktop Snake Layout */
@media (min-width: 769px) {

    /* High Position Cards (Ingest, NLP, Vector) */
    .architecture-flow>.arch-card:nth-child(1),
    .architecture-flow>.arch-card:nth-child(5),
    .architecture-flow>.arch-card:nth-child(9) {
        transform: translateY(-40px);
    }

    /* Low Position Cards (STT, Engine) */
    .architecture-flow>.arch-card:nth-child(3),
    .architecture-flow>.arch-card:nth-child(7) {
        transform: translateY(40px);
    }

    /* High Card Hover/Active - Move up slightly */
    .architecture-flow>.arch-card:nth-child(1):hover,
    .architecture-flow>.arch-card:nth-child(5):hover,
    .architecture-flow>.arch-card:nth-child(9):hover,
    .architecture-flow>.arch-card:nth-child(1).active-core,
    .architecture-flow>.arch-card:nth-child(5).active-core,
    .architecture-flow>.arch-card:nth-child(9).active-core {
        transform: translateY(-48px) scale(1.05);
        z-index: 20;
    }

    /* Low Card Hover/Active - Move up slightly */
    .architecture-flow>.arch-card:nth-child(3):hover,
    .architecture-flow>.arch-card:nth-child(7):hover,
    .architecture-flow>.arch-card:nth-child(3).active-core,
    .architecture-flow>.arch-card:nth-child(7).active-core {
        transform: translateY(32px) scale(1.05);
        z-index: 20;
    }

    /* Down Connectors (1->2, 3->4 DOM: 2, 6) */
    .architecture-flow>.arch-connector:nth-child(2),
    .architecture-flow>.arch-connector:nth-child(6) {
        transform: rotate(25deg);
        width: 80px;
        /* Longer bridge */
        margin: 0 -10px;
        /* Pull closer */
    }

    /* Up Connectors (2->3, 4->5 DOM: 4, 8) */
    .architecture-flow>.arch-connector:nth-child(4),
    .architecture-flow>.arch-connector:nth-child(8) {
        transform: rotate(-25deg);
        width: 80px;
        margin: 0 -10px;
    }
}

.arch-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 170px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.arch-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(0, 229, 255, 0.3);
}

.arch-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.arch-icon {
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.arch-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
}

.arch-card:hover .arch-icon,
.arch-card.active-core .arch-icon {
    border-color: var(--accent-primary);
    background: rgba(0, 229, 255, 0.1);
}

.arch-card:hover .arch-icon svg,
.arch-card.active-core .arch-icon svg {
    stroke: var(--accent-primary);
}

/* Active Core Special Styles */
.arch-card.active-core {
    transform: translateY(-5px) scale(1.05);
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.arch-card.active-core span {
    color: var(--accent-primary);
    font-weight: 700;
}

.pulse-icon {
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 229, 255, 0));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.5));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 229, 255, 0));
    }
}

/* Connectors */
.arch-connector {
    display: flex;
    align-items: center;
    position: relative;
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.flow-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    box-shadow: 0 0 5px var(--accent-primary);
    animation: flowMove 2s infinite linear;
}

@keyframes flowMove {
    0% {
        left: 0%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Latency Budget Chart */
.latency-container {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.latency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.latency-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.latency-header span {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    color: var(--accent-secondary);
    background: rgba(38, 198, 218, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.latency-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.l-segment {
    height: 100%;
    position: relative;
    transition: width 1s ease-out;
    cursor: pointer;
}

.l-segment:hover .tooltip {
    opacity: 1;
    transform: translateY(-130%);
}

.l-segment.ingest {
    background: #64748B;
}

.l-segment.nlp {
    background: #3B82F6;
}

.l-segment.core {
    background: #00E5FF;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    z-index: 2;
}

.l-segment.network {
    background: #8B5CF6;
}

.l-segment.headroom {
    background: rgba(255, 255, 255, 0.05);
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
}

.tooltip {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateY(-100%);
    background: rgba(0, 0, 0, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s;
    margin-left: -50%;
    /* approximate center */
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.latency-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.latency-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.latency-disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-style: italic;
    text-align: center;
    width: 100%;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.ingest {
    background: #64748B;
}

.dot.nlp {
    background: #3B82F6;
}

.dot.core {
    background: #00E5FF;
}

.dot.network {
    background: #8B5CF6;
}

/* Improved Tech Stack */
.tech-stack-improved {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    max-width: 700px;
    margin: 0 auto;
}

.tech-pill {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: default;
}

.tech-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Responsiveness for Architecture */
@media (max-width: 768px) {
    .architecture-flow {
        flex-direction: column;
    }

    .arch-connector {
        width: 2px;
        height: 30px;
        margin: 0.5rem 0;
    }

    .flow-dot {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        animation: flowMoveVert 2s infinite linear;
    }

    @keyframes flowMoveVert {
        0% {
            top: 0%;
            opacity: 0;
        }

        20% {
            opacity: 1;
        }

        80% {
            opacity: 1;
        }

        100% {
            top: 100%;
            opacity: 0;
        }
    }
}

/* Integration List (Layer 3) */
.integration-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.int-row {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-align: left;
}

.int-row:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.int-icon {
    width: 48px;
    height: 48px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.int-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.int-row:hover .int-icon {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.int-content {
    flex: 1;
}

.int-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.int-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.int-arrow {
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.int-row:hover .int-arrow {
    opacity: 1;
    color: var(--accent-primary);
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .int-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
    }

    .int-arrow {
        display: none;
    }
}

/* Collapsible Integration Details */
.int-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.int-row.active .int-details {
    max-height: 100px;
    /* Approximate max height */
    opacity: 1;
    margin-top: 0.5rem;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.1s;
}

.int-content h3 {
    transition: color 0.3s ease;
}

.int-row.active .int-content h3 {
    color: var(--accent-primary);
}

.int-row.active {
    background: rgba(255, 255, 255, 0.08);
    /* Keep it highlighted */
    border-color: var(--accent-primary);
}

.int-row.active .int-icon {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Layer 4: Industry Grid */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.industry-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    text-align: left;
    /* Left align for horizontal layout */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: row;
    /* Horizontal */
    align-items: center;
    /* Vertical center alignment */
    gap: 1.5rem;
}

.industry-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    /* Lighter on hover */
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 229, 255, 0.1);
}

.ind-icon {
    width: 64px;
    height: 64px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--accent-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ind-icon svg {
    width: 32px;
    height: 32px;
}

.industry-card:hover .ind-icon {
    background: var(--accent-primary);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-primary);
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.industry-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.industry-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Final CTA Section */
.final-cta {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.big-cta {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    /* Pill shape */
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    /* Strong glow */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

.big-cta:hover {
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.6);
    transform: translateY(-3px) scale(1.05);
}

.cta-sub {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* --- Global Responsiveness --- */

@media (max-width: 768px) {

    /* Typography */
    :root {
        --header-height: 80px;
    }

    /* Typography - Scaled Down */
    h1 {
        font-size: clamp(2rem, 5vh, 2.5rem) !important;
        margin-bottom: 2vh !important;
        /* Override hero */
    }

    .hero-sub {
        font-size: clamp(0.9rem, 1.8vh, 1rem);
        padding: 0 1rem;
        margin-bottom: 3vh !important;
    }

    .section-header h2 {
        font-size: clamp(1.8rem, 4vh, 2rem);
        margin-bottom: 2vh !important;
    }

    .section-header p {
        font-size: clamp(0.9rem, 2vh, 1.1rem) !important;
    }

    /* Hide Layer 2 Description on Mobile to save space */
    #layer-2 .section-header p {
        display: none;
    }

    /* Layout - Compact Vertical */
    .section-container {
        padding: 2vh 1.5rem;
        /* Reduced padding */
        width: 100%;
        max-width: 100%;
    }

    .section-header {
        margin-bottom: 3vh !important;
        /* Compact header margin */
    }

    /* Architecture Layout (Mobile) - Vertical Stack Reset */
    /* Architecture Layout (Mobile) - Grid 2x3 Zigzag */
    .architecture-flow {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
        /* Vertical gap space for connectors */
        width: 100%;
        margin: 0;
        padding: 0;
        transform: none !important;
        position: relative;
        /* For absolute connectors */
    }

    .architecture-flow .arch-card {
        margin: 0;
        width: 100%;
        max-width: none;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        min-height: 80px;
        z-index: 2;
        /* Above connectors */
        position: relative;
        background: rgba(15, 23, 42, 0.8);
        /* Opaque bg to cover lines if needed */
    }

    /* Zigzag Ordering via nth-child (counting connectors) */
    /* 1: Ingest (Child 1) -> Pos 1 (TL) */
    .architecture-flow .arch-card:nth-child(1) {
        order: 1;
    }

    /* 2: STT (Child 3) -> Pos 2 (TR) */
    .architecture-flow .arch-card:nth-child(3) {
        order: 2;
    }

    /* 3: NLP (Child 5) -> Pos 4 (BR) */
    .architecture-flow .arch-card:nth-child(5) {
        order: 4;
    }

    /* 4: Context (Child 7) -> Pos 3 (BL) - Swap to allow R->L flow */
    .architecture-flow .arch-card:nth-child(7) {
        order: 3;
    }

    /* 5: Vector (Child 9) -> Pos 5 (Center) */
    .architecture-flow .arch-card:nth-child(9) {
        grid-column: span 2;
        width: 80%;
        justify-self: center;
        order: 5;
    }

    /* Connectors - Hide DOM elements, use Pseudo */
    .architecture-flow .arch-connector {
        display: none !important;
    }

    .architecture-flow .arch-card {
        position: relative;
    }

    /* Line Base */
    .architecture-flow .arch-card::after {
        content: '';
        position: absolute;
        background: var(--accent-primary);
        opacity: 0.3;
        z-index: 0;
        pointer-events: none;
    }

    /* Dot Base */
    .architecture-flow .arch-card::before {
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        background: var(--accent-primary);
        box-shadow: 0 0 8px var(--accent-primary);
        border-radius: 50%;
        z-index: 1;
        opacity: 0;
        animation: flowDotMobile 2s infinite linear;
    }

    /* 1. Ingest (Child 1) -> STT (Right) */
    .architecture-flow .arch-card:nth-child(1)::after {
        width: 1rem;
        /* Match grid-column-gap */
        height: 2px;
        top: 50%;
        right: -1rem;
    }

    .architecture-flow .arch-card:nth-child(1)::before {
        top: 50%;
        left: 100%;
        margin-top: -3px;
        animation-name: flowDotHoriz;
    }

    /* 2. STT (Child 3) -> NLP (Down - Vertical) */
    .architecture-flow .arch-card:nth-child(3)::after {
        width: 2px;
        height: 1.5rem;
        /* Match grid-row-gap */
        bottom: -1.5rem;
        left: 50%;
    }

    .architecture-flow .arch-card:nth-child(3)::before {
        top: 100%;
        left: 50%;
        margin-left: -3px;
        animation-name: flowDotVert;
    }

    /* 3. NLP (Child 5) -> Context (Left) */
    .architecture-flow .arch-card:nth-child(5)::after {
        width: 1rem;
        /* Match grid-column-gap */
        height: 2px;
        top: 50%;
        left: -1rem;
    }

    .architecture-flow .arch-card:nth-child(5)::before {
        top: calc(50% + 2px);
        /* Tiny bit down */
        right: 100%;
        margin-top: -3px;
        animation-name: flowDotHorizRev;
    }

    /* 4. Context (Child 7) -> Vector (Down - Vertical) */
    .architecture-flow .arch-card:nth-child(7)::after {
        width: 2px;
        height: 1.5rem;
        /* Match grid-row-gap */
        bottom: -1.5rem;
        left: 50%;
    }

    .architecture-flow .arch-card:nth-child(7)::before {
        top: 100%;
        left: 50%;
        margin-left: -3px;
        animation-name: flowDotVert;
    }

    @keyframes flowDotHoriz {
        0% {
            transform: translateX(0);
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            transform: translateX(0.8rem);
            opacity: 0;
        }
    }

    @keyframes flowDotHorizRev {
        0% {
            transform: translateX(0);
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            transform: translateX(-0.8rem);
            opacity: 0;
        }
    }

    @keyframes flowDotVert {
        0% {
            transform: translateY(0);
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            transform: translateY(1.2rem);
            opacity: 0;
        }
    }

    /* Card - Compact */
    .card {
        padding: 1.5rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    /* Industry Grid */
    .industry-grid {
        grid-template-columns: 1fr;
        gap: 1.5vh;
    }

    /* General Grid */
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5vh;
    }

    /* Integration List (Mobile) - Compact */
    .integration-list {
        gap: 1vh;
    }

    .int-row {
        padding: 1.5vh 1rem;
        /* Very compact vertical padding */
    }

    .int-icon {
        width: 36px;
        height: 36px;
    }

    .int-icon svg {
        width: 18px;
        height: 18px;
    }

    .int-content h3 {
        font-size: 1rem;
    }

    .int-content p {
        font-size: 0.85rem;
    }

    /* Latency Chart - Compact */
    /* Latency Chart - Ultra Compact */
    .latency-container {
        padding: 0.75rem;
        margin-top: 0.5rem;
        transform: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }



    .latency-header {
        flex-direction: row;
        /* Keep row but smaller */
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5vh;
    }

    .latency-header h3 {
        font-size: 1rem;
    }

    .latency-bar {
        height: 12px;
        /* Thinner bars */
        border-radius: 4px;
        margin: 0.5vh 0;
    }

    .latency-legend {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .legend-item {
        font-size: 0.7rem;
        /* Tiny text */
    }

    .legend-dot {
        width: 6px;
        height: 6px;
    }

    /* CTA */
    .big-cta {
        width: 100%;
        padding: 1.2vh 1rem;
        font-size: 0.9rem;
    }
}

/* --- Laptop Responsiveness (769px - 1280px) --- */
@media (min-width: 769px) and (max-width: 1280px) {
    :root {
        --container-width: 95%;
        /* Use percentage instead of fixed px */
    }

    /* Architecture Flow: Scale Down */
    .architecture-flow {
        transform: scale(0.85);
        /* Slightly shrink the whole diagram */
        margin: 0 -5%;
        /* Counter margin to center scale */
    }

    .arch-card {
        width: 140px;
        /* Reduce card width */
    }

    .arch-connector {
        width: 50px;
        /* Shorten connectors */
    }

    /* Adjust snake offset for smaller cards */
    .architecture-flow .arch-card:nth-child(1),
    .architecture-flow .arch-card:nth-child(5),
    .architecture-flow .arch-card:nth-child(9) {
        transform: translateY(-30px);
    }

    .architecture-flow .arch-card:nth-child(3),
    .architecture-flow .arch-card:nth-child(7) {
        transform: translateY(30px);
    }

    /* Industry Grid: Force 3 columns inside the page */
    .industry-grid {
        gap: 1rem;
        grid-template-columns: repeat(3, 1fr);
        /* 3 side-by-side */
    }

    .industry-card {
        padding: 1rem;
        flex-direction: column;
        /* Revert to specific vertical stacking for dense 3-col */
        text-align: center;
        align-items: center;
        gap: 0.5rem;
    }

    .industry-card h3 {
        font-size: 1.2rem;
    }

    .industry-card p {
        font-size: 0.9rem;
    }
}

/* Mobile: Stack industry card contents vertically */
@media (max-width: 600px) {
    .industry-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* --- Vertical Responsiveness (Short Screens) --- */
@media (max-height: 850px) {
    :root {
        --header-height: 70px;
        /* Shrink header */
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .section-header p {
        font-size: 1.1rem;
    }

    /* Scale down large components */
    .architecture-flow {
        transform: scale(0.8);
        margin: -20px -10% -20px;
        /* Compensate for scale margins */
    }

    .grid-2,
    .industry-grid {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .card,
    .industry-card {
        padding: 1.5rem;
    }

    .card h3,
    .industry-card h3 {
        font-size: 1.5rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    /* Layer 4 Specific Compactness */
    #layer-4 .section-header {
        margin-bottom: 1.5rem;
    }

    .industry-grid {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .industry-card {
        padding: 1.5rem 1rem;
        gap: 0.5rem;
        /* Reduce internal gap */
    }

    .ind-icon {
        width: 48px;
        /* Smaller icons */
        height: 48px;
        margin-bottom: 0.25rem;
    }

    .ind-icon svg {
        width: 24px;
        height: 24px;
    }

    .industry-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    .final-cta {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .big-cta {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }
}

/* Very Short Screens (e.g. small laptops with toolbars) */
@media (max-height: 700px) {
    .layer {
        padding-top: 60px;
        /* Minimal header space */
    }

    .section-container {
        /* Global scale down for ultra-short screens */
        transform: scale(0.85);
        transform-origin: center center;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Ensure footer stays visible */
    footer {
        padding: 1rem;
        position: relative;
        bottom: auto;
    }
}

/* Contact Form (Layer 4) */
/* Contact Form (Layer 4) */
.contact-container {
    max-width: 1200px;
    /* Wider */
    width: 98%;
    margin: 0 auto 2rem;
    align-self: center;
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Reduced gap */
}

/* ... existing styles ... */

.form-group textarea {
    resize: vertical;
    /* Allow vertical resize */
    min-height: 150px;
    /* Reduced default height */
    max-height: 50vh;
    /* Limit to 50% of viewport height */
}

/* ... existing styles ... */

/* Ensure Contact Page title doesn't hug the nav */
#layer-4 .section-header {
    margin-top: 1rem;
    /* Reduced margin */
    margin-bottom: 1rem;
    /* Added bottom margin control */
}

.form-group {
    margin-bottom: 0;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    /* Compact inputs */
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}



/* Compact Button for Contact Form */
.contact-form .big-cta {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    /* Shorter height */
    font-size: 1.1rem;
}

/* Mobile: Stack back to 1 column */
/* Mobile: Ensure inputs stretch */
@media (max-width: 600px) {
    .contact-form {
        padding: 1.5rem;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .contact-container {
        width: 100%;
        padding: 0 1rem;
    }
}

/* Ensure Contact Page title doesn't hug the nav */
#layer-4 .section-header {
    margin-top: 2rem;
}

/* Ensure Button text doesn't break layout */
.big-cta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.contact-fallback {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    padding: 0 1rem;
    opacity: 0.8;
}

.contact-fallback a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-fallback a:visited {
    color: var(--accent-primary);
}

.contact-fallback a:hover {
    text-decoration: underline;
}

.footer-legal {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 0.5rem;
}