/* ===================================
   ROOT VARIABLES & RESET
   =================================== */

:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    --bg-dark: #0f0f1e;
    --bg-darker: #070712;
    --bg-light: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b80;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    --gradient-dark: linear-gradient(180deg, rgba(15,15,30,0) 0%, rgba(15,15,30,1) 100%);

    /* Fluid Spacing - scales with viewport */
    --section-padding: clamp(60px, 8vw, 120px) 0;
    --container-padding: 0 clamp(20px, 5vw, 80px);
    --gap-small: clamp(12px, 2vw, 24px);
    --gap-medium: clamp(24px, 3vw, 40px);
    --gap-large: clamp(40px, 5vw, 80px);

    /* Fluid Element Sizing */
    --card-padding: clamp(20px, 3vw, 30px);
    --border-radius-sm: clamp(8px, 1vw, 12px);
    --border-radius-md: clamp(12px, 1.5vw, 18px);
    --border-radius-lg: clamp(16px, 2vw, 24px);
    --icon-size: clamp(40px, 5vw, 50px);

    /* Fluid Typography */
    --text-xs: clamp(11px, 1vw, 14px);
    --text-sm: clamp(13px, 1.2vw, 16px);
    --text-base: clamp(14px, 1.4vw, 18px);
    --text-lg: clamp(16px, 1.8vw, 22px);
    --text-xl: clamp(18px, 2vw, 26px);
    --text-2xl: clamp(20px, 2.5vw, 32px);
    --text-3xl: clamp(26px, 3.5vw, 48px);
    --text-4xl: clamp(32px, 5vw, 64px);
    --text-5xl: clamp(40px, 6vw, 80px);

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-padding-top: 0;
    /* Optimize scroll performance */
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar but maintain functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Viewport scaling support - page is scaled via JavaScript zoom */
/* This ensures consistent proportions at all window sizes */

html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

