/* =========================================
   1. Theme Variables
   ========================================= */
:root {
    /* BACKGROUNDS */
    /* A slightly warmer, bone-white to complement the earth tones */
    --bg-color: #F4F3EF;

    /* TEXT */
    /* A very deep green-charcoal, softer than pure black */
    --text-color: #1A1C18;

    /* FONTS */
    --heading-font: 'Space Grotesk', sans-serif;
    --body-font: 'Inter', sans-serif;

    /* ACCENTS */
    /* Primary Accent: Spicy Mustard (High Energy/CTA) */
    --accent-color: #E1AD01;

    /* Secondary Accent: Deep Olive (Stability/Structure) */
    --secondary-accent: #556B2F;

    /* Intelligence Accent: Teal (Data/Process) */
    --intel-color: #00897B;

    /* UI ELEMENTS */
    /* Increased opacity slightly for better legibility against the new hues */
    --card-bg: rgba(255, 255, 255, 0.6);

    /* A faint olive border for subtle structure */
    --border-color: rgba(85, 107, 47, 0.2);

    /* DECORATION */
    --noise-opacity: 0.05;
    --shape-radius: 50%;
    --grid-display: none;
}

/* =========================================
   2. Base Reset & Layout
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.4s ease, color 0.2s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--body-font);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Noise Texture for Warm Theme */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: var(--noise-opacity);
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.5s ease;
}

h1,
h2,
h3 {
    font-family: var(--heading-font);
    color: var(--text-color);
    font-weight: normal;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================
   3. Components
   ========================================= */

/* Header */
.site-header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-dot {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-color);
}

.site-header nav a {
    font-family: var(--body-font);
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Mobile Nav Styles */
.nav-link.active {
    color: var(--accent-color) !important;
}

.mobile-text {
    display: none;
}

.site-header nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.site-header nav a.active {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-color);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem !important;
    text-align: left;
    border-bottom: none !important;
    opacity: 0.9 !important;
}

.dropdown-content a:hover {
    background-color: rgba(225, 173, 1, 0.1);
    /* Low opacity accent color */
    color: var(--accent-color) !important;
    opacity: 1 !important;
}

.dropdown-content a.active {
    font-weight: bold;
    color: var(--accent-color);
    opacity: 1 !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover>a {
    color: var(--accent-color);
    opacity: 1;
}

/* Hero */
.hero {
    padding: 6rem 5%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.overline {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-transform: uppercase;
    color: var(--accent-color);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero .lead {
    font-size: 1.25rem;
    max-width: 500px;
    opacity: 0.9;
}

/* Hero Visual - Atom Animation */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px;
    position: relative;
    /* Anchor for canvas */
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind the atom */
    pointer-events: none;
}

.atom-container {
    position: relative;
    width: 270px;
    /* Scaled up 1.5x */
    height: 270px;
    /* Scaled down from 300px */
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    perspective: 3000px;
    z-index: 1;
    /* Above canvas */
}

/* ORBITS (RINGS) - Swapped to Olive */
.atom-orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid var(--secondary-accent);
    /* Main Olive border */
    transform-style: preserve-3d;
    box-shadow: 0 0 15px rgba(85, 107, 47, 0.6), inset 0 0 15px rgba(85, 107, 47, 0.6);
    /* Olive Glow */
}

/* Ensure diverse ring rotations & Meaningful Colors */
/* Ring 1: Gold Layer Quality (Mustard) */
.orbit-1 {
    animation: orbit-1-spin 7s linear infinite;
    border: 4px solid var(--accent-color);
    /* Tubular Shading */
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.6),
        inset -1px -1px 3px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(225, 173, 1, 0.6);
}

/* Ring 2: Sustainability (Olive) */
.orbit-2 {
    animation: orbit-2-spin 9s linear infinite;
    border: 4px solid var(--secondary-accent);
    /* Tubular Shading */
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.6),
        inset -1px -1px 3px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(85, 107, 47, 0.6);
}

/* Ring 3: Data Foundation (Charcoal Green) */
.orbit-3 {
    animation: orbit-3-spin 11s linear infinite;
    border: 4px solid #2F4F4F;
    /* Tubular Shading */
    box-shadow:
        inset 1px 1px 3px rgba(0, 0, 0, 0.6),
        inset -1px -1px 3px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(47, 79, 79, 0.6);
}

