/* ================================================
   TSROW STUDIO — $100K TIER CSS
   ================================================ */

:root {
    /* Colors */
    --black: #0a0a0a;
    --white: #f5f5f5;
    --white-muted: rgba(245, 245, 245, 0.6);
    --accent: #ffffff;
    /* Monochrome White */
    --accent-alt: #cccccc;
    /* Monochrome Gray */
    --grid-line: rgba(255, 255, 255, 0.06);

    /* Typography */
    --font-display: 'Syncopate', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    /* Spacing */
    --gutter: clamp(20px, 4vw, 60px);
    --section-padding: clamp(80px, 15vh, 200px);

    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: initial;
    /* Let Lenis handle */
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.5;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

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

.accent {
    color: var(--accent);
}

/* ================================================
   WEBGL CANVAS BACKGROUND
   ================================================ */
#gl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* Opacity handled in JS or via color output */
}

/* ================================================
   LAYER 2: FILM GRAIN + PAPER OVERLAY
/* ================================================
   BACKGROUNDS & FX
   ================================================ */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Deep background */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

/* ECLIPSE GLOW UTILITIES */
.glow-text {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.18), 0 0 10px rgba(255, 255, 255, 0.06);
}

.hero-title,
.about-statement h2,
.section-title {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.14);
}

/* Spotlights behind text */
.hero-content,
.about-statement,
.section-header {
    position: relative;
    /* Ensure z-index stack works for pseudo */
    z-index: 1;
}

.hero-content::before,
.about-statement::before,
.section-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    z-index: -1;
    /* Behind text, above void */
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    filter: blur(40px);
    pointer-events: none;
    opacity: 0.7;
}

/* Grain Overlay */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: overlay;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
    animation: noiseShift 0.5s steps(10) infinite;
}

/* Subtle moving light sweep */
.bg-overlay::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    animation: lightDrift 20s linear infinite;
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -5%);
    }

    20% {
        transform: translate(-10%, 5%);
    }

    30% {
        transform: translate(5%, -10%);
    }

    40% {
        transform: translate(-5%, 15%);
    }

    50% {
        transform: translate(-10%, 5%);
    }

    60% {
        transform: translate(15%, 0);
    }

    70% {
        transform: translate(0, 10%);
    }

    80% {
        transform: translate(-15%, 0);
    }

    90% {
        transform: translate(10%, 5%);
    }

    100% {
        transform: translate(5%, 0);
    }
}

@keyframes lightDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-10%, -5%) rotate(180deg);
    }

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

/* ================================================
   PRELOADER
   ================================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.preloader-logo {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow: hidden;
}

.preloader-logo .char {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.preloader-progress {
    width: 0%;
    height: 100%;
    background: var(--accent);
}

.preloader-count {
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--white-muted);
}

/* ================================================
   CUSTOM CURSOR
   ================================================ */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-ball {
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s var(--ease-out-expo), width 0.3s, height 0.3s;
}

.cursor-label {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translate(-50%, 6px);
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.45s var(--ease-out-expo);
}

body.cursor-hover .cursor-ball {
    width: 80px;
    height: 80px;
}

body.cursor-hover .cursor-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Hide on touch */
@media (hover: none) {
    .cursor {
        display: none;
    }
}

/* ================================================
   UI FRAME (Fixed Elements)
   ================================================ */
.ui-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    padding: var(--gutter);
}

.ui-frame>* {
    pointer-events: auto;
}

.ui-header {
    position: absolute;
    top: var(--gutter);
    left: var(--gutter);
    right: var(--gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo sup {
    font-size: 0.5em;
    vertical-align: super;
}

.main-nav {
    display: flex;
    gap: clamp(20px, 3vw, 50px);
}

.nav-link {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--white-muted);
    transition: color 0.3s;
    display: inline-block;
}

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

.nav-link span {
    display: inline-block;
}

.ui-sidebar-left {
    position: absolute;
    top: 50%;
    left: var(--gutter);
    transform: translateY(-50%);
}

.scene-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1px;
}

.scene-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.ui-sidebar-right {
    position: absolute;
    top: 50%;
    right: var(--gutter);
    transform: translateY(-50%);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.scroll-line {
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: -2.5px;
    animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {

    0%,
    100% {
        top: 0;
    }

    50% {
        top: calc(100% - 6px);
    }
}

.ui-footer {
    position: absolute;
    bottom: var(--gutter);
    left: var(--gutter);
    right: var(--gutter);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--white-muted);
}

/* ================================================
   MAIN CONTENT
   ================================================ */
#smooth-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 30px;
    margin-bottom: clamp(40px, 8vh, 100px);
}

.section-index {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--white);
    letter-spacing: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--white);
}

.section-year {
    font-size: 12px;
    color: rgba(245, 245, 245, 0.45);
}

/* ================================================
   HERO SECTION
   ================================================ */
.section-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 15vh;
}

.hero-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 11vw, 14rem);
    /* Reduced from 14vw to fit 'ENGINEERS' */
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: clamp(30px, 5vh, 60px);
    opacity: 0;
    /* Hidden initially for animation */
    width: 100%;
    /* Ensure full width for centering */
}

.hero-title .line {
    display: block;
    white-space: nowrap;
    /* Prevent intra-word breaking */
    overflow: hidden;
}

/* ... existing styles ... */

.hero-tagline {
    max-width: 50ch;
    /* Better readability length */
    margin-bottom: clamp(40px, 6vh, 80px);
    /* More space */
    opacity: 0;
    /* Hidden initially for animation */
    margin-left: auto;
    /* Center block */
    margin-right: auto;
}

.hero-tagline p {
    font-size: clamp(1rem, 1.25vw, 1.5rem);
    color: var(--white-muted);
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    opacity: 0;
    /* Hidden initially for animation */
    justify-content: center;
    /* Center button */
}

/* ... existing button styles ... */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 40px;
    border: 1px solid var(--white);
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
    transition: all 0.4s var(--ease-out-expo);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--black);
}

