/* 
   ===============================================
   APPALACHIAN ENERGY AND INFRASTRUCTURE (AEI)
   ===============================================
*/

:root {
    /* Color Palette */
    --clr-bg-dark: #0f172a; /* Traditional Navy */
    --clr-bg-light: #ffffff; /* White */
    --clr-text-light: #f8fafc; /* Light Gray/White */
    --clr-text-dark: #1e293b; /* Dark Navy/Gray */
    --font-display: 'Oswald', sans-serif;
    --font-sans: 'Inter', sans-serif;
    --clr-accent: #fbbf24; /* Primary Brand Yellow */
    --clr-accent-secondary: #fbbf24; /* Primary Brand Yellow */
    --clr-accent-bright: #fcd34d;
    --clr-accent-blue: #fbbf24;
    --clr-accent-gold: #fbbf24; /* Kept for reference if needed */
    
    /* Layout */
    --padding-x: 5vw;
    --padding-y: 15vh;
}

/* =========================================
   RESET & BASICS
   ========================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide default cursor only if custom cursor script initialization succeeded */
@media (pointer: fine) {
    body.has-custom-cursor, 
    body.has-custom-cursor a, 
    body.has-custom-cursor button {
        cursor: none;
    }
}

html {
    /* Remove native smooth scroll since we use Lenis */
    scroll-behavior: auto;
    font-size: 16px;
}

/* Scrollbar styling for a custom feel */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--clr-bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--clr-accent-blue);
}

body {
    font-family: var(--font-sans);
    color: var(--clr-text-light);
    background-color: var(--clr-bg-dark);
    line-height: 1.4;
    overflow-x: hidden;
    transition: background-color 0.8s ease, color 0.8s ease;
}

body.light-mode {
    background-color: var(--clr-bg-light);
    color: var(--clr-text-dark);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   CUSTOM CURSOR
   ========================================= */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--clr-accent-blue);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2147483647; /* Absolute top priority */
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    will-change: transform;
}

.cursor-follower {
    width: 24px;   /* Reduced base size */
    height: 24px;  /* Reduced base size */
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2147483646; /* One layer below primary dot */
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    will-change: transform;
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none !important;
    }
}

body.light-mode .cursor-follower {
    border-color: rgba(0, 0, 0, 0.2);
}

.cursor.hover-active {
    width: 40px;
    height: 40px;
    background-color: rgba(251, 191, 36, 0.3); /* Brand Yellow */
    mix-blend-mode: difference;
}
.cursor-follower.hover-active {
    opacity: 0;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mt-5 { margin-top: 5rem; }

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
.preloader {
    position: fixed;
    inset: 0;
    background-color: #ffffff; /* Changed to White */
    z-index: 9000;
    display: none; /* Hidden by default to prevent navigation flicker */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-text {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 12px;
    font-weight: 700;
    color: var(--clr-text-light);
    text-transform: uppercase;
}

.loader-logo {
    height: 250px;
    width: auto;
    object-fit: contain;
    opacity: 0;
    margin-bottom: 2rem;
}

.loader-line {
    width: 200px;
    height: 1px;
    background: rgba(0,0,0,0.1); /* Visible on white background */
    position: relative;
    overflow: hidden;
}

.line-progress {
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--clr-accent-blue);
}

/* =========================================
   HEADER & NAV
   ========================================= */
/* /* 1. Slim & Compact Header (Base Solid White) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem var(--padding-x); /* Extra slim for modern look */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    color: var(--clr-text-dark);
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* 2. Universal Transparency - For ALL Dynamic Header Pages (Home, Projects, etc) */
body.dynamic-header:not(.header-scrolled) .header {
    background: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    padding: 1.2rem var(--padding-x); /* Slightly taller and breathable on load */
}

/* 3. Universal Transparency Overrides (Menu text and welcomes) */
body.dynamic-header:not(.header-scrolled) .header .menu-btn,
body.dynamic-header:not(.header-scrolled) .header .welcome-text {
    color: #ffffff !important;
}

/* 4. Transparent Header when Menu is Open */
body.nav-menu-open .header {
    background: transparent !important;
    box-shadow: none !important;
    color: #000000 !important;
}


/* 4. Global Scrolled State (For All Dynamic Headers) */
body.header-scrolled .header {
    padding: 1rem var(--padding-x) !important;
}



.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo {
    height: clamp(120px, 16vw, 190px); /* Significantly larger branding */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}



.menu-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: inherit; /* Follow header color */
}

