/* --- SYSTEM VARIABLES --- */
:root {
    --c-bg-dark: #050505;
    --c-text-main: #FFFFFF;
    --c-text-muted: #B0B0B0;

    --c-accent-blue: #3366FF;
    --c-accent-cyan: #66CCFF;
    --c-accent-glow: rgba(51, 102, 255, 0.5);

    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur: 20px;

    --font-display: 'Bodoni Moda', serif;
    --font-body: 'Inter', sans-serif;

    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

    /* Apple-style Scale Easing */
    --ease-mac-window: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--c-bg-dark);
    color: var(--c-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* SCROLL LOCK CLASS */
body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s var(--ease-smooth);
}

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

.container-fluid {
    width: 92%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 1.2s var(--ease-smooth);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

/* --- NAVIGATION --- */
header {
    width: 100%;
    height: 90px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    transition: all 0.6s var(--ease-smooth);
    transform: translateY(0);
}

/* NAVBAR LASER LINE EFFECT */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 10%,
            #1dd2ff 30%,
            var(--c-accent-blue) 50%,
            #1dd2ff 70%,
            transparent 90%,
            transparent 100%);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
    z-index: 10;
    pointer-events: none;
}

/* Class to trigger the Navbar Laser */
header.laser-on::after {
    transform: scaleX(1);
    opacity: 1;
}

header.nav-hidden {
    transform: translateY(-100%);
}

header.scrolled {
    height: 80px;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: none !important;
}

/* --- NAV TOGGLE BUTTON --- */
.nav-toggle-btn {
    position: fixed;
    top: 22px;
    right: 4rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.4s var(--ease-smooth);
}

.nav-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-toggle-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.nav-toggle-btn i {
    font-size: 1.2rem;
    transition: transform 0.5s var(--ease-elastic);
}

.nav-toggle-btn.rotated i {
    transform: rotate(180deg);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    animation: navSlideDown 1s var(--ease-smooth) forwards;
    animation-delay: 0.1s;
}

.logo-mark {
    height: 40px;
    width: auto;
}

.logo-word {
    height: 30px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    margin-right: 2rem;
}

.nav-link {
    color: var(--c-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 10px 0;
    opacity: 0;
    animation: navSlideDown 1s var(--ease-smooth) forwards;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 20px var(--c-accent-glow);
    transform: scale(1.05);
}

.nav-links li:nth-child(1) .nav-link {
    animation-delay: 0.2s;
}

.nav-links li:nth-child(2) .nav-link {
    animation-delay: 0.3s;
}

.nav-links li:nth-child(3) .nav-link {
    animation-delay: 0.4s;
}

.nav-links li:nth-child(4) .nav-link {
    animation-delay: 0.5s;
}

@keyframes navSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
    background-color: #000;
}

#hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-image: url('cubes.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    will-change: opacity;
    animation: heroBgFadeIn 2s ease-out forwards;
    animation-delay: 1.2s;
}

