/* ==========================================================================
   2. BLUEPRINT CROSSHAIR CURSOR (TECHNICAL SURVEYING RETICLE)
   ========================================================================== */
@media (pointer: fine) and (min-width: 1025px) {
    body {
        cursor: none !important;
    }

    body a,
    body button,
    body input,
    body textarea,
    body .magnetic,
    body .principle-card,
    body .build-layer,
    body .quality-card {
        cursor: none !important;
    }
}

.blueprint-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 99999;
    will-change: transform;
    transform: translate3d(-100px, -100px, 0);
}

/* Center circle (~6px diameter, empty in default, filled amber in hover) */
.cursor-center-circle {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--accent-amber);
    border-radius: 50%;
    background-color: transparent;
    transition: transform 0.2s var(--ease-out-expo), background-color 0.2s ease, border-color 0.2s ease;
}

/* Perpendicular crosshair lines (~1px thick, ~24px long) */
.cursor-line {
    position: absolute;
    background-color: rgba(244, 241, 236, 0.85);
    transition: opacity 0.2s ease, transform 0.2s var(--ease-out-expo);
}

.cursor-line-h {
    top: -0.5px;
    left: -12px;
    width: 24px;
    height: 1px;
}

.cursor-line-v {
    top: -12px;
    left: -0.5px;
    width: 1px;
    height: 24px;
}

/* Four L-shaped Corner Brackets (Surveying Target Reticle) */
.cursor-bracket {
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--accent-amber);
    border-style: solid;
    border-width: 0;
    transition: transform 0.25s var(--ease-out-expo), opacity 0.25s ease, border-color 0.25s ease;
    opacity: 0.95;
}

/* Default position: spaced ~14px out from center */
.cursor-bracket-tl {
    top: -14px;
    left: -14px;
    border-top-width: 1.5px;
    border-left-width: 1.5px;
}

.cursor-bracket-tr {
    top: -14px;
    left: 6px;
    border-top-width: 1.5px;
    border-right-width: 1.5px;
}

.cursor-bracket-bl {
    top: 6px;
    left: -14px;
    border-bottom-width: 1.5px;
    border-left-width: 1.5px;
}

.cursor-bracket-br {
    top: 6px;
    left: 6px;
    border-bottom-width: 1.5px;
    border-right-width: 1.5px;
}

/* Coordinate Annotation Text ("X: 482 Y: 216") */
.cursor-annotation {
    position: absolute;
    top: 14px;
    left: 14px;
    font-family: var(--font-mono, 'Space Grotesk', monospace);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent-amber);
    letter-spacing: 0.1em;
    white-space: nowrap;
    background: rgba(11, 31, 58, 0.9);
    padding: 3px 7px;
    border-left: 2px solid var(--accent-amber);
    border-radius: 1px;
    backdrop-filter: blur(6px);
    transition: opacity 0.2s ease, transform 0.2s var(--ease-out-expo), color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   HOVER STATE — LOCK-ON RETICLE
   ========================================================================== */
.blueprint-cursor.is-locked .cursor-center-circle {
    transform: scale(2.2);
    background-color: var(--accent-amber);
    border-color: var(--accent-amber-light);
    box-shadow: 0 0 12px rgba(217, 138, 43, 0.7);
}

.blueprint-cursor.is-locked .cursor-line {
    opacity: 0;
    transform: scale(0.2);
}

/* Corner brackets snap outward on lock-on (~24px from center) */
.blueprint-cursor.is-locked .cursor-bracket-tl {
    transform: translate3d(-10px, -10px, 0);
    border-width: 2px;
}

.blueprint-cursor.is-locked .cursor-bracket-tr {
    transform: translate3d(10px, -10px, 0);
    border-width: 2px;
}

.blueprint-cursor.is-locked .cursor-bracket-bl {
    transform: translate3d(-10px, 10px, 0);
    border-width: 2px;
}

.blueprint-cursor.is-locked .cursor-bracket-br {
    transform: translate3d(10px, 10px, 0);
    border-width: 2px;
}

.blueprint-cursor.is-locked .cursor-annotation {
    background: var(--accent-amber);
    color: var(--bg-navy-deep, #061224);
    border-left-color: var(--text-concrete, #fff);
    font-weight: 800;
    transform: translate3d(4px, 4px, 0) scale(1.05);
    box-shadow: 0 4px 15px rgba(217, 138, 43, 0.5);
}

/* Disable on Touch / Mobile Devices */
@media (max-width: 1024px),
(pointer: coarse) {
    .blueprint-cursor {
        display: none !important;
    }

    body {
        cursor: auto !important;
    }
}

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

    .cursor-center-circle,
    .cursor-line,
    .cursor-bracket,
    .cursor-annotation {
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   3. BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.25rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    border-radius: 2px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-amber);
    color: var(--bg-navy-deep);
    border: 1px solid var(--accent-amber);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn-primary:hover {
    background-color: var(--accent-amber-light);
    box-shadow: 0 10px 30px rgba(217, 138, 43, 0.4);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-concrete);
    border: 1px solid var(--border-steel);
}

.btn-outline:hover {
    border-color: var(--accent-amber);
    color: var(--accent-amber);
    background-color: rgba(217, 138, 43, 0.08);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. STICKY / MORPHING NAVBAR & RESPONSIVE DRAWER
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    z-index: 1000;
    transition: all 0.5s var(--ease-out-expo);
    background: transparent;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    height: 75px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-steel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.04em;
    z-index: 1002;
    background: linear-gradient(110deg,
            #BF953F 0%,
            #FCF6BA 25%,
            #B38728 50%,
            #FBF5B7 75%,
            #AA771C 100%);
    background-size: 200% auto;
    color: #F2A341;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: goldShine 3.5s linear infinite;
    filter: drop-shadow(0 0 12px rgba(217, 138, 43, 0.45));
}

@keyframes goldShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.logo span {
    color: #FCF6BA;
    font-size: 1.8rem;
    line-height: 1;
    -webkit-text-fill-color: initial;
    text-shadow: 0 0 15px rgba(242, 163, 65, 0.8);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-concrete);
    text-decoration: none;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent-amber);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-amber);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
    padding: 0;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-concrete);
    border-radius: 2px;
    transition: all 0.4s var(--ease-out-expo);
}