.menu-line {
    width: 30px;
    height: 2px;
    background-color: currentColor; /* Follow text color */
    transition: width 0.3s ease;
}

body.light-mode .menu-btn {
    color: var(--clr-text-dark);
}

.menu-btn:hover .menu-line {
    width: 60px;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
}

.welcome-text {
    font-size: clamp(0.6rem, 0.85vw, 0.85rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
    color: inherit; /* Follow header color */
    white-space: nowrap;
}

body.light-mode .welcome-text {
    color: var(--clr-text-dark);
}

.brand-short { display: none; }

@media (max-width: 768px) {
    .header {
        padding: 0.8rem var(--padding-x); 
    }
    .header-center {
        display: flex; 
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 0.55rem; /* Increased slightly for mobile legibility */
        width: auto;
        white-space: nowrap;
        text-align: center;
        opacity: 1;
    }
    .brand-logo {
        height: 45px;
    }
    .brand-full { display: none; }
    .brand-short { display: inline; }
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background-color: #ffffff; /* Changed to White per user request */
    z-index: 990;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-overlay.nav-open {
    clip-path: circle(150% at 100% 0%);
}

.nav-links {
    text-align: center;
}

.nav-links li {
    margin: 2rem 0;
    overflow: hidden;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 1.8rem; /* Reverted to smaller size as requested */
    text-transform: uppercase;
    color: #000000; /* Black text on white background */
    position: relative;
    display: inline-block;
    transition: color 0.4s ease;
}

.nav-links a::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    overflow: hidden;
    color: var(--clr-accent-blue);
    -webkit-text-stroke: 1px var(--clr-accent-blue);
    transition: width 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    white-space: nowrap;
}

.nav-links a:hover::before {
    width: 100%;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
    padding: 0 var(--padding-x);
    max-width: 1600px;
    margin: 0 auto;
}

.padded-section {
    padding-top: var(--padding-y);
    padding-bottom: var(--padding-y);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.flex-row {
    display: flex;
    gap: 5vw;
    align-items: center;
}

.section-tag {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff; /* Default, can be overridden */
    margin-bottom: 2rem;
    opacity: 1;
}

.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 3rem; }
.mt-5 { margin-top: 5rem; }
.text-dark { color: var(--clr-text-dark); }

/* Typography */
.huge-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.8rem); /* Refined safe scale */
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--clr-text-dark);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.1rem); /* Professional scale */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: var(--clr-text-dark);
}

/* SplitType character CSS */
.char {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.word {
    display: inline-block;
    overflow: hidden;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--padding-x);
    overflow: hidden;
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-slider .slide.active {
    opacity: 1;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: radial-gradient(circle at center, #111 0%, #050505 100%);
}

.hero-noise {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 50%), 
                      url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 18vh;
    padding-left: var(--padding-x);
    padding-right: var(--padding-x);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4.2rem); 
    line-height: 1.1;
    font-weight: 800; /* Increased weight */
    letter-spacing: 2px; /* Added spacing */
    margin-bottom: 4vh;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .word {
    transform: translateY(110%); /* Start hidden downward for GSAP */
}

.hero-title .accent {
    color: var(--clr-accent);
}

.hero-desc {
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    font-weight: 300;
    max-width: 650px;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--clr-text-light) 50%, transparent 50%);
    background-size: 100% 200%;
    animation: scrollDown 2s ease infinite;
}

@keyframes scrollDown {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

/* =========================================
   MARQUEE
   ========================================= */
.marquee-section {
    padding: 1.5rem 0;
    background: var(--clr-accent-blue);
    color: var(--clr-text-light);
    overflow: hidden;
}

.marquee-container {
    display: flex;
    width: 200%; /* For continuous scrolling */
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marqueeScroll 20s linear infinite;
}

.marquee-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 3rem);
    font-weight: 500;
    margin-right: 2rem;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-text-wrapper {
    flex: 1;
}

.about-image-wrapper {
    flex: 1;
    position: relative;
}

.image-mask {
    border-radius: 4px;
    overflow: hidden;
    height: 70vh;
    background: #e0e0e0;
}

.parallax-img {
    width: 100%;
    height: 120%; /* larger to allow parallax */
    object-fit: cover;
    transform: translateY(-10%) translateZ(0); /* default hidden top margin, hardware accelerated */
    will-change: transform;
}

