/* ============================================
   X-COGNITA — TRUE SPATIAL UI SYSTEM
   Inspired by Apple VisionOS & Stripe Sessions
   ============================================ */

:root {
    /* Base Colors */
    --bg-base: #000000;
    --text-white: #ffffff;
    --text-muted: #888899;
    --text-dim: #555566;

    /* Spatial Brand Accents */
    --accent-cyan: #00f0ff;
    --accent-violet: #8a2be2;
    --accent-indigo: #4f00ff;

    /* Panel Colors */
    --panel-bg: rgba(12, 12, 14, 0.4);
    --panel-border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, "Liberation Mono", Menlo, Courier, monospace;

    /* Transitions */
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-base);
    color: var(--text-white);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none; /* Custom luxury cursor */
}

/* ---------- CUSTOM CURSOR ---------- */
.custom-cursor {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 4px;
    height: 4px;
    background-color: var(--text-white);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: invert(1);
}

/* ---------- DYNAMIC WEBGL BACKGROUND ---------- */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: var(--bg-base);
}

/* Grain Overlay for Cinematic Texture */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.8;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.huge-title {
    font-size: clamp(1.5rem, 4vw, 5.5rem); /* Scaled down further to prevent overflow which breaks centering */
    margin-bottom: 24px;
    width: 100%;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-line2 {
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
}

.hero-subtitle {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: none;
}

/* --- FOCUS READING MODE --- */
.intro-scene.focus-mode .huge-title {
    filter: blur(8px);
    opacity: 0.15;
    transform: scale(0.95);
}

.intro-scene.focus-mode .hero-subtitle {
    color: var(--text-white);
    transform: scale(1.02);
    text-shadow: 0 0 30px rgba(255,255,255,0.2);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin-bottom: 40px;
    display: inline-block;
}

/* ---------- CINEMATIC ENTRANCE ---------- */
#entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000;
    z-index: 9999;
    pointer-events: none; /* Let clicks pass through once faded */
}

/* ---------- FLOATING NAVIGATION ---------- */
.navbar {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.navbar.hidden-nav {
    transform: translate(-50%, -150%);
    opacity: 0;
    pointer-events: none;
}

.nav-container {
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--panel-border);
    border-radius: 40px;
    padding: 8px 12px 8px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo img {
    height: 24px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 30px;
    transition: all var(--transition-smooth);
}

.nav-link:hover {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-cta {
    background-color: var(--text-white) !important;
    color: var(--bg-base) !important;
    font-weight: 600;
}

.nav-cta:hover {
    transform: scale(1.05);
}

/* ---------- HERO LOGO ---------- */
.hero-logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    width: 100%;
    height: 75vh;
}

.hero-main-logo {
    max-width: 300px;
    width: 100%;
    filter: drop-shadow(0 0 40px rgba(255,255,255,0.1));
    position: relative;
    z-index: 10;
    will-change: transform, opacity;
}

.logo-explosion-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.logo-flash {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #ffffff 0%, var(--accent-cyan) 30%, var(--accent-violet) 65%, transparent 100%);
    border-radius: 50%;
    filter: blur(15px);
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    z-index: 2;
    will-change: transform, opacity;
}

.logo-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff 20%, var(--accent-cyan) 60%, transparent 100%);
    border-radius: 50%;
    filter: drop-shadow(0 0 10px var(--accent-cyan));
    pointer-events: none;
    z-index: 3;
    will-change: transform, opacity;
}

.logo-spark.violet {
    background: radial-gradient(circle, #ffffff 20%, var(--accent-violet) 60%, transparent 100%);
    filter: drop-shadow(0 0 10px var(--accent-violet));
}

/* ---------- SCROLL INDICATOR ---------- */
.scroll-indicator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0; /* Animated in via GSAP */
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 6px;
    background: var(--text-white);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

.arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.arrows span {
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    animation: scrollArrow 1.5s infinite;
}

.arrows .a1 { animation-delay: 0s; }
.arrows .a2 { animation-delay: 0.15s; }
.arrows .a3 { animation-delay: 0.3s; }

@keyframes scrollArrow {
    0% { opacity: 0; }
    50% { opacity: 1; border-color: var(--accent-cyan); }
    100% { opacity: 0; }
}

/* ---------- LANG BUTTON ---------- */
.lang-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    cursor: none;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.lang-btn:hover {
    color: var(--text-white);
    border-color: rgba(255,255,255,0.8);
}

/* ---------- FLOATING LAYOUT (BORDERLESS) ---------- */
.scene-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px;
    position: relative;
    z-index: 1;
}