.btn-arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.hero-scroll-hint {
    margin-top: clamp(60px, 10vh, 120px);
    /* Dynamic spacing from content */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--white-muted);
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--white-muted), transparent);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {

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

    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* ================================================
   MARQUEE
   ================================================ */
.section-marquee {
    min-height: auto;
    padding: clamp(30px, 5vh, 60px) 0;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    overflow: hidden;
}

.marquee {
    display: flex;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    /* Animation handled in JS for smooth velocity */
    will-change: transform;
}

.marquee-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    white-space: nowrap;
    padding-right: 50px;
    color: var(--white-muted);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ================================================
   ABOUT SECTION
   ================================================ */
.section-about {
    padding: var(--section-padding) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(30px, 5vw, 80px);
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.label-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin-top: 8px;
}

.label-text {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--white-muted);
}

.about-statement h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.about-statement .line {
    display: block;
    overflow: hidden;
}

.about-description p {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--white-muted);
    line-height: 1.7;
    margin-bottom: 25px;
}

.about-bullets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 30px;
    margin: 20px 0 50px;
    color: rgba(245, 245, 245, 0.8);
}

.about-bullets li {
    position: relative;
    padding-left: 18px;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.6;
}
    .about-bullets {
        grid-template-columns: 1fr;
    }

.about-bullets li::before {
    content: '—';
    .modal-artifact-grid {
        grid-template-columns: 1fr;
    }
    position: absolute;
    left: 0;
    color: var(--accent);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    /* Reduced gap to fit content better */
    border-top: 1px solid var(--grid-line);
    padding-top: 30px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    /* Reduced from 4vw/3.5rem to prevent overflow */
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    word-break: break-word;
    /* Ensure it breaks if absolutely necessary */
}

.stat-label {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--white-muted);
}

/* ================================================
   WORK SECTION (Hover Accordion)
   ================================================ */
.section-work {
    padding: 10vh 0;
    /* Natural spacing */
    position: relative;
}

/* Quiet Section */
.section-quiet {
    min-height: 45vh;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    padding: clamp(60px, 10vh, 120px) 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
}

.quiet-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.quiet-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(245, 245, 245, 0.55);
    margin-bottom: 15px;
}

.quiet-text {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--white-muted);
    line-height: 1.6;
    max-width: 32ch;
    margin: 0 auto;
}

.work-gallery-wrapper {
    width: 100%;
    height: 70vh;
    /* Fixed height for the gallery strip */
    overflow: hidden;
    padding: 0 var(--gutter);
}

.work-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 20px;
}

.work-card {
    flex: 1;
    /* Compressed state */
    min-width: 0;
    position: relative;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
    cursor: pointer;
}

.work-card.active {
    flex: 6;
    /* Expanded state */
}

.work-card-window {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #050505;
    position: relative;
    overflow: hidden;
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.6) blur(12px);
    transition: all 0.8s ease;
    transform: scale(1.2);
}

.work-card img.img-loaded {
    /* Keep grayscale and dim but remove loading blur */
    filter: grayscale(100%) brightness(0.6) blur(5px);
}

.work-card.active img,
.work-card.active img.img-loaded {
    filter: grayscale(0%) brightness(1) blur(0px);
    transform: scale(1);
}

/* Modal hero image blur-up */
.modal-hero-img {
    filter: blur(15px);
    transition: filter 0.8s ease;
}

.modal-hero-img.img-loaded {
    filter: blur(0px);
}

.work-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.work-card.active .work-card-info {
    transform: translateY(0);
    opacity: 1;
}

.work-card-info h3 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin: 0;
    color: var(--white);
    line-height: 1;
}

.work-card-info span {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.work-card-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.work-card-links a {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    padding: 10px 20px;
    border: 1px solid var(--white);
    color: var(--white);
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}

.work-card-links a:hover {
    background: var(--white);
    color: var(--black);
}

@media (max-width: 768px) {

    /* On mobile, stack or allow horizontal scroll without accordion */
    .work-gallery-track {
        flex-direction: column;
        height: auto;
    }

    .work-card {
        height: 400px;
        flex: none;
        width: 100%;
    }

    /* Mobile touch feedback states */
    .work-card.in-view {
        transform: scale(1.01);
        box-shadow: 0 8px 32px rgba(255, 255, 255, 0.08);
    }

    .work-card.in-view img {
        filter: grayscale(0%) brightness(0.9);
    }

    .work-card.touching {
        transform: scale(0.98);
        transition: transform 0.15s ease;
    }

    .work-card.touching img {
        filter: grayscale(0%) brightness(1);
    }
}

/* ================================================
   PROCESS SECTION (Restructure: Sticky Split)
   ================================================ */
.section-process {
    padding: 15vh 0;
}

/* 2-Column Layout */
.section-process .container {
    display: grid;
    grid-template-columns: 300px 1fr;
    /* Sticky Header | List */
    gap: var(--gutter);
    align-items: start;
}

.section-process .section-header {
    position: relative;
    /* GSAP ScrollTrigger handles pinning */
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    padding-right: 40px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    align-self: start;
}

.section-process .section-title {
    font-size: clamp(2rem, 3vw, 3rem);
    margin-top: 20px;
    line-height: 1;
}

.process-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Connected list */
    margin-top: 0;
}

/* Process Step - Fixed Layout */
.process-step {
    position: relative;
    padding-left: 140px;
    /* Space for number */
    padding-top: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    background: transparent !important;
    backdrop-filter: none;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.process-step:hover {
    border-color: var(--white);
    transform: translateX(10px);
}

.process-step::before {
    display: none;
}

.step-header {
    display: block;
    /* Normal block flow */
}

.step-number {
    position: absolute;
    left: 0;
    top: 65px;
    /* Align with title's cap height */
    font-size: 14px;
    color: var(--accent);
    font-family: var(--font-display);
    width: 100px;
    /* Fixed width area */
}

.step-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 10px;
    color: var(--white);
}