.image-caption {
    position: absolute;
    bottom: -2rem;
    right: 0;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-grid {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 2rem;
}

.stat-item {
    font-family: var(--font-display);
}

.stat-num, .stat-plus {
    font-size: 3rem; /* Reduced from 4rem */
    line-height: 1;
    font-weight: 700;
    color: var(--clr-accent-blue);
}

.stat-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* =========================================
   SERVICES INTERACTIVE LIST
   ========================================= */
.services-list {
    border-top: 1px solid rgba(0,0,0,0.1);
}

.service-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center; /* Center content */
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.service-num {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: rgba(0,0,0,0.2);
    width: 60px;
    transition: color 0.3s;
}

.service-name {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.8vw, 1.8rem); /* Slightly smaller for cleaner list */
    text-transform: uppercase;
    margin: 0 1.5rem; /* Tighter margins */
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    letter-spacing: -0.5px;
}

.service-flyout {
    position: absolute;
    right: 2rem;
    max-width: 350px;
    font-size: 1rem;
    color: #000000 !important;
    opacity: 0;
    transform: translateX(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
    text-align: right;
    background: #ffffff;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-item:hover .service-num {
    color: var(--clr-accent);
    transform: translateX(-10px);
}

.service-item:hover .service-name {
    color: var(--clr-accent);
    letter-spacing: 2px;
}

.service-item:hover .service-flyout {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    left: 50%;
    top: 50%;
}

/* =========================================
   PROJECTS HORIZONTAL SCROLL
   ========================================= */
.projects-section {
    overflow: hidden;
    /* Height will be managed by GSAP pinning, usually 300vh */
}

.horizontal-scroll-container {
    display: inline-flex;
    height: 100vh;
}

.horizontal-panel {
    width: 100vw;
    height: 100vh;
    padding: var(--padding-y) var(--padding-x);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.intro-panel {
    justify-content: center;
    padding-top: 0;
    padding-bottom: 4vh;
}

.intro-panel .reveal-text {
    margin-top: 1.5rem;
    font-size: 1rem;
    opacity: 0.6;
    letter-spacing: 1px;
    overflow: visible;
}

.massive-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 7rem); /* Reduced from 11rem */
    line-height: 1;
    white-space: nowrap;
}

/* Detailed Project Panel (Side-by-Side) */
.detailed-panel {
    width: 100vw !important;
    flex-shrink: 0;
    padding: 0 !important;
    background: var(--clr-bg-light); 
}

