/* ============================================
   CSS CUSTOM PROPERTIES - TYPOGRAPHY
   ============================================ */
:root {
    /* Font Stacks - Using system fonts as SF Pro not available in web environment */
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Liberation Mono', monospace;

    /* Font Sizes - Fluid Typography */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);
    --text-5xl: clamp(3rem, 2rem + 5vw, 5rem);
    --text-hero: clamp(2.5rem, 2rem + 5vw, 5.5rem);
}

/* ============================================
   RESET AND BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: #000;
}

body {
    font-family: var(--font-display);
    background: #000;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    z-index: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================================
   TYPOGRAPHY ASSIGNMENTS
   ============================================ */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Monospace elements */
code,
pre,
kbd,
samp,
.mono {
    font-family: var(--font-mono);
}

/* ============================================
   PARTICLE BACKGROUND LAYERS
   ============================================ */

/* Additional smoke layers for depth */
.particles-background .smoke-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particles-background .smoke-layer:nth-child(1) {
    background:
        radial-gradient(ellipse at 25% 50%,
            rgba(190, 180, 230, 0.12) 0%,
            transparent 50%);
    animation: smokeDrift 20s ease-in-out infinite;
}

.particles-background .smoke-layer:nth-child(2) {
    background:
        radial-gradient(ellipse at 75% 40%,
            rgba(200, 190, 240, 0.1) 0%,
            transparent 45%);
    animation: smokeDrift 25s ease-in-out infinite reverse;
}

.particles-background .smoke-layer:nth-child(3) {
    background:
        radial-gradient(ellipse at 50% 80%,
            rgba(180, 180, 220, 0.11) 0%,
            transparent 55%);
    animation: smokeDrift 30s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes smokeDrift {

    0%,
    100% {
        transform: translateX(0) translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateX(50px) translateY(-30px);
        opacity: 1;
    }
}


/* Full Page Animated Smoke Background - Enhanced */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 16;
    /* Above hero-section (15) so particles appear over video */
    opacity: 0;
    will-change: transform;
    transition: opacity 3s ease-in-out;
    pointer-events: none;
    overflow: hidden;
}

/* Remove image reference and create animated smoke layers */
.particles-background::before,
.particles-background::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
}

.particles-background::before {
    background:
        radial-gradient(ellipse 600px 400px at 20% 40%,
            rgba(150, 150, 200, 0.2) 0%,
            rgba(100, 100, 150, 0.1) 30%,
            transparent 60%),
        radial-gradient(ellipse 800px 600px at 80% 30%,
            rgba(170, 150, 200, 0.15) 0%,
            rgba(120, 100, 150, 0.08) 25%,
            transparent 55%),
        radial-gradient(ellipse 700px 500px at 50% 70%,
            rgba(160, 160, 210, 0.12) 0%,
            rgba(110, 110, 160, 0.06) 35%,
            transparent 65%);
    filter: blur(40px);
    animation: smokeFlow 25s ease-in-out infinite;
}

.particles-background::after {
    background:
        radial-gradient(ellipse 900px 500px at 70% 20%,
            rgba(180, 170, 220, 0.18) 0%,
            rgba(130, 120, 170, 0.09) 30%,
            transparent 60%),
        radial-gradient(ellipse 700px 700px at 30% 60%,
            rgba(160, 150, 200, 0.14) 0%,
            rgba(115, 110, 155, 0.07) 35%,
            transparent 65%);
    filter: blur(50px);
    animation: smokeFlow 30s ease-in-out infinite reverse;
    opacity: 0.8;
}

@keyframes smokeFlow {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    25% {
        transform: translate(5%, -10%) rotate(2deg) scale(1.1);
    }

    50% {
        transform: translate(-5%, 5%) rotate(-1deg) scale(0.95);
    }

    75% {
        transform: translate(3%, -5%) rotate(1deg) scale(1.05);
    }
}

.particles-background.show {
    opacity: 1;
    animation: smokeReveal 4s ease-in-out;
}