/* BRAIN CONTAINER (Replaces CORE) */
.brainContainer {
    position: absolute;
    width: 180px;
    height: 180px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* BRAIN ANIMATION CLASSES (Pulse & Waves) */
.brainContainer svg {
    display: block;
    width: 100%;
    height: 100%;
    /* Mustard Glow */
    filter: drop-shadow(0 0 8px rgba(225, 173, 1, 0.8));
    overflow: visible;
}

/* Force Color and Animation on Paths */
/* Force Color on Both */
.brainContainer svg .brain-outer,
.brainContainer svg .brain-inner {
    stroke: #E1AD01 !important;
    /* Spicy Mustard */
}

/* Apply Waves Animation ONLY to Inner Paths */
.brainContainer svg .brain-inner {
    animation: waves 60s linear infinite;
}

/* Ensure Outer Path is solid (no dasharray animation) */
.brainContainer svg .brain-outer {
    stroke-dasharray: none;
    fill: none;
}

@keyframes waves {
    0% {
        stroke-dasharray: 120 20;
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dasharray: 120 20;
        stroke-dashoffset: 12000;
    }
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes fade {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.service-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* 3D Orbit Keyframes - Independent Axes */
@keyframes orbit-1-spin {
    0% {
        transform: rotateX(70deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(70deg) rotateY(360deg);
    }
}

@keyframes orbit-2-spin {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(60deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(60deg);
    }
}

@keyframes orbit-3-spin {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(0deg);
    }

    /* Flat Spin */
}

/* Brain Animation - Pulse and Wave */
.brainContainer svg {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(225, 173, 1, 0.6));
    /* Glowing Mustard */
    stroke: var(--accent-color);
}

.particle-stream {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.source-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--charcoal-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: source-flow-3d 3s infinite ease-in;
}

/* 16 Particles with Random 3D Starting Positions */
.source-particle:nth-child(1) {
    top: 50%;
    left: 0;
    transform: translate3d(-40px, -20px, 0px);
    animation-delay: 0s;
}

.source-particle:nth-child(2) {
    top: 50%;
    left: 0;
    transform: translate3d(-30px, 20px, 20px);
    animation-delay: 0.2s;
}

.source-particle:nth-child(3) {
    top: 50%;
    left: 0;
    transform: translate3d(-50px, -10px, -20px);
    animation-delay: 0.4s;
}

.source-particle:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translate3d(-35px, 30px, 10px);
    animation-delay: 0.6s;
}

.source-particle:nth-child(5) {
    top: 50%;
    left: 0;
    transform: translate3d(-45px, -30px, -10px);
    animation-delay: 0.8s;
}

.source-particle:nth-child(6) {
    top: 50%;
    left: 0;
    transform: translate3d(-20px, 10px, 30px);
    animation-delay: 1.0s;
}

.source-particle:nth-child(7) {
    top: 50%;
    left: 0;
    transform: translate3d(-55px, -25px, -30px);
    animation-delay: 1.2s;
}

.source-particle:nth-child(8) {
    top: 50%;
    left: 0;
    transform: translate3d(-25px, 25px, 15px);
    animation-delay: 1.4s;
}

.source-particle:nth-child(9) {
    top: 50%;
    left: 0;
    transform: translate3d(-60px, 0px, 0px);
    animation-delay: 1.6s;
}

.source-particle:nth-child(10) {
    top: 50%;
    left: 0;
    transform: translate3d(-40px, 40px, 40px);
    animation-delay: 1.8s;
}

.source-particle:nth-child(11) {
    top: 50%;
    left: 0;
    transform: translate3d(-50px, -40px, -40px);
    animation-delay: 2.0s;
}

.source-particle:nth-child(12) {
    top: 50%;
    left: 0;
    transform: translate3d(-10px, 15px, 25px);
    animation-delay: 2.2s;
}

.source-particle:nth-child(13) {
    top: 50%;
    left: 0;
    transform: translate3d(-70px, -15px, -25px);
    animation-delay: 2.4s;
}

/* Services */

/* Services */
.services {
    padding: 6rem 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    border-top: 1px solid var(--border-color);
}

.service-card {
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    /* Slightly rounded always */
}

.service-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Philosophy */
.philosophy {
    padding: 6rem 5%;
    background-color: var(--border-color);
    /* Subtle contrast */
    text-align: center;
}

.philosophy .content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.philosophy h3 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.philosophy p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-family: var(--heading-font);
}

/* Footer */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 5%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .lead {
        margin: 0 auto;
    }

    /* Mobile Navigation */
    .site-header {
        padding: 1.5rem 5%;
    }

    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline-block;
        font-size: 1.5rem;
        font-weight: bold;
        padding: 0.5rem;
    }

    .main-nav {
        gap: 1rem;
    }

    /* When dropdown is open, swap initial for full text */
    .dropdown.active .nav-link .mobile-text {
        display: none;
    }

    .dropdown.active .nav-link .desktop-text {
        display: inline-block;
        font-size: 1.1rem;
        font-weight: bold;
        padding: 0.5rem;
    }

    /* Disable hover for mobile */
    .dropdown:hover .dropdown-content {
        display: none;
    }

    /* Enable click toggle */
    .dropdown.active .dropdown-content {
        display: block;
        position: absolute;
        width: 200px;
        right: 0;
        left: auto;
        top: 100%;
    }
}
}