.step-description {
    font-size: 16px;
    max-width: 600px;
    color: rgba(245, 245, 245, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
    .section-process .container {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .section-process .section-header {
        position: relative;
        top: 0;
        border-right: none;
        flex-direction: row;
        margin-bottom: 60px;
    }

    .process-step {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ================================================
   SERVICES SECTION
   ================================================ */
.section-services {
    padding: var(--section-padding) 0;
}

.services-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: clamp(40px, 8vw, 120px);
}

@media (max-width: 1024px) {
    .services-layout {
        grid-template-columns: 1fr;
    }
}

.services-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(30px, 4vw, 60px);
}

@media (max-width: 768px) {
    .services-list {
        grid-template-columns: 1fr;
    }
}

.category-title {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--grid-line);
}

.category-items li {
    font-size: 1rem;
    color: var(--white-muted);
    padding: 12px 0;
    border-bottom: 1px solid var(--grid-line);
    transition: color 0.3s, padding-left 0.3s;
}

.category-items li:hover {
    color: var(--white);
    padding-left: 10px;
}

.services-cta {
    margin-top: 60px;
}

.price-anchor {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    letter-spacing: 1px;
}

/* ================================================
   TESTIMONIAL SECTION
   ================================================ */
.section-testimonial {
    padding: var(--section-padding) 0;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
}

.testimonial-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 50px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.author-name {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
}

.author-role {
    font-size: 12px;
    color: var(--white-muted);
}

/* ================================================
   CONTACT SECTION
   ================================================ */
.section-contact {
    padding: var(--section-padding) 0;
    min-height: 80vh;
}

.contact-content {
    text-align: center;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 10vw, 10rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: clamp(40px, 8vh, 100px);
}

.contact-cta {
    display: flex;
    justify-content: center;
}

.contact-email {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: -0.01em;
    padding: 30px 60px;
    border: 1px solid var(--white);
    transition: all 0.4s var(--ease-out-expo);
    display: inline-block;
}

.contact-email:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
}

/* ================================================
   FOOTER
   ================================================ */
.section-footer {
    min-height: auto;
    padding: clamp(60px, 10vh, 120px) 0 clamp(30px, 5vh, 60px);
    background: #050505;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(30px, 5vw, 60px);
    margin-bottom: clamp(60px, 10vh, 120px);
}

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

.footer-heading {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--white-muted);
    margin-bottom: 25px;
}

.footer-links li {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--white-muted);
}

.footer-links a {
    transition: color 0.3s;
    display: inline-block;
}

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

.footer-newsletter p {
    font-size: 0.9rem;
    color: var(--white-muted);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-input {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: 1px solid var(--grid-line);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.newsletter-input::placeholder {
    color: var(--white-muted);
    letter-spacing: 1px;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.newsletter-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--white);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.newsletter-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--grid-line);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-legal {
    display: flex;
    gap: 30px;
    font-size: 11px;
    color: var(--white-muted);
}

.footer-legal a {
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--white);
}

.footer-marquee {
    position: absolute;
    bottom: -5vw;
    left: 0;
    display: flex;
    white-space: nowrap;
    animation: footerMarquee 40s linear infinite;
}

.footer-big-text {
    font-family: var(--font-display);
    font-size: 15vw;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
}

@keyframes footerMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ================================================
   MAGNETIC BUTTON UTILITY
   ================================================ */
.magnetic {
    display: inline-block;
}

.magnetic>span {
    display: inline-block;
    pointer-events: none;
}

/* ================================================
   MOBILE NAVIGATION
   ================================================ */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s var(--ease-out-expo);
}

.menu-toggle span:first-child {
    margin-bottom: 6px;
}

.menu-toggle span:last-child {
    margin-top: 6px;
}

/* Menu open state */
body.menu-open .menu-toggle span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-toggle span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

body.menu-open .mobile-nav {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s var(--ease-out-expo);
}

body.menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .mobile-nav-link:nth-child(1) {
    transition-delay: 0.1s;
}

body.menu-open .mobile-nav-link:nth-child(2) {
    transition-delay: 0.15s;
}

body.menu-open .mobile-nav-link:nth-child(3) {
    transition-delay: 0.2s;
}

body.menu-open .mobile-nav-link:nth-child(4) {
    transition-delay: 0.25s;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    color: var(--accent);
}

/* ================================================
   RESPONSIVE — TABLET (1024px)
   ================================================ */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-label {
        order: -1;
    }

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

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

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

    .work-item-inner {
        grid-template-columns: 60px 1fr;
        gap: 20px;
    }

    .work-meta {
        display: none;
    }

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

/* ================================================
   RESPONSIVE — MOBILE (768px)
   ================================================ */