@keyframes smokeReveal {
    0% {
        opacity: 0;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.particles-background.blurred {
    filter: blur(4px) brightness(0.8);
    opacity: 0.7;
}

/* Volumetric Steam/Smoke Effects - Enhanced */
.steam-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
}

.steam-layer::before,
.steam-layer::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 150%;
    background:
        radial-gradient(ellipse 1200px 600px at 25% 80%,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(230, 230, 255, 0.04) 20%,
            transparent 40%),
        radial-gradient(ellipse 1000px 500px at 75% 70%,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(220, 220, 255, 0.03) 25%,
            transparent 45%),
        radial-gradient(ellipse 900px 700px at 50% 90%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 35%);
    filter: blur(40px) contrast(1.1);
    animation: steamRise 25s ease-in-out infinite;
    transform-origin: bottom center;
}

.steam-layer::after {
    animation-delay: -12s;
    animation-direction: reverse;
    filter: blur(50px) contrast(1.2);
}

@keyframes steamRise {

    0%,
    100% {
        transform: translateY(20%) translateX(-5%) scale(0.9);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-30%) translateX(5%) scale(1.1);
        opacity: 1;
    }
}

/* Volumetric Cloud/Fog Layers - Enhanced Steam Effect */
.cloud-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 1;
}

.cloud-layer::before,
.cloud-layer::after {
    content: '';
    position: absolute;
    width: 300%;
    height: 200%;
}

.cloud-layer::before {
    top: -50%;
    left: -100%;
    background:
        radial-gradient(ellipse 1400px 900px at 50% 100%,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(200, 200, 255, 0.1) 15%,
            rgba(150, 150, 200, 0.05) 30%,
            transparent 50%),
        radial-gradient(ellipse 1600px 700px at 20% 80%,
            rgba(220, 220, 255, 0.12) 0%,
            rgba(180, 180, 220, 0.08) 20%,
            transparent 45%),
        radial-gradient(ellipse 1500px 800px at 80% 90%,
            rgba(210, 210, 255, 0.13) 0%,
            rgba(170, 170, 210, 0.06) 25%,
            transparent 40%);
    filter: blur(60px) contrast(1.2);
    animation: cloudRise 45s ease-in-out infinite;
    mix-blend-mode: screen;
    transform: translateY(0) scale(1);
}

.cloud-layer::after {
    bottom: -40%;
    left: -50%;
    background:
        radial-gradient(ellipse 1800px 1000px at 30% 120%,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(200, 200, 255, 0.12) 15%,
            rgba(160, 160, 220, 0.06) 30%,
            transparent 55%),
        radial-gradient(ellipse 1600px 900px at 70% 110%,
            rgba(230, 230, 255, 0.16) 0%,
            rgba(190, 190, 230, 0.09) 20%,
            transparent 50%);
    filter: blur(70px) contrast(1.3);
    animation: cloudWaft 55s ease-in-out infinite reverse;
    mix-blend-mode: screen;
    transform: translateY(0) scale(1.1);
}

@keyframes cloudRise {

    0%,
    100% {
        transform: translateX(0) translateY(10%) scale(1);
    }

    25% {
        transform: translateX(5%) translateY(-5%) scale(1.1);
    }

    50% {
        transform: translateX(-3%) translateY(-15%) scale(1.05);
    }

    75% {
        transform: translateX(2%) translateY(-8%) scale(1.08);
    }
}

@keyframes cloudWaft {

    0%,
    100% {
        transform: translateX(0) translateY(5%) scale(1.1) rotate(0deg);
    }

    33% {
        transform: translateX(-8%) translateY(-10%) scale(1.15) rotate(2deg);
    }

    66% {
        transform: translateX(6%) translateY(-5%) scale(1.05) rotate(-1deg);
    }
}

@keyframes cloudDrift {

    0%,
    100% {
        transform: translateX(0) translateY(0) scale(1);
    }

    25% {
        transform: translateX(5%) translateY(-2%) scale(1.05);
    }

    50% {
        transform: translateX(-3%) translateY(3%) scale(0.98);
    }

    75% {
        transform: translateX(2%) translateY(-1%) scale(1.02);
    }
}



/* Navigation */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    padding: 20px 40px !important;
    backdrop-filter: blur(20px) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: background-color 0.3s ease, padding 0.3s ease;
    transform: none !important;
    will-change: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    height: 80px;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw + 0.75rem, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

/* Navigation link dynamic sizing */
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

nav.scrolled {
    padding: 20px 40px !important;
    background: rgba(0, 0, 0, 0.85) !important;
}