.project-flex-container {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.project-img-side {
    flex: 0 0 35%;
    padding: 10vh 2vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-side .project-img-container {
    width: 100%;
    height: 70vh;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-content-side {
    flex: 1;
    padding: 5vh 5vw;
    color: var(--clr-text-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content-side .section-tag {
    font-size: 0.75rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    color: var(--clr-accent);
}

.project-content-side .huge-title {
    font-size: clamp(1.8rem, 3.5vw, 3rem) !important;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-align: left !important;
    text-transform: uppercase;
}

.project-description-text {
    max-width: 550px;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
}

.services-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 3rem;
    max-width: 700px;
}

.mini-grid-item h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: var(--clr-accent);
    margin-bottom: 0.4rem;
}

.mini-grid-item p {
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.6;
}

/* Base Project Panel */
.project-panel {
    align-items: center;
    justify-content: center;
    padding: 10vh var(--padding-x);
    gap: 1.5rem;
}

/* Unique background per panel — creates the color-change on scroll */
.project-panel:nth-child(2) { background: #f8fafc; }
.project-panel:nth-child(3) { background: #f1f5f9; }
.project-panel:nth-child(4) { background: #eff6ff; }
.project-panel:nth-child(5) { background: #f0fdf4; }
.project-panel:nth-child(6) { background: #fffcf0; }

.project-img-container {
    width: 50vw;
    height: 55vh;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border-radius: 4px; /* Added subtle rounded corners for a cleaner look */
}

.project-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: brightness(0.85);
}

.project-panel:hover .project-img-container img {
    transform: scale(1.05);
}

.project-panel h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    flex-shrink: 0;
}

/* =========================================
   CONTACT CTA
   ========================================= */
.magnetic-btn {
    display: inline-block;
    padding: 1.2rem 3rem; /* Tighter padding */
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    border: 1px solid var(--clr-text-dark);
    border-radius: 500px;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem); /* Further reduced for professional look */
    font-family: var(--font-display);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--clr-accent-blue);
    z-index: -1;
    transition: height 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    border-radius: 50% 50% 0 0;
}

.magnetic-btn:hover {
    color: var(--clr-text-light);
    border-color: var(--clr-accent-blue);
}

.magnetic-btn:hover::before {
    height: 200%;
    border-radius: 0;
}

.contact-footer {
    display: flex;
    justify-content: space-around;
    padding-top: 4rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-col h4 {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--clr-accent);
    margin-bottom: 0.5rem;
}

/* =========================================
   NEW CONTACT GRID & FORM
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10vw;
    align-items: start;
}

.contact-info-panel .lead-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.contact-methods {
    display: flex;
    gap: 4rem;
}

.method-item .label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--clr-accent-blue);
    display: block;
    margin-bottom: 0.5rem;
}

.method-item p {
    font-size: 1.2rem;
    font-family: var(--font-display);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(0,0,0,0.6);
}

.form-group input, 
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 1rem 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--clr-text-dark);
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-accent-blue);
}

.form-disclaimer {
    font-size: 0.75rem;
    line-height: 1.6;
    color: rgba(0,0,0,0.5);
}

.inline-link {
    text-decoration: underline;
    color: var(--clr-accent-blue);
}

/* =========================================
   DETAILED FOOTER
   ========================================= */
.main-footer {
    background-color: var(--clr-bg-dark);
    padding: 10vh 0 5vh;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1.2fr;
    gap: 4vw;
}

.footer-logo {
    height: 30px;
}

.footer-desc {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    max-width: 250px;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--clr-accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--clr-accent);
}

.areas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
}

.footer-contact p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .flex-row {
        flex-direction: column;
    }
    .about-text-wrapper, .about-image-wrapper {
        width: 100%;
    }
    .image-mask {
        height: 50vh;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 5rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    .brand-col {
        grid-column: span 2;
    }
    .service-flyout {
        display: none;
    }
    .project-img-container {
        width: 80vw;
    }
    .nav-links a {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .nav-links a {
        font-size: 1.2rem;
    }
    .magnetic-btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.9rem;
        background-color: transparent !important;
        -webkit-appearance: none !important;
        appearance: none !important;
        color: var(--clr-text-dark) !important; /* Ensure visible on light background */
        border-color: var(--clr-text-dark) !important;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .brand-col {
        grid-column: span 1;
    }
    .contact-footer {
        flex-direction: column;
        gap: 2rem;
    }
    .horizontal-scroll-container {
        flex-direction: column;
        width: 100% !important;
        height: auto !important;
    }
    .horizontal-panel {
        width: 100% !important;
        height: auto !important;
        min-height: 80vh;
        padding: 10vh var(--padding-x);
    }
    .projects-section {
        height: auto !important;
    }
    .massive-title {
        font-size: 4rem;
    }
    .hero-content {
        justify-content: center;
        padding-bottom: 0;
        text-align: center;
    }
    .hero-title {
        margin-bottom: 2rem;
    }
}
/* =========================================
   SUBPAGE & UI FIXES
   ========================================= */
.subpage-hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--clr-bg-dark);
}

.subpage-hero .hero-content {
    justify-content: center;
    padding-bottom: 0;
}

.large-para {
    font-size: 1.5rem;
    line-height: 1.4;
    max-width: 900px;
    margin-bottom: 2rem;
}

.safety-card {
    position: relative;
    padding: 3rem 2rem 2rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-top: 4px solid var(--clr-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

.safety-card:hover {
    transform: translateY(-5px);
}

.card-num {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: var(--font-display);
    font-size: 3rem;
    color: rgba(250, 204, 21, 0.1);
    font-weight: 700;
}

.bullet-list-dark {
    margin-top: 1.5rem;
    padding-left: 1.2rem;
    list-style: none;
}

.bullet-list-dark li {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    position: relative;
    color: var(--clr-text-dark);
}

.bullet-list-dark li::before {
    content: '';
    position: absolute;
    left: -1.2rem;
    top: 0.6em;
    width: 6px;
    height: 2px;
    background: var(--clr-accent);
}

/* Careers Page Enhancements */
.careers-intro {
    margin-bottom: 4rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.benefit-card {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--clr-accent);
}

.benefit-card h4 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.benefit-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.6;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
}

.job-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--clr-accent);
    transition: height 0.4s ease;
}

.job-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(250, 204, 21, 0.2);
    transform: translateY(-10px);
}

.job-card:hover::before {
    height: 100%;
}

.job-card-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.job-card-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.job-card-loc {
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.5;
    text-transform: uppercase;
}