@media (max-width: 768px) {
    :root {
        --gutter: 20px;
        --section-padding: 60px;
    }

    /* Show mobile menu toggle */
    .menu-toggle {
        display: flex;
    }

    /* Hide desktop nav */
    .main-nav {
        display: none;
    }

    .ui-sidebar-left,
    .ui-sidebar-right {
        display: none;
    }

    .hero-scroll-hint {
        display: none;
    }

    /* Header adjustments */
    .ui-header {
        top: 15px;
        left: 15px;
        right: 15px;
    }

    /* Hide fixed UI footer on mobile to prevent overlap */
    .ui-footer {
        display: none;
    }

    /* Hero - ensure no overlap with header */
    .section-hero {
        padding-top: max(100px, 20vh);
        /* Ensure space for header */
        min-height: 100svh;
        /* Use small viewport height for mobile */
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .hero-tagline {
        max-width: 100%;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 18px 30px;
    }

    /* About */
    .about-statement h2 {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .stat-number {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    /* Work */
    .work-item-inner {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 25px var(--gutter);
    }

    .work-index {
        display: none;
    }

    .work-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .work-preview {
        display: none;
        /* Hide floating preview on mobile */
    }

    /* Process */
    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-step {
        padding: 25px;
    }

    /* Services */
    .services-list {
        grid-template-columns: 1fr;
    }

    .category-items li {
        padding: 15px 0;
        font-size: 1.1rem;
    }

    /* Testimonial */
    .testimonial-quote {
        font-size: clamp(1.2rem, 5vw, 2rem);
        text-align: left;
    }

    .testimonial-author {
        text-align: left;
    }

    /* Contact */
    .contact-title {
        font-size: clamp(2rem, 10vw, 5rem);
        text-align: left;
    }

    .contact-content {
        text-align: left;
    }

    .contact-cta {
        justify-content: flex-start;
    }

    .contact-email {
        font-size: clamp(1rem, 4vw, 1.5rem);
        padding: 20px 30px;
        width: 100%;
        text-align: center;
    }

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

    .footer-col-wide {
        order: -1;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-btn {
        width: 100%;
        height: 50px;
    }

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

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .footer-marquee {
        display: none;
    }

    /* Section headers */
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    /* Marquee */
    .section-marquee {
        padding: 20px 0;
    }

    .marquee-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
}

/* ================================================
   RESPONSIVE — SMALL MOBILE (480px)
   ================================================ */
@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 14vw, 4rem);
    }

    .about-statement h2 {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }

    .work-title {
        font-size: clamp(1.2rem, 7vw, 2rem);
    }

    .process-step h3 {
        font-size: 1.2rem;
    }

    .contact-title {
        font-size: clamp(1.8rem, 12vw, 3rem);
    }

    .preloader-logo {
        font-size: clamp(2rem, 15vw, 4rem);
    }
}

/* ================================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================================ */
@media (hover: none) and (pointer: coarse) {

    /* Hide custom cursor on touch devices */
    .cursor {
        display: none;
    }

    /* Increase touch targets */
    .nav-link,
    .footer-links a,
    .mobile-nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .btn-primary {
        min-height: 50px;
    }

    .work-item-inner {
        min-height: 80px;
    }

    /* Disable hover effects that don't work on touch */
    .work-item:hover .work-item-inner {
        padding-left: var(--gutter);
        background: transparent;
    }

    .work-item:active .work-item-inner {
        background: rgba(255, 255, 255, 0.02);
    }

    /* Active states for touch feedback */
    .btn-primary:active {
        background: var(--white);
        color: var(--black);
    }

    .contact-email:active {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--black);
    }

    /* Disable magnetic effects on touch */
    .magnetic {
        transform: none !important;
    }

    .magnetic>span {
        transform: none !important;
    }
}

/* ================================================
   REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {

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

    .marquee-track,
    .footer-marquee {
        animation: none;
    }

    .scroll-dot {
        animation: none;
    }
}

/* ================================================
   LANDSCAPE MOBILE
   ================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .section-hero {
        min-height: auto;
        padding: 80px 0;
    }

    .hero-title {
        font-size: clamp(1.5rem, 8vw, 3rem);
    }

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

/* ================================================
   SAFE AREA (Notch support)
   ================================================ */
