:root {
    /* Pure Monochromatic & Muted Espresso Tones */
    --c-ink: #f0f0f0;
    --c-grid-line: rgba(255, 255, 255, 0.1);

    /* Liquid Glass 2.0 */
    --c-glass-bg: rgba(20, 20, 20, 0.15);
    /* Frosty */
    --c-glass-bd: rgba(255, 255, 255, 0.15);
    /* 1px sharp edge */

    /* Typography (Foundation) */
    --f-mono: 'Montserrat', sans-serif;
    --f-serif: 'Cormorant Garamond', serif;

    /* Blueprint Constants */
    --sp-side: 4vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Strict Geometry */
    border-radius: 0 !important;
    box-shadow: none !important;
    /* Zero Glow */
}

/* Lenis Required Config */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    /* Animated Breathable Mesh Gradient */
    background: linear-gradient(120deg, #0a0a0b, #151614, #181413, #0d0e0f);
    background-size: 300% 300%;
    animation: breathingMesh 20s ease-in-out infinite;

    color: var(--c-ink);
    font-family: var(--f-mono);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Global overflow block keeps horizontal scroll away */
    cursor: none;
    /* Hide default for custom cursor */
}

@keyframes breathingMesh {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===========================================================
   ADVANCED LIQUID PRELOADER
   =========================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0a0a0b;
    /* Match deepest tone of mesh gradient */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.preloader-anim-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.salon-loader-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.preloader-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--f-serif);
    text-transform: uppercase;
    letter-spacing: 0.05em; /* Starts tight, will expand */
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--c-ink);
    opacity: 0;
    text-align: center;
    white-space: nowrap;
    will-change: opacity, transform, letter-spacing;
}

/* ===========================================================
   LIQUID GLASS 2.0
   =========================================================== */
.liquid-glass {
    position: relative;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 0 !important;
}

.glass-noise-layer,
.global-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
    filter: url(#noiseFilter);
}

.global-noise {
    position: fixed;
    z-index: -1;
}

.global-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -3;
    /* Behind grid and noise */
    opacity: 0.2;
    /* Subdued 3D mesh background loop */
    mix-blend-mode: luminosity;
    pointer-events: none;
}

/* ===========================================================
   THE CUSTOM CURSOR (BUG FIX CRITICAL)
   =========================================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 5px;
    height: 5px;
    /* BUG FIXES: Transparent, No Borders, No Events */
    background: transparent !important;
    border: none !important;
    pointer-events: none !important;
    z-index: 9999;
}

.custom-cursor .cursor-fill {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 50% !important;
    /* Force true dot shape */
    /* Apply blend mode exactly here */
    mix-blend-mode: difference;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.custom-cursor.hover .cursor-fill {
    transform: scale(3.5);
}

/* ===========================================================
   EDITORIAL 12-COLUMN GRID (Visible)
   =========================================================== */
.editorial-grid-lines {
    position: fixed;
    top: 0;
    left: var(--sp-side);
    right: var(--sp-side);
    height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    pointer-events: none;
    z-index: -2;
    opacity: 0.15;
    /* Subtle newspaper column markers */
}

.editorial-grid-lines div {
    border-right: 1px solid var(--c-grid-line);
}

.editorial-grid-lines div:first-child {
    border-left: 1px solid var(--c-grid-line);
}

.twelve-col-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    padding: 0 var(--sp-side);
    gap: 0;
}

/* Span utilities for grid */
.col-span-12 {
    grid-column: span 12;
}

.col-span-portrait {
    grid-column: 2 / 5;
}

.col-span-quote {
    grid-column: 6 / 12;
}

.col-span-index {
    grid-column: 3 / 11;
}

.col-span-4 {
    grid-column: span 4;
    border: 1px solid var(--c-grid-line);
}

.col-span-5 {
    grid-column: span 5;
    border: 1px solid var(--c-grid-line);
}

.col-span-6 {
    grid-column: span 6;
    border: 1px solid var(--c-grid-line);
}

.col-span-2 {
    grid-column: span 2;
}

/* Spacer */

/* Offset layout */
.offset-down {
    margin-top: 5rem;
}

.mt-large {
    margin-top: -3rem;
}

