/*
--- NEBULA THEME ---
Version: 6.0

TABLE OF CONTENTS
1.  :root & Global Styles
2.  Utility & Animation Classes
3.  Header & Navigation
4.  Mobile Navigation
5.  Hero Section & 3D Data Orb
6.  Service Constellation Section
7.  Trajectory (Process) Section
8.  Impact Simulator Section
9.  Testimonials Section
10. CTA Section
11. Footer
12. Stardust Canvas Background
13. Page-Specific Styles (Contact, Legal)
14. Forms
15. Media Queries (Responsiveness)
*/

/* 1. :root & Global Styles */
:root {
    --bg-deep-space: #050510;
    /* Deep Midnight */
    --bg-dark-nebula: #0E1330;
    /* Navy Void */
    --bg-light-nebula: #1A1F4D;
    /* Subtle Indigo Glow */
    --primary-glow: #00FFE0;
    /* Neon Aqua */
    --secondary-glow: #007BFF;
    /* Bright Electric Blue */
    --accent-glow: #7C3AED;
    /* Vivid Violet Accent */
    --text-primary: #E8F9FF;
    /* Clean Cool White */
    --text-secondary: #A0B8FF;
    /* Frosted Blue Gray */
    --border-color: rgba(0, 255, 224, 0.25);
    /* Aqua Border Glow */
    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;
    --border-radius: 10px;
    --transition: 0.3s ease-out;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-deep-space);
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 0;
    position: relative;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 2.75rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    max-width: 65ch;
}

a {
    color: var(--secondary-glow);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--text-primary);
}

/* 2. Utility & Animation Classes */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-glow), var(--accent-glow));
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 0, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(255, 0, 229, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-dark-nebula);
    border-color: var(--secondary-glow);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.section-header {
    margin-bottom: 60px;
}

.section-header .section-subtitle {
    max-width: 600px;
    margin: 1rem auto 0;
}

.highlight {
    color: var(--primary-glow);
}

[data-animation] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animation="fade-in-up"] {
    transform: translateY(40px);
}

[data-animation="zoom-in"] {
    transform: scale(0.9);
}

[data-animation="slide-in-right"] {
    transform: translateX(40px);
}

.animate-on-load,
.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
    transition-delay: var(--delay, 0s);
}

/* 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);
    transition: background-color var(--transition);
}

.site-header.scrolled {
    background: rgba(10, 10, 31, 0.9);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 55px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-glow);
    transition: all var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
    left: 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 4. Mobile Navigation */
.hamburger {
    display: none;
    background: none;
    border: none;
    z-index: 1010;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 6px 0;
    border-radius: 1px;
    transition: all 0.4s ease;
}

.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);
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-deep-space);
    z-index: 999;
    padding: 40px;
    transition: left 0.4s ease;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mobile-menu a {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* 5. Hero Section & 3D Data Orb */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 500px;
    margin: 1.5rem 0 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-visual {
    perspective: 1000px;
}

.data-orb-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.data-orb {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: spin 20s linear infinite;
}

.data-orb::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, var(--secondary-glow), var(--accent-glow) 80%);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--accent-glow), inset 0 0 40px rgba(255, 255, 255, 0.2);
}

.orb-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(51, 209, 255, 0.3);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.orb-ring:nth-child(1) {
    transform: rotateY(30deg) scale(1.2);
}

.orb-ring:nth-child(2) {
    transform: rotateY(60deg) scale(1.4);
}

.orb-ring:nth-child(3) {
    transform: rotateY(90deg) scale(1.6);
}

@keyframes spin {
    to {
        transform: rotateY(360deg);
    }
}

/* 6. Service Constellation Section */
.constellation-map {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 8 / 5;
}

.constellation-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
}

.service-star {
    position: absolute;
    transform: translate(-50%, -50%);
}

.star-point {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px white, 0 0 20px var(--secondary-glow);
    animation: star-pulse 2.5s infinite ease-in-out;
    cursor: pointer;
}

