@import 'reset.css';
@import 'variables.css';
@import 'typography.css';

/* Global Styles */
body {
    background: var(--color-dark);
    overflow-x: hidden;
}

/* Container */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Utility Classes */
.flex {
    display: flex;
}

.grid {
    display: grid;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-soft);
}

/* Buttons */
/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--border-radius-sm);
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 3D Glare Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    transform: skewX(-20deg);
    pointer-events: none;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-secondary);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-light);
    color: var(--color-light);
}

.btn-outline:hover {
    background: var(--color-light);
    color: var(--color-dark);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
    padding: var(--spacing-sm) 0;
}

header.scrolled {
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav .logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-light);
    letter-spacing: -0.02em;
}

nav .logo span {
    color: var(--color-primary);
}

nav ul {
    display: flex;
    gap: var(--spacing-md);
}

nav a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-light);
    opacity: 0.8;
    transition: var(--transition-fast);
    position: relative;
}

nav a:hover,
nav a.active {
    opacity: 1;
    color: var(--color-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-fast);
}

nav a:hover::after {
    width: 100%;
}

/* Footer */
footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    font-size: 0.9rem;
    color: #888;
}

footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

footer h4 {
    color: var(--color-light);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

footer a {
    display: block;
    margin-bottom: var(--spacing-xs);
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--color-primary);
}

footer .copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Animations Init (Simple fade up) */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section Specifics */
.hero {
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through, but we handle mousemove globally on window if needed, or overlay */
}

/* Ensure canvas captures mouse if we want it to, but usually text is on top. 
   In JS we use window listener so pointer-events: none is fine for visual only. 
   BUT the user wants interaction. The JS uses window mousemove, so it's fine. 
*/

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    z-index: 10;
    position: relative;
}

.hero p {
    margin-left: auto;
    margin-right: auto;
}

/* 3D Growth Chart Animation */
.scene-3d {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    transform: rotateX(-20deg) rotateY(-30deg);
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
}

.bar-3d {
    position: relative;
    width: 40px;
    height: 0;
    transform-style: preserve-3d;
    animation: growBar 2s ease-out forwards;
    animation-delay: var(--d);
}

@keyframes growBar {
    to {
        height: var(--h);
    }
}

.bar-3d .face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bar-3d .face.front {
    transform: translateZ(20px);
    background: linear-gradient(to bottom, var(--color-primary), #b8860b);
    opacity: 0.9;
}

.bar-3d .face.back {
    transform: translateZ(-20px);
    background: #b8860b;
}

.bar-3d .face.right {
    width: 40px;
    transform: rotateY(90deg) translateZ(20px);
    background: #daa520;
}

.bar-3d .face.left {
    width: 40px;
    transform: rotateY(-90deg) translateZ(20px);
    background: #daa520;
}

.bar-3d .face.top {
    height: 40px;
    transform: rotateX(90deg) translateZ(20px);
    background: #fff;
    box-shadow: 0 0 20px var(--color-primary);
}

/* Floating animation for the whole scene (Default) */
.scene-3d {
    /* Default rotation handled by animation, overwritten by JS style if needed */
    transform: rotateX(-20deg) rotateY(-30deg);
    transition: transform 0.1s ease-out;
    /* Smooth follow */
    animation: float3D 6s ease-in-out infinite;
}

/* When interacting, we might want to pause animation or just let JS override transform completely */
#growth-chart:hover .scene-3d {
    animation: none;
}

@keyframes float3D {

    0%,
    100% {
        transform: rotateX(-20deg) rotateY(-30deg) translateY(0);
    }

    50% {
        transform: rotateX(-20deg) rotateY(-35deg) translateY(-10px);
    }
}

/* 3D Gyroscope Animation for Vision Section */
.gyroscope {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: gyroFloat 6s ease-in-out infinite;
}

.gyroscope .ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
    transform-style: preserve-3d;
}

.gyroscope .ring.outer {
    width: 180px;
    height: 180px;
    border-color: rgba(255, 215, 0, 0.6);
    animation: rotateRing1 10s linear infinite;
}

.gyroscope .ring.middle {
    width: 140px;
    height: 140px;
    border-color: rgba(255, 215, 0, 0.4);
    animation: rotateRing2 15s linear infinite reverse;
}

.gyroscope .ring.inner {
    width: 100px;
    height: 100px;
    border-color: rgba(255, 215, 0, 0.8);
    animation: rotateRing3 8s linear infinite;
}

.gyroscope .core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffd700, #b8860b);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: pulseCore 2s ease-in-out infinite;
}

@keyframes gyroFloat {

    0%,
    100% {
        transform: translateY(0) rotateX(0);
    }

    50% {
        transform: translateY(-15px) rotateX(5deg);
    }
}

@keyframes rotateRing1 {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(360deg) rotateY(180deg);
    }
}

@keyframes rotateRing2 {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(180deg) rotateY(360deg);
    }
}

@keyframes rotateRing3 {
    0% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateY(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(60deg) rotateY(360deg);
    }
}

@keyframes pulseCore {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
        box-shadow: 0 0 50px rgba(255, 215, 0, 1);
    }
}