.job-card-body {
    flex-grow: 1;
}

.job-card-section {
    margin-bottom: 2rem;
}

.job-card-section h4 {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--clr-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.job-card-section ul {
    list-style: none;
    padding: 0;
}

.job-card-section li {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    opacity: 0.8;
}

.job-card-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--clr-accent);
    font-weight: bold;
}

.job-apply-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--clr-accent);
    text-decoration: none;
    transition: gap 0.3s ease;
}

.job-apply-link:hover {
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    .job-card {
        padding: 2rem;
    }
    .job-card-title {
        font-size: 1.5rem;
    }
}


.centered-header { text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 3rem; }
.text-accent { color: var(--clr-accent-blue) !important; }

/* Mobile Fixes */
@media (max-width: 768px) {
    .header {
        background: rgba(255, 255, 255, 1) !important;
        color: var(--clr-text-dark) !important;
        padding: 0.5rem 5vw !important; /* Extremely slim for mobile */
    }
    .brand-logo {
        height: 150px !important; /* Large logo even on mobile */
    }
    body.dynamic-header:not(.header-scrolled) .header {
        background: transparent !important; 
        color: #ffffff !important;
        box-shadow: none !important;
        padding: 1rem 5vw !important;
    }
    body.nav-menu-open .header {
        background: transparent !important;
        box-shadow: none !important;
        color: #000000 !important;
    }
    body.header-scrolled .header {
        background: rgba(255, 255, 255, 0.98) !important;
        color: var(--clr-text-dark) !important;
        box-shadow: 0 4px 30px rgba(0,0,0,0.05) !important;
    }
    .welcome-text { display: none !important; } /* Hidden on mobile to make room for larger logo */

    body.light-mode .section-tag { color: var(--clr-accent-blue) !important; }
    .brand-logo { height: 125px !important; } /* Further enlarged mobile logo as requested */
    .hero-bg-slider .slide { background-attachment: scroll !important; } /* Fix for mobile image visibility */
    .menu-btn { font-size: 0.95rem !important; }
    .menu-line { width: 35px !important; }
    
    /* Services section mobile sizing */
    .services-section .huge-title { font-size: 2rem !important; }
    .service-name { font-size: 1.1rem !important; }
    .service-flyout { display: none !important; }
    .service-item { padding: 1.5rem 0 !important; }
    .service-name { font-size: 1.4rem !important; margin: 0 1rem !important; text-align: center; }
    .service-num { font-size: 0.9rem !important; width: 30px !important; }
    
    /* Our Work mobile fixes */
    .projects-section { height: auto !important; overflow: visible !important; }
    .horizontal-scroll-container { 
        display: flex !important; 
        flex-direction: column !important; 
        height: auto !important; 
        width: 100% !important;
    }
    .horizontal-panel {
        width: 100% !important;
        height: auto !important;
        padding: 2rem var(--padding-x) !important;
        flex-shrink: 1 !important;
        display: block !important;
        min-height: auto !important;
    }
    .project-image-wrapper { height: auto !important; }
    .detailed-panel { 
        height: auto !important; 
        min-height: auto !important; 
        padding-top: 1rem !important;
        padding-bottom: 3rem !important;
        display: block !important;
    }
    .project-flex-container { 
        display: block !important; /* Stack normally without flex centering side-effects */
        background: #111827 !important; 
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 2.5rem;
        box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    }
    .project-img-side { 
        width: 100% !important; 
        height: 220px !important; 
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        position: relative !important;
    }
    .project-img-side .project-img-container {
        width: 100% !important;
        height: 100% !important; /* Force it to match the parent instead of 70vh Desktop */
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important; /* Remove Desktop shadow within the card */
    }
    .project-img-side img { 
        display: block;
        height: 100% !important; 
        width: 100% !important;
        object-fit: cover !important; 
        position: relative !important;
        z-index: 1;
    }
    .project-content-side { 
        position: relative !important;
        z-index: 2;
        width: 100% !important; 
        padding: 1.5rem 1.25rem !important; 
        background: transparent !important;
        color: #ffffff !important;
        display: block !important;
        margin-top: 0 !important; /* Ensure no negative margin overlap */
        transform: none !important; /* Clear any ghost translations */
    }
    .project-content-side .huge-title {
        font-size: 2rem !important;
        margin-top: 0.5rem !important;
        color: #ffffff !important;
    }
    .project-description-text {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        color: rgba(255, 255, 255, 0.8) !important;
    }
    .services-mini-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    .mini-grid-item {
        padding: 0.75rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    .massive-title { font-size: 3rem !important; white-space: normal !important; text-align: center; }

    body.light-mode .project-flex-container {
        background: #f8fafc !important; /* Distinct light grey box */
        border: 1px solid rgba(0,0,0,0.1) !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    }
    body.light-mode .project-content-side,
    body.light-mode .project-content-side .huge-title,
    body.light-mode .project-content-side p {
        color: var(--clr-text-dark) !important;
    }
    body.light-mode .mini-grid-item {
        background: #ffffff !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
    }
    
    .footer .footer-logo { height: 140px !important; }
    /* Desktop Spacing Fix for large logo area */
    .service-hero, .subpage-hero { 
        padding-top: 300px !important; 
        min-height: 80vh !important;
    }
    .service-hero .huge-title, .subpage-hero .huge-title { font-size: 2.2rem !important; }
}


.service-hero, .subpage-hero { 
    min-height: 70vh; 
    display: flex; 
    flex-direction: column;
    justify-content: center;
    padding: 300px var(--padding-x) 120px; /* Increased to 300px for absolute desktop clearance */
    position: relative;
    background-color: #000; /* Fallback */
}

.service-hero::before, .subpage-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.service-hero .container, .subpage-hero .container {
    position: relative;
    z-index: 2;
}

.service-hero .huge-title, .subpage-hero .huge-title { 
    color: #ffffff !important; 
    text-shadow: 0 4px 30px rgba(0,0,0,0.8), 0 0 50px rgba(0,0,0,0.4); 
} 
.detail-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: start; }
.feature-img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.benefits-list { list-style: none; padding: 0; margin: 2rem 0; }
.benefits-list li { margin-bottom: 1.5rem; position: relative; padding-left: 2rem; }
.benefits-list li::before { content: '\2192'; position: absolute; left: 0; color: var(--clr-accent); font-weight: bold; }
a.service-item { text-decoration: none; color: inherit; display: block; }