body {
    width: 100%;
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Hide scrollbar but maintain functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

/* Disable transitions during resize to prevent visual glitches */
body.is-resizing * {
    transition: none !important;
}

/* Scale Wrapper - contains all scalable content, excludes fixed UI elements */
.scale-wrapper {
    width: 100%;
    min-height: 100%;
    position: relative;
    /* Transform origin and scale applied via JavaScript */
    /* Ensure no gaps or margins affect positioning */
    margin: 0;
    padding: 0;
}

/* ===================================
   NAVIGATION - MAMMUT STYLE
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    padding: 20px 0;
    background: transparent;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(15, 15, 30, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 18px 0 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--gap-small);
}

/* Mobile Logo - hidden on desktop */
.nav-logo {
    display: none;
}

/* Section Indicator */
.section-indicator {
    color: var(--primary-light);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    pointer-events: none;
    margin-right: 2px;
}

.section-indicator.visible {
    opacity: 1;
    visibility: visible;
}

/* Menu Button - Mammut Style */
.menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.menu-button.visible {
    opacity: 1;
    visibility: visible;
}

.menu-button.visible:hover {
    opacity: 0.8;
}

.menu-button:focus,
.menu-button:focus-visible,
.menu-button:active {
    outline: none;
    box-shadow: none;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger-icon span {
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    display: block;
    transform-origin: center;
}

/* Transform hamburger to symmetrical X when menu is active */
.menu-button.active .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-button.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.menu-button.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu Overlay - Slides in from right (75% transparent with blur) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: auto;
    right: -320px; /* Start off-screen to the right */
    width: 320px;
    height: 100vh;
    background: rgba(10, 5, 25, 0.15);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 10000;
    opacity: 1;
    visibility: hidden;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s;
    overflow: hidden;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    border-radius: 0;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
    padding-top: 100px; /* Space for header area */
}

.menu-overlay.active {
    right: 0;
    visibility: visible;
}

/* Background dim when menu is open (desktop) */
body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    pointer-events: auto;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Menu Content */
.menu-content {
    width: 100%;
    padding: 0;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Menu Items - Clean Style for Slide-out (full width) */
.menu-item {
    display: block;
    padding: 24px 40px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: transparent;
    border-left: 3px solid transparent;
}

.menu-item:not(:last-child) {
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.menu-item:hover {
    background: rgba(139, 92, 246, 0.15);
    border-left-color: var(--primary-color);
    color: rgba(255, 255, 255, 1);
    padding-left: 45px;
}

/* ===================================
   HERO SECTION WITH VIDEO BACKGROUND
   =================================== */

.hero-section {
    position: relative;
    width: 100%;
    /* Height controlled by JavaScript for proper scaling */
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1; /* Establish stacking context */
    box-sizing: border-box;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: 100% !important;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    /* Ensure video always covers viewport while maintaining aspect ratio */
    /* At narrow viewports, prioritize showing full width over full height */
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.4);
    transition: opacity 2.5s ease-out;
}

/* 3D Metallic Logo Text - Unified logo that appears after shutters close */
.hero-logo-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(120px, 20vw, 280px);
    font-weight: 700;
    letter-spacing: -0.05em;
    opacity: 0;
    z-index: 11; /* Above split halves so it covers the seam */

    /* Dramatic metallic gradient with strong highlights */
    background: linear-gradient(
        180deg,
        #e8e8e8 0%,
        #c0c0c0 10%,
        #d8d8d8 20%,
        #a0a0a0 30%,
        #b8b8b8 40%,
        #808080 50%,
        #989898 60%,
        #686868 70%,
        #808080 80%,
        #505050 90%,
        #707070 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* EXTREMELY dramatic 3D depth effect - sharp clean edges */
    text-shadow:
        /* Very deep 3D extrusion - pixel by pixel depth - pure grey monochrome - NO BLUR */
        0 1px 0 #888888,
        0 2px 0 #808080,
        0 3px 0 #777777,
        0 4px 0 #707070,
        0 5px 0 #666666,
        0 6px 0 #606060,
        0 7px 0 #555555,
        0 8px 0 #505050,
        0 9px 0 #444444,
        0 10px 0 #404040,
        0 11px 0 #333333,
        0 12px 0 #303030,
        0 13px 0 #282828,
        0 14px 0 #242424,
        0 15px 0 #202020,
        0 16px 0 #1c1c1c,
        0 17px 0 #181818,
        0 18px 0 #141414,
        0 19px 0 #101010,
        0 20px 0 #0c0c0c,
        0 21px 0 #080808,
        0 22px 0 #040404,
        0 23px 0 #000000,
        0 24px 0 #000000,
        0 25px 0 #000000;
}

.hero-logo-text.visible {
    opacity: 1;
    transition: opacity 1.0s ease-in-out;
}

/* Split Logo Halves on Shutters */
.logo-half {
    position: absolute;
    left: 50%;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(120px, 20vw, 280px);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    white-space: nowrap;
    z-index: 10;

    /* Same metallic gradient as main logo */
    background: linear-gradient(
        180deg,
        #e8e8e8 0%,
        #c0c0c0 10%,
        #d8d8d8 20%,
        #a0a0a0 30%,
        #b8b8b8 40%,
        #808080 50%,
        #989898 60%,
        #686868 70%,
        #808080 80%,
        #505050 90%,
        #707070 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* EXTREMELY dramatic 3D depth effect - sharp clean edges */
    text-shadow:
        /* Very deep 3D extrusion - pixel by pixel depth - pure grey monochrome - NO BLUR */
        0 1px 0 #888888,
        0 2px 0 #808080,
        0 3px 0 #777777,
        0 4px 0 #707070,
        0 5px 0 #666666,
        0 6px 0 #606060,
        0 7px 0 #555555,
        0 8px 0 #505050,
        0 9px 0 #444444,
        0 10px 0 #404040,
        0 11px 0 #333333,
        0 12px 0 #303030,
        0 13px 0 #282828,
        0 14px 0 #242424,
        0 15px 0 #202020,
        0 16px 0 #1c1c1c,
        0 17px 0 #181818,
        0 18px 0 #141414,
        0 19px 0 #101010,
        0 20px 0 #0c0c0c,
        0 21px 0 #080808,
        0 22px 0 #040404,
        0 23px 0 #000000,
        0 24px 0 #000000,
        0 25px 0 #000000;
}

.logo-half-top {
    bottom: 0; /* Position at bottom edge of top shutter (where shutters meet) */
    transform: translateX(-50%) translateY(50%); /* Move down 50% so bottom edge of visible top half aligns with shutter edge */
    clip-path: inset(0 0 50% 0); /* Show only top half of text */
}

.logo-half-bottom {
    top: 0; /* Position at top edge of bottom shutter (where shutters meet) */
    transform: translateX(-50%) translateY(-50%); /* Move up 50% so top edge of visible bottom half aligns with shutter edge */
    clip-path: inset(50% 0 0 0); /* Show only bottom half of text */
}

/* Tagline attached to bottom shutter - moves with bottom logo half */
.shutter-tagline.hero-subtitle {
    position: absolute;
    left: 50%;
    top: 50%; /* Start at center of bottom shutter (which is at the split line) */
    transform: translateX(-50%) translateY(-100%); /* Move up by its own height */
    padding-top: 0; /* Remove padding - align text to top of box */
    margin-top: 0 !important; /* Override hero-subtitle margin */
    font-size: clamp(20px, 3vw, 36px);
    color: rgba(220, 220, 220, 1); /* Very bright for maximum visibility */
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: lowercase;
    opacity: 1 !important; /* Always visible, force visibility - override hero-subtitle */
    z-index: 15; /* Very high z-index to be above everything */
    white-space: nowrap;
    pointer-events: none; /* Don't interfere with interactions */
    line-height: 1; /* Tight line-height for top alignment */

    /* Carved/engraved effect into concrete - matching logo metallic grey */
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.8),
        0 -1px 0 rgba(255, 255, 255, 0.3),
        0 2px 3px rgba(0, 0, 0, 0.5);
}

/* Shutter Animation Elements - Concrete Wall with Purple Tint */
.shutter-top,
.shutter-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%; /* Use percentage of parent instead of vh for consistent sizing */
    background:
        /* RADIAL GRADIENT - Lighter center (around logo), darker edges - dark mysterious purple */
        radial-gradient(ellipse at center, rgba(26, 26, 46, 0.7) 0%, rgba(15, 15, 30, 0.85) 40%, rgba(7, 7, 18, 1) 80%),
        /* Dark purple overlay for concrete texture */
        linear-gradient(180deg, rgba(7, 7, 18, 0.85) 0%, rgba(15, 15, 30, 0.8) 50%, rgba(7, 7, 18, 0.9) 100%),
        /* Concrete wall image */
        url('Concrete Wall/ConcreteWall.png');
    background-size: 100% 200%; /* Image spans full height (200% because each shutter is 50%) */
    background-repeat: no-repeat;
    z-index: 5;
    overflow: visible; /* Allow tagline to be visible beyond shutter bounds */
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 0, 0, 0.6);
}


