/* ==========================================================================
   CSS Variables (mapped from app_colors.dart and theme.dart)
   ========================================================================== */
:root {
    /* Background & Surface Details */
    --bg-dark: #181B22;
    --grid-color: transparent; /* Removed grid for solid background */

    /* Typography Colors */
    --text-primary: rgba(255, 255, 255, 1);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    /* Primary Brand Colors */
    --clr-orange: #FF8C3A; /* Primary Dark */
    --clr-orange-glow: rgba(255, 140, 58, 0.6);
    --clr-cyan: #338FC0;   /* Theme Primary Dark, On Route Dark */
    --clr-cyan-glow: rgba(51, 143, 192, 0.6);
    --clr-green: #059669;  /* Success Dark */
    --clr-green-glow: rgba(5, 150, 105, 0.6);

    /* Glass Effect Basics from theme.dart GlassContainer */
    --glass-bg-grad-start: rgba(51, 143, 192, 0.05);
    --glass-bg-grad-end: rgba(30, 30, 30, 0.20);
    --glass-border-default: rgba(51, 143, 192, 0.3);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   Reset & Global Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .headline, .section-title {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.max-w-5xl { max-width: 64rem; }
.relative { position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Grid Background */
.grid-background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-image: 
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
}

/* Scroll Container Setup */
.scroll-container {
    height: 100vh;
    overflow-y: auto; /* Use auto, smooth scrolling behavior can cause issues in combination with mandatory */
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.h-full { height: 100%; }
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}
.flex-col { flex-direction: column; }

/* Image Styling */
.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.responsive-graphic {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

/* Split Layout for animations */
.split-layout {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.image-layout {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.split-layout.shifted .image-layout {
    left: 45%;
    transform: translateX(0);
    width: 55%;
}
.text-layout {
    position: absolute;
    left: 0;
    width: 40%;
    opacity: 0;
    transform: translateX(-50px);
    visibility: hidden;
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.split-layout.shifted .text-layout {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}


/* ==========================================================================
   Typography Glow Effects
   ========================================================================== */
.text-glow {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.text-glow-green {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--clr-green-glow);
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Animations (Entrance via IntersectionObserver)
   ========================================================================== */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.reveal.active {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.fade-up { transform: translateY(50px); }
.fade-in { transform: translateY(0); }
.zoom-in { transform: scale(0.95); }
.delay-1 { transition-delay: 0.2s; }

/* Breathing Animation for elements */
@keyframes breathe-blue {
    0% { box-shadow: 0 0 15px var(--clr-cyan-glow); }
    50% { box-shadow: 0 0 30px rgba(51, 143, 192, 0.9); }
    100% { box-shadow: 0 0 15px var(--clr-cyan-glow); }
}

/* ==========================================================================
   Glassmorphism Components (For Contact Form)
   ========================================================================== */
.glass-container {
    background: linear-gradient(135deg, var(--glass-bg-grad-start), var(--glass-bg-grad-end));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    border: 1px solid var(--glass-border-default);
    padding: 1.5rem;
    color: var(--text-secondary);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}
.glass-container::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.border-glow-blue { border-color: var(--clr-cyan); box-shadow: 0 0 15px var(--clr-cyan-glow), inset 0 0 10px rgba(51, 143, 192, 0.1); }

.icon-wrapper {
    display: inline-flex; padding: 12px; border-radius: 50%; width: max-content;
}
.glow-green { background: rgba(5, 150, 105, 0.2); box-shadow: 0 0 20px var(--clr-green-glow); border: 1px solid var(--clr-green); color: #fff;}


/* ==========================================================================
   Section 7: Contact Form
   ========================================================================== */
.contact-card {
    width: 100%; max-width: 500px; padding: 3rem; margin: 0 auto;
}
.contact-form {
    display: flex; flex-direction: column; gap: 1.5rem;
}
.input-group {
    position: relative;
    width: 100%;
}
.input-group input, .input-group textarea {
    width: 100%;
    background: rgba(51, 143, 192, 0.05); /* input fill dark mode */
    border: 1px solid rgba(51, 143, 192, 0.3);
    border-radius: 8px;
    padding: 1.25rem 1rem 0.5rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
.input-group textarea { resize: vertical; min-height: 120px; }
.input-group label {
    position: absolute;
    top: 50%; left: 1rem; transform: translateY(-50%);
    color: var(--text-tertiary); pointer-events: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}
.input-group textarea ~ label { top: 1.5rem; transform: none; }

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--clr-cyan);
    background: rgba(51, 143, 192, 0.1);
}
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label {
    top: 0.25rem; font-size: 0.75rem; transform: none; color: var(--clr-cyan);
}
.input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label { top: 0.25rem; }

.input-glow {
    position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--clr-cyan); box-shadow: 0 0 10px var(--clr-cyan-glow);
    transition: width 0.3s ease; border-radius: 0 0 8px 8px;
}
.input-group input:focus ~ .input-glow, .input-group textarea:focus ~ .input-glow { width: 100%; }

.submit-btn {
    background: rgba(51, 143, 192, 0.85); /* Primary Cyan 0.85 */
    color: var(--bg-dark); /* text color */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem; border-radius: 8px;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.3s;
    margin-top: 1rem;
    display: flex; justify-content: center; align-items: center;
}
.submit-btn:hover { background: var(--clr-cyan); box-shadow: 0 0 20px var(--clr-cyan-glow); color: #000; }
.submit-btn.pulsing { animation: breathe-blue 2s infinite ease-in-out; }

.success-message {
    text-align: center; padding: 2rem 0;
}
.hidden { display: none !important; }

/* Responsive adjustments */
@media (max-width: 1024px), (orientation: portrait) {
    .responsive-graphic { max-height: 50vh; }
    .scroll-container { scroll-snap-type: none; overflow-y: hidden; height: auto;}
    .section { height: auto; min-height: 100vh; scroll-snap-align: none; padding: 4rem 1rem;}

    /* Vertical Split Layout */
    .split-layout {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }
    .image-layout {
        position: relative;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
    }
    .split-layout.shifted .image-layout {
        left: auto;
        transform: scale(0.9);
        width: 100%;
    }
    .text-layout {
        position: relative;
        left: auto;
        width: 100%;
        max-width: 600px;
        transform: translateY(30px);
    }
    .split-layout.shifted .text-layout {
        transform: translateY(0);
    }
}