@media (max-width: 968px) { .detail-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* Projects Gallery Styles */
.projects-grid-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }
.project-card-full { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.4s ease; }
.project-card-full:hover { transform: translateY(-10px); }
.project-card-full img { width: 100%; height: 250px; object-fit: cover; }
.p-card-content { padding: 2rem; }
.p-card-content h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.p-card-content p { font-size: 0.95rem; opacity: 0.7; margin-bottom: 1.5rem; }
.btn-minimal { display: inline-block; font-family: var(--font-display); font-weight: bold; font-size: 0.8rem; letter-spacing: 1px; color: var(--clr-accent); border-bottom: 2px solid var(--clr-accent); padding-bottom: 2px; }
@media (max-width: 768px) { .projects-grid-full { grid-template-columns: 1fr; } }


/* =========================================
   FINAL HYBRID THEME REFINEMENTS
   ========================================= */

/* Ensure the Body is Light by Default */
body {
    background-color: var(--clr-bg-light);
    color: var(--clr-text-dark);
}

/* Specific Footer Override: Bright Theme with SOLID BLACK text */
.footer { 
    background-color: #f1f5f9 !important; 
    color: #000000 !important; 
    border-top: 1px solid rgba(0,0,0,0.1);
    padding: 10vh var(--padding-x) !important;
}

.footer .footer-logo {
    height: 180px !important; 
    width: auto !important;
    object-fit: contain;
    margin-bottom: 2rem;
    margin-left: 0 !important; /* Left aligned flush with grid */
    align-self: flex-start !important;
}

.footer .footer-col:first-of-type {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left corner for branding side */
    text-align: left;
}

.footer .footer-title { 
    color: var(--clr-accent-blue) !important; 
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.footer a { 
    color: #000000 !important; 
    opacity: 0.8 !important;
}

.footer a:hover { 
    color: var(--clr-accent-blue) !important; 
    opacity: 1 !important;
}

.footer .footer-desc, .footer p, .footer span, .footer li, .footer-bottom p { 
    color: #000000 !important; 
    opacity: 1 !important;
}

/* Hide Preloader Progress Bar as Requested */
.loader-line { display: none !important; }

.service-images-wrapper { display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin-top:3.5rem; }
.service-images-wrapper img { width:100%; height:350px; object-fit:cover; border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,0.1); }
@media(max-width:768px){ .service-images-wrapper{grid-template-columns:1fr;} }

