/* ==========================================================================
   CSS Variables & Obsidian Monochrome Theme
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Color Palette - Obsidian & Indigo */
    --bg-obsidian: #050505;
    --bg-surface: #0E0E11;
    --bg-surface-elevated: #16161A;

    --primary: #4F46E5;
    /* Electric Indigo */
    --primary-glow: rgba(79, 70, 229, 0.3);
    --secondary: #06B6D4;
    /* Cyan Accent */
    --accent: #F43F5E;
    /* Rose Data Highlight */

    /* Typography Colors */
    --text-pure: #FFFFFF;
    --text-main: #FAFAFA;
    --text-muted: #A1A1AA;

    /* Structural Elements */
    --border-subtle: #27272A;
    --border-hover: #3F3F46;

    /* Shadows & Glows */
    --shadow-base: 0 10px 30px rgba(0, 0, 0, 0.5);
    --glow-ambient: 0 0 80px rgba(79, 70, 229, 0.15);

    /* Typography Fonts */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout & Animation */
    --max-width: 1440px;
    --nav-height: 90px;
    --border-radius-lg: 24px;
    --border-radius-md: 12px;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fluid: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --section-spacing: 160px 5%;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-obsidian);
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-muted);
    background-color: var(--bg-obsidian);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    color: var(--text-pure);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Custom Selection & Scrollbar */
::selection {
    background: var(--primary);
    color: var(--text-pure);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   Typography & Reusable Components
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--text-pure) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-indigo {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.headline-mega {
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 3rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-pure);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.btn-fluid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    background-color: var(--text-pure);
    color: var(--bg-obsidian);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-fluid);
    z-index: 1;
}

.btn-fluid::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    border-radius: 50% 50% 0 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-fluid:hover::before {
    top: 0;
    border-radius: 0;
}

.btn-fluid:hover {
    color: var(--text-pure);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

/* ==========================================================================
   Master Header (Exact Obsidian Layout)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.site-header.scrolled {
    height: 75px;
    background-color: rgba(5, 5, 5, 0.95);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 5%;
}

.logo img {
    height: 55px;
    filter: brightness(0) 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.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-pure);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hamburger */
.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);
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* ==========================================================================
   Hero Section (Cinematic Typography & Ambient Glow)
   ========================================================================== */
.hero {
    padding-top: calc(var(--nav-height) + 80px);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Ambient Background Glow */
.hero-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    filter: blur(100px);
    border-radius: 50%;
    z-index: -1;
    animation: breathe 8s ease-in-out infinite alternate;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 0 5%;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ==========================================================================
   Infinite Marquee
   ========================================================================== */
.marquee-wrap {
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(255, 255, 255, 0.01);
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scrollX 40s linear infinite;
}

.mq-item {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-hover);
    margin: 0 3rem;
    transition: var(--transition-fast);
}

.mq-item:hover {
    color: var(--text-pure);
    -webkit-text-stroke: 0px;
}

/* ==========================================================================
   Manifesto / About
   ========================================================================== */
.about {
    padding: var(--section-spacing);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.metric-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition-fluid);
}

.metric-card:hover {
    border-color: var(--primary);
    background-color: var(--bg-surface-elevated);
    transform: translateY(-10px);
}

.m-val {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-pure);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.m-lbl {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Services (Bento Box Architecture)
   ========================================================================== */
.services {
    padding: var(--section-spacing);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 2rem;
    margin-top: 4rem;
}

.bento-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: var(--transition-fluid);
    position: relative;
    overflow: hidden;
}

/* Hover Gradient Border effect */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--primary-glow), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-fluid);
    z-index: 0;
}

.bento-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 1;
}

.bento-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-obsidian);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-pure);
    margin-bottom: auto;
}

.bento-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Bento Spanning */
.bento-card:nth-child(1) {
    grid-column: span 2;
}

.bento-card:nth-child(4) {
    grid-column: span 2;
}

/* ==========================================================================
   Analytics Dashboard (Pure CSS Visuals)
   ========================================================================== */
.analytics {
    padding: var(--section-spacing);
    border-top: 1px solid var(--border-subtle);
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.dash-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-base);
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

/* CSS Dynamic Bar Chart */
.css-chart-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    height: 250px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.c-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 6px 6px 0 0;
    transform-origin: bottom;
    transform: scaleY(0);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-panel.in-view .c-bar {
    transform: scaleY(1);
}

