/* ==========================================================================
   CSS Variables & Glass & Grain Theme
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-void: #04120D; 
    --bg-surface: #0A1C15; /* Slightly lighter surface */
    
    --primary: #C4F135; /* Luminous Lime */
    --primary-dim: rgba(196, 241, 53, 0.15);
    
    /* Typography Colors */
    --text-pure: #FFFFFF;
    --text-main: #E2E8F0;
    --text-muted: #8A9A93;
    
    /* Structural Elements */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(196, 241, 53, 0.3);
    
    /* Glassmorphism Shadows & Filters */
    --glass-panel: rgba(10, 28, 21, 0.5);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(196, 241, 53, 0.1);
    
    /* Typography Fonts */
    --font-heading: 'Archivo Black', sans-serif; /* Heavy, structural */
    --font-body: 'Inter', sans-serif; /* Clean, legible */
    
    /* Layout & Animation */
    --max-width: 1400px;
    --nav-height: 90px;
    --border-radius-lg: 24px;
    --border-radius-md: 12px;
    --section-gap: 150px;
    
    --transition-snappy: 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-void);
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-void);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle CSS Film Grain Texture */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    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.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    pointer-events: none;
    z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-pure);
    text-transform: uppercase;
    line-height: 1.05;
}

a { text-decoration: none; color: inherit; transition: var(--transition-snappy); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

::selection { background: var(--primary); color: var(--bg-void); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ==========================================================================
   Typography & Reusable UI
   ========================================================================== */
.display-text {
    font-size: clamp(3.5rem, 8vw, 7rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 3rem;
}

.pill-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--primary-dim);
    color: var(--primary);
    border: 1px solid var(--border-strong);
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.btn-lime {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    background-color: var(--primary);
    color: var(--bg-void);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition-snappy);
    box-shadow: 0 10px 20px rgba(196, 241, 53, 0.2);
}

.btn-lime:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(196, 241, 53, 0.4);
    background-color: #D4FC5B;
}

/* ==========================================================================
   Master Header 
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background-color: var(--bg-void); 
    border-bottom: 1px solid var(--border-glass);
    z-index: 9990;
    display: flex;
    align-items: center;
    transition: var(--transition-snappy);
}

.site-header.scrolled {
    height: 75px;
    background-color: rgba(4, 18, 13, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-strong);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 60px;
    filter: invert(1);
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    transition: var(--transition-snappy);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 10000;
}

.hamburger span {
    display: block;
    width: 32px; height: 2px;
    background-color: var(--text-pure);
    border-radius: 2px;
    transition: var(--transition-snappy);
}

/* ==========================================================================
   Hero Section (Abstract Glass Nodes)
   ========================================================================== */
.hero {
    padding-top: calc(var(--nav-height) + 60px);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subdued background gradient orb */
.hero::after {
    content: '';
    position: absolute;
    top: 20%; right: 10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--primary-dim) 0%, transparent 60%);
    filter: blur(60px);
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Frosted Glass Nodes */
.hero-visual {
    position: relative;
    height: 500px;
    z-index: 1;
}

.glass-node {
    position: absolute;
    background: var(--glass-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.node-1 { top: 10%; left: 0; animation: floatNode 6s ease-in-out infinite; }
.node-2 { bottom: 20%; right: 0; animation: floatNode 8s ease-in-out infinite reverse; border-color: var(--border-strong); }

.node-icon {
    width: 50px; height: 50px;
    background: var(--bg-void);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; color: var(--primary);
    border: 1px solid var(--border-strong);
}

.node-text strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; }
.node-text span { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ==========================================================================
   Infinite Status Marquee
   ========================================================================== */
.status-marquee {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    overflow: hidden;
}

.mq-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}

.mq-item {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--bg-void);
    -webkit-text-stroke: 1px var(--text-muted);
    margin: 0 3rem;
    transition: var(--transition-snappy);
}

.mq-item:hover { color: var(--primary); -webkit-text-stroke: 0px; }

/* ==========================================================================
   Philosophy / Metric Cards
   ========================================================================== */
.philosophy { padding: var(--section-gap) 0; }

.phil-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.m-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.m-card:hover { border-color: var(--primary); background: var(--glass-panel); transform: translateY(-5px); box-shadow: var(--shadow-glow); }

.m-val { font-family: var(--font-heading); font-size: 3.5rem; color: var(--primary); line-height: 1; margin-bottom: 1rem; }
.m-lbl { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }

/* ==========================================================================
   Services Layout
   ========================================================================== */
.services { padding: var(--section-gap) 0; background-color: var(--bg-surface); }

.srv-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.srv-box {
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    background: var(--bg-void);
    transition: var(--transition-smooth);
}

.srv-box:hover { border-color: var(--primary); transform: scale(1.02); }

.srv-icon {
    width: 60px; height: 60px;
    background: var(--primary-dim);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary);
    margin-bottom: 2rem;
}

.srv-box h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.srv-box p { color: var(--text-muted); font-size: 1rem; }

/* ==========================================================================
   Data Telemetry (Pure CSS Step Chart)
   ========================================================================== */
.telemetry { padding: var(--section-gap) 0; }

.tel-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.data-panel {
    background: var(--glass-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 4rem;
    box-shadow: var(--shadow-soft);
}

.dp-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1.5rem; margin-bottom: 3rem;
}

/* CSS Step Chart */
.step-chart {
    display: flex;
    align-items: flex-end;
    height: 250px;
    gap: 4px;
}