/* Keyframe animations for shutter drop - starts slow, accelerates continuously until impact, then bounces */
@keyframes shutterDropTop {
    0% {
        transform: translateY(-100%);
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Starts slow, accelerates throughout */
    }
    45% {
        transform: translateY(0); /* IMPACT - hit at maximum speed */
        animation-timing-function: cubic-bezier(0, 0.8, 0.5, 1); /* Quick bounce up, decelerate */
    }
    58% {
        transform: translateY(-9%); /* Bounce apart - doubled from 4.5% */
        animation-timing-function: cubic-bezier(0.5, 0, 1, 1); /* Pause at peak, then fall */
    }
    62% {
        transform: translateY(-9%); /* Hold at peak briefly */
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Fall back with gravity */
    }
    75% {
        transform: translateY(0); /* Second impact */
        animation-timing-function: cubic-bezier(0, 0.8, 0.5, 1); /* Smaller bounce up */
    }
    85% {
        transform: translateY(-2.4%); /* Small rebound - doubled from 1.2% */
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Fall */
    }
    95% {
        transform: translateY(0); /* Settle */
        animation-timing-function: ease-out;
    }
    100% {
        transform: translateY(0); /* Final rest */
    }
}

@keyframes shutterDropBottom {
    0% {
        transform: translateY(100%);
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Starts slow, accelerates throughout */
    }
    45% {
        transform: translateY(0); /* IMPACT - hit at maximum speed */
        animation-timing-function: cubic-bezier(0, 0.8, 0.5, 1); /* Quick bounce up, decelerate */
    }
    58% {
        transform: translateY(9%); /* Bounce apart - doubled from 4.5% */
        animation-timing-function: cubic-bezier(0.5, 0, 1, 1); /* Pause at peak, then fall */
    }
    62% {
        transform: translateY(9%); /* Hold at peak briefly */
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Fall back with gravity */
    }
    75% {
        transform: translateY(0); /* Second impact */
        animation-timing-function: cubic-bezier(0, 0.8, 0.5, 1); /* Smaller bounce up */
    }
    85% {
        transform: translateY(2.4%); /* Small rebound - doubled from 1.2% */
        animation-timing-function: cubic-bezier(0.12, 0, 0.9, 0.4); /* Fall */
    }
    95% {
        transform: translateY(0); /* Settle */
        animation-timing-function: ease-out;
    }
    100% {
        transform: translateY(0); /* Final rest */
    }
}

.shutter-top {
    top: 0;
    background-position: center top; /* Show top half of concrete wall image */
    transform: translateY(-100%);
}

.shutter-bottom {
    bottom: 0;
    background-position: center bottom; /* Show bottom half of concrete wall image */
    transform: translateY(100%);
}

.shutter-top.active {
    animation: shutterDropTop 1.55s linear forwards;
}

.shutter-bottom.active {
    animation: shutterDropBottom 1.55s linear forwards;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(15, 15, 30, 0.3) 0%,
        rgba(15, 15, 30, 0.7) 50%,
        rgba(15, 15, 30, 0.95) 100%
    );
}

/* Fallback gradient if no video */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 40px;
    pointer-events: none;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -4px;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(20px, 3vw, 36px);
    color: rgba(160, 160, 160, 0.85);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: lowercase;
    opacity: 0;
    margin-top: clamp(180px, 25vw, 350px);
    transition: opacity 0.5s ease-out;

    /* Carved/engraved effect into concrete - matching logo metallic grey */
    text-shadow:
        /* Dark shadow on top-left (creates depth into surface) */
        -1px -1px 2px rgba(0, 0, 0, 0.8),
        -2px -2px 4px rgba(0, 0, 0, 0.6),
        -1px -1px 6px rgba(0, 0, 0, 0.4),
        /* Light highlight on bottom-right (carved edge catching light) */
        1px 1px 1px rgba(255, 255, 255, 0.05),
        2px 2px 2px rgba(255, 255, 255, 0.03);
}

.hero-subtitle.visible {
    opacity: 1;
}