@keyframes heroBgFadeIn {
    to {
        opacity: 0.5;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #050505 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 10;
    padding-left: 4rem;
    max-width: 1200px;
}

@keyframes heroEnter {
    0% {
        opacity: 0;
        transform: translateY(40px);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 9vw, 7.5rem);
    line-height: 1.05;
    margin-bottom: 2.5rem;
    color: #fff;
    letter-spacing: -3px;
    opacity: 0;
    animation: heroEnter 1.5s var(--ease-smooth) forwards;
    animation-delay: 0.3s;
}

.hero-title span {
    display: block;
    color: var(--c-text-muted);
    font-style: normal;
    font-weight: 300;
    margin-top: 10px;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    margin-bottom: 3.5rem;
    max-width: 500px;
    font-weight: 300;
    line-height: 1.7;
    opacity: 0;
    animation: heroEnter 1.5s var(--ease-smooth) forwards;
    animation-delay: 0.5s;
}

.hero-btn-wrapper {
    opacity: 0;
    animation: heroEnter 1.5s var(--ease-smooth) forwards;
    animation-delay: 0.7s;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 1.2rem 2.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 100px;
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.btn i {
    transition: transform 0.3s;
}

.btn:hover i {
    transform: translateX(5px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInGrid 1s ease-out forwards 1.5s;
    z-index: 10;
}

.mouse {
    width: 20px;
    height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* --- ABOUT --- */
.about {
    padding: 8rem 0;
    background: linear-gradient(to bottom, #000 0%, #050505 100%);
    position: relative;
    overflow: hidden;
}

.about-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

.about-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
    opacity: 0;
}

.about-grid-bg.active {
    animation: fadeInGrid 2s ease-out forwards;
}

@keyframes fadeInGrid {
    to {
        opacity: 1;
    }
}

.about-gradient-orb {
    position: absolute;
    top: 50%;
    left: -10%;
    transform: translateY(-50%) scale(0);
    width: 80vh;
    height: 80vh;
    background: radial-gradient(circle, var(--c-accent-blue) 0%, rgba(51, 102, 255, 0.1) 60%, transparent 70%);
    filter: blur(80px);
    z-index: 0;
    opacity: 0;
}

.about-gradient-orb.active {
    animation: expandOrbLeft 2.5s var(--ease-smooth) forwards;
}

@keyframes expandOrbLeft {
    0% {
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }

    100% {
        transform: translateY(-50%) scale(1.5);
        opacity: 0.6;
    }
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

.about-text {
    position: sticky;
    top: 150px;
}

.about-text h2 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.about-text h2 span {
    color: var(--c-text-muted);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    margin-bottom: 1.5rem;
    max-width: 90%;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 1.5rem;
}

.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.span-2 {
    grid-column: span 2;
}

.card-gradient {
    background: linear-gradient(135deg, rgba(51, 102, 255, 0.1) 0%, rgba(112, 0, 255, 0.1) 100%);
    border-color: rgba(51, 102, 255, 0.2);
}

.card-dark {
    background: #000;
}

.bento-num {
    font-family: var(--font-display);
    font-size: 3rem;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.bento-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-text-muted);
    font-weight: 600;
}

.bento-icon {
    font-size: 2rem;
    color: var(--c-accent-cyan);
    margin-bottom: 1rem;
}

/* --- SERVICES --- */
.services {
    padding: 2rem 0 12rem 0;
    background: #050505;
    position: relative;
    overflow: hidden;
    transition: background 0.8s ease;
    scroll-margin-top: 100px;
}

#services-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.services-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
    pointer-events: none;
}

.services-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, #050505 0%, rgba(5, 5, 5, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: brightness(0.6) grayscale(50%);
    transform: scale(1.1);
}

.bg-slide.active {
    opacity: 1;
    animation: bgPan 30s linear infinite alternate;
}

@keyframes bgPan {
    0% {
        transform: scale(1.1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(-2%, -2%);
    }
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: var(--font-display);
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-subtitle {
    color: var(--c-text-muted);
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    z-index: 5;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1350px;
    margin: 0 auto;
    z-index: 2;
    isolation: isolate;
    mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%, black 75%, transparent 100%);
    padding: 3rem 0;
    overflow: visible;
    cursor: grab;
    perspective: 2000px;
}

.carousel-wrapper:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 2.5rem;
    width: max-content;
    will-change: transform;
    padding-left: 50vw;
    pointer-events: auto;
    transform-style: preserve-3d;
}

.card-wrapper {
    width: 380px;
    height: 520px;
    flex-shrink: 0;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    perspective: 1200px;
}

.service-card {
    width: 100%;
    height: 100%;
    background-color: #050505;
    border-radius: 30px;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    transform: rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1);
}

.card-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    filter: grayscale(100%);
    transition: all 0.6s var(--ease-smooth);
    z-index: 0;
}

.service-content {
    position: relative;
    z-index: 5;
    transform: translateZ(0);
    transition: transform 0.4s var(--ease-elastic);
}

.service-icon-box {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s var(--ease-smooth);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-smooth);
}

.service-card p {
    color: #9CA3AF;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-smooth);
}

.service-details {
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.5s var(--ease-smooth);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0;
}