@supports (padding: max(0px)) {
    .ui-header {
        top: max(15px, env(safe-area-inset-top));
        left: max(15px, env(safe-area-inset-left));
        right: max(15px, env(safe-area-inset-right));
    }

    .ui-footer {
        bottom: max(15px, env(safe-area-inset-bottom));
        left: max(15px, env(safe-area-inset-left));
        right: max(15px, env(safe-area-inset-right));
    }

    .mobile-nav {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* ================================================
   MOBILE RESPONSIVE ENHANCEMENTS
   Added for full mobile responsiveness
   ================================================ */

/* ------------------------------------------------
   GLOBAL OVERFLOW PREVENTION
   Prevents horizontal scrolling on all devices
   ------------------------------------------------ */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Use dynamic viewport height for mobile browsers */
@supports (height: 100dvh) {

    .section-hero,
    .mobile-nav {
        min-height: 100dvh;
    }
}

/* ------------------------------------------------
   ENHANCED CONTAINER RULES
   Mobile-first max-width and padding
   ------------------------------------------------ */
.container {
    width: 100%;
    max-width: min(1600px, 100vw - (var(--gutter) * 2));
    margin: 0 auto;
    padding: 0 var(--gutter);
    box-sizing: border-box;
}

/* ------------------------------------------------
   FLUID TYPOGRAPHY IMPROVEMENTS
   Using clamp() for better scaling
   ------------------------------------------------ */
@media (max-width: 768px) {
    :root {
        /* Mobile-optimized gutter that respects safe areas */
        --gutter: clamp(16px, 5vw, 24px);
        --section-padding: clamp(48px, 12vh, 80px);
    }

    /* Ensure all text is readable on mobile */
    body {
        font-size: clamp(15px, 4vw, 16px);
        line-height: 1.6;
    }

    /* Hero section fluid typography */
    .hero-title {
        font-size: clamp(2rem, 10vw, 4.5rem);
        line-height: 0.95;
        letter-spacing: -0.03em;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-tagline p {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.6;
    }

    /* Section title fluid sizing */
    .section-title {
        font-size: clamp(1.25rem, 5vw, 2rem);
        word-break: break-word;
    }

    /* About section improvements */
    .about-statement h2 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        word-break: break-word;
    }

    .about-description p {
        font-size: clamp(0.9rem, 3.5vw, 1rem);
        margin-bottom: clamp(30px, 8vw, 50px);
    }

    /* Testimonial quote fluid sizing */
    .testimonial-quote {
        font-size: clamp(1.1rem, 4.5vw, 1.8rem);
        line-height: 1.4;
        padding: 0 clamp(8px, 2vw, 16px);
    }

    /* Contact title improvements */
    .contact-title {
        font-size: clamp(1.8rem, 8vw, 4rem);
        word-break: break-word;
        hyphens: auto;
    }

    /* Footer text sizing */
    .footer-heading {
        font-size: clamp(10px, 2.5vw, 11px);
    }

    .footer-links li {
        font-size: clamp(0.875rem, 3.5vw, 1rem);
    }
}

/* ------------------------------------------------
   WORK SECTION MOBILE IMPROVEMENTS
   Stack cards vertically with proper spacing
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-work {
        padding: clamp(48px, 10vh, 80px) 0;
    }

    .work-gallery-wrapper {
        height: auto;
        min-height: auto;
        padding: 0 var(--gutter);
        overflow-x: hidden;
    }

    .work-gallery-track {
        flex-direction: column;
        gap: clamp(16px, 4vw, 24px);
        height: auto;
    }

    .work-card {
        flex: none;
        width: 100%;
        height: clamp(280px, 60vw, 400px);
        border-radius: 8px;
        overflow: hidden;
    }

    /* On mobile, show all cards with full info visible */
    .work-card .work-card-info {
        transform: translateY(0);
        opacity: 1;
        padding: clamp(16px, 4vw, 24px);
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    }

    .work-card img {
        filter: grayscale(30%) brightness(0.8);
        transform: scale(1.05);
    }

    .work-card-info h3 {
        font-size: clamp(1.1rem, 4.5vw, 1.5rem);
    }

    .work-card-info span {
        font-size: clamp(9px, 2.5vw, 11px);
        letter-spacing: 1.5px;
    }
}

/* ------------------------------------------------
   PROCESS SECTION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-process {
        padding: clamp(48px, 10vh, 80px) 0;
    }

    .section-process .container {
        grid-template-columns: 1fr;
        gap: clamp(24px, 6vw, 40px);
    }

    .section-process .section-header {
        position: static !important;
        /* Force removal of sticky */
        top: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: clamp(16px, 4vw, 24px);
        margin-bottom: clamp(24px, 6vw, 40px);
        flex-direction: column;
        align-items: flex-start;
    }

    .section-process .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        white-space: nowrap;
        /* Prevent awkward line breaks */
        overflow: visible;
    }

    .process-step {
        padding: clamp(20px, 5vw, 40px);
        padding-left: clamp(60px, 15vw, 100px);
    }

    .step-number {
        left: clamp(8px, 2vw, 16px);
        top: clamp(24px, 6vw, 40px);
        font-size: clamp(11px, 3vw, 14px);
        width: auto;
    }

    .step-title {
        font-size: clamp(1.3rem, 5vw, 2rem);
        margin-bottom: clamp(12px, 3vw, 20px);
        line-height: 1.1;
        word-break: break-word;
    }

    .step-description {
        font-size: clamp(0.875rem, 3.5vw, 1rem);
        line-height: 1.7;
        margin-top: 0;
    }

    /* Disable hover transform on mobile for better touch experience */
    .process-step:hover {
        transform: none;
    }

    .process-step:active {
        background: rgba(255, 255, 255, 0.02);
    }
}

/* ------------------------------------------------
   SERVICES SECTION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-services {
        padding: clamp(48px, 10vh, 80px) 0;
    }

    .services-layout {
        gap: clamp(32px, 8vw, 60px);
    }

    .services-header {
        margin-bottom: clamp(24px, 6vw, 40px);
    }

    .services-list {
        gap: clamp(32px, 8vw, 48px);
    }

    .service-category {
        padding-bottom: clamp(16px, 4vw, 24px);
    }

    .category-title {
        font-size: clamp(11px, 3vw, 13px);
        margin-bottom: clamp(16px, 4vw, 24px);
        padding-bottom: clamp(10px, 2.5vw, 15px);
    }

    .category-items li {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        padding: clamp(14px, 3.5vw, 18px) 0;
        /* Larger touch targets */
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .services-cta {
        margin-top: clamp(32px, 8vw, 60px);
    }

    .price-anchor {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        text-align: center;
    }
}

/* ------------------------------------------------
   ABOUT SECTION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-about {
        padding: clamp(48px, 10vh, 80px) 0;
    }

    .about-grid {
        gap: clamp(32px, 8vw, 48px);
    }

    .about-statement h2 {
        line-height: 1.15;
        margin-bottom: clamp(16px, 4vw, 24px);
    }

    .about-description p {
        line-height: 1.7;
    }

    .about-label {
        gap: clamp(10px, 2.5vw, 15px);
    }

    .label-line {
        width: clamp(24px, 6vw, 40px);
        margin-top: 6px;
    }

    .about-stats {
        gap: clamp(20px, 5vw, 30px);
        padding-top: clamp(20px, 5vw, 30px);
    }

    .stat {
        text-align: center;
    }

    .stat-number {
        font-size: clamp(1.75rem, 8vw, 3rem);
        margin-bottom: clamp(6px, 1.5vw, 10px);
    }

    .stat-label {
        font-size: clamp(9px, 2.5vw, 11px);
    }
}

/* ------------------------------------------------
   MARQUEE MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-marquee {
        padding: clamp(16px, 4vw, 24px) 0;
    }

    .marquee-text {
        font-size: clamp(0.875rem, 3.5vw, 1.25rem);
        padding-right: clamp(24px, 6vw, 40px);
    }
}

/* ------------------------------------------------
   CONTACT SECTION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-contact {
        padding: clamp(48px, 10vh, 80px) 0;
        min-height: auto;
    }

    .contact-header {
        margin-bottom: clamp(24px, 6vw, 40px);
    }

    .contact-cta {
        width: 100%;
    }

    .contact-email {
        width: 100%;
        font-size: clamp(0.875rem, 3.5vw, 1.25rem);
        padding: clamp(16px, 4vw, 24px) clamp(20px, 5vw, 32px);
        text-align: center;
        word-break: break-all;
        /* Larger touch target */
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ------------------------------------------------
   FOOTER MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-footer {
        padding: clamp(48px, 10vh, 80px) 0 clamp(80px, 15vh, 120px);
        /* Extra bottom padding for footer UI */
    }

    .footer-grid {
        gap: clamp(32px, 8vw, 48px);
        margin-bottom: clamp(48px, 10vh, 80px);
    }

    .footer-col {
        text-align: left;
    }

    .footer-heading {
        margin-bottom: clamp(16px, 4vw, 24px);
    }

    .footer-links li {
        margin-bottom: clamp(10px, 2.5vw, 14px);
        /* Touch-friendly spacing */
    }

    .footer-links a {
        /* Larger touch target */
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 4px 0;
    }

    .footer-newsletter p {
        font-size: clamp(0.8rem, 3vw, 0.9rem);
        margin-bottom: clamp(14px, 3.5vw, 20px);
    }

    .newsletter-form {
        gap: clamp(8px, 2vw, 12px);
    }

    .newsletter-input {
        padding: clamp(14px, 3.5vw, 18px) clamp(14px, 3.5vw, 18px);
        font-size: clamp(0.875rem, 3.5vw, 1rem);
        /* Prevent iOS zoom on focus */
        font-size: 16px;
    }

    .newsletter-btn {
        width: 100%;
        height: clamp(48px, 12vw, 56px);
        min-height: 48px;
        font-size: clamp(1rem, 4vw, 1.25rem);
    }

    .footer-bottom {
        gap: clamp(16px, 4vw, 24px);
    }

    .footer-logo {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .footer-legal {
        gap: clamp(12px, 3vw, 20px);
        font-size: clamp(9px, 2.5vw, 11px);
    }

    .footer-legal span {
        text-align: center;
        width: 100%;
    }

    .footer-legal a {
        /* Touch-friendly */
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 4px 8px;
    }
}