nav * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - 80px);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
    padding: 40px 0;
    z-index: 15;
    /* RESTORED: Required for proper stacking with nav and other sections */
    background: transparent;
    /* Allow particles/fireflies to show through */
    box-sizing: border-box;
}

/* Enhanced gradient overlay with radial masking - start minimal */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 18;
    transition: background 0.6s ease;
}

/* Add gradient overlay on scroll */
.hero-section.scrolled::after {
    background:
        radial-gradient(ellipse 80% 60% at center,
            transparent 0%,
            transparent 30%,
            rgba(0, 0, 0, 0.4) 60%,
            rgba(0, 0, 0, 0.7) 100%);
}

/* Video Background Container - Sized to 90% of visible area below navbar */
.video-container {
    position: absolute;
    /* Center the container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 90% of viewport */
    width: 90%;
    height: calc(90vh - 72px);
    max-width: 1600px;
    z-index: 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Mask the container so edges fade out */
    -webkit-mask-image: radial-gradient(ellipse closest-side at center,
            black 0%,
            black 20%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.2) 75%,
            transparent 100%);
    mask-image: radial-gradient(ellipse closest-side at center,
            black 0%,
            black 20%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.2) 75%,
            transparent 100%);
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 2;
    transition: all 0.6s ease;
}

.hero-section.scrolled .video-container::before {
    background: transparent;
}

.background-video {
    /* Object-fit: contain = show full video without cropping */
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: -1;
    /* mix-blend-mode: screen makes black transparent and glows brighter */
    mix-blend-mode: screen;
    /* Scale video UP slightly to push its hard edges outside the container's mask */
    transform: scale(1.15);
}

/* Neural G Video Blur and Dim Effect on Scroll - Toned down */
.hero-section.scrolled .background-video {
    opacity: 0.7;
    filter: brightness(0.7) blur(2px);
}

/* Dynamic scaling for all screen sizes */
/* Standard Aspect Ratio Video Sizing */
@media (min-aspect-ratio: 16/9) {

    /* Wide screens - just ensure cover */
    .background-video {
        width: 100%;
        height: 100%;
    }
}

@media (max-aspect-ratio: 16/9) {

    /* Tall screens - just ensure cover */
    .background-video {
        width: 100%;
        height: 100%;
    }
}