.detail-item {
    color: #E0E0E0;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s var(--ease-smooth);
}

.detail-item i {
    color: var(--c-accent-cyan);
    font-size: 1rem;
}

.service-card.hover-active {
    border-color: var(--c-accent-blue);
    box-shadow: inset 0 0 30px rgba(51, 102, 255, 0.15), 0 0 20px rgba(51, 102, 255, 0.5), 0 0 60px rgba(51, 102, 255, 0.3);
}

.service-card.hover-active .card-bg-img {
    opacity: 0.6;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.service-card.hover-active .service-content {
    transform: translateZ(40px);
}

.service-card.hover-active .service-icon-box {
    background: var(--c-accent-blue);
    box-shadow: 0 0 20px var(--c-accent-glow);
    transform: translateY(-10px) scale(1.1);
}

.service-card.hover-active h3 {
    transform: translateY(0);
}

.service-card.hover-active p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.service-card.hover-active .service-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.service-card.hover-active .detail-item {
    opacity: 1;
    transform: translateX(0);
}

.service-card.hover-active .detail-item:nth-child(1) {
    transition-delay: 0.2s;
}

.service-card.hover-active .detail-item:nth-child(2) {
    transition-delay: 0.3s;
}

.service-card.hover-active .detail-item:nth-child(3) {
    transition-delay: 0.4s;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s var(--ease-smooth), transform 0.1s var(--ease-elastic);
}

.nav-arrow:hover {
    background: var(--c-accent-blue);
    border-color: var(--c-accent-blue);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(51, 102, 255, 0.4);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.9);
}

.nav-arrow.click-anim {
    animation: buttonPulse 0.4s ease-out;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(51, 102, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(51, 102, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(51, 102, 255, 0);
    }
}

#prev-btn {
    left: 4rem;
}

#next-btn {
    right: 4rem;
}

.nav-glow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.2s var(--ease-smooth);
}

.glow-left {
    left: -100px;
    background: radial-gradient(circle, rgba(51, 102, 255, 0.3) 0%, transparent 70%);
}

.glow-right {
    right: -100px;
    background: radial-gradient(circle, rgba(51, 102, 255, 0.3) 0%, transparent 70%);
}

/* --- ARCHIVE --- */
.archive {
    padding: 8rem 0;
    background: #000;
    position: relative;
    z-index: 2;
}

.archive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
    z-index: 1;
}

.archive-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--c-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--c-accent-cyan);
    transition: all 0.3s var(--ease-smooth);
    transform: translateX(-50%);
}

.filter-btn:hover,
.filter-btn.active {
    color: #fff;
}

.filter-btn.active::after {
    width: 100%;
    box-shadow: 0 0 10px var(--c-accent-cyan);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    width: 100%;
}

.archive-item {
    position: relative;
    width: 100%;
    background: #0a0a0a;
    border-radius: 0;
    cursor: pointer;
    overflow: hidden;
    /* Base border is transparent/dark so the glow pops */
    border: 1px solid black;
    aspect-ratio: 16/9;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* --- THE LASER GLOW LOGIC (FROM PROTOTYPE) --- */
.archive-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1.5px;
    /* Width of the glowing border */

    /* The Glow Gradient: Uses CSS variables set by JS */
    background: radial-gradient(300px circle at var(--mouse-x) var(--mouse-y),
            rgba(51, 102, 255, 1),
            transparent 100%);

    /* The Masking Magic: Cuts out the center, leaving only the border */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.archive-item:hover::before {
    opacity: 0;
}

.archive-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.archive-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border-color: black;
}

.archive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-smooth), filter 0.5s ease;
    filter: grayscale(100%) contrast(1.1) brightness(0.8);
}

.archive-item:hover .archive-img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1) brightness(1);
}

.archive-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 40%, transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    align-items: flex-start;
}

.archive-genre {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--c-accent-cyan);
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.archive-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    transform: translateY(10px);
    transition: transform 0.6s var(--ease-smooth);
}

.archive-item:hover .archive-title {
    transform: translateY(0);
}

.archive-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;
    transition: all 0.8s var(--ease-smooth);
}