/* ------------------------------------------------
   HEADER & NAVIGATION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .ui-frame {
        padding: clamp(12px, 3vw, 16px);
    }

    .ui-header {
        top: clamp(12px, 3vw, 16px);
        left: clamp(12px, 3vw, 16px);
        right: clamp(12px, 3vw, 16px);
    }

    .logo {
        font-size: clamp(12px, 3.5vw, 16px);
        /* Touch-friendly */
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .menu-toggle {
        width: clamp(44px, 11vw, 56px);
        height: clamp(44px, 11vw, 56px);
        /* Guaranteed touch target */
        min-width: 44px;
        min-height: 44px;
    }

    .menu-toggle span {
        width: clamp(20px, 5vw, 28px);
    }

    /* Mobile Nav Overlay improvements */
    .mobile-nav {
        padding-top: clamp(80px, 20vw, 120px);
    }

    .mobile-nav-links {
        gap: clamp(20px, 5vw, 32px);
        width: 100%;
        padding: 0 var(--gutter);
    }

    .mobile-nav-link {
        font-size: clamp(1.75rem, 7vw, 3rem);
        width: 100%;
        text-align: center;
        /* Touch-friendly */
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: clamp(8px, 2vw, 12px) 0;
    }

    /* UI Footer on mobile */
    .ui-footer {
        bottom: clamp(12px, 3vw, 16px);
        left: clamp(12px, 3vw, 16px);
        right: clamp(12px, 3vw, 16px);
        font-size: clamp(8px, 2.5vw, 10px);
        flex-wrap: wrap;
    }

    .time-display,
    .velocity-display {
        font-size: clamp(8px, 2.5vw, 10px);
    }
}

/* ------------------------------------------------
   PRELOADER MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .preloader-inner {
        gap: clamp(24px, 6vw, 40px);
        padding: 0 var(--gutter);
    }

    .preloader-logo {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .preloader-bar {
        width: clamp(120px, 40vw, 200px);
    }

    .preloader-count {
        font-size: clamp(11px, 3vw, 14px);
    }
}

/* ------------------------------------------------
   BUTTON MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: clamp(16px, 4vw, 22px) clamp(24px, 6vw, 36px);
        font-size: clamp(10px, 3vw, 12px);
        /* Touch target */
        min-height: 52px;
    }

    .btn-arrow {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

/* ------------------------------------------------
   HERO SECTION MOBILE IMPROVEMENTS
   ------------------------------------------------ */
@media (max-width: 768px) {
    .section-hero {
        padding-top: clamp(100px, 25vh, 150px);
        padding-bottom: clamp(60px, 15vh, 100px);
        min-height: 100svh;
    }

    .hero-content {
        padding: 0 var(--gutter);
    }

    .hero-title .line {
        /* Allow text to wrap properly on very small screens */
        white-space: normal;
        word-break: break-word;
    }

    .hero-tagline {
        max-width: 100%;
        margin-bottom: clamp(32px, 8vw, 56px);
    }

    .hero-cta {
        width: 100%;
    }
}

/* ------------------------------------------------
   VERY SMALL SCREENS (360px and below)
   ------------------------------------------------ */
@media (max-width: 360px) {
    :root {
        --gutter: 12px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 11vw, 2.5rem);
    }

    .about-statement h2 {
        font-size: clamp(1.25rem, 7vw, 2rem);
    }

    .contact-title {
        font-size: clamp(1.5rem, 9vw, 2.5rem);
    }

    .testimonial-quote {
        font-size: clamp(0.95rem, 4vw, 1.5rem);
    }

    .work-card {
        height: clamp(220px, 55vw, 300px);
    }

    .mobile-nav-link {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
    }

    .contact-email {
        font-size: clamp(0.75rem, 3.5vw, 1rem);
        padding: clamp(14px, 3.5vw, 18px);
    }
}

