:root {
    --bg-color: #0a0a0c;
    --bg-secondary: #121216;
    --primary-color: #00e5ff;
    /* Cyan/Neon */
    --secondary-color: #7000ff;
    /* Purple/Neon */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(10, 10, 12, 0.8);
    --transition: all 0.3s ease;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Background Effects */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a20 0%, #0a0a0c 100%);
    /* Subtle gradient behind 3D */
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.grid {
    display: grid;
    gap: 30px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    /* Reduced gap */
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    /* Increased font size */
}

.logo img {
    height: 80px;
    /* Even bigger */
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy spring transition */
    transform-style: preserve-3d;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #000;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(0, 229, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 229, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.1);
}

.btn-secondary:active {
    transform: translateY(1px);
}

.btn-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Hero Section */
.hero {
    height: 80vh;
    /* Reduced height to show content sooner */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    /* Centered content */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 10;
    /* Ensure it's above 3D bg */
}

.hero-logo {
    max-width: 900px;
    width: 90%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.4));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Features */
.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 16px;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    /* Fast transform for tilt */
    transform-style: preserve-3d;
}

.card:hover {
    border-color: rgba(0, 229, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.1);
}

/* Ensure inner elements can pop out */
.product-content,
.product-image {
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

/* Contact Form 3D Flip */
.contact-perspective {
    perspective: 1000px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-container {
    width: 100%;
    position: relative;
    background: transparent;
    /* Container is transparent, faces have bg */
    border: none;
    padding: 0;
    border-radius: 16px;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy flip */
    transform-style: preserve-3d;
}

.contact-container.flipped {
    transform: rotateY(180deg);
}

.contact-front,
.contact-back {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 40px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.contact-back {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-message {
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form button {
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Products */
.alt-bg {
    background: var(--bg-secondary);
}

.products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.product-image {
    height: 200px;
    background: #2a2a30;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.placeholder-glow::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Footer */
footer {
    padding: 80px 0 30px;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Reduced spacing for logo */
.footer-brand p {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.footer-brand .footer-brand-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin-top: 5px !important;
    /* Small positive margin for visual separation */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-brand-logo:hover {
    opacity: 1;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero-btns {
        flex-direction: column;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
}