/* Enhanced Animations - Every Element Animates */
:root {
    --bg-900: #05060a;
    --bg-800: #0A0F24;
    --bg-700: #0D132B;
    --accent: #1E90FF;
    --accent-2: #0ab3ff;
    --muted: #9aa7bf;
    --text: #F5F7FA;
    --glass: rgba(255, 255, 255, 0.03);
    --radius: 12px;
    --font-family: 'Poppins', sans-serif;
    --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, var(--bg-900) 0%, var(--bg-800) 60%);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

h1 { font-size: 3.2rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tagline {
    display: block;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 0.82rem;
    margin-bottom: 0.6rem;
}

.text-center {
    text-align: center;
}

/* ========================================
   REVEAL ANIMATIONS - APPLIED TO EVERYTHING
   ======================================== */

/* Base reveal animation: Slide up and fade in */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal item (for inline elements) */
.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Hero specific reveals (subtler slide/scale) */
.reveal-hero-item {
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal-hero-item.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Canvas reveal (simple fade in) */
.reveal-canvas {
    opacity: 0;
    transition: opacity 1.5s var(--ease);
}

.reveal-canvas.animate-in {
    opacity: 0.7; /* Particles are subtle by design */
}

/* Header reveal (drop-in) */
.reveal-header {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.8s var(--ease) 0.2s, transform 0.8s var(--ease) 0.2s;
}

.reveal-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for sequential animations */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* Scale animation for cards */
.service-card.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.service-card.reveal.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Fade and slide for section containers */
.bg-light.reveal,
.bg-dark.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.bg-light.reveal.animate-in,
.bg-dark.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Image placeholder reveal (Slide and scale) */
.image-placeholder.reveal {
    opacity: 0;
    transform: translateX(50px) scale(0.95);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.image-placeholder.reveal.animate-in {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Form group reveals (Subtle slide-in left) */
.form-group.reveal {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.form-group.reveal.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Button reveals (Slide up and scale) */
.btn.reveal {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.btn.reveal.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Footer reveal (Standard slide-up) */
.main-footer.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.main-footer.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Vision inner reveal (Subtle scale-in) */
.vision-inner.reveal {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.vision-inner.reveal.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Contact form entrance */
.contact-form.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.contact-form.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Text content reveals (Covers most text blocks, including Contact header) */
.text-content .tagline,
.text-content h2,
.text-content p,
.contact-header .tagline,
.contact-header h2 {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.text-content .tagline.animate-in,
.text-content h2.animate-in,
.text-content p.animate-in,
.contact-header .tagline.animate-in,
.contact-header h2.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Animations - Keyframes (Immediate top-of-page animation) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: fadeInUp 1s var(--ease) 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 1s var(--ease) 0.4s both;
}

.hero-btn-1 {
    animation: fadeInUp 1s var(--ease) 0.6s both;
}

.hero-btn-2 {
    animation: fadeInUp 1s var(--ease) 0.75s both;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.35s var(--ease);
    backface-visibility: hidden;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #021027; /* Dark text for bright background */
    box-shadow: 0 8px 34px rgba(30, 144, 255, 0.14);
}

.btn-primary:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 80px rgba(30, 144, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(30, 144, 255, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 60px rgba(30, 144, 255, 0.2);
}

.btn-large {
    padding: 16px 34px;
    font-size: 1.02rem;
}

.btn-full {
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */

.main-header {
    position: fixed;
    top: 14px;
    left: 20px;
    right: 20px;
    border-radius: 14px;
    padding: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(10px);
    z-index: 999;
    box-shadow: 0 6px 30px rgba(2, 6, 23, 0.6);
    transition: all 0.3s var(--ease);
}

.main-header.sticky {
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    box-shadow: 0 10px 50px rgba(2, 6, 23, 0.8);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s var(--ease);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-dot {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 2px;
}

.main-nav {
    position: relative;
}

.nav-list {
    display: flex;
    gap: 26px;
    list-style: none;
    align-items: center;
}

.nav-list li {
    list-style: none;
}

.nav-list a {
    color: var(--muted);
    font-weight: 600;
    padding: 8px 2px;
    position: relative;
    text-decoration: none;
    transition: color 0.28s var(--ease);
}

.nav-list a:hover {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Update for .nav-list button: ensure proper padding/sizing inside the nav */
.nav-list .btn {
    padding: 8px 18px; /* Slightly reduced padding for a more compact button in the header */
    margin-left: 10px; /* Add some spacing from the last nav link */
    font-size: 0.9rem; /* Make text slightly smaller to fit better */
    line-height: 1.2; /* Ensure vertical alignment is correct */
}

/* FIX: Force primary button text color to dark to match the primary style */
.nav-list .btn-primary {
    color: #021027; 
}

/* Ensure the hover effect for the button in the nav doesn't use the line-under effect */
.nav-btn::after {
    display: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.3s var(--ease);
}

.nav-toggle:hover {
    transform: scale(1.1);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    position: relative;
    padding: 140px 0 120px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(10, 15, 36, 0.9), rgba(6, 8, 16, 0.7));
}

#hero-canvas {
    position: absolute;
    top: -50px; /* Extended upward */
    left: -50px; /* Extended left */
    right: -50px; /* Extended right */
    bottom: -50px; /* Extended downward */
    width: calc(100% + 100px); /* Wider */
    height: calc(100% + 100px); /* Taller */
    z-index: 0;
    pointer-events: auto;
    mix-blend-mode: screen;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-inner {
    width: 100%;
}

.hero-title {
    font-size: 3.6rem;
    margin-bottom: 18px;
    text-shadow: 0 8px 30px rgba(2, 6, 23, 0.7);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 26px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   SECTIONS
   ======================================== */

.section-padding {
    padding: 100px 0;
}

.bg-light {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: 14px;
    padding: 60px 20px;
    margin: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bg-dark {
    background: linear-gradient(180deg, rgba(9, 12, 26, 0.86), rgba(6, 8, 19, 0.95));
    border-radius: 14px;
    padding: 60px 20px;
    margin: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section {
    position: relative;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.text-content {
    width: 100%;
}

.image-placeholder {
    background: linear-gradient(135deg, rgba(30, 144, 255, 0.06), rgba(0, 0, 0, 0.2));
    height: 420px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 88px;
    color: var(--accent);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

/* ========================================
   SERVICES
   ======================================== */

.services-section {
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    margin-top: 36px;
}

.service-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 28px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 30px rgba(5, 8, 16, 0.5);
    transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border 0.45s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.service-icon {
    font-size: 2.4rem;
    color: var(--accent);
    margin-bottom: 14px;
}

.service-card h3 {
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.service-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.service-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 30px 80px rgba(30, 144, 255, 0.2);
    border: 1px solid rgba(30, 144, 255, 0.3);
}

/* ========================================
   VISION
   ======================================== */

.vision-section {
    position: relative;
}

.vision-section .content-box {
    max-width: 860px;
    margin: 0 auto;
}

.vision-inner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    padding: 60px 40px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.large-text {
    font-size: 1.15rem;
    color: var(--muted);
    font-weight: 400;
    margin-top: 22px;
    margin-bottom: 22px;
}

/* CONTACT SECTION STYLES */

.contact-section {
    background: var(--bg-900); /* Darker background for contrast */
}

.contact-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: var(--bg-700); /* Subtle background for the form area */
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--glass);
    background: var(--glass);
    color: var(--text);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.3);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.form-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 20px;
}

#form-message {
    display: none;
    text-align: center;
    margin-top: 20px;
    font-size: 1rem;
    padding: 10px;
    border-radius: 8px;
}

#form-message.success {
    color: #ffffff;
    background: rgba(30, 144, 255, 0.3);
}

#form-message.error {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.2);
}

/* ========================================
   FOOTER STYLES (ENHANCED MULTI-COLUMN)
   ======================================== */

.main-footer {
    padding-top: 60px; /* Increased padding */
    background: var(--bg-900);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    margin-bottom: 20px;
}

.footer-col h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 18px;
    font-weight: 700;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: inline-block;
}

.studio-description {
    font-size: 0.9rem;
    max-width: 300px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s var(--ease);
}

.footer-links a:hover {
    color: var(--accent-2);
}

.social-links a {
    color: var(--muted);
    font-size: 1.25rem;
    margin-right: 20px;
    margin-left: 0; /* Reset for grid placement */
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-2px) scale(1.05);
}

.copyright-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 15px 0;
    text-align: center;
}

.copyright-bar p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 1.8rem; }
    .section-padding { padding: 80px 0; }
    .bg-light, .bg-dark { padding: 50px 20px; }

    /* Services Grid: 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Content Grid (About) */
    .content-grid {
        gap: 32px;
    }
}

@media (max-width: 768px) {
    /* Full stacking for major elements */
    .content-grid {
        grid-template-columns: 1fr;
    }

    /* Re-order about section content for better flow (Image at top) */
    .about-section .content-grid {
        grid-template-rows: auto auto;
    }

    .about-section .text-content {
        order: 2;
    }

    .about-section .image-placeholder {
        order: 1;
        margin-bottom: 30px;
    }
    
    .image-placeholder {
        height: 300px;
        font-size: 60px;
    }
    
    /* Services Grid: 1 column */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer Responsive Update */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col {
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    }
    
    .footer-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .studio-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-links {
        text-align: center;
    }
    
    /* Hero Section Adjustments */
    .hero-title {
        font-size: 2.4rem;
    }

    h2 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 120px 0 80px;
        min-height: auto;
    }
    
    .hero-ctas {
        flex-direction: column;
        gap: 12px;
    }
    
    /* The buttons are set to 100% width here, but their padding/font will be adjusted at 500px */
    .hero-ctas .btn {
        width: 100%;
    }

    .vision-inner {
        padding: 40px 24px;
    }

    .contact-form {
        padding: 24px;
    }

    .bg-light,
    .bg-dark {
        padding: 40px 20px;
        margin: 0 10px;
    }

    /* Mobile Navigation - FIXED VERSION */
    .nav-list {
        display: none;
        flex-direction: column;
        position: fixed; /* Changed from absolute to fixed */
        top: 80px; /* Adjusted to clear the header */
        left: 20px;
        right: 20px;
        width: auto; /* Changed from 100% */
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
        backdrop-filter: blur(10px);
        box-shadow: 0 12px 40px rgba(2, 6, 23, 0.6);
        padding: 20px 0;
        border-radius: 12px;
        z-index: 998; /* Below the main header */
    }
    
    .nav-list.active {
        display: flex;
    }

    /* Blur overlay behind menu */
    .nav-list.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:  rgba(2, 6, 23, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    .nav-list li {
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    /* Make button full width in mobile menu */
    .nav-list .btn-primary {
        width: 90%; 
        margin: 10px auto; 
        display: block;
    }
    
    .nav-toggle {
        display: block;
        z-index: 1000; /* Ensure toggle is above menu */
    }
}

@media (max-width: 500px) {
    .section-padding {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }

    .tagline {
        font-size: 0.75rem;
    }

    /* Standard button size for small screens */
    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    /* Reduced gap between the buttons on very small screens */
    .hero-ctas {
        gap: 8px;
    }

    /* Smaller Hero Buttons */
    .hero-ctas .btn-large {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .vision-section .content-box {
        padding: 0;
    }
}