/* Ultra-wide screens optimization */
/* Ultra-wide screens optimization */
@media (min-aspect-ratio: 21/9) {
    .background-video {
        width: 100%;
        height: 100%;
    }

    /* Scale down content for ultrawide aspect ratios */
    .hero-content {
        transform: scale(0.9);
        max-width: 1080px;
    }

    .hero-title {
        font-size: clamp(2.25rem, 5.4vw + 0.9rem, 6.3rem);
        /* 90% scaling */
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .background-video {
        width: 100%;
        height: 100%;
    }

    /* Ensure mobile content is visible immediately */
    .hero-content {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        transition: all 0.3s ease;
        z-index: 30;
    }

    .hero-title {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .hero-description {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .hero-buttons {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Portrait mobile optimization */
@media (max-width: 768px) and (orientation: portrait) {
    .background-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .hero-section {
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Hero Content - CRITICAL FIX */
.hero-content {
    position: relative;
    z-index: 20;
    /* Ensure text is above particles (12) and video (10) */
    text-align: center;
    max-width: 1200px;
    padding: 0 40px;
    width: 100%;
    margin: 0 auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0s 0.8s;
}

.hero-section.scrolled .hero-content {
    opacity: 0.7;
    transform: translateY(-20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.hero-description {
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.5rem);
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin: 0 auto 40px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9), 0 1px 5px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    transform: translateY(20px);
    transition: transform 0.8s ease 0.2s, opacity 0.8s ease 0.2s;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    transform: translateY(20px);
    transition: transform 0.8s ease 0.4s, opacity 0.8s ease 0.4s;
}

/* Content Sections */
.content-section {
    position: relative;
    min-height: max(60vh, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(60px, 10vh, 120px) 0;
    background: transparent !important;
    z-index: 20;
}

.content-section:first-of-type {
    margin-top: 0;
    padding-top: 120px;
}

.section-content {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    background: transparent;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

section {
    background: transparent !important;
    position: relative;
    z-index: 20;
}

footer {
    background: transparent !important;
    position: relative;
    z-index: 20;
}

/* Gradient Text - Make it white instead */
.gradient-text {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
}

/* Buttons */
.button-primary {
    display: inline-block;
    background: #007AFF;
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.42, 0, 0.58, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 122, 255, 0.3);
}

.button-primary:hover {
    background: #0051D5;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
}

.button-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.42, 0, 0.58, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Services Grid - Flexbox for centered last row */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 60px;
}

/* Service cards with responsive widths */
.services-grid .service-card {
    flex: 0 1 350px;
    max-width: 400px;
    min-width: 280px;
}

/* Mobile: full width cards */
@media (max-width: 767px) {
    .services-grid .service-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* Tablet: 2 cards per row */
@media (min-width: 768px) and (max-width: 1199px) {
    .services-grid .service-card {
        flex: 0 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

/* Desktop: 3 cards per row, centered */
@media (min-width: 1200px) {
    .services-grid .service-card {
        flex: 0 1 350px;
        max-width: 380px;
    }
}

.service-card h3 {
    font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
    font-weight: 600;
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
    letter-spacing: -0.02em;
}

.service-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    transform: translate3d(0, 0, 0);
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translate3d(0, -8px, 20px) rotateX(2deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Industries Grid */
#industries {
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.6) 5%,
            rgba(0, 0, 0, 0.8) 15%,
            rgba(0, 0, 0, 0.9) 100%);
}

.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.industry-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.4s ease;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.industry-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.industry-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(45deg, #007AFF, #5856D6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.industry-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
    font-family: var(--font-display);
}

.industry-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    flex-grow: 1;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.glass-effect {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
}

/* Navigation Links */
.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #007AFF;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #007AFF;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Tablet: icons only in nav (no text) */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-link {
        padding: 8px 12px;
        font-size: 1.25rem;
    }

    /* Hide text, show only icon */
    .nav-link i {
        margin-right: 0;
    }

    /* Use :not selector to hide text but keep icon */
    .nav-link {
        font-size: 0;
        /* Hide text */
    }

    .nav-link i {
        font-size: 1.25rem;
        /* Show icon at normal size */
    }
}

/* Override Tailwind md: breakpoint - show hamburger at 1100px instead of 768px */
@media (max-width: 1100px) {

    /* Hide desktop nav */
    .hidden.md\:flex {
        display: none !important;
    }

    /* Show mobile hamburger */
    .md\:hidden {
        display: block !important;
    }
}

@media (min-width: 1101px) {

    /* Show desktop nav */
    .hidden.md\:flex {
        display: flex !important;
    }

    /* Hide mobile hamburger */
    .md\:hidden {
        display: none !important;
    }
}

/* Mobile Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
    cursor: pointer;
}

.line {
    width: 100%;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active .line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .line2 {
    opacity: 0;
}

.hamburger.active .line3 {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-hidden {
    max-height: 0;
    opacity: 0;
}

.mobile-menu-visible {
    max-height: 200px;
    opacity: 1;
}

.mobile-nav-link {
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #007AFF;
}

/* Scroll Animations */
[data-scroll-fade] {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

[data-scroll-fade].in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.form-group select option {
    background-color: #1a1a1a;
    color: #fff;
    padding: 12px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007AFF;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-submit {
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

/* Modal Styles - LIQUID GLASS EFFECT */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px) saturate(150%);
    -webkit-backdrop-filter: blur(8px) saturate(150%);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

.modal-content {
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.85) 30%,
            rgba(0, 0, 0, 0.88) 60%,
            rgba(0, 0, 0, 0.92) 100%);
    margin: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(40px) saturate(200%) brightness(1.2);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.2);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 0 120px rgba(100, 150, 255, 0.3),
        0 0 80px rgba(255, 255, 255, 0.15),
        0 20px 70px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            #00ffff40,
            #007bff40,
            #5856d640,
            #af52de40,
            #00ffff40);
    border-radius: 24px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(20px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.02);
    }
}

.modal-content:hover::before {
    opacity: 0.6;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.02) 100%);
}

.modal-close {
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Frost effect for modal background */
.modal::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center,
            transparent 0%,
            rgba(100, 150, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
    z-index: -1;
}

.modal-body {
    padding: 30px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.modal-body h3 {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 10px rgba(100, 150, 255, 0.5);
}

.modal-body ul {
    padding-left: 0;
    list-style: none;
}

.modal-body ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-body ul li:last-child {
    border-bottom: none;
}

/* Result box styling in modals */
.modal-body .bg-gray-800 {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(100, 150, 255, 0.1);
    border-radius: 12px;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-header h2 i {
    margin-right: 12px;
    filter: drop-shadow(0 0 8px currentColor);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Icons in modals - add glow */
.modal .text-blue-400,
.modal .text-blue-500,
.modal .text-purple-400,
.modal .text-purple-500,
.modal .text-green-400,
.modal .text-green-500 {
    filter: drop-shadow(0 0 12px currentColor);
    animation: iconGlow 2s ease-in-out infinite alternate;
}

@keyframes iconGlow {
    0% {
        filter: drop-shadow(0 0 8px currentColor);
    }

    100% {
        filter: drop-shadow(0 0 16px currentColor);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-description {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }

    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
        text-align: center;
        padding: 18px 32px;
        margin-bottom: 12px;
    }

    nav {
        padding: 15px 20px !important;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 80vh;
    }

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.button-primary:focus,
.button-secondary:focus,
.nav-link:focus,
.mobile-nav-link:focus {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* Mono font */
.mono {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2.25rem);
}

.contact-info-footer {
    margin-top: 60px;
}

.contact-info-item {
    text-align: center;
}

.form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.form-status.error {
    background: rgba(255, 69, 58, 0.2);
    color: #FF453A;
    border: 1px solid rgba(255, 69, 58, 0.3);
}

.button-primary.magnetic {
    transform-style: preserve-3d;
    transform: perspective(800px);
}

.button-primary.magnetic::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0) 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.button-primary.magnetic:hover::after {
    opacity: 1;
}

.service-card:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 70%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.service-card:hover:after {
    transform: translateX(100%);
}

/* Firefly Container */
.firefly-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 17;
    /* Above hero-section (15) and particles (16) */
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
    overflow: visible;
}

.firefly-container.show {
    opacity: 1;
}

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 1);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.9),
        0 0 20px 4px rgba(255, 255, 255, 0.5),
        0 0 30px 6px rgba(255, 255, 255, 0.3);
    animation: firefly-float 40s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    pointer-events: none;
    filter: blur(0.5px);
}

.firefly::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: firefly-glow 2s ease-in-out infinite;
    filter: blur(1px);
}

@keyframes firefly-float {
    0% {
        transform: translateY(110vh) translateX(0) scale(0);
        opacity: 0;
    }

    5% {
        opacity: 0.8;
        transform: translateY(95vh) translateX(5vw) scale(1);
    }

    20% {
        transform: translateY(75vh) translateX(-8vw) scale(1.1);
    }

    35% {
        opacity: 1;
        transform: translateY(55vh) translateX(10vw) scale(0.9);
    }

    50% {
        transform: translateY(35vh) translateX(-12vw) scale(1);
    }

    65% {
        opacity: 0.9;
        transform: translateY(15vh) translateX(15vw) scale(1.05);
    }

    80% {
        transform: translateY(-5vh) translateX(-10vw) scale(0.95);
    }

    95% {
        opacity: 0.5;
        transform: translateY(-20vh) translateX(8vw) scale(0.8);
    }

    100% {
        transform: translateY(-30vh) translateX(0) scale(0);
        opacity: 0;
    }
}

@keyframes firefly-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

.no-video {
    background: transparent;
}

.contact-section {
    padding: 120px 0;
    min-height: auto;
}

.service-card,
.bento-item,
.feature-item,
.section-title {
    opacity: 1;
    transform: translateY(0);
}

.service-card.in-view,
.bento-item.in-view,
.feature-item.in-view,
.section-title.in-view {
    opacity: 1;
    transform: translateY(0);
}

.content-section+.content-section {
    margin-top: -20px;
}

footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Mobile and Ultrawide Device Classes */
.mobile-device .hero-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: none !important;
}