/* ------------------------------------------------
   ENHANCED iOS SAFE AREA SUPPORT
   ------------------------------------------------ */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .ui-header {
            padding-top: max(var(--gutter), env(safe-area-inset-top));
            padding-left: max(var(--gutter), env(safe-area-inset-left));
            padding-right: max(var(--gutter), env(safe-area-inset-right));
        }

        .section-footer {
            padding-bottom: max(clamp(80px, 15vh, 120px), calc(env(safe-area-inset-bottom) + 60px));
        }

        .ui-footer {
            padding-bottom: max(8px, env(safe-area-inset-bottom));
        }

        .mobile-nav {
            padding-top: max(100px, calc(env(safe-area-inset-top) + 80px));
            padding-bottom: max(40px, env(safe-area-inset-bottom));
            padding-left: max(var(--gutter), env(safe-area-inset-left));
            padding-right: max(var(--gutter), env(safe-area-inset-right));
        }

        .section-hero {
            padding-top: max(clamp(100px, 25vh, 150px), calc(env(safe-area-inset-top) + 80px));
        }

        .container {
            padding-left: max(var(--gutter), env(safe-area-inset-left));
            padding-right: max(var(--gutter), env(safe-area-inset-right));
        }
    }
}

/* ------------------------------------------------
   TABLET SPECIFIC IMPROVEMENTS (768px - 1024px)
   ------------------------------------------------ */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --gutter: clamp(24px, 4vw, 40px);
    }

    .hero-title {
        font-size: clamp(3rem, 9vw, 6rem);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: clamp(32px, 6vw, 56px);
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .work-gallery-wrapper {
        height: clamp(50vh, 60vh, 70vh);
    }

    .work-card {
        min-width: 80px;
    }

    .services-list {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(24px, 4vw, 40px);
    }

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

    .contact-email {
        font-size: clamp(1.25rem, 3vw, 2rem);
    }
}

/* ------------------------------------------------
   ORIENTATION SPECIFIC STYLES
   ------------------------------------------------ */
@media (max-width: 768px) and (orientation: portrait) {
    .section-hero {
        min-height: 100svh;
    }

    .work-card {
        height: clamp(250px, 45vw, 350px);
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .section-hero {
        min-height: auto;
        padding: clamp(60px, 15vh, 100px) 0;
    }

    .hero-title {
        font-size: clamp(1.5rem, 6vw, 3rem);
    }

    .mobile-nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: clamp(16px, 4vw, 24px);
    }

    .mobile-nav-link {
        font-size: clamp(1.25rem, 4vw, 2rem);
        width: auto;
        padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 24px);
    }

    .work-card {
        height: clamp(200px, 40vh, 280px);
    }
}

/* ------------------------------------------------
   MOBILE ANIMATION PERFORMANCE OPTIMIZATIONS
   Preserves animations but optimizes for mobile GPU
   ------------------------------------------------ */
@media (max-width: 768px) {

    /* Use GPU-accelerated properties */
    .work-card,
    .work-card img,
    .work-card-info,
    .process-step,
    .mobile-nav-link,
    .btn-primary,
    .contact-email,
    .marquee-track {
        will-change: transform, opacity;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    /* Slightly reduce animation complexity on mobile for better performance */
    .bg-overlay::after {
        animation-duration: 30s;
        /* Slower for less CPU usage */
    }

    /* Reduce grain animation frequency on mobile */
    .bg-overlay {
        animation: noiseShift 1s steps(5) infinite;
    }
}

/* ------------------------------------------------
   FOCUS STATES FOR ACCESSIBILITY
   ------------------------------------------------ */
@media (max-width: 768px) {

    .nav-link:focus-visible,
    .mobile-nav-link:focus-visible,
    .btn-primary:focus-visible,
    .contact-email:focus-visible,
    .footer-links a:focus-visible,
    .newsletter-input:focus-visible,
    .newsletter-btn:focus-visible,
    .logo:focus-visible,
    .menu-toggle:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 4px;
    }
}

/* ================================================
   MODAL SYSTEM (Case Study + Contact Form)
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    padding: var(--gutter);
}

.modal-overlay.active {
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: #0e0e0e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-container--form {
    max-width: 600px;
}

.modal-scroll {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    /* Crucial for flex child scrolling */
    padding-right: 4px;
    /* Prevent scrollbar overlap visual */
    overscroll-behavior: contain;
    /* Prevent chaining */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.modal-scroll::-webkit-scrollbar {
    width: 4px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* Close Button */
.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    z-index: 1000;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .modal-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.3);
    }
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-close span {
    position: absolute;
    width: 18px;
    height: 1.5px;
    background: var(--white);
}

.modal-close span:first-child {
    transform: rotate(45deg);
}

.modal-close span:last-child {
    transform: rotate(-45deg);
}

/* Hero Image */
.modal-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.modal-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, #0e0e0e, transparent);
    pointer-events: none;
}

/* Modal Body */
.modal-body {
    padding: clamp(30px, 6vw, 60px);
}

.modal-header {
    margin-bottom: 40px;
}

.modal-category {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    display: block;
    margin-bottom: 15px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 15px;
}

.modal-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: rgba(245, 245, 245, 0.65);
    line-height: 1.6;
    max-width: 60ch;
}

/* Stats Row */
.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 30px 0;
    border-top: 1px solid var(--grid-line);
    border-bottom: 1px solid var(--grid-line);
    margin-bottom: 40px;
}

.modal-stat-value {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.modal-stat-label {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--white-muted);
}

.modal-disciplines {
    margin: 0 0 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-label {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(245, 245, 245, 0.6);
}

.modal-discipline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-discipline-tags .tech-tag {
    color: rgba(245, 245, 245, 0.8);
}

/* Content Sections */
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 50px;
}

.modal-grid .modal-section {
    margin-bottom: 0;
}

.modal-grid p {
    max-width: 38ch;
}

.modal-section {
    margin-bottom: 0;
}

.modal-section h3 {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--grid-line);
}

.modal-section p {
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: rgba(245, 245, 245, 0.6);
    line-height: 1.7;
}

.modal-results {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: rgba(245, 245, 245, 0.85);
}

.modal-results li {
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
}

.modal-results li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.modal-artifact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.modal-artifact {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b0b0b;
    padding: 12px;
}

.modal-artifact img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-artifact span {
    display: block;
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(245, 245, 245, 0.6);
}