.system-visual {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Reorder for AI Infra scene so text is left, diagram right if needed, but handled in HTML order */
.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content p {
    font-size: 1.25rem;
    margin: 32px auto 48px;
    max-width: 700px;
}

.hero-content strong {
    color: var(--text-white);
    font-weight: 500;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-smooth);
}

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

.btn-primary:hover {
    transform: scale(1.05);
}

.btn-outline {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

/* Architecture Layout */
.architecture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.architecture-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.architecture-detail {
    padding-left: 24px;
    border-left: 1px solid var(--panel-border);
}

.architecture-detail h4 {
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 8px;
}

.architecture-detail p {
    font-size: 0.95rem;
}

/* Diagram Nodes */
.diagram-visual {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.diagram-node {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 16px 24px;
    border-radius: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s;
}

.diagram-node:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-white);
}

.diagram-node .pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
}

.diagram-node.violet .pulse {
    background: var(--accent-violet);
    box-shadow: 0 0 10px var(--accent-violet);
}

/* ---------- TEAM & METRICS ---------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 40px 0;
    border-top: 1px solid var(--panel-border);
    border-bottom: 1px solid var(--panel-border);
    margin-bottom: 80px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric h3 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--text-white);
}

.metric p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.team-member {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px;
    transition: transform var(--transition-smooth);
}

.team-member:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
}

.team-member img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s, opacity 0.3s;
}

.team-member:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.team-member h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.team-member p {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* ---------- HORIZONTAL SLIDER ---------- */
#horizontal-slider-container {
    overflow: hidden;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
}

#horizontal-slider-wrapper {
    display: flex;
    width: 400vw; /* 4 cards * 100vw */
    height: 100vh;
}

/* ---------- SPATIAL UI CARDS ---------- */
.spatial-card {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.system-visual {
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    border: none;
    
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    width: 100%;
    max-width: 1200px;
    align-items: center;
    position: relative;
}

/* Premium Animated Spatial Border */
.system-visual::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 40px;
    padding: 2px; /* Border thickness */
    background: linear-gradient(45deg, rgba(0,240,255,1), transparent 40%, transparent 60%, rgba(79,0,255,1));
    background-size: 200% 200%;
    animation: gradientBorderSpin 4s linear infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0; /* Changed from 10 to 0 to sit behind content */
}