.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
    background-color: var(--accent-amber);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
    background-color: var(--accent-amber);
}

@media (max-width: 1024px) {
    .navbar {
        padding: 0 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        background: rgba(6, 18, 36, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.5s var(--ease-out-expo);
        z-index: 1001;
        padding: 4rem 2rem;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        letter-spacing: 0.2em;
    }

    .nav-cta {
        margin-top: 1.5rem;
        padding: 1.1rem 2.75rem;
        font-size: 1rem;
    }
}

/* ==========================================================================
   5. FOOTER / CTA
   ========================================================================== */
.footer {
    background-color: var(--bg-charcoal-light);
    background-image: linear-gradient(180deg, rgba(11, 31, 58, 0.90) 0%, rgba(15, 17, 21, 0.95) 100%), url('../images/footer/footer-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    padding: 75px 0 30px;
    position: relative;
    border-top: 1px solid var(--border-steel);
}

.footer-cta {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-steel);
}

.footer-statement {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    letter-spacing: -0.03em;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-brand-desc {
    color: var(--text-steel-light);
    font-size: 1rem;
    max-width: 350px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-amber);
    margin-bottom: 1.75rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-concrete-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-amber);
    padding-left: 6px;
}

.contact-info p {
    color: var(--text-concrete-muted);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.contact-info strong {
    color: var(--text-concrete);
    font-family: var(--font-mono);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: var(--text-steel);
}

.back-to-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-concrete);
    text-decoration: none;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.back-to-top:hover {
    color: var(--accent-amber);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    .footer {
        padding: 5rem 0 2.5rem;
    }

    .footer-cta {
        margin-bottom: 4rem;
        padding-bottom: 4rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* ==========================================================================
   6. IMAGERY AS STORYTELLING (DUOTONE, KEN BURNS, GRAIN, BEFORE/AFTER)
   ========================================================================== */

/* A. Duotone / Navy-Tinted Photography */
.duotone {
    filter: grayscale(1) sepia(0.15) hue-rotate(180deg) saturate(1.4) brightness(0.9) contrast(1.1);
    transition: filter 0.5s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.magnetic-card:hover .duotone,
.client-row:hover .duotone,
.horizontal-slide:hover .duotone {
    /* Slight 5-10% shift toward full amber tint on interactive card hover */
    filter: grayscale(0.85) sepia(0.25) hue-rotate(185deg) saturate(1.6) brightness(0.95) contrast(1.15);
}

.quality-card:hover .duotone {
    /* Reveal original photo in full color on hover */
    filter: none !important;
}

/* Navy Gradient Overlay for text readability on images */
.image-navy-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(11, 31, 58, 0.88) 100%);
    pointer-events: none;
    z-index: 1;
}

/* B. Ken Burns Continuous Zoom & Parallax Pan */
.ken-burns-wrap {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.ken-burns-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurnsZoom 26s ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes kenBurnsZoom {
    0% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ken-burns-img {
        animation: none !important;
        transform: scale(1.0) !important;
    }
}

/* C. Film Grain Noise Texture Overlay */
.dark-section-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: 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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.045;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 8;
}

/* D. Before/After Project Comparison Slider */
.comparison-slider-wrap {
    position: relative;
    width: 100%;
    max-width: 1400px;
    aspect-ratio: 1024 / 571;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-steel);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(217, 138, 43, 0.2);
    user-select: none;
    touch-action: pan-y;
}

.comparison-img-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.comparison-img-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.85);
    transform-origin: center 82%;
    pointer-events: none;
    transition: transform 0.6s var(--ease-out-expo);
}

.comparison-slider-wrap:hover .comparison-img-layer img {
    transform: scale(1.95);
}

.comparison-after-layer {
    z-index: 2;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    will-change: clip-path;
}

.comparison-before-layer {
    z-index: 1;
}

.comparison-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--accent-amber);
    box-shadow: 0 0 15px var(--accent-amber);
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
    will-change: left;
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    background-color: var(--accent-amber);
    border: 3px solid var(--bg-charcoal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-navy-deep);
    font-weight: 800;
    box-shadow: 0 0 25px rgba(217, 138, 43, 0.6);
    transform: translate(-50%, -50%);
    z-index: 11;
    cursor: ew-resize;
    pointer-events: auto;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-slider-wrap:hover .comparison-handle {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 35px var(--accent-amber-glow);
}

@keyframes handlePulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 35px var(--accent-amber);
    }
}

.comparison-handle.pulsing {
    animation: handlePulse 2s infinite ease-in-out;
}

.comparison-label {
    position: absolute;
    bottom: 1.5rem;
    z-index: 12;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-amber);
    background: rgba(11, 31, 58, 0.85);
    border: 1px solid rgba(217, 138, 43, 0.4);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    letter-spacing: 0.15em;
    pointer-events: none;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.comparison-label-left {
    left: 1.5rem;
}

.comparison-label-right {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .comparison-handle {
        width: 42px;
        height: 42px;
    }

    .comparison-label {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .comparison-handle {
        width: 36px;
        height: 36px;
    }
}