.archive-item:hover .archive-bubbles {
    opacity: 1;
    transform: translateY(0);
    max-height: 150px;
    margin-top: 10px;
}

.archive-item:hover,
.archive-item.active-focus {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border-color: black;
}

/* 2. Image: Grayscale to Color */
.archive-item:hover .archive-img,
.archive-item.active-focus .archive-img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1) brightness(1);
}

/* 3. Title: Slide Up */
.archive-item:hover .archive-title,
.archive-item.active-focus .archive-title {
    transform: translateY(0);
}

/* 4. Tags/Bubbles: Reveal */
.archive-item:hover .archive-bubbles,
.archive-item.active-focus .archive-bubbles {
    opacity: 1;
    transform: translateY(0);
    max-height: 150px;
    margin-top: 10px;
}

.bubble-tag {
    font-size: 0.75rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* --- IMMERSIVE CONTACT SECTION --- */
.contact {
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-intro {
    text-align: center;
    position: relative;
    z-index: 2;
    transition: all 0.8s ease;
}

.contact-intro h2 {
    font-family: var(--font-display);
    font-size: 4rem;
    color: #fff;
    margin-bottom: 1rem;
}

.contact-intro p {
    font-size: 1.1rem;
    color: var(--c-text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* Modal Overlay - Full Screen Fade */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s var(--ease-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(51, 102, 255, 0.15) 0%, transparent 60%);
    z-index: -1;
}

.modal-container {
    width: 1200px;
    max-width: 90%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    transform: translateY(40px);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

/* Left Side Content inside Modal */
.modal-left {
    text-align: left;
}

.modal-left.fade-out {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s ease;
}

.modal-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--c-accent-cyan);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    color: #fff;
    margin-bottom: 1.5rem;
}

.modal-desc {
    font-size: 1rem;
    color: var(--c-text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
    max-width: 400px;
}

.modal-connect-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.connect-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.connect-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.connect-link {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    width: max-content;
}

.connect-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--c-accent-cyan);
    transition: width 0.4s var(--ease-smooth);
}

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

/* Right Side: Glass Panel Card (EXACT REPLICA + FORM) */
.glass-form-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2rem;
    /* Was 2.5rem */
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.1);
    opacity: 0;
    will-change: transform, opacity;
}

/* The Apple Animation Class */
.glass-form-card.mac-open {
    transition: transform 0.6s var(--ease-mac-window), opacity 0.4s ease;
    transform: scale(1);
    opacity: 1;
}

.glass-form-card.mac-close {
    transition: transform 0.5s var(--ease-mac-window), opacity 0.3s ease;
    transform: scale(0.1);
    opacity: 0;
}

/* Maximized State */
.glass-form-card.maximized {
    position: absolute;
    width: 95vw;
    height: 95vh;
    z-index: 1000 !important;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) !important;
    transform-origin: center center !important;
    opacity: 1 !important;
}

/* Focus Mode for Modal Content (Hides siblings) */
.modal-focus-mode>*:not(.maximized) {
    opacity: 0 !important;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.glass-form-card.maximized .panel-content {
    max-width: 500px;
    margin: 0 auto;
    padding-top: 5vh;
}

.panel-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    /* Was 2.5rem */
}

.panel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.6);
    opacity: 1;
    transition: transform 0.2s;
}

.panel-dot::before {
    content: '';
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: sans-serif;
    font-weight: 700;
}

.glass-form-card:hover .panel-dot::before {
    opacity: 1;
}

.red {
    background: #FF5F56;
    cursor: pointer;
}

.red::before {
    content: '×';
    font-size: 10px;
}

.yellow {
    background: #FFBD2E;
    cursor: pointer;
}

.yellow::before {
    content: '−';
    font-size: 10px;
}

.green {
    background: #27C93F;
    cursor: pointer;
}

.green::before {
    content: '+';
    font-size: 9px;
}

.panel-title-card {
    font-family: var(--font-display);
    font-size: 1.6rem;
    /* Was 1.8rem */
    margin-bottom: 0.5rem;
    color: #fff;
}