.section-header-border {
    border-bottom: 1px solid var(--c-grid-line);
    padding-bottom: 3rem;
    margin-bottom: 5rem;
}

.flex-center {
    display: flex;
    align-items: center;
}

/* ===========================================================
   TOP NAVIGATION
   =========================================================== */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 5rem;
    padding: 1.5rem var(--sp-side);
    z-index: 1000;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border-top: none;
    border-left: none;
    border-right: none;
}

.top-nav a {
    color: var(--c-ink);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    cursor: none;
}

/* ===========================================================
   HERO SECTION
   =========================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10rem var(--sp-side) 0;
    /* Clear header collision */
    border-bottom: 1px solid var(--c-grid-line);
}

.hero-bg-wrapper {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    /* Gritty texture integration */
}

.logo-text {
    font-family: var(--f-serif);
    font-size: clamp(3.5rem, 15vw, 15rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--c-ink);
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

.logo-subtitle {
    font-family: var(--f-mono);
    font-size: clamp(0.8rem, 2.5vw, 1.6rem);
    font-weight: 300;
    letter-spacing: 0.5em;
    color: rgba(240, 240, 240, 0.6);
    text-transform: uppercase;
    text-align: center;
    margin-top: 1rem;
}

/* ===========================================================
   STICKY CTA (High Conversion)
   =========================================================== */
.sticky-cta {
    position: fixed;
    bottom: 2.5rem;
    right: var(--sp-side);
    z-index: 2000;
    padding: 1.2rem 2.5rem;
    color: var(--c-ink);
    text-decoration: none;
    font-family: var(--f-mono);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.4s ease;
    cursor: none;
    /* Visual Rhyme: Match exactly grid line */
    border: 1px solid var(--c-grid-line);
}

.sticky-cta:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===========================================================
   SECTIONS
   =========================================================== */
.section {
    padding: 12rem 0;
    border-bottom: 1px solid var(--c-grid-line);
}

.section-heading {
    font-family: var(--f-serif);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--c-ink);
}

/* ===========================================================
   AUTHORITY (Pull Quote)
   =========================================================== */
.col-span-portrait img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    outline: 1px solid var(--c-grid-line);
}

.pull-quote {
    font-family: var(--f-serif);
    font-style: italic;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.2;
    color: var(--c-ink);
    max-width: 700px;
    letter-spacing: -0.01em;
}

/* ===========================================================
   THE INDEX (Pricing Categories)
   =========================================================== */
.pricing-category-title {
    font-family: var(--f-serif);
    font-size: 1.8rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4rem;
    margin-bottom: 2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.pricing-category-title:first-child {
    margin-top: 0;
}

.pricing-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.pricing-item {
    display: flex;
    align-items: baseline;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.87);
    /* Secondary Text rule */
}

.service-leader {
    flex-grow: 1;
    border-bottom: 2px dotted #555;
    /* Classical restaurant menu leader */
    margin: 0 1rem;
    position: relative;
    top: -4px;
}

.service-price {
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
}

/* ===========================================================
   SELECTED WORKS
   =========================================================== */
.portfolio-grid-strict {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2vw;
    padding: 0 var(--sp-side);
}

.portfolio-item {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    width: 100%;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================================================
   THE PROOF (Advanced GSAP Pinning)
   =========================================================== */
.proof-pin-section {
    position: relative;
    background: transparent;
    padding-bottom: 10vh;
}

.proof-pin-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-x: clip; /* CRITICAL: Prevents mobile layout breaking / stuck scrolling */
    overflow-y: visible; 
    min-height: 100vh;
    position: relative;
}

.reviews-track {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.carousel-card {
    position: absolute;
    width: clamp(200px, 20vw, 320px);
    height: 42vh;
    padding: 0.6rem;
    will-change: transform, opacity;
    /* CRITICAL FIX FOR MOBILE: Disable blur on moving elements to prevent iOS WebKit rendering engine crash (white flashes/lag) */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(20, 20, 20, 0.95); /* Solidify background instead of blur */
}

.carousel-card:hover {
    z-index: 50;
}

/* Marquee clones only visible on mobile */
.marquee-clone {
    display: none;
}

.carousel-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    mix-blend-mode: luminosity;
    opacity: 0.87;
    /* 87 rule */
}