.hero-buttons {
    display: flex;
    gap: var(--gap-small);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

.btn {
    padding: 16px 36px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.btn-large {
    padding: 20px 44px;
    font-size: var(--text-lg);
}

/* Focus states for keyboard navigation */
.btn:focus,
.btn:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.menu-button:focus,
.menu-button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.menu-item:focus,
.menu-item:focus-visible {
    outline: none;
    background: rgba(139, 92, 246, 0.3);
    padding-left: 20px;
}

.scroll-dot:focus,
.scroll-dot:focus-visible {
    outline: none;
}

.form-input:focus-visible {
    outline: none;
}

.footer-column a:focus,
.footer-column a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.feature-card:focus,
.feature-card:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeIn 1s ease-out 1.2s forwards;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--primary-color));
    animation: scrollPulse 2s ease-in-out infinite;
}

/* ===================================
   SECTIONS WITH OVERLAP EFFECT
   =================================== */

.section {
    position: relative;
    width: 100%;
    padding: var(--section-padding);
    margin-top: 0;
    background: var(--bg-darker);
    z-index: 10;
    /* Height controlled by JavaScript for proper scaling */
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden; /* Prevent content overflow between sections */
    box-sizing: border-box;
}

.section:first-of-type {
    margin-top: 0;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: var(--gap-large);
}

.section-label {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: clamp(40px, 5vw, 50px);
    color: var(--primary-light);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   FEATURES SECTION - FLIP CARDS
   =================================== */

.features-section {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    justify-content: center; /* Vertically center content */
    padding-top: 70px; /* Account for fixed navbar height - centers content in area below navbar */
    padding-bottom: 0; /* Asymmetric padding shifts center point down */
    box-sizing: border-box;
}

.features-section .section-content {
    width: 100%; /* Ensure full width for grid */
}

.features-section .section-header {
    margin-bottom: var(--gap-medium); /* Reduce header margin */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-medium);
    width: clamp(450px, 65%, 750px);
    max-width: 100%;
    margin: 0 auto;
}

.feature-card {
    cursor: pointer;
    width: 100%;
    aspect-ratio: 8 / 6;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
    transform-origin: center center;
}

.feature-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    border-radius: var(--border-radius-lg);
    padding: var(--card-padding);
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.card-front {
    background: rgba(26, 26, 46, 0.8);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.card-back {
    background: rgba(26, 26, 46, 0.9);
    transform: rotateY(180deg);
    border-color: rgba(99, 102, 241, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    box-sizing: border-box;
}

.card-back .feature-description,
.card-back .feature-bullets {
    width: 100%;
}

.feature-bullets {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--text-sm);
    margin: 15px 0 0 0;
    padding-left: 20px;
    text-align: left;
    list-style-type: disc;
}

.feature-bullets li {
    margin-bottom: 8px;
}

.feature-bullets li:last-child {
    margin-bottom: 0;
}

.feature-card:hover .card-front,
.feature-card:hover .card-back {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

.feature-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    margin-top: 70px; /* Space below icon */
    line-height: 1.3;
    text-align: left;
    padding: 0 20px;
    white-space: nowrap;
}

.feature-description {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--text-base);
    font-weight: 500;
    margin: 0;
    text-align: left;
}

.feature-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    background: var(--gradient-primary);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 68px;
    left: 50px;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

/* ===================================
   TECHNOLOGY SECTION
   =================================== */

.tech-section {
    position: relative;
    overflow: hidden;
}

.tech-layout {
    display: grid;
    grid-template-columns: 500px minmax(600px, 1fr);
    gap: 60px; /* Reduced gap to give quote more room */
    align-items: center;
}

@media (max-width: 1400px) {
    .tech-layout {
        grid-template-columns: 450px minmax(550px, 1fr);
        gap: 50px;
    }

    .tech-visual {
        transform: scale(0.9);
    }

    .tech-rings {
        transform: translate(-50%, -50%) scale(0.9);
    }
}

@media (max-width: 1200px) {
    .tech-layout {
        grid-template-columns: 400px minmax(500px, 1fr);
        gap: 40px;
    }

    .tech-visual {
        transform: scale(0.85);
    }

    .tech-rings {
        transform: translate(-50%, -50%) scale(0.85);
    }

    .hero-logo-text {
        font-size: clamp(90px, 16vw, 200px);
    }

    .logo-half {
        font-size: clamp(90px, 16vw, 200px);
    }

    .features-grid {
        width: clamp(550px, 88%, 750px);
        transform: scale(0.92);
    }

    .quote-text {
        font-size: clamp(17px, 3.2vw, 22px);
    }
}

.tech-visual {
    position: relative;
    min-height: 400px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Allow sphere blur to extend beyond container */
}

.tech-orb {
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(60px);
    animation: orbPulse 4s ease-in-out infinite;
}

.tech-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: ringRotate 10s linear infinite;
}

.ring:nth-child(1) {
    width: 150px;
    height: 150px;
    animation-duration: 8s;
    z-index: 4; /* Innermost ring on top */
}

.ring:nth-child(2) {
    width: 250px;
    height: 250px;
    z-index: 3;
}

.ring:nth-child(3) {
    width: 350px;
    height: 350px;
    animation-duration: 15s;
    animation-direction: reverse;
    z-index: 2;
}