@keyframes gradientBorderSpin {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.system-details {
    position: relative;
    z-index: 20;
}

/* FIX CHROME RENDERING BUG: background-clip: text disappears when placed over a backdrop-filter inside a z-index stacking context */
.system-details .huge-title {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
    color: var(--text-white);
    margin-bottom: 30px;
    transition: none !important;
}

.system-visual.reverse-layout {
    /* For cards where image should be on the left */
}
.system-visual.reverse-layout .system-details {
    grid-column: 2;
    grid-row: 1;
}
.system-visual.reverse-layout .vanguard-ui {
    grid-column: 1;
    grid-row: 1;
}

.mt-4 { margin-top: 32px; display: inline-block; }

/* ---------- VANGUARD UI ABSTRACT DESIGNS ---------- */
.vanguard-ui {
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* UI 1: Nodes (Constant movement) */
.ui-nodes .ui-box {
    position: relative;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
}
.grid-line {
    position: absolute;
    background: rgba(0,240,255,0.2);
}
.gl-1 { width: 100%; height: 1px; top: 30%; }
.gl-2 { width: 100%; height: 1px; top: 70%; }
.gl-3 { width: 1px; height: 100%; left: 50%; }

.ui-dot {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--text-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
/* Node movement loops */
.ui-dot.d-1 { 
    top: 30%; 
    left: 50%; 
    animation: travelX 6s linear infinite;
}
.ui-dot.d-2 { 
    top: 70%; 
    left: 50%; 
    animation: travelY 8s linear infinite;
}
.ui-dot.d-3 { 
    top: 50%; 
    left: 20%; 
    background: var(--accent-cyan); 
    box-shadow: 0 0 15px var(--accent-cyan); 
    animation: pulse 2s infinite; 
}

@keyframes travelX {
    0% { left: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}
@keyframes travelY {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.ui-block {
    position: absolute;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--accent-cyan);
    padding: 5px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    animation: nodeBlink 4s ease-in-out infinite;
}
.ui-block:nth-of-type(7) { top: 15%; left: 60%; animation-delay: 1s; }
.ui-block:nth-of-type(8) { top: 60%; left: 10%; animation-delay: 2s; }

@keyframes nodeBlink {
    0%, 100% { opacity: 0.8; box-shadow: 0 0 5px rgba(0,240,255,0.2); }
    50% { opacity: 0.4; box-shadow: 0 0 0px transparent; }
}

/* UI 2: Rings */
.ui-rings {
    position: relative;
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.05);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.r-outer { width: 280px; height: 280px; border-top-color: var(--accent-violet); animation: spin 8s linear infinite; }
.r-middle { width: 200px; height: 200px; border-right-color: var(--accent-cyan); animation: spinReverse 5s linear infinite; }
.r-inner { width: 120px; height: 120px; border-bottom-color: var(--text-white); animation: spin 3s linear infinite; }
.core-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 20px var(--accent-violet);
}

/* UI 3: Stack (Constant floating wave animation) */
.ui-stack {
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateZ(-45deg);
}
.iso-layer {
    position: absolute;
    width: 180px; height: 180px;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid rgba(0, 240, 255, 0.4);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-white);
    text-shadow: 0 0 5px var(--accent-cyan);
    transition: transform 0.5s ease;
    backdrop-filter: blur(5px);
}
.layer-1 { animation: floatL1 5s ease-in-out infinite; }
.layer-2 { border-color: rgba(79, 0, 255, 0.5); background: rgba(79, 0, 255, 0.05); animation: floatL2 5s ease-in-out infinite; }
.layer-3 { animation: floatL3 5s ease-in-out infinite; }

@keyframes floatL1 {
    0%, 100% { transform: translateZ(-30px); }
    50% { transform: translateZ(-45px); }
}
@keyframes floatL2 {
    0%, 100% { transform: translateZ(30px); }
    50% { transform: translateZ(40px); }
}
@keyframes floatL3 {
    0%, 100% { transform: translateZ(90px); }
    50% { transform: translateZ(115px); }
}

.ui-stack:hover .layer-1 { transform: translateZ(-60px) !important; animation: none; }
.ui-stack:hover .layer-2 { transform: translateZ(30px) !important; animation: none; }
.ui-stack:hover .layer-3 { transform: translateZ(120px) !important; animation: none; }

/* UI 4: HUD (Scanning progress & active cell blink) */
.ui-hud .hud-panel {
    width: 250px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    background: rgba(0,0,0,0.6);
}
.hud-header {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}
.hud-bar {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-bottom: 10px;
    overflow: hidden;
}
.hud-bar .fill {
    height: 100%;
    background: var(--text-white);
}
/* Scanning animations */
.f-1 { width: 90%; background: var(--accent-cyan) !important; animation: fillPulse1 3s ease-in-out infinite; }
.f-2 { width: 60%; background: var(--accent-violet) !important; animation: fillPulse2 4s ease-in-out infinite; }
.f-3 { width: 100%; animation: fillPulse3 5s ease-in-out infinite; }

@keyframes fillPulse1 { 0%, 100% { width: 90%; } 50% { width: 30%; } }
@keyframes fillPulse2 { 0%, 100% { width: 60%; } 50% { width: 85%; } }
@keyframes fillPulse3 { 0%, 100% { width: 100%; } 50% { width: 50%; } }

.hud-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 20px;
}
.hud-grid .cell {
    height: 20px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    transition: background 0.3s;
}
.hud-grid .cell.active {
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: gridCellPulse 1.5s ease-in-out infinite alternate;
}
.hud-grid .cell:nth-child(1) { animation: randomBlink 2.5s infinite; }
.hud-grid .cell:nth-child(3) { animation: randomBlink 3s infinite 0.7s; }
.hud-grid .cell:nth-child(6) { animation: randomBlink 1.8s infinite 0.3s; }

@keyframes gridCellPulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}
@keyframes randomBlink {
    0%, 100% { background: rgba(255,255,255,0.05); box-shadow: none; }
    50% { background: var(--accent-violet); box-shadow: 0 0 8px var(--accent-violet); }
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spinReverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

/* ---------- EXPLODING CTA STYLING ---------- */
.cta-explode {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, background-color 0.3s !important;
}

.cta-explode:hover {
    background-color: var(--accent-cyan) !important;
    color: var(--bg-base) !important;
    box-shadow: 0 0 25px var(--accent-cyan), 0 0 50px rgba(0, 240, 255, 0.3);
    animation: ctaSuperShake 0.15s infinite linear;
}

@keyframes ctaSuperShake {
    0% { transform: translate(0, 0) scale(1.1); }
    20% { transform: translate(-2px, 2px) scale(1.11); }
    40% { transform: translate(-2px, -2px) scale(1.09); }
    60% { transform: translate(2px, 2px) scale(1.1); }
    80% { transform: translate(2px, -2px) scale(1.11); }
    100% { transform: translate(0, 0) scale(1.1); }
}

/* ---------- CLIENTS ---------- */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 60px;
    align-items: center;
    justify-items: center;
    padding: 60px 0;
}