.panel-sub-card {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    margin-bottom: 1.2rem;
    /* Was 2rem */
}

/* NEW: Form Row to keep inputs side-by-side */
.form-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.form-row .form-input-box {
    flex: 1;
}

/* Inputs styled like the Clipboard Box */
.form-input-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    /* Was 1rem 1.5rem */
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    /* Was 1rem */
    transition: all 0.3s ease;
}

.form-input-box:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--c-accent-cyan);
}

.form-field {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--c-text-muted);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    outline: none;
}

.form-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

textarea.form-field {
    resize: none;
    height: 75px;
    /* Was 100px */
}

/* Footer inside card */
.panel-footer {
    margin-top: 1.2rem;
    /* Was 2rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #444;
    text-transform: uppercase;
}

/* Main Content Blur Effect */
#main-wrapper.dimmed {
    filter: blur(10px) grayscale(80%) brightness(0.5);
    transition: filter 1s ease;
    pointer-events: none;
}

/* Mobile Adjustments for Modal */
@media (max-width: 900px) {
    .modal-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        overflow-y: auto;
        max-height: 90vh;
        padding: 1rem;
    }

    .modal-left {
        text-align: center;
    }

    .modal-connect-group {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 0;
        padding-top: 1.5rem;
        align-items: center;
    }
}

/* --- FOOTER STYLES --- */
footer {
    background: #030303;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12rem 0 4rem;
    color: var(--c-text-muted);
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

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

.footer-brand h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 300px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-col h5 {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

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

.footer-links a {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--c-accent-cyan);
    padding-left: 5px;
}

.footer-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
}

.footer-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.footer-btn {
    background: transparent;
    border: none;
    color: var(--c-accent-cyan);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.footer-btn:hover {
    transform: translateX(3px);
}

.footer-bottom {
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    font-size: 1.2rem;
    color: var(--c-text-muted);
    transition: color 0.3s;
}

.social-icon:hover {
    color: #fff;
}

@media (max-width: 768px) {

    /* Stack form row items nicely on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

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

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

.modal-overlay:not(.active) .nav-toggle-btn {
    pointer-events: none !important;
}

/* --- SUCCESS MODAL SPECIFIC --- */
#success-modal .modal-container {
    grid-template-columns: 1fr;
    /* Override the 2-column grid */
    height: auto;
    pointer-events: none;
    /* Let clicks pass to overlay if not on card */
}

#success-window {
    pointer-events: auto;
    /* Re-enable clicks on the card */
    margin: 0 auto;
}


/* ========================================================= */
/* --- MOBILE RESPONSIVENESS OVERRIDES (ADDED) --- */
/* ========================================================= */