/* Staggered Chart Animation */
.dash-panel.in-view .chart-bar-group:nth-child(1) .c-bar {
    transition-delay: 0.1s;
}

.dash-panel.in-view .chart-bar-group:nth-child(2) .c-bar {
    transition-delay: 0.2s;
}

.dash-panel.in-view .chart-bar-group:nth-child(3) .c-bar {
    transition-delay: 0.3s;
}

.dash-panel.in-view .chart-bar-group:nth-child(4) .c-bar {
    transition-delay: 0.4s;
}

.c-lbl {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   Interactive ROI Calculator
   ========================================================================== */
.calculator {
    padding: var(--section-spacing);
    background-color: var(--bg-surface);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    margin-top: 4rem;
}

.calc-input-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.slider-header label {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.slider-val {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-pure);
    line-height: 1;
}

/* Sleek Minimal Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    background: var(--border-hover);
    border-radius: 1px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    background: var(--text-pure);
    border-radius: 50%;
    margin-top: -11px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: transform var(--transition-fast);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-output-area {
    background-color: var(--bg-obsidian);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.out-metric h4 {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--text-pure);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.out-metric p {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Industry Sectors (Hover List)
   ========================================================================== */
.industries {
    padding: var(--section-spacing);
}

.ind-list {
    margin-top: 4rem;
    border-top: 1px solid var(--border-subtle);
}

.ind-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
    cursor: default;
}

.ind-row:hover {
    padding-left: 2rem;
    padding-right: 2rem;
    background-color: rgba(255, 255, 255, 0.02);
}

.ind-row h3 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.ind-row:hover h3 {
    color: var(--text-pure);
}

.ind-row span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.ind-row:hover span {
    opacity: 1;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials {
    padding: var(--section-spacing);
    background-color: var(--bg-surface);
    text-align: center;
}

.test-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.test-quote {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.4;
    color: var(--text-pure);
    margin-bottom: 3rem;
}

.test-author {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Contact Section & Terminal Chat
   ========================================================================== */
.contact-section {
    padding: var(--section-spacing);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-pure);
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

textarea.form-input {
    height: 120px;
    resize: none;
}

/* Minimalist Chat Terminal */
.chat-terminal {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    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-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

.chat-log {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.c-msg {
    max-width: 85%;
    font-size: 1rem;
    line-height: 1.5;
    padding: 1rem 1.5rem;
    border-radius: 12px;
}

.c-msg.ai {
    background-color: var(--bg-obsidian);
    border: 1px solid var(--border-subtle);
    align-self: flex-start;
    color: var(--text-muted);
}

.c-msg.user {
    background-color: var(--primary);
    color: var(--text-pure);
    align-self: flex-end;
}

/* ==========================================================================
   Legal Pages Styling
   ========================================================================== */
.legal-main {
    padding: calc(var(--nav-height) + 120px) 5% 120px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-main h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1.5rem;
}

.legal-main h2 {
    font-size: 1.75rem;
    color: var(--text-pure);
    margin: 3rem 0 1rem;
}

.legal-main p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ==========================================================================
   Master Footer (Identical Obsidian Base)
   ========================================================================== */
.site-footer {
    background-color: var(--bg-obsidian);
    border-top: 1px solid var(--border-subtle);
    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: 40px;
    margin-bottom: 2rem;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 320px;
    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;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--text-pure);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Animations & Responsive Adjustments
   ========================================================================== */
@keyframes breathe {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

@keyframes scrollX {
    100% {
        transform: translateX(-50%);
    }
}

.reveal-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {

    .about-grid,
    .analytics-grid,
    .calc-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-card:nth-child(1),
    .bento-card:nth-child(4) {
        grid-column: span 1;
    }

    .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: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--bg-obsidian);
        flex-direction: column;
        justify-content: center;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    .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);
    }

    .bento-grid,
    .about-metrics {
        grid-template-columns: 1fr;
    }

    .bento-card:nth-child(1),
    .bento-card:nth-child(4) {
        grid-column: span 1;
    }

    .ind-row {
        padding-left: 0;
        padding-right: 0;
    }

    .ind-row span {
        display: none;
    }

    .ind-row:hover {
        padding-left: 0;
        padding-right: 0;
        background: transparent;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}