@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-grid p {
        max-width: 100%;
    }
}

/* Tech Tags */
.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--white-muted);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    border-color: var(--accent);
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

/* ================================================
   LEAD CAPTURE FORM STYLES
   ================================================ */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--white-muted);
}

.form-input {
    padding: 16px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
    border-color: var(--accent);
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-select option {
    background: #0e0e0e;
    color: var(--white);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}

.btn-submit {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.btn-submit:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Form Success State */
.form-success {
    display: none;
    text-align: center;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-success.visible {
    display: block;
}

.form-success-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 15px;
    color: var(--accent);
}

.form-success p {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--white-muted);
    line-height: 1.6;
}

/* Contact CTA Layout (email + button side by side) */
.contact-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn-open-form {
    background: transparent;
}

/* ================================================
   MODAL RESPONSIVE STYLES
   ================================================ */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-container {
        max-height: 95vh;
        border-bottom: none;
    }

    .modal-hero {
        height: 250px;
    }

    .modal-body {
        padding: clamp(24px, 5vw, 40px);
    }

    .modal-stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }

    .modal-stat-value {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
        margin-bottom: 0;
    }

    .modal-title {
        font-size: clamp(1.25rem, 5vw, 2rem);
    }

    .modal-close {
        top: 12px;
        right: 12px;
    }

    .tech-tag {
        font-size: 9px;
        padding: 6px 12px;
    }

    /* Form responsive */
    .form-input {
        font-size: 16px;
        /* Prevent iOS zoom */
        padding: 14px 16px;
    }

    .form-select {
        font-size: 16px;
    }
}

/* ================================================
   PAGE TRANSITION OVERLAY
   ================================================ */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
}

.transition-panel {
    width: 50%;
    height: 100%;
    background: var(--black);
    transform: scaleY(0);
    transform-origin: bottom;
    will-change: transform;
}

.transition-panel--left {
    transform-origin: bottom;
}

.transition-panel--right {
    transform-origin: top;
}

/* ================================================
   ENHANCED SCROLL REVEAL ANIMATIONS
   ================================================ */

/* Service Categories - Staggered Reveal */
.service-category {
    opacity: 0;
    transform: translateY(40px);
}

.service-category.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

/* Footer Links - Staggered Reveal */
.footer-col {
    opacity: 0;
    transform: translateY(30px);
}

.footer-col.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

/* Work Card Image Reveal */
.work-card-window {
    overflow: hidden;
}

.work-card-window img {
    transition: transform 0.8s var(--ease-out-expo), filter 0.6s ease;
}

.work-card.img-revealed .work-card-window img {
    clip-path: inset(0 0 0 0);
}

/* Animated Lines - Draw Effect */
.step-line,
.label-line {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s var(--ease-out-expo);
}

.step-line.drawn,
.label-line.drawn {
    transform: scaleX(1);
}

/* ================================================
   MICRO-INTERACTIONS
   ================================================ */

/* Button Press Effect */
.btn-primary:active,
.newsletter-btn:active,
.modal-close:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* Nav Link Underline Slide */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-out-expo);
}

.nav-link:hover::after {
    transform: translateX(0);
}

/* Footer Link Hover */
.footer-links a {
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-expo);
}

.footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Form Input Focus Glow */
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05),
        0 0 20px rgba(255, 255, 255, 0.1);
}

/* Newsletter Input Focus */
.newsletter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Work Card Hover Enhancement */
.work-card {
    transition: transform 0.5s var(--ease-out-expo);
}

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

/* Stat Number Glow on Count */
.stat-number.counting {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
}

/* Contact Email Hover Glow */
.contact-email:hover {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

/* Section Index Pulse */
.section-index {
    animation: indexPulse 3s ease-in-out infinite;
}

@keyframes indexPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Testimonial Quote Fade */
.testimonial-quote {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}

.testimonial-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Title Glow */
.contact-title {
    transition: text-shadow 0.5s ease;
}

.contact-title:hover {
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.18);
}

/* ================================================
   MOBILE ANIMATION RESPONSIVENESS
   Ensure animations perform identically on mobile
   ================================================ */
@media (max-width: 768px) {

    /* Page Transition - Same effect, responsive sizing */
    .page-transition {
        z-index: 9999;
    }

    /* Service/Footer reveals - Same timing */
    .service-category,
    .footer-col {
        opacity: 0;
        transform: translateY(40px);
    }

    /* Testimonial - Reduced translate for smaller viewport */
    .testimonial-quote {
        transform: translateY(20px);
    }

    /* Nav link underlines - Show on active/focus for touch */
    .nav-link:active::after,
    .nav-link:focus::after {
        transform: translateX(0);
    }

    /* Footer link underlines - Show on active/focus for touch */
    .footer-links a:active::after,
    .footer-links a:focus::after {
        transform: scaleX(1);
        transform-origin: left;
    }

    /* Work card tap feedback */
    .work-card:active {
        transform: translateY(-5px);
    }

    /* Contact email tap glow */
    .contact-email:active {
        text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    }

    /* Contact title tap glow */
    .contact-title:active {
        text-shadow: 0 0 60px rgba(255, 255, 255, 0.25);
    }
}

/* Touch devices - Use active state instead of hover */
@media (hover: none) and (pointer: coarse) {

    /* Enable underlines on tap */
    .nav-link::after,
    .footer-links a::after {
        display: block;
    }

    /* Work card active state */
    .work-card:active {
        transform: translateY(-5px);
        transition: transform 0.2s ease;
    }
}

/* ================================================
   MODAL PROJECT LINKS
   ================================================ */
.modal-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--grid-line);
}

.modal-link {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
    padding: 15px 30px;
    border: 1px solid var(--white);
    color: var(--white);
    transition: all 0.3s var(--ease-out-expo);
    text-decoration: none;
}

.modal-link:hover {
    background: var(--white);
    color: var(--black);
}