.clients-grid img {
    max-height: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.2;
    transition: opacity var(--transition-smooth);
}

.spatial-panel.revealed .clients-grid img {
    opacity: 0.6;
}

.spatial-panel.revealed .clients-grid img:hover {
    opacity: 1;
}

/* ---------- BRUTALIST CONTACT CENTER ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--accent-cyan); /* Vivid Cyan */
    padding: 40px;
    border: 6px solid #000;
    box-shadow: 16px 16px 0px #FF00FF; /* Brutalist sharp shadow - Logo Magenta */
    border-radius: 0;
    transform: rotate(-1deg); /* Slight tilt for that raw, unpolished feel */
}

.contact-form input, .contact-form select, .contact-form textarea {
    background: #fff;
    border: 4px solid #000;
    padding: 16px;
    border-radius: 0;
    color: #000;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 800;
    outline: none;
    box-shadow: 6px 6px 0px #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
    color: #000;
    opacity: 0.5;
    text-transform: uppercase;
}

.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    transform: translate(6px, 6px);
    box-shadow: 0px 0px 0px #000;
    border-color: #FF00FF;
    background: #f0f0f0;
}

.contact-form textarea {
    min-height: 180px;
    resize: none;
}

.brutal-btn {
    background: #000;
    color: var(--accent-cyan);
    border: 4px solid #000;
    border-radius: 0;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 1.3rem;
    text-transform: uppercase;
    font-weight: 900;
    box-shadow: 8px 8px 0px #FF00FF;
    cursor: pointer;
    transition: all 0.1s;
    margin-top: 10px;
}

.brutal-btn:hover, .brutal-btn:active {
    background: #FF00FF;
    color: #000;
    transform: translate(8px, 8px);
    box-shadow: 0px 0px 0px #000;
}

/* ---------- FOOTER ---------- */
footer {
    padding: 60px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

footer p {
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

/* ---------- SERVICES GRID ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 45px;
    width: 100%;
    margin-top: 60px;
    text-align: left;
}

.service-card {
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border-radius: 24px;
    padding: 50px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 480px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 45px 90px rgba(0, 0, 0, 0.7);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0,240,255,0.4), transparent 60%, rgba(79,0,255,0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.service-card .service-category {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
    display: block;
}

.service-card h3 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 800;
}

.service-card p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.service-card .btn-more {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: color 0.3s;
}

.service-card .btn-more:hover {
    color: var(--accent-cyan);
}

.service-card .btn {
    align-self: flex-start;
}

/* ---------- INTEGRATIONS MARQUEE ---------- */
.integrations-section {
    position: relative;
    padding: 100px 24px;
    overflow: hidden;
    z-index: 1;
}

.marquee-wrapper {
    margin-top: 60px;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.marquee-track {
    display: flex;
    gap: 40px;
    align-items: center;
    width: max-content;
    animation: marqueeScroll 45s linear infinite;
    padding: 20px 0;
}

.marquee-track.reverse {
    animation: marqueeScrollReverse 40s linear infinite;
    margin-top: 24px;
}

.marquee-track .integration-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 16px 40px;
    border-radius: 40px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    cursor: pointer;
    flex-shrink: 0;
}

.marquee-track .integration-pill:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.25);
}

.marquee-track .integration-pill img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ---------- CLIENTS LOGOS SECTION ---------- */
.clients-logos-section {
    position: relative;
    padding: 100px 24px;
    z-index: 1;
}

/* ---------- CLIENTS HONEYCOMB HIVE ---------- */
.honeycomb-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 60px auto 0;
    position: relative;
    z-index: 1;
}