@media (max-width: 1024px) {

    /* Tablet adjustments */
    .hero-title {
        font-size: 5rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
        /* Stack about text and grid on smaller laptops */
        gap: 3rem;
    }

    .about-text {
        position: static;
        margin-bottom: 2rem;
    }

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

    .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {

    .archive-item::before {
        display: none !important;
    }

    /* --- RESET & GLOBAL --- */
    .container {
        padding: 0 1.5rem;
    }

    .section-title {
        font-size: 3rem;
    }

    /* --- NAVIGATION --- */
    /* Ensure nav button is ALWAYS visible on mobile, not just scroll */
    .nav-toggle-btn {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: scale(1) !important;
        right: 1.5rem;
    }

    .logo {
        opacity: 1;
        animation: none;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: black;
        opacity: 0.9;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        margin-right: 0;
        z-index: 900;
    }

    /* This class will be toggled via JS */
    .nav-links.mobile-menu-active {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.5rem;
        opacity: 1;
        animation: none;
    }

    header.scrolled {
        /* Reset default background */
        background: transparent !important;

        /* Gradient: Visible at Bottom (0%) -> Disappears at Top (100%) */
        background-image: linear-gradient(to top,
                rgba(5, 5, 5, 1) 10%,
                /* Solid dark color at the bottom */
                rgba(5, 5, 5, 0.6) 60%,
                /* Semi-visible middle */
                rgba(5, 5, 5, 0) 100%
                /* Completely transparent at top */
            ) !important;

        /* Soft blur to blend it smoothly */
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;

        /* Remove sharp borders so the gradient looks clean */
        border-bottom: none !important;
        box-shadow: none !important;
    }

    /* --- HERO --- */
    .hero-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-title {
        font-size: clamp(3rem, 10vw, 4rem);
        line-height: 1.1;
    }

    .hero-text {
        font-size: 1rem;
        max-width: 100%;
    }

    .btn {
        padding: 1rem 2rem;
        width: 100%;
        justify-content: center;
    }

    /* --- ABOUT --- */
    .about-layout {
        grid-template-columns: 1fr;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    /* Remove spans, stack vertically */
    .about-text h2 {
        font-size: 2.5rem;
    }

    /* --- SERVICES (CAROUSEL) --- */
    .carousel-wrapper {
        padding-left: 0;
        mask-image: none;
        -webkit-mask-image: none;
        overflow: visible;
    }

    /* Hide arrows on mobile, use swipe */
    #prev-btn,
    #next-btn {
        display: none;
    }

    /* Card size on mobile */
    .card-wrapper {
        width: 85vw;
        /* 85% of screen width */
        height: 480px;
    }

    .service-card {
        padding: 2rem;
    }

    /* --- ARCHIVE --- */
    .archive-grid {
        grid-template-columns: 1fr;
        /* 1 column grid */
        gap: 20px;
    }

    .archive-controls {
        gap: 1rem;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    /* --- MODALS --- */
    .modal-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        height: 100%;
        overflow-y: auto;
        align-items: flex-start;
        padding-top: 4rem;
    }

    .modal-left {
        text-align: center;
        margin-bottom: 2rem;
    }

    .modal-title {
        font-size: 2.5rem;
    }

    .glass-form-card {
        width: 100%;
    }

    /* Split rows in content (About Modal) */
    .split-row {
        flex-direction: column;
        gap: 2rem !important;
        margin-bottom: 3rem !important;
    }

    /* FIX: Reverse specific rows on mobile so Text is on top of Image */
    .split-row.mobile-reverse {
        flex-direction: column-reverse;
    }

    /* FIX: Force Center Alignment for text in split-rows on mobile */
    .split-row>div {
        text-align: center !important;
        /* Override inline styles like text-align: right */
        width: 100%;
    }

    /* Ensure images/cards are centered */
    .split-row .glass-form-card {
        margin: 0 auto;
    }

    .modal-close-wrapper {
        top: 1rem !important;
        right: 1rem !important;
    }

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

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

/* ========================================= */
/* --- HERO MOBILE GLOW UPDATES --- */
/* ========================================= */

.hero-mobile-glow {
    display: none;
}

@media (max-width: 768px) {

    #hero-bg {
        display: none !important;
    }

    .hero-mobile-glow {
        display: block;
        /* CHANGE THIS FROM ABSOLUTE TO FIXED */
        position: fixed;

        /* Adjust centering for fixed positioning */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);

        width: 100vw;
        height: 100vw;
        max-width: 600px;
        max-height: 600px;

        background: radial-gradient(circle, var(--c-accent-blue) 0%, rgba(51, 102, 255, 0.2) 60%, transparent 70%);
        filter: blur(60px);

        /* Ensure it stays behind everything */
        z-index: 0;

        opacity: 0;
        pointer-events: none;

        /* Use a slightly different animation so it doesn't conflict with the scroll transform */
        animation: mobileHeroGlowEnter 1.5s var(--ease-smooth) forwards;
        animation-delay: 0.2s;
    }
}

/* Updated Keyframes */
@keyframes mobileHeroGlowEnter {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    100% {
        opacity: 0.8;
        /* Max opacity */
        transform: translate(-50%, -50%) scale(1.0);
    }
}

/* ========================================= */
/* --- MOBILE STICKY STACK SERVICES (FINAL STYLE) --- */
/* ========================================= */

.mobile-services-container {
    display: none;
}