.star-label {
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--bg-light-nebula);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.service-star:hover .star-label {
    opacity: 1;
    visibility: visible;
    bottom: 150%;
}

@keyframes star-pulse {
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 15px white, 0 0 30px var(--secondary-glow);
    }
}

/* 7. Trajectory (Process) Section */
.trajectory-section {
    background: var(--bg-dark-nebula);
}

.trajectory-path {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.trajectory-stage {
    text-align: center;
    background: var(--bg-light-nebula);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    position: relative;
}

.stage-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.trajectory-stage:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--accent-glow);
}

/* 8. Impact Simulator Section */
.simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.simulator-controls .section-title {
    text-align: left;
}

.slider-group {
    margin-bottom: 1.5rem;
}

.slider-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.impact-slider {
    width: 100%;
    -webkit-appearance: none;
    background: transparent;
}

.impact-slider::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--bg-light-nebula);
    border-radius: 2px;
}

.impact-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-glow);
    border-radius: 50%;
    margin-top: -8px;
    box-shadow: 0 0 10px var(--primary-glow);
    cursor: pointer;
}

.simulator-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.impact-orb {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, var(--bg-light-nebula), var(--bg-deep-space) 70%);
    box-shadow: 0 0 calc(20px * var(--impact-scale, 1)) var(--primary-glow);
    transform: scale(var(--impact-scale, 1));
    transition: all 0.5s ease;
}

.impact-orb span {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.impact-orb small {
    color: var(--text-secondary);
}

/* 9. Testimonials Section */
.testimonials-section {
    background: var(--bg-dark-nebula);
}

.testimonial-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.testimonial-carousel::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    flex: 0 0 100%;
    max-width: 45%;
    scroll-snap-align: center;
    background: var(--bg-light-nebula);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.author {
    text-align: right;
    color: var(--accent-glow);
    font-weight: 500;
}

/* 10. CTA Section */
.cta-content {
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-dark-nebula);
    border-radius: var(--border-radius);
}

.cta-content p {
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* 11. Footer */
.site-footer {
    background: var(--bg-dark-nebula);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo img {
    height: 55px;
    margin-bottom: 1rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a,
address {
    color: var(--text-secondary);
    font-style: normal;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    color: var(--text-secondary);
}

/* 12. Stardust Canvas Background */
#stardust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* 13. Page-Specific Styles (Contact, Legal) */
.page-header {
    padding: calc(var(--header-height) + 80px) 0;
    text-align: center;
}

.page-header p {
    max-width: 600px;
    margin: 1rem auto 0;
}

.contact-page-section,
.legal-content-section {
    padding-bottom: 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
}

.contact-form-container {
    background: var(--bg-dark-nebula);
    padding: 40px;
    border-radius: var(--border-radius);
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h4 {
    color: var(--secondary-glow);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-dark-nebula);
    padding: 40px;
    border-radius: var(--border-radius);
}

.legal-content h2 {
    text-align: left;
}

/* 14. Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-deep-space);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    transition: all var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-glow);
    box-shadow: 0 0 10px rgba(51, 209, 255, 0.3);
}

/* 15. Media Queries */
@media (max-width: 1024px) {
    h1 {
        font-size: 3.2rem;
    }

    .main-nav,
    .header-actions .btn {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin: 40px 0;
    }

    .trajectory-path {
        grid-template-columns: 1fr 1fr;
    }

    .trajectory-stage:nth-child(2)::after {
        display: none;
    }

    .simulator-grid {
        grid-template-columns: 1fr;
    }

    .simulator-visual {
        margin-top: 40px;
    }

    .testimonial-card {
        max-width: 80%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    body {
        font-size: 15px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .constellation-map {
        display: none;
    }

    /* Simplified for mobile */
    .trajectory-path {
        grid-template-columns: 1fr;
    }

    .trajectory-stage::after {
        display: none;
    }

    .testimonial-card {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}