.hex-row {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Staggered overlapping margins */
.hex-row:nth-child(2) {
    margin-top: -50px;
    margin-bottom: -50px;
}

/* ---- LIVING HIVE: Transition-driven glow (controlled by JS) ---- */

/* Hex Cell base: long transitions for buttery-smooth breathing */
.hex-cell {
    position: relative;
    width: 200px;
    height: 230px;
    margin: 0 10px;
    clip-path: url(#hex-clip);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    text-decoration: none;
    display: block;
    will-change: transform, background-color, box-shadow;
    transition: background 3s ease,
                box-shadow 3s ease,
                transform 3s ease;
}

/* HEART — the source of the pulse (brightest, glassy) */
.hex-cell.hex-heart {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.30), rgba(123, 47, 255, 0.15));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35),
                0 0 50px rgba(0, 240, 255, 0.12);
    transform: scale(1.04);

}

/* NEAR — direct neighbors (medium glow, slight delay) */
.hex-cell.hex-near {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(123, 47, 255, 0.08));
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.20),
                0 0 35px rgba(0, 240, 255, 0.06);
    transform: scale(1.02);

}

/* FAR — second ring (faint whisper, more delay) */
.hex-cell.hex-far {
    background: rgba(0, 240, 255, 0.07);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.10);
    transform: scale(1.01);

}

/* CTA variants */
.hex-cell.hex-cta.hex-heart {
    background: linear-gradient(135deg, rgba(123, 47, 255, 0.30), rgba(0, 240, 255, 0.15));
    box-shadow: 0 0 20px rgba(123, 47, 255, 0.35),
                0 0 50px rgba(123, 47, 255, 0.12);
}
.hex-cell.hex-cta.hex-near {
    background: linear-gradient(135deg, rgba(123, 47, 255, 0.15), rgba(0, 240, 255, 0.08));
    box-shadow: 0 0 14px rgba(123, 47, 255, 0.20),
                0 0 35px rgba(123, 47, 255, 0.06);
}
.hex-cell.hex-cta.hex-far {
    background: rgba(123, 47, 255, 0.07);
    box-shadow: 0 0 10px rgba(123, 47, 255, 0.10);
}

/* Hex Inner Panel (Transparent glass with deep blur) */
.hex-inner {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: rgba(8, 8, 10, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    clip-path: url(#hex-clip);
    transition: background 3s ease;
}

/* Inner glow — intensity follows the pulse layer */
.hex-cell.hex-heart .hex-inner {
    background: rgba(0, 240, 255, 0.08);
    backdrop-filter: blur(20px) brightness(1.2);
    -webkit-backdrop-filter: blur(20px) brightness(1.2);
}
.hex-cell.hex-near .hex-inner {
    background: rgba(0, 240, 255, 0.04);
    backdrop-filter: blur(18px) brightness(1.1);
    -webkit-backdrop-filter: blur(18px) brightness(1.1);
}
.hex-cell.hex-far .hex-inner {
    background: rgba(0, 240, 255, 0.02);
}

.hex-cell.hex-cta.hex-heart .hex-inner {
    background: rgba(123, 47, 255, 0.08);
    backdrop-filter: blur(20px) brightness(1.2);
    -webkit-backdrop-filter: blur(20px) brightness(1.2);
}
.hex-cell.hex-cta.hex-near .hex-inner {
    background: rgba(123, 47, 255, 0.04);
}
.hex-cell.hex-cta.hex-far .hex-inner {
    background: rgba(123, 47, 255, 0.02);
}

/* Featured & CTA — no special animation overrides needed, JS handles everything */
.hex-cell.hex-featured,
.hex-cell.hex-cta {
    background: rgba(255, 255, 255, 0.05);
}

/* Hover States (override alive state completely) */
.hex-cell:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet)) !important;
    transform: scale(1.08) translateY(-5px) !important;
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.3) !important;
    transition: all 0.4s ease-out;
}

.hex-cell:hover .hex-inner {
    background: rgba(15, 15, 20, 0.9) !important;
    transition: background 0.4s ease-out;
}

.hex-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px;
    text-align: center;
    box-sizing: border-box;
}

.hex-content .client-logo-img-wrap {
    width: 110px;
    height: 50px;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform var(--transition-smooth);
}

.hex-cell:hover .client-logo-img-wrap {
    transform: scale(1.05);
}

.hex-content .client-logo-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Club Co custom logo in hexagon */
.club-custom-bg {
    background: #002f6c !important;
}