.mobile-device .hero-title,
.mobile-device .hero-description,
.mobile-device .hero-buttons {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.3s ease !important;
}

.mobile-device .background-video {
    /* Maintain robust centering on mobile */
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
}

.ultrawide-device .hero-content {
    max-width: 1600px;
    transform: scale(0.95);
    margin: 0 auto;
}

.ultrawide-device .background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Force immediate visibility on mobile */
@media (max-width: 768px) {

    .hero-content,
    .hero-title,
    .hero-description,
    .hero-buttons {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* Ensure video never uses complex transforms on mobile */
    /* Ensure video stays centered on mobile */
    .background-video {
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }

    /* Disable parallax on mobile for performance */
    .particles-background,
    .steam-layer,
    .cloud-layer,
    .firefly-container {
        transform: none !important;
    }
}

/* Ensure ultrawide compatibility */
@media (min-width: 2560px) {


    .hero-content {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(0.9) !important;
    }
}

/* Video Vignette Overlay - Enhanced */
/* Video Vignette Overlay - REMOVED for clarity/contrast */
/* .video-container::after { ... } rule deleted */

/* Trust Signals */
.trust-signals {
    display: none;
    margin-bottom: 30px;
    opacity: 0.9;
    transform: translateY(20px);
    transition: all 0.8s ease 0.6s;
}

.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.trust-item {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.trust-item:hover {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

@media (max-width: 768px) {
    .trust-items {
        gap: 12px;
    }

    .trust-item {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* SEO-specific content sections */
.segment-section {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.segment-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.segment-icon {
    font-size: 2rem;
    margin-right: 15px;
    min-width: 40px;
}

.segment-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.segment-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.segment-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.segment-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.segment-feature:hover {
    background: rgba(255, 255, 255, 0.08);
}

.segment-feature i {
    color: #007AFF;
    margin-top: 2px;
    min-width: 16px;
}

/* Louisiana-specific styling */
.louisiana-pride {
    background: linear-gradient(135deg,
            rgba(0, 122, 255, 0.1) 0%,
            rgba(138, 43, 226, 0.1) 100%);
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.government-section {
    border-left: 4px solid #007AFF;
}

.smb-section {
    border-left: 4px solid #34C759;
}

.startup-section {
    border-left: 4px solid #FF9500;
}

.individual-section {
    border-left: 4px solid #FF453A;
}

/* Global SF Pro Font Override - Clean Apple Style */
/* Removed aggressive * selector that was breaking Font Awesome icons */
* {
    /* Only apply font smoothing globally, not font-family */
    font-feature-settings: 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure all text elements use clean SF Pro */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}

p,
span,
div,
a,
button,
input,
textarea,
select,
li {
    /* Use variable and NO !important so icons can override */
    font-family: var(--font-display);
}

/* Modal specific font ensuring */
.modal-content {
    font-family: var(--font-display);
}

/* END OF CSS */

/* Navigation responsive sizing */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Tablet adjustments */
    nav {
        padding: 16px 30px !important;
        height: 70px;
    }

    .nav-logo {
        font-size: clamp(1.1rem, 2vw, 1.5rem);
    }

    .nav-link {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }
}

@media (min-width: 1920px) {

    /* Large screens */
    nav {
        padding: 24px 60px !important;
        height: 90px;
    }

    .nav-logo {
        font-size: clamp(1.3rem, 1.8vw, 2rem);
    }

    .nav-link {
        font-size: clamp(1rem, 1.2vw, 1.25rem);
    }
}

/* ========================================
   HERO SECTION CUTOFF FIX
   Fixes content being cut off on mobile and ultra-wide screens
   Applied: August 2025
   ======================================== */

/* 1. CORE FIX - Dynamic Viewport Height */
.hero-section {
    /* Override fixed height with min-height */
    min-height: 100vh;
    min-height: 100dvh;
    /* dvh = dynamic viewport height (accounts for mobile browser UI) */
    height: auto;
    /* Allow content to determine height if needed */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    /* Global bottom padding to prevent cutoff */
}

/* Ensure hero content is always fully visible */
.hero-content {
    margin-bottom: 40px;
    /* Add bottom margin as safety */
}

/* Fix for initial load visibility */
@media (min-width: 2560px) {
    .hero-content {
        /* Ensure content is visible on ultrawide */
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }
}

/* 2. MOBILE FIXES (< 768px) */
@media (max-width: 768px) {

    /* Adjust hero section for mobile */
    .hero-section {
        padding-top: 70px;
        /* Space for fixed navigation */
        padding-bottom: 30px;
        /* Ensure bottom content is visible */
    }

    /* Optimize video for mobile */
    .background-video {
        /* Simplified scaling for mobile performance */
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        /* Remove complex transforms for mobile */
        transform: none !important;
        position: absolute;
        top: 0;
        left: 0;
    }

    /* Adjust content spacing */
    .hero-content {
        padding: 0 20px;
        /* Reduce horizontal padding */
    }

    /* Slightly smaller hero text on mobile */
    .hero-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
        /* Smaller minimum size */
        margin-bottom: 20px;
        /* Less margin */
    }

    .hero-description {
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
        margin-bottom: 30px;
        /* Less margin */
    }

    /* Stack buttons vertically on very small screens */
    @media (max-width: 400px) {
        .hero-buttons {
            flex-direction: column;
            align-items: stretch;
            max-width: 280px;
            margin: 0 auto;
        }

        .button-primary,
        .button-secondary {
            width: 100%;
            margin-bottom: 10px;
        }
    }
}

/* 3. ULTRA-WIDE FIXES (> 2560px) */
@media (min-width: 2560px) {

    /* Fix hero section height for ultra-wide */
    .hero-section {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        padding-bottom: 40px;
        /* Ensure bottom content visible */
    }

    /* Increase content max-width for ultra-wide */
    .hero-content {
        max-width: 1600px;
        padding: 0 60px;
    }

    /* Scale up text for large screens */
    .hero-title {
        font-size: clamp(3rem, 4vw, 8rem);
    }

    .hero-description {
        font-size: clamp(1.25rem, 1.5vw, 2rem);
        max-width: 1000px;
    }

    /* Ensure video covers ultra-wide screens */
    /* Ensure video covers ultra-wide screens */
    .background-video {
        width: 100%;
        height: 100%;
    }
}

/* Extra ultra-wide (> 3440px) - for 21:9 and wider */
@media (min-width: 3440px) {
    .hero-section {
        padding-bottom: 60px;
        /* Extra padding for super wide screens */
    }

    .background-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Only override necessary properties for ultrawide */
    .hero-content {
        transform: scale(0.9);
        max-width: 1080px;
        /* Reduce max width */
    }

    .hero-title {
        font-size: clamp(2.25rem, 5.4vw + 0.9rem, 6.3rem);
        /* 90% of original */
    }
}

/* 4. SPECIAL CASES */

/* iPhone notch/home indicator safe areas */
@supports (padding: max(0px)) {
    .hero-section {
        padding-bottom: max(30px, env(safe-area-inset-bottom));
    }
}

/* Landscape mobile (common issue area) */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding-top: 60px;
        padding-bottom: 20px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 5vw, 3rem);
        margin-bottom: 15px;
    }

    .hero-description {
        font-size: clamp(0.875rem, 2vw, 1.1rem);
        margin-bottom: 20px;
    }
}

/* Very tall screens (ensure content stays centered) */
@media (min-height: 1000px) {
    .hero-content {
        margin-top: -5vh;
        /* Slight upward adjustment */
    }
}

/* 5. FALLBACK FOR OLDER BROWSERS */
@supports not (height: 100dvh) {

    /* Fallback for browsers that don't support dvh */
    .hero-section {
        min-height: 100vh;
        /* Add extra padding as safety margin */
        padding-bottom: 50px;
    }
}

/* ===== RESPONSIVE DESIGN ENHANCEMENTS ===== */
/* Enhanced responsive design improvements for better cross-device compatibility */

/* Improved Touch Targets for Mobile */
@media (max-width: 480px) {

    /* Ensure all interactive elements meet accessibility standards */
    button,
    a,
    input,
    select,
    textarea,
    .service-card {
        min-height: 44px;
        /* Apple HIG minimum touch target */
    }

    /* Better spacing on very small screens */
    .hero-buttons {
        gap: 0.75rem;
    }

    .hero-buttons a {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Improve service card spacing */
    .services-grid {
        gap: 1rem;
    }

    .service-card {
        padding: 1.25rem;
    }
}

/* Enhanced Tablet Layout */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Better use of tablet screen real estate */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero-content {
        max-width: 600px;
        margin: 0 auto;
    }

    /* Improve form layout on tablets */
    .contact-form {
        max-width: 500px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .contact-form .form-group:nth-child(5),
    .contact-form .form-group:nth-child(6) {
        grid-column: 1 / -1;
        /* Full width for message and button */
    }
}

/* Large Screen Optimizations */
@media (min-width: 1440px) {

    /* Prevent content from becoming too spread out on large screens */
    .services-section,
    .features-section,
    .contact-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    /* Better grid layout for large screens */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Enhanced Ultrawide Support */
@media (min-width: 2560px) {

    /* Prevent excessive stretching on ultrawide monitors */
    .hero-content {
        max-width: 1000px;
        margin: 0 auto;
        transform: scale(0.95);
        /* Slightly smaller on ultrawide */
    }

    /* Center main content areas */
    main {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    /* Better typography scaling for ultrawide */
    .hero-title {
        font-size: clamp(2.5rem, 4vw + 1rem, 4.5rem);
    }
}

/* Landscape Mobile Improvements */
@media (max-height: 500px) and (orientation: landscape) {

    /* Better handling of landscape mobile devices */
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }

    .hero-content {
        transform: scale(0.85);
    }

    .hero-title {
        font-size: clamp(1.5rem, 3vh + 0.5rem, 2.5rem);
    }

    .hero-description {
        font-size: clamp(0.875rem, 2vh + 0.25rem, 1.125rem);
    }
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {

    /* Respect user preferences for reduced motion */
    .background-video,
    .firefly,
    .particles-background * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    .hero-content {
        transform: none !important;
        opacity: 1 !important;
    }

    /* Reduce complex transforms */
    .service-card:hover {
        transform: translateY(-2px) !important;
    }
}

/* Improved Focus States */
@media (min-width: 768px) {

    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 2px solid #007AFF;
        outline-offset: 2px;
        border-radius: 4px;
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    }
}

/* High DPI Display Enhancements */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Ensure crisp text on high DPI displays */
    .hero-title,
    .service-card h3,
    nav a {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {

    .background-video,
    .particles-background,
    .firefly-container,
    nav,
    .hero-buttons {
        display: none !important;
    }

    .hero-content {
        background: white;
        color: black;
        position: static;
        transform: none;
        text-align: left;
    }

    .hero-title {
        color: black;
    }

    .service-card,
    .feature-card {
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* ============================================
   ENHANCED RESPONSIVE BREAKPOINT SYSTEM
   ============================================ */

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .background-video {
        display: none;
    }

    .hero-section {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    }

    .firefly-container,
    .particles-background,
    .steam-layer,
    .cloud-layer {
        display: none;
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
    .hero-section {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    nav {
        padding-left: max(20px, env(safe-area-inset-left)) !important;
        padding-right: max(20px, env(safe-area-inset-right)) !important;
        padding-top: max(20px, env(safe-area-inset-top)) !important;
    }

    footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 767px) {
    .hero-section {
        min-height: 100dvh;
        padding: 80px 1.5rem 2rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1rem;
        line-height: 1.1;
    }

    .hero-description {
        font-size: var(--text-base);
        margin-bottom: 1.5rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 320px;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
        padding: 16px 24px;
        font-size: var(--text-base);
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    nav {
        padding: 16px !important;
        height: auto;
        min-height: 64px;
    }

    .nav-logo {
        font-size: 1.125rem;
    }

    .background-video {
        opacity: 0.3;
    }
}

/* ============================================
   ULTRAWIDE DISPLAY IMPROVEMENTS
   ============================================ */
@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }

    .hero-content {
        max-width: 1200px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: clamp(3rem, 4vw, 5rem);
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }

    .services-grid {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .background-video {
        object-fit: cover;
        object-position: center center;
    }

    .video-container {
        /* max-height: 1080px; - REMOVED to prevent clipping on large screens */
        overflow: hidden;
    }
}

@media (min-width: 3440px) {
    .hero-content {
        max-width: 1400px;
    }

    .services-grid {
        max-width: 1800px;
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   FONT AWESOME FORCE FIXES
   ============================================ */
/* Ensure Font Awesome classes always win specificity wars */
.fa,
.fas,
.far,
.fal,
.fab {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}