@media (max-width: 768px) {

    .services {
        overflow: visible !important;
        padding-bottom: 6rem;
    }

    .carousel-container {
        display: none !important;
    }

    .mobile-services-container {
        display: block;
        width: 100%;
        padding: 0 1.5rem;
        position: relative;
        z-index: 5;
        margin-top: 2rem;
    }

    .mobile-services-wrapper {
        display: flex;
        flex-direction: column;
        padding-bottom: 10vh;
    }

    /* 1. WRAPPER */
    .mobile-stack-card {
        position: sticky;
        /* Top & Z-Index set via JS */
        height: 420px;
        width: 100%;
        margin-bottom: 2rem;
        perspective: 1000px;
    }

    /* 2. INNER CARD */
    .mobile-stack-card .service-card {
        width: 100%;
        height: 100%;
        border-radius: 24px;
        background-color: #050505;

        /* Base Border (Gray/Transparent) */
        border: 1px solid rgba(255, 255, 255, 0.1);

        padding: 2rem;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        position: relative;
        overflow: hidden;

        /* Shadow pointing DOWN (casts shadow on card below) */
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);

        /* Fade Out / Scale Down State */
        opacity: 0;
        transform: translateY(100px) scale(0.85);

        transition:
            opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
            transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
            border-color 0.4s ease,
            box-shadow 0.4s ease;
    }

    /* FADE IN STATE */
    .mobile-stack-card.in-view .service-card {
        opacity: 1;
        transform: translateY(0) scale(0.92);
    }

    /* Background Image */
    .mobile-stack-card .card-bg-img {
        opacity: 0.2;
        filter: grayscale(100%);
        transform: scale(1);
        transition: opacity 0.5s ease, filter 0.1s linear, transform 0.5s ease;
    }

    .mobile-stack-card .service-content {
        position: relative;
        z-index: 5;
    }

    .mobile-stack-card h3 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        color: #fff;
    }

    .mobile-stack-card p {
        font-size: 0.95rem;
        opacity: 0.8;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 0;
    }

    .mobile-stack-card .service-icon-box {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        margin-bottom: 1rem;
        transition: all 0.4s ease;
    }

    .mobile-stack-card .service-details {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        overflow: hidden;
        transition: all 0.5s ease;
    }

    /* --- BLOOM / ACTIVE STATE (UPDATED DESIGN) --- */

    .mobile-stack-card.mobile-active .service-card {
        transform: translateY(0) scale(1);
        /* Full Size */

        /* 1. Border Color */
        border-color: var(--c-accent-blue);

        /* 2. Complex Shadow */
        box-shadow:
            /* INNER GLOW (Blue) - Creates the "Inside Bloom" */
            inset 0 0 30px rgba(51, 102, 255, 0.3),

            /* INNER BORDER HIGHLIGHT (Sharper Blue line inside) */
            inset 0 0 0 1px rgba(51, 102, 255, 0.4),

            /* DROP SHADOW (Black) - Falls onto the card below */
            0 30px 60px rgba(0, 0, 0, 1.0);
    }

    .mobile-stack-card.mobile-active .card-bg-img {
        opacity: 0.5;
        filter: grayscale(0%);
        transform: scale(1.1);
    }

    .mobile-stack-card.mobile-active .service-icon-box {
        background: var(--c-accent-blue);
        box-shadow: 0 0 20px var(--c-accent-glow);
        border-color: transparent;
        transform: translateY(-5px);
    }

    .mobile-stack-card.mobile-active .service-details {
        max-height: 300px;
        opacity: 1;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-stack-card.mobile-active .detail-item {
        opacity: 1;
        transform: translateX(0);
        margin-bottom: 0.5rem;
        display: flex;
        gap: 10px;
    }
}

/* --- 1. Fix for About & Archive Close Buttons --- */
.modal-close-icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* IMPORTANT: Stops it from floating to the top right of the screen */
    position: relative;
    z-index: 1002;
}

.modal-close-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-close-icon-btn i {
    font-size: 1.4rem;
}

/* --- 2. Hide Main Nav Button when ANY Modal is Open --- */
body.no-scroll .nav-toggle-btn {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}