.club-custom-text {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 1.2rem;
    color: #f2a900;
    letter-spacing: 0.05em;
}

.hex-name {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-white);
    margin-bottom: 2px;
}

.hex-tag {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hex-link {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-cyan);
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s, transform 0.3s;
}

.hex-cell:hover .hex-link {
    opacity: 1;
    transform: translateY(0);
}

/* CTA text stylings */
.hex-cta-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.hex-cta-desc {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 10px;
    padding: 0 10px;
}

/* ---------- HAMBURGER TOGGLE BUTTON ---------- */
.nav-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease,
                width 0.3s ease;
}

.nav-toggle.active span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ---------- RESPONSIVE ---------- */

/* ===== TABLET (1024px) ===== */
@media (max-width: 1024px) {
    .spatial-panel { padding: 48px; }
    .architecture-grid { grid-template-columns: 1fr; gap: 48px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }

    .system-visual {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px;
        max-width: 600px;
    }

    .system-visual.reverse-layout .system-details {
        grid-column: 1;
        grid-row: 1;
    }
    .system-visual.reverse-layout .vanguard-ui {
        grid-column: 1;
        grid-row: 2;
    }

    .vanguard-ui {
        height: 250px;
    }
}

/* ===== MOBILE (768px) ===== */
@media (max-width: 768px) {

    /* --- Hide default cursor on touch devices --- */
    body {
        cursor: auto;
    }

    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }

    /* --- MOBILE NAV --- */
    .nav-toggle {
        display: flex;
    }

    .navbar {
        top: 16px;
        left: 8px;
        right: 8px;
        transform: none;
        width: auto;
    }

    .navbar.hidden-nav {
        transform: translateY(-150%);
    }

    .nav-container {
        padding: 10px 16px;
        gap: 0;
        justify-content: space-between;
        border-radius: 24px;
    }

    .nav-logo img {
        height: 20px;
    }

    .nav-menu {
        /* Full-screen mobile overlay */
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        justify-content: center;
        align-items: center;
        gap: 8px;
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
        transform: scale(0.95);
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }

    .nav-menu li {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animation for menu items */
    .nav-menu.active li:nth-child(1) { transition-delay: 0.05s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.10s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.20s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.30s; }

    .nav-link {
        font-size: 1.6rem;
        font-weight: 600;
        padding: 16px 32px;
        display: block;
        text-align: center;
    }

    .nav-cta {
        margin-top: 16px;
        font-size: 1.2rem !important;
        padding: 14px 40px !important;
        border-radius: 30px;
    }

    .lang-btn {
        margin-left: 0;
        margin-top: 16px;
        padding: 10px 24px;
        font-size: 1rem;
    }

    /* --- TYPOGRAPHY --- */
    .huge-title {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }

    .section-label {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
        margin-bottom: 24px;
    }

    p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* --- HERO --- */
    .hero-logo-container {
        height: 60vh;
        gap: 40px;
    }

    .hero-main-logo {
        max-width: 200px;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 24px auto 32px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    /* --- SCENE SECTIONS --- */
    .scene-section {
        padding: 80px 16px;
        min-height: auto;
    }

    .intro-scene {
        min-height: 100vh;
    }

    /* --- HORIZONTAL SLIDER → VERTICAL STACK --- */
    #horizontal-slider-container {
        width: 100%;
        height: auto !important;
        overflow: visible;
        display: block;
    }

    #horizontal-slider-wrapper {
        width: 100%;
        height: auto !important;
        display: flex;
        flex-direction: column;
    }

    .spatial-card {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 40px 16px;
        box-sizing: border-box;
    }

    /* --- SPATIAL CARDS (stacked 1-column) --- */
    .system-visual {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 20px;
        border-radius: 24px;
        max-width: 100%;
    }

    .system-visual::before {
        border-radius: 24px;
    }

    .system-visual.reverse-layout .system-details {
        grid-column: 1;
        grid-row: 1;
    }
    .system-visual.reverse-layout .vanguard-ui {
        grid-column: 1;
        grid-row: 2;
    }

    .system-details .huge-title {
        margin-bottom: 16px;
    }

    .system-details p {
        font-size: 0.95rem;
    }

    .system-details .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 14px 20px;
        font-size: 0.9rem;
    }

    /* --- VANGUARD UI (smaller on mobile) --- */
    .vanguard-ui {
        height: 200px;
    }

    .ui-nodes .ui-box {
        width: 180px;
        height: 180px;
    }

    .r-outer { width: 200px; height: 200px; }
    .r-middle { width: 140px; height: 140px; }
    .r-inner { width: 80px; height: 80px; }

    .ui-stack {
        transform: rotateX(60deg) rotateZ(-45deg) scale(0.75);
    }

    .iso-layer {
        width: 140px;
        height: 140px;
        font-size: 0.65rem;
    }

    /* --- ARCHITECTURE GRID (Contact section) --- */
    .architecture-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 8px;
    }

    /* --- CONTACT FORM --- */
    .contact-form {
        padding: 24px 16px;
        border-width: 4px;
        box-shadow: 10px 10px 0px #FF00FF;
        transform: rotate(0deg);
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        padding: 14px 12px;
        font-size: 0.9rem;
        border-width: 3px;
        box-shadow: 4px 4px 0px #000;
    }

    .contact-form textarea {
        min-height: 140px;
    }

    .brutal-btn {
        padding: 18px;
        font-size: 1rem;
        box-shadow: 6px 6px 0px #FF00FF;
    }

    /* --- INTEGRATIONS MARQUEE --- */
    .integrations-section {
        padding: 60px 16px;
    }

    .marquee-track .integration-pill {
        padding: 10px 24px;
    }

    .marquee-track .integration-pill img {
        height: 30px;
    }

    .marquee-track {
        gap: 20px;
    }

    /* --- CLIENTS / HONEYCOMB --- */
    .clients-logos-section {
        padding: 60px 16px;
    }

    .section-desc {
        font-size: 0.95rem !important;
    }

    .honeycomb-grid {
        margin-top: 30px;
    }

    .hex-row {
        flex-direction: column;
        align-items: center;
        width: auto;
    }

    .hex-row:nth-child(2) {
        margin-top: 0;
        margin-bottom: 0;
    }

    .hex-cell {
        width: 170px;
        height: 196px;
        margin: -18px 0 !important;
    }

    .hex-content .client-logo-img-wrap {
        width: 90px;
        height: 42px;
        padding: 4px;
    }

    .hex-name {
        font-size: 0.85rem;
    }

    .hex-tag {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .hex-link {
        font-size: 0.6rem;
    }

    .hex-cta-text {
        font-size: 0.95rem;
    }

    .hex-cta-desc {
        font-size: 0.65rem;
    }

    /* --- METRICS --- */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* --- SERVICES --- */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: auto;
        padding: 32px 24px;
    }

    /* --- FOOTER --- */
    footer {
        padding: 40px 16px;
    }

    footer p {
        font-size: 0.75rem;
    }
}