.ring:nth-child(4) {
    width: 450px;
    height: 450px;
    animation-duration: 20s;
    z-index: 1; /* Outermost ring on bottom */
}

.tech-info {
    position: relative;
    min-height: 400px;
    height: auto;
    overflow: visible; /* Ensure quote text isn't clipped */
    padding-right: 40px; /* Narrow the text on right side */
}

.tech-info .section-label {
    margin-bottom: 20px;
}

.tech-info .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.tech-text {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.tech-list {
    list-style: none;
    margin-bottom: 40px;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.tech-list svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Quote and Hover Content */
.quote-permanent {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.quote-permanent.hidden {
    opacity: 0;
    visibility: hidden;
}

.quote-text {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 12px;
    text-align: left;
    white-space: nowrap;
}

.quote-author {
    font-size: var(--text-base);
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
}

.hover-content {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hover-content.active {
    opacity: 1;
    visibility: visible;
}

.content-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.content-text {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: justify;
}

/* Make rings hoverable */
.ring {
    cursor: pointer;
    transition: border-color 0.3s ease, border-width 0.3s ease;
}

.ring:hover {
    border-color: rgba(99, 102, 241, 0.6);
    border-width: 3px;
}

/* ===================================
   STATS SECTION
   =================================== */

.stats-section {
    background: var(--bg-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    text-align: center;
}

.stat-item {
    padding: 40px 20px;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--text-5xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.stat-label {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 0;
}

.cta-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-text {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: var(--gap-small);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact-section {
    background: var(--bg-darker);
    z-index: 15; /* Between regular sections (10) and footer (20) */
    overflow: hidden; /* Ensure form doesn't bleed into footer */
}

/* Ensure contact section content stays within bounds */
.contact-section .section-content {
    width: 100%;
    max-width: none;
    overflow: hidden;
}

.contact-container {
    width: clamp(320px, 37.5vw, 600px);
    margin: 0 auto;
    max-width: 90%;
}

.contact-header {
    text-align: center;
    margin-bottom: 60px;
}

.contact-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-top: 16px;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-medium);
}

.form-group {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 18px 24px;
    background: rgba(26, 26, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-family: 'Inter', sans-serif;
    transition: var(--transition-smooth);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--primary-color);
    background: rgba(26, 26, 46, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    width: 100%;
    margin-top: 8px;
}

.form-message {
    text-align: center;
    padding: 16px;
    border-radius: var(--border-radius-md);
    font-size: var(--text-base);
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    /* Height controlled by JavaScript for proper scaling */
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    z-index: 20; /* Higher than .section z-index of 10 to prevent bleed-through */
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: var(--text-3xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: var(--text-base);
}

.footer-column h4 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: var(--text-sm);
}

.footer-column a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

@keyframes orbPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes ringRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
    :root {
        --container-padding: 0 40px;
        --section-padding: 80px 0;
    }

    /* Keep 2-column layout but scale down */
    .tech-layout {
        grid-template-columns: 350px minmax(400px, 1fr);
        gap: 60px;
    }

    .tech-visual {
        height: 350px;
    }

    .tech-rings {
        transform: translate(-50%, -50%);
    }

    .tech-orb {
        width: 200px;
        height: 200px;
    }

    .hero-logo-text {
        font-size: clamp(80px, 15vw, 180px);
    }

    .logo-half {
        font-size: clamp(80px, 15vw, 180px);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .contact-container {
        width: 60vw;
        max-width: 600px;
    }

    /* Keep 2x2 grid layout */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        width: clamp(450px, 75%, 650px);
    }

    .quote-text {
        font-size: clamp(14px, 2.5vw, 18px);
        white-space: normal;
    }

    .tech-text {
        font-size: clamp(13px, 1.8vw, 16px);
    }

    .tech-list li {
        font-size: clamp(12px, 1.6vw, 14px);
    }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
    :root {
        --container-padding: 0 24px;
        --section-padding: 40px 0;
    }

    /* Video - fit to mobile screen without excessive zoom */
    .video-background video {
        min-width: 100%;
        min-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    /* Navbar - hide bar initially on landing page, only show hamburger */
    .navbar {
        background: transparent !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .navbar.scrolled {
        background: rgba(15, 15, 30, 0.95) !important;
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }

    /* Hide nav-logo until scrolled */
    .nav-logo {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .navbar.scrolled .nav-logo {
        opacity: 1;
        visibility: visible;
    }

    /* Hide section indicator until scrolled */
    .section-indicator {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .navbar.scrolled .section-indicator.visible {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Hamburger - 70% of desktop size, precisely center-aligned with dots */
    /* Dots: right: 8px, width: 20px, so center is at 18px from right edge */
    /* Hamburger icon: 17px wide, so center at 8.5px from icon left */
    /* With 8px padding, button is 33px total, center at 16.5px from button right */
    /* To align centers: button right = 18px - 16.5px = 1.5px from viewport right */
    .menu-button {
        padding: 8px;
        position: absolute;
        right: 1.5px;
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-icon {
        width: 17px;
        gap: 3.5px;
    }

    .hamburger-icon span {
        width: 17px;
        height: 1.5px;
    }

    .menu-button.active .hamburger-icon span:nth-child(1) {
        transform: translateY(5px) rotate(45deg);
    }

    .menu-button.active .hamburger-icon span:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg);
    }

    /* Hero adjustments for mobile - 2051 logo 3.5x larger */
    .hero-logo-text {
        font-size: clamp(180px, 55vw, 320px);
    }

    .logo-half {
        font-size: clamp(180px, 55vw, 320px);
    }

    .shutter-tagline.hero-subtitle {
        font-size: clamp(14px, 3.5vw, 20px);
    }

    /* Tech section - stack vertically on mobile */
    .tech-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .tech-visual {
        height: 65vw;
        min-height: 280px;
        max-height: 400px;
        order: 1;
    }

    .tech-info {
        order: 2;
        padding-right: 0;
        min-height: auto;
    }

    .tech-info .section-label,
    .tech-info .section-title {
        text-align: center;
    }

    .quote-permanent {
        position: relative;
        top: auto;
        transform: none;
    }

    .quote-text {
        font-size: clamp(14px, 3.5vw, 18px);
        white-space: normal;
        text-align: center;
    }

    .quote-author {
        text-align: center;
    }

    /* Scale up orb and rings to 60-70% of screen width */
    .tech-orb {
        width: 40vw;
        height: 40vw;
        min-width: 150px;
        min-height: 150px;
        max-width: 220px;
        max-height: 220px;
    }

    .ring:nth-child(1) {
        width: 28vw;
        height: 28vw;
        min-width: 100px;
        min-height: 100px;
        max-width: 160px;
        max-height: 160px;
    }

    .ring:nth-child(2) {
        width: 45vw;
        height: 45vw;
        min-width: 160px;
        min-height: 160px;
        max-width: 240px;
        max-height: 240px;
    }

    .ring:nth-child(3) {
        width: 58vw;
        height: 58vw;
        min-width: 220px;
        min-height: 220px;
        max-width: 320px;
        max-height: 320px;
    }

    .ring:nth-child(4) {
        width: 70vw;
        height: 70vw;
        min-width: 280px;
        min-height: 280px;
        max-width: 400px;
        max-height: 400px;
    }

    /* Features section - single column on mobile, scaled up */
    .features-section {
        padding-top: clamp(40px, 6vh, 80px);
    }

    .features-grid {
        grid-template-columns: 1fr;
        width: 85%;
        max-width: none;
        gap: var(--gap-medium);
    }

    .feature-card {
        aspect-ratio: 4 / 3;
        min-height: 55vw;
        max-height: 300px;
    }

    .feature-title {
        font-size: clamp(18px, 5vw, 24px);
        white-space: normal;
        margin-top: 50px;
    }

    .feature-icon {
        top: 25px;
        left: 25px;
        width: clamp(40px, 10vw, 56px);
        height: clamp(40px, 10vw, 56px);
    }

    .feature-icon svg {
        width: clamp(20px, 5vw, 28px);
        height: clamp(20px, 5vw, 28px);
    }

    /* Contact section - scaled up */
    .contact-container {
        width: 85%;
        max-width: none;
    }

    /* Footer - stack on mobile */
    .footer {
        padding: 60px 0 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-bottom {
        justify-content: center;
    }

    /* Navigation */
    .nav-container {
        padding: 0 20px;
    }

    .menu-overlay {
        right: 20px;
        width: 200px;
    }

    /* Hide scroll nav dots on mobile */
    .scroll-nav {
        display: none;
    }

    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .stat-number {
        font-size: clamp(32px, 8vw, 48px);
    }

    /* Hover content for rings */
    .hover-content {
        position: relative;
        top: auto;
        transform: none;
    }

    .content-title {
        text-align: center;
        font-size: var(--text-xl);
    }

    .content-text {
        text-align: center;
        font-size: var(--text-base);
    }
}

/* Small mobile - 480px and below */
@media (max-width: 480px) {
    :root {
        --container-padding: 0 16px;
        --gap-small: clamp(8px, 2vw, 12px);
        --gap-medium: clamp(16px, 3vw, 24px);
        --gap-large: clamp(24px, 5vw, 40px);
    }

    .hero-logo-text {
        font-size: clamp(40px, 12vw, 60px);
    }

    .logo-half {
        font-size: clamp(40px, 12vw, 60px);
    }

    .shutter-tagline.hero-subtitle {
        font-size: clamp(12px, 2.5vw, 16px);
    }

    /* Tech section */
    .tech-visual {
        height: 220px;
    }

    .tech-orb {
        width: 100px;
        height: 100px;
    }

    .ring:nth-child(1) {
        width: 80px;
        height: 80px;
    }

    .ring:nth-child(2) {
        width: 130px;
        height: 130px;
    }

    .ring:nth-child(3) {
        width: 180px;
        height: 180px;
    }

    .ring:nth-child(4) {
        width: 220px;
        height: 220px;
    }

    .quote-text {
        font-size: clamp(13px, 3.5vw, 16px);
    }

    /* Features */
    .features-grid {
        width: 95%;
        max-width: 320px;
    }

    .feature-card {
        aspect-ratio: 4 / 3;
    }

    .feature-title {
        font-size: var(--text-lg);
        margin-top: 50px;
        padding: 0 15px;
    }

    .feature-icon {
        top: 25px;
        left: 25px;
        width: 35px;
        height: 35px;
    }

    .feature-description {
        font-size: var(--text-sm);
        padding: 0 15px;
    }

    /* Contact */
    .contact-container {
        width: 95%;
    }

    .form-input {
        padding: 14px 18px;
    }

    /* Footer */
    .footer-logo {
        font-size: clamp(24px, 6vw, 32px);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item {
        padding: 20px 10px;
    }

    .stat-number {
        font-size: clamp(28px, 7vw, 40px);
    }

    .stat-label {
        font-size: var(--text-sm);
    }
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   SCROLL NAVIGATION DOTS
   =================================== */

.scroll-nav {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--gap-medium);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    pointer-events: auto;
}

.scroll-nav.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-dot {
    position: relative;
    display: block;
    width: 25px;
    height: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Outer circle - very light and transparent */
.dot-outer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Inner circle - less transparent, more visible */
.dot-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Active dot - expanded with both circles visible */
.scroll-dot.active {
    width: 25px;
    height: 25px;
}

.scroll-dot.active .dot-outer {
    width: 25px;
    height: 25px;
    opacity: 1;
}

.scroll-dot.active .dot-inner {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
}

/* Hover effect for inactive dots */
.scroll-dot:not(.active):hover .dot-inner {
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Mobile - hide on small screens */
@media (max-width: 768px) {
    .scroll-nav {
        display: none;
    }
}

/* ===================================
   COOKIE CONSENT BANNER
   =================================== */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 30, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    padding: 20px;
    z-index: 99999;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    min-width: 280px;
}

.cookie-content a {
    color: var(--primary-light);
    text-decoration: underline;
}

.cookie-content a:hover {
    color: var(--primary-color);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 24px;
    font-size: var(--text-sm);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}

/* ===================================
   MOBILE STYLES (768px and below)
   =================================== */

@media (max-width: 768px) {
    /* ---- Mobile Navbar - transparent until scrolled ---- */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        padding: 12px 8px 12px 20px;
        z-index: 10001;
        background: transparent !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }

    .navbar.scrolled {
        background: rgba(15, 15, 30, 0.95) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        backdrop-filter: blur(20px) !important;
    }

    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative;
    }

    /* Nav logo - hidden by default, shown when scrolled */
    .nav-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .navbar.scrolled .nav-logo {
        opacity: 1;
        visibility: visible;
    }

    .nav-logo-text {
        font-family: var(--font-display);
        font-size: 28px;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-light) 0%, #818cf8 50%, var(--secondary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .nav-logo-tagline {
        font-size: 8px;
        color: var(--text-muted);
        letter-spacing: 1px;
        text-transform: uppercase;
        display: block;
        white-space: nowrap;
    }

    /* ---- Mobile Slide-out Menu - matching desktop appearance ---- */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: auto;
        right: -50%;
        width: 50%;
        height: 100vh;
        background: rgba(10, 5, 25, 0.15); /* 75% transparent like desktop */
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        z-index: 10001;
        opacity: 1;
        visibility: hidden;
        transform: none;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
        border-radius: 0;
        border-left: 1px solid rgba(139, 92, 246, 0.2); /* Purple tint like desktop */
        border-right: none;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        padding-top: 80px;
        overflow: hidden;
    }

    .menu-overlay.active {
        right: 0;
        visibility: visible;
        transform: none;
    }

    .menu-content {
        width: 100%;
        padding: 0;
    }

    .menu-item {
        display: block;
        width: 100%;
        padding: 20px 25px;
        font-size: 15px;
        font-weight: 500;
        color: var(--text-primary);
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        border-bottom: 1px solid rgba(139, 92, 246, 0.15);
        transition: all 0.3s ease;
        background: transparent;
    }

    .menu-item:hover,
    .menu-item:active {
        background: rgba(139, 92, 246, 0.2);
        padding-left: 35px;
        color: var(--primary-light);
    }

    /* Dim background when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 10000;
        pointer-events: auto;
        animation: fadeIn 0.3s ease forwards;
    }

    /* ---- Mobile Navigation Dots (further right to avoid overlap) ---- */
    .scroll-nav {
        display: flex !important;
        right: 8px;
        gap: 15px;
    }

    .scroll-dot {
        width: 20px;
        height: 10px;
    }

    .scroll-dot.active {
        width: 20px;
        height: 20px;
    }

    .dot-outer {
        width: 8px;
        height: 8px;
    }

    .dot-inner {
        width: 4px;
        height: 4px;
    }

    .scroll-dot.active .dot-outer {
        width: 20px;
        height: 20px;
    }

    .scroll-dot.active .dot-inner {
        width: 8px;
        height: 8px;
    }

    /* ---- Mobile Hero Section ---- */
    .hero-logo-text {
        font-size: clamp(48px, 15vw, 80px);
    }

    .logo-half {
        font-size: clamp(48px, 15vw, 80px);
    }

    .hero-subtitle,
    .shutter-tagline.hero-subtitle {
        font-size: clamp(10px, 2.5vw, 14px);
        letter-spacing: 3px;
    }

    /* ---- Mobile About Section - Interactive Sphere ---- */
    .tech-visual {
        height: 280px;
    }

    .ring {
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* Touch-active state for rings */
    .ring.touch-active {
        border-color: var(--primary-color) !important;
        background: rgba(99, 102, 241, 0.15);
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
    }

    /* Dim other rings when one is active */
    .tech-rings.has-active .ring:not(.touch-active) {
        opacity: 0.4;
    }

    /* ---- Mobile Services - Expandable Cards (no flip) ---- */
    .features-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }

    .feature-card {
        width: 100%;
        aspect-ratio: auto;
        min-height: auto;
        perspective: none;
    }

    .card-inner {
        transform-style: flat;
        transition: none;
    }

    .feature-card:hover .card-inner,
    .feature-card.flipped .card-inner {
        transform: none;
    }

    .card-front {
        position: relative;
        backface-visibility: visible;
        transform: none;
        padding: 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        cursor: pointer;
        min-height: auto;
        height: auto;
    }

    .card-back {
        position: relative;
        backface-visibility: visible;
        transform: none;
        display: none;
        padding: 0 20px 20px 20px;
        height: auto;
        min-height: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0;
    }

    /* Show card-back when expanded */
    .feature-card.expanded .card-back {
        display: block;
        animation: slideDown 0.3s ease forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 300px;
        }
    }

    .feature-icon {
        position: relative;
        top: auto;
        left: auto;
        width: 45px;
        height: 45px;
        flex-shrink: 0;
    }

    .feature-title {
        margin-top: 0;
        padding: 0;
        font-size: 16px;
        white-space: normal;
    }

    .feature-description {
        font-size: 14px;
        padding: 15px 0 0 0;
        text-align: left;
    }

    .feature-bullets {
        font-size: 13px;
        margin-top: 10px;
    }

    /* Expand indicator */
    .feature-card .card-front::after {
        content: '+';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        color: var(--text-muted);
        transition: transform 0.3s ease;
    }

    .feature-card.expanded .card-front::after {
        content: '−';
    }

    /* ---- Mobile Contact Form ---- */
    .contact-container {
        width: 100%;
        padding: 0 20px;
    }

    .form-input {
        padding: 16px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 50px;
    }

    .form-textarea {
        min-height: 120px;
    }

    .contact-form button[type="submit"] {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }

    /* ---- Mobile Footer ---- */
    .footer {
        padding: 40px 20px;
    }

    .footer-logo {
        font-size: clamp(36px, 10vw, 48px);
    }

    .footer-tagline {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
        margin-top: 30px;
    }

    .footer-link {
        font-size: 12px;
    }

    .footer-copyright {
        font-size: 10px;
        margin-top: 30px;
    }

    /* ---- Hide cursor glow on touch devices ---- */
    .cursor-glow {
        display: none !important;
    }

    /* ---- Section indicator on mobile ---- */
    #sectionIndicator {
        font-size: 10px;
        bottom: 15px;
        left: 15px;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    /* Reset background colors for printing */
    body, .section, .hero-section, .footer {
        background: white !important;
        color: black !important;
    }

    /* Hide non-essential elements */
    .navbar,
    .menu-overlay,
    .scroll-nav,
    .cookie-consent,
    .video-background video,
    .shutter-top,
    .shutter-bottom,
    .tech-orb,
    .tech-rings,
    .cursor-glow,
    .btn {
        display: none !important;
    }

    /* Reset transforms and scaling */
    body {
        transform: none !important;
        width: 100% !important;
        zoom: 1 !important;
    }

    /* Make sections flow naturally */
    .hero-section,
    .section,
    .footer {
        height: auto !important;
        min-height: auto !important;
        page-break-inside: avoid;
        padding: 40px 20px;
    }

    /* Show text properly */
    .hero-logo-text,
    .logo-half {
        background: none !important;
        -webkit-text-fill-color: black !important;
        text-shadow: none !important;
        opacity: 1 !important;
    }

    /* Fix text colors */
    .text-primary,
    .section-title,
    .feature-title,
    .content-title,
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
    }

    .text-secondary,
    .text-muted,
    p, li {
        color: #333 !important;
    }

    /* Show flip cards content without flip effect */
    .feature-card {
        perspective: none !important;
    }

    .card-inner {
        transform: none !important;
    }

    .card-front,
    .card-back {
        position: static !important;
        backface-visibility: visible !important;
        transform: none !important;
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        padding: 20px;
        margin-bottom: 20px;
    }

    /* Links should show URLs */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    /* Footer adjustments */
    .footer-logo {
        background: none !important;
        -webkit-text-fill-color: black !important;
    }
}