.s-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.s-bar {
    width: 100%;
    background: var(--border-glass);
    transform-origin: bottom;
    transform: scaleY(0);
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.s-bar.accent { background: var(--primary); box-shadow: var(--shadow-glow); }

.data-panel.in-view .s-bar { transform: scaleY(1); }

/* Stagger bar reveals */
.data-panel.in-view .s-bar-wrap:nth-child(1) .s-bar { transition-delay: 0.1s; }
.data-panel.in-view .s-bar-wrap:nth-child(2) .s-bar { transition-delay: 0.2s; }
.data-panel.in-view .s-bar-wrap:nth-child(3) .s-bar { transition-delay: 0.3s; }
.data-panel.in-view .s-bar-wrap:nth-child(4) .s-bar { transition-delay: 0.4s; }

.s-lbl { margin-top: 15px; font-size: 0.75rem; color: var(--text-muted); text-align: center; text-transform: uppercase; letter-spacing: 0.1em; }

/* ==========================================================================
   Tactile Calculator
   ========================================================================== */
.calculator { padding: var(--section-gap) 0; background-color: var(--bg-surface); }

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-top: 4rem;
}

.slider-container { margin-bottom: 3rem; }

.sl-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem;
}

.sl-lbl { font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; }
.sl-val { font-family: var(--font-heading); font-size: 2rem; color: var(--primary); }

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%; height: 6px;
    background: var(--bg-void);
    border: 1px solid var(--border-glass);
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px; width: 24px;
    background: var(--primary);
    border-radius: 4px; /* Brutalist square thumb */
    cursor: pointer;
    margin-top: -10px;
    transition: transform var(--transition-snappy);
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.calc-results {
    background: var(--bg-void);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.res-box h4 { font-size: 4rem; color: var(--text-pure); margin-bottom: 0.5rem; }
.res-box p { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; font-weight: 600; }

/* ==========================================================================
   Industries (Glass Pills)
   ========================================================================== */
.industries { padding: var(--section-gap) 0; text-align: center; }

.ind-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 4rem;
}

.ind-glass {
    padding: 18px 36px;
    background: var(--glass-panel);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-snappy);
    cursor: default;
}

.ind-glass:hover {
    background: var(--primary);
    color: var(--bg-void);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials { padding: var(--section-gap) 0; background-color: var(--bg-surface); }

.test-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.t-mark { font-family: var(--font-heading); font-size: 6rem; color: var(--primary-dim); line-height: 0.5; margin-bottom: 2rem; }

.t-quote {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-pure);
    margin-bottom: 3rem;
}

.t-auth { font-family: var(--font-heading); font-size: 1rem; color: var(--primary); }

/* ==========================================================================
   Contact Area
   ========================================================================== */
.contact-section { padding: var(--section-gap) 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.c-form { display: flex; flex-direction: column; gap: 2rem; }

.c-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-pure);
    transition: var(--transition-snappy);
}

.c-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-glow); }
textarea.c-input { height: 150px; resize: none; }

/* Chat Module */
.chat-module {
    background: var(--glass-panel);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-head {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.c-dot { width: 10px; height: 10px; background: var(--primary); border-radius: 50%; box-shadow: var(--shadow-glow); }

.chat-log {
    flex: 1; padding: 2rem;
    display: flex; flex-direction: column; gap: 1.5rem;
}

.chat-bubble { max-width: 80%; padding: 1.2rem 1.5rem; border-radius: 12px; font-size: 0.95rem; line-height: 1.5; }
.chat-bubble.ai { background: var(--bg-surface); border: 1px solid var(--border-glass); align-self: flex-start; }
.chat-bubble.user { background: var(--primary); color: var(--bg-void); font-weight: 600; align-self: flex-end; }

/* ==========================================================================
   Legal Pages Styling
   ========================================================================== */
.legal-main {
    padding: calc(var(--nav-height) + 100px) 5% 100px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-panel {
    background: var(--glass-panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: 5rem;
}

.legal-panel h1 { font-size: 3.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border-strong); padding-bottom: 1rem; }
.legal-panel h2 { font-size: 1.5rem; color: var(--primary); margin: 3rem 0 1rem; }
.legal-panel p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.8; }

/* ==========================================================================
   Master Footer (Pure Deep Forest Green)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-void); /* Exact solid color */
    border-top: 1px solid var(--border-glass);
    padding: 100px 5% 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto 4rem;
}

.footer-brand img { height: 38px; margin-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); max-width: 300px; font-size: 1rem; }

.footer-col h4 {
    font-size: 1.1rem;
    color: var(--text-pure);
    margin-bottom: 1.5rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 1rem; }
.footer-col a, .footer-col li { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: var(--transition-snappy); }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Animations & Breakpoints
   ========================================================================== */
@keyframes floatNode { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes marqueeScroll { 100% { transform: translateX(-50%); } }

.reveal-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .hero-grid, .phil-grid, .tel-grid, .calc-grid, .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero-visual { height: 400px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-height); left: -100%; width: 100%; height: calc(100vh - var(--nav-height));
        background-color: var(--bg-void);
        flex-direction: column; justify-content: center;
        transition: var(--transition-smooth);
    }
    .nav-links.active { left: 0; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .metric-grid, .srv-container, .footer-grid { grid-template-columns: 1fr; }
    .legal-panel { padding: 2.5rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}