/* No panning CSS required, GSAP handles 3D flight mechanics */

/* ===========================================================
   UNMASKING REVEAL ANIMATION INITIATORS
   =========================================================== */
.reveal-mask {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

.reveal-mask img,
.reveal-mask video {
    transform: scale(1.15);
    /* Pull away parallax unmask */
}

/* ===========================================================
   FOOTER
   =========================================================== */
.main-footer {
    text-align: center;
    padding: 3rem 3rem 6rem; /* Extra bottom padding so sticky CTA doesn't cover content */
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    border-top: 1px solid var(--c-grid-line);
    border-bottom: none;
    border-left: none;
    border-right: none;
}

/* ===========================================================
   RESPONSIVE DESIGN
   =========================================================== */
@media (max-width: 1024px) {
    .editorial-grid-lines {
        display: none;
    }

    .twelve-col-grid {
        display: flex;
        flex-direction: column;
        gap: 4rem;
    }

    .col-span-portrait,
    .col-span-quote,
    .col-span-index,
    .portfolio-item {
        width: 100%;
        margin: 0 !important;
    }

    .carousel-card {
        margin: 0 auto;
    }
}

/* Phones & Smaller Devices */
@media (max-width: 768px) {
    .top-nav {
        gap: 1rem;
        font-size: 0.65rem;
        padding: 0.8rem;
        flex-wrap: wrap;
        text-align: center;
        background: rgba(10, 10, 11, 0.85); /* Slightly darker readable backdrop */
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .section {
        padding: 4rem 0; /* Reduced massive white space overhead */
    }

    .section-header-border {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .section-heading {
        font-size: 1.5rem; /* Smaller to breathe */
    }

    .pull-quote {
        font-size: 1.15rem;
        text-align: left;
    }

    .pricing-list {
        gap: 1rem;
    }

    .pricing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.8rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .pricing-category-title {
        font-size: 1.25rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .pricing-list .pricing-item:last-child {
        border-bottom: none;
    }

    .service-leader {
        display: none; /* Hide dots gracefully on mobile */
    }

    .service-price {
        font-size: 0.95rem;
        font-weight: 500;
        opacity: 0.7;
    }

    /* Fixed grid bursting off iPhone SE width screen */
    .portfolio-grid-strict {
        grid-template-columns: 1fr;
        gap: 6vw;
    }

    /* Full-width sticky action bar at the bottom for high conversion */
    .sticky-cta {
        left: var(--sp-side);
        text-align: center;
        bottom: 1rem;
        padding: 1rem;
        font-size: 0.75rem;
    }

    /* ===========================================================
       MOBILE REVIEWS: HORIZONTAL MARQUEE (same as DesignerWebsite 1.0)
       =========================================================== */
    .proof-pin-section {
        padding-bottom: 2rem;
    }

    .proof-pin-container {
        min-height: auto;
        overflow: hidden; /* Hide horizontal overflow for marquee */
        position: relative;
    }

    /* Fade edges */
    .proof-pin-container::before,
    .proof-pin-container::after {
        content: '';
        position: absolute;
        top: 0;
        width: 15%;
        height: 100%;
        z-index: 2;
        pointer-events: none;
    }
    .proof-pin-container::before {
        left: 0;
        background: linear-gradient(to right, #0a0a0b 0%, transparent 100%);
    }
    .proof-pin-container::after {
        right: 0;
        background: linear-gradient(to left, #0a0a0b 0%, transparent 100%);
    }

    .reviews-track {
        height: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        width: max-content;
        gap: 1rem;
        padding: 1rem 0;
        perspective: none;
        animation: mobile-marquee 30s linear infinite;
    }

    .reviews-track:active {
        animation-play-state: paused; /* Touch to pause */
    }

    @keyframes mobile-marquee {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }

    .carousel-card {
        position: relative !important;
        width: 260px !important;
        height: auto !important;
        flex-shrink: 0;
        padding: 0;
        margin: 0;
        opacity: 1 !important;
        transform: none !important;
        will-change: auto;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        overflow: visible !important;
    }

    .carousel-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .mobile-hidden {
        display: none !important;
    }

    .marquee-clone {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .reveal-mask {
        clip-path: none;
    }
}