/*
--- SYNAPSE THEME ---
Version: 11.0

TABLE OF CONTENTS
1.  :root & Global Styles
2.  Utility & Animation Classes
3.  Header & Navigation
4.  Mobile Navigation
5.  Hero Section & 3D Sphere
6.  Services Section
7.  Process Section (Synapse)
8.  ROI Forecaster Section
9.  Testimonials & CTA
10. Footer & Live Chat
11. Page-Specific Styles
12. Forms
13. Media Queries
*/

/* 1. :root & Global Styles */
:root {
    --bg-dark: #050517; /* Deep cosmic navy */
    --bg-panel: #101225; /* Slightly lighter panel contrast */
    --primary-blue: #00B4D8; /* Bright aqua-teal */
    --secondary-violet: #6D28D9; /* Deep indigo violet */
    --text-primary: #E6F1FF; /* Cool soft white */
    --text-secondary: #A5B4FC; /* Muted lavender gray */
    --border-color: rgba(0, 180, 216, 0.25); /* Aqua border glow */
    --font-heading: 'Bai Jamjuree', sans-serif;
    --font-body: 'Roboto Mono', monospace;
    --header-height: 80px;
    --transition: 0.3s ease-out;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(rgba(0, 123, 255, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 123, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

h1 {
    font-size: 4.5rem;
    letter-spacing: -2px;
}

h2 {
    font-size: 2.75rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--text-primary);
}

/* 2. Utility & Animation Classes */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: var(--primary-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary-blue);
}

.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    max-width: 600px;
    margin: 1rem auto 0;
    text-align: center;
}

[data-animation] {
    opacity: 0;
}

.animate-on-load.visible,
.animate-on-scroll.visible {
    opacity: 1;
}

[data-animation="fade-in"] {
    transition: opacity 1s ease;
    transition-delay: var(--d, 0s);
}

[data-animation="pop-in"] {
    transform: scale(0.5);
    transition: transform 0.6s var(--transition), opacity 0.6s ease;
}

.animate-on-scroll.visible [data-animation="pop-in"] {
    transform: scale(1);
}

[data-animation="reveal-card"] {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue)) no-repeat;
    background-size: 0% 100%;
    background-position: right;
    transition: background-size 0.8s ease;
}

.animate-on-scroll.visible [data-animation="reveal-card"] {
    background-size: 100% 100%;
}

/* Text Glitch Animation */
[data-animation="text-glitch"] {
    position: relative;
}

.animate-on-load.visible [data-animation="text-glitch"] {
    animation: glitch-anim 1s forwards;
    animation-delay: var(--d, 0s);
}

@keyframes glitch-anim {
    0% {
        text-shadow: none;
        opacity: 0;
    }

    20% {
        text-shadow: 2px 2px 0 var(--secondary-violet), -2px -2px 0 var(--primary-blue);
    }

    40% {
        text-shadow: -2px 2px 0 var(--secondary-violet), 2px -2px 0 var(--primary-blue);
    }

    60% {
        text-shadow: none;
    }

    100% {
        opacity: 1;
    }
}

/* 3. Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 10, 31, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 45px;
    filter: brightness(0) invert(1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
}

.main-nav a.active {
    color: var(--primary-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 4. Mobile Navigation */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    z-index: 1010;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 6px 0;
    transition: transform 0.3s;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-dark);
    z-index: 999;
    padding: 40px;
    transform: translateX(100%);
    transition: transform var(--transition);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu a {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* 5. Hero Section & 3D Sphere */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 1.5rem 0 2.5rem;
}

.hero-visual {
    height: 400px;
}

#neural-sphere {
    width: 100%;
    height: 100%;
    cursor: grab;
}

/* 6. Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-panel);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.service-card h3 {
    color: var(--primary-blue);
}

.animate-on-scroll.visible [data-animation="reveal-card"]>* {
    animation: fade-in-children 0.6s 0.6s forwards;
    opacity: 0;
}

@keyframes fade-in-children {
    to {
        opacity: 1;
    }
}

/* 7. Process Section (Synapse) */
.synapse-diagram {
    position: relative;
    max-width: 700px;
    margin: 60px auto;
    aspect-ratio: 1 / 1;
}

.synapse-node {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.synapse-node span {
    font-family: var(--font-heading);
    font-weight: 600;
}

.node-1 {
    top: 0;
    left: 0;
}

.node-2 {
    top: 0;
    right: 0;
}

.node-3 {
    bottom: 0;
    left: 0;
}

.node-4 {
    bottom: 0;
    right: 0;
}

.synapse-connections {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
}

.connection-path {
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.animate-on-scroll.visible [data-animation="draw-path"] {
    animation: draw 1s 0.5s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* 8. ROI Forecaster Section */
.forecaster-section {
    background: var(--bg-panel);
}

.forecaster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.forecaster-text .section-title {
    text-align: left;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="range"] {
    width: 100%;
}

.range-value {
    float: right;
    color: var(--primary-blue);
    font-weight: 700;
}

.forecaster-output {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.forecaster-output h4 {
    margin-bottom: 0.5rem;
}

.forecaster-output span {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--primary-blue);
}

/* 9. Testimonials & CTA */
.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.testimonial-card {
    background: var(--bg-panel);
    padding: 30px;
    border-left: 3px solid var(--primary-blue);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-card cite {
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary);
}

.cta-section {
    background: var(--primary-blue);
}

.cta-content {
    text-align: center;
}

.cta-content h2,
.cta-content p {
    color: #fff;
}

.cta-content .btn-primary {
    background: #fff;
    color: var(--primary-blue);
    border-color: #fff;
}

/* 10. Footer & Live Chat */
.site-footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-panel);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    display: block;
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a,
.footer-col p {
    color: var(--text-secondary);
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
}

.live-chat {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
}

/* 11. Page-Specific Styles */
.page-header {
    padding: calc(var(--header-height) + 80px) 0;
    text-align: center;
}

.contact-page-section,
.legal-content-section {
    padding-bottom: 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h4 {
    color: var(--primary-blue);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-panel);
    padding: 40px;
    border-radius: 8px;
}

.legal-content h2 {
    text-align: left;
}

/* 12. Forms */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

input,
textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* 13. Media Queries */
@media (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    .main-nav,
    .header-actions .btn {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        height: 300px;
        margin-bottom: 40px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .forecaster-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .forecaster-text {
        text-align: center;
    }

    .forecaster-text .section-title {
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 80px 0;
    }

    .synapse-node {
        width: 120px;
        height: 120px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}