/* ===== SMALL MOBILE (480px) ===== */
@media (max-width: 480px) {
    .huge-title {
        font-size: clamp(1.6rem, 8vw, 2.5rem);
    }

    .hero-main-logo {
        max-width: 160px;
    }

    .hero-logo-container {
        height: 50vh;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .scene-section {
        padding: 60px 12px;
    }

    .system-visual {
        padding: 24px 16px;
        gap: 24px;
        border-radius: 20px;
    }

    .system-visual::before {
        border-radius: 20px;
    }

    .vanguard-ui {
        height: 160px;
    }

    .ui-nodes .ui-box {
        width: 140px;
        height: 140px;
    }

    .r-outer { width: 160px; height: 160px; }
    .r-middle { width: 110px; height: 110px; }
    .r-inner { width: 60px; height: 60px; }

    .core-glow {
        font-size: 0.9rem;
    }

    .ui-stack {
        transform: rotateX(60deg) rotateZ(-45deg) scale(0.6);
    }

    .iso-layer {
        width: 120px;
        height: 120px;
        font-size: 0.6rem;
    }

    .hex-cell {
        width: 150px;
        height: 173px;
        margin: -16px 0 !important;
    }

    .hex-content .client-logo-img-wrap {
        width: 80px;
        height: 36px;
    }

    .hex-name {
        font-size: 0.8rem;
    }

    .contact-form {
        padding: 20px 12px;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 0.8rem;
        padding: 12px 10px;
    }

    .nav-link {
        font-size: 1.3rem;
        padding: 12px 24px;
    }

    .marquee-track .integration-pill {
        padding: 8px 16px;
    }

    .marquee-track .integration-pill img {
        height: 24px;
    }

    .architecture-grid {
        gap: 32px;
    }
}
