/* ========================================
   KONCEPT INTERIORS — Pure CSS
   Zero bloat, GPU-accelerated, buttery smooth
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0a182e;
    --navy-light: #060f1d;
    --accent: #D32F2F;
    --accent-dark: #B91C1C;
    --cream: #FAF8F5;
    --beige: #E9E7E2;
    --white: #ffffff;
    --text: #0a192f;
    --text-muted: #475569;
    --text-white: #ffffff;
    --text-white-muted: #94A3B8;
    --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html.lenis,
html.lenis body {
    height: auto;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Container --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* --- Typography --- */
.label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--text);
}

.section-heading em {
    font-style: italic;
    font-weight: 500;
}

.section-heading-white {
    color: var(--text-white);
}

.body-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    /* Converted to premium gradient */
    color: var(--white);
    /* box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4); */
    transform: translateY(0);
    transition: all 0.3s ease;
    will-change: transform;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    /* box-shadow: 0 15px 35px rgba(239, 68, 68, 0.5); */
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
}

/* --- Reveal Animation (initial hidden state) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
}

/* ========================================
   HEADER
   ======================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    /* width: 100%; */
    margin-top: 1rem;
    width: 90%;
    border-radius: 10px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.02);
    /* Translucent glass fallback */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Premium glassmorphism border */
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06); */
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: filter 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

#header.scrolled .logo-img {
    filter: none;
    animation: logoReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes logoReveal {
    0% {
        transform: scale(0.92) rotate(-2deg);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05) rotate(0.5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Reverse animation when going back to transparent */
#header:not(.scrolled) .logo-img {
    animation: logoInvert 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes logoInvert {
    0% {
        transform: scale(1.04);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-desktop {
    display: flex;
    gap: 2.2rem;
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 2px;
    text-decoration: none;
}

.nav-link::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 0;
    background: #ef4444;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

#header.scrolled .nav-link {
    color: var(--text);
}

#header.scrolled .nav-link:hover {
    color: var(--accent);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    background: var(--accent);
    color: var(--white);
    border-radius: 4px;
    /* transition: background 0.3s ease, box-shadow 0.3s ease; */
}

.btn-cta:hover {
    background: var(--accent-dark);
    /* box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25); */
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}

.hamburger span:last-child {
    width: 16px;
}

#header.scrolled .hamburger span {
    background: var(--text);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    border-radius: 10px;
    margin-top: 10px;
    top: 100%;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem) 2rem;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);

    /* Animation initial state */
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.5s;
}

.mobile-menu.open {
    clip-path: inset(0 0 0% 0);
    visibility: visible;
}

.mobile-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease, opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) {
    transition-delay: 0.05s;
}

.mobile-menu.open .mobile-link:nth-child(2) {
    transition-delay: 0.1s;
}

.mobile-menu.open .mobile-link:nth-child(3) {
    transition-delay: 0.15s;
}

.mobile-menu.open .mobile-link:nth-child(4) {
    transition-delay: 0.2s;
}

.mobile-link:hover {
    color: var(--accent);
}

.mobile-cta {
    text-align: center;
    margin-top: 0.5rem;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu.open .mobile-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.25s;
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    /* Gradients stay here — applied over the pseudo-element bg */
    background:
        linear-gradient(to top, rgba(10, 24, 46, 0.9) 0%, transparent 40%),
        linear-gradient(to right, rgba(10, 24, 46, 0.7) 15%, transparent 60%);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Blurred background image lives here, isolated from content */
.hero::before {
    content: '';
    position: absolute;
    inset: -10px;
    /* slightly oversize to hide blur edges */
    background: url('https://ik.imagekit.io/konceptinteriors/Koncept/hero-bg-mobile.webp') center 30% / cover no-repeat;
    opacity: 0.9;
    /* filter: blur(3px); */
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5.5rem;
    align-items: center;
    padding-top: 76px;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* have to turn this into two in mobile devices */
    order: 1;
}

.hero-heading {
    font-family: var(--font-serif);
    font-size: 70px;
    /* rotate: -5deg; */
    transform: translateX(-10px);
    /* Dominant typographical upgrade */
    font-weight: 500;
    color: white;
    line-height: 1.1;
    /* Tighter line-height for contrast */
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.hero-heading em {
    display: flex;
    flex-direction: row;
    font-style: italic;
    font-weight: 500;
    color: #e5e0d8;
    opacity: 0.95;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pm-scroller-track-text {
    color: #e5e0d8;
    font-style: italic;
    font-weight: 500;
    height: 1.3em;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.pm-scroller {
    display: inline-block;
    height: 1.3em;
    /* Increased height to accommodate descenders (g, y, p) */
    overflow: hidden;
    vertical-align: middle;
    position: relative;
    padding-left: 0.4rem;
    padding-bottom: 0.1em;
    /* Safety gap for italic tails */
    margin-top: -0.1em;
}

.pm-scroller-track {
    display: flex;
    flex-direction: column;
    animation: pm-text-scroll 10s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}

/* .pm-scroller-track span {
    display: block;
    height: 1.1em;
    color: var(--accent);
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
} */

@keyframes pm-text-scroll {

    0%,
    20% {
        transform: translateY(0);
    }

    25%,
    45% {
        transform: translateY(-20%);
    }

    50%,
    70% {
        transform: translateY(-40%);
    }

    75%,
    95% {
        transform: translateY(-60%);
    }

    100% {
        transform: translateY(-80%);
    }
}

.hero-sub {
    color: var(--text-white-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 460px;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Hero Divider */
.hero-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 2.2rem 0 2rem 0;
    width: 100%;
    transform-origin: left;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    color: var(--white);
    flex-wrap: wrap;
    width: 100%;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.hero-stat-item h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1;
}

.hero-stat-item p {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

.hero-stat-trust {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding-left: 2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-trust .stars {
    display: flex;
    gap: 4px;
}

.hero-stat-trust .stars svg {
    width: 14px;
    height: 14px;
    fill: #FBBF24;
}

.hero-stat-trust span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Hero Stamp */
.hero-stamp {
    position: absolute;
    top: -3%;
    right: -3%;
    z-index: 100;
    width: 150px;
    height: 150px;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
}

.stamp-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: rotateStamp 12s linear infinite;
}

.stamp-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

@keyframes rotateStamp {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Decorative Stars */
.decorative-star {
    position: absolute;
    color: var(--white);
    opacity: 0.1;
    pointer-events: none;
    animation: floatStar 4s ease-in-out infinite alternate;
    z-index: 10;
}

.decorative-star svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.ds-1 {
    rotate: 15deg;
    top: 0%;
    left: -10%;
    width: 100px;
    height: 100px;
}

.ds-2 {
    bottom: 25%;
    left: 2%;
    width: 24px;
    height: 24px;
    animation-delay: -2s;
}

.ds-3 {
    top: 15%;
    left: 45%;
    width: 18px;
    height: 18px;
    animation-delay: -1s;
}

/* @keyframes floatStar {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        transform: translateY(-10px) rotate(15deg) scale(1.1);
    }
} */

/* --- Hero Stacked Cards --- */
.hero-cards {
    position: relative;
    width: 110%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* order :1 */
    order: 2;
}

.hero-card {
    position: absolute;
    width: 88%;
    height: 88%;
    border-radius: 20px;
    overflow: hidden;
    /* Layered Box Shadow Core Glow */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
    will-change: transform, opacity;
    /* Pro Dev Touch */
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
    z-index: 2;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* z-index managed by JS for card flipping */
.hero-card-1 {
    z-index: 3;
}

.hero-card-2 {
    z-index: 2;
    cursor: pointer;
}

.hero-card-3 {
    z-index: 1;
    cursor: pointer;
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: pulse-fade 2.5s ease-in-out infinite;
    z-index: 10;
}

.scroll-pill {
    width: 20px;
    height: 30px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.scroll-pill::before {
    content: '';
    position: absolute;
    top: 6px;
    width: 4px;
    height: 4px;
    background: var(--white);
    border-radius: 50%;
    animation: scroll-dot 2s infinite;
}

@keyframes scroll-dot {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

@keyframes pulse-fade {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.9;
    }
}

/* ========================================
   ABOUT
   ======================================== */
.about {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.about-text .section-heading {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--accent);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    display: inline;
}

.stat-suffix {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ========================================
   FOUNDER
   ======================================== */
.founder {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--white);
    position: relative;
}

.founder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.founder-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s ease;
    aspect-ratio: 4/5;
}

.founder-image:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Owner portrait — always visible underneath */
.founder-image .founder-img-tag {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    z-index: 1;
}

/* Team image — hidden by default, revealed on hover with panning */
.founder-image .founder-team-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    opacity: 0;
    z-index: 2;
}

.founder-image:hover .founder-team-img {
    opacity: 1;
    animation: founderTeamPan 8s ease-in-out infinite alternate;
}

@keyframes founderTeamPan {
    0% {
        object-position: left center;
    }

    100% {
        object-position: right center;
    }
}

/* JS adds this on mouseleave to freeze position during fade-out */
.founder-image .founder-team-img.no-animate {
    animation: none !important;
}

.founder-image-overlay {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    pointer-events: none;
    z-index: 3;
}

.founder-text .section-heading {
    margin-bottom: 0.5rem;
}

.founder-role {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.founder-quote {
    position: relative;
    padding-left: 2rem;
    border-left: 3px solid var(--accent);
    margin-bottom: 2rem;
}

.founder-quote .quote-icon {
    position: absolute;
    top: -15px;
    left: -15px;
    color: rgba(211, 47, 47, 0.1);
    z-index: -1;
    width: 60px;
    height: 60px;
}

.founder-quote .body-text {
    font-family: var(--font-serif);
    /* font-size: clamp(0.95rem, 2vw, 1.35rem); */
    line-height: 1.6;
    color: var(--text);
    font-style: italic;
    margin-bottom: 0;
}

.founder-text .body-text {
    /* font-size: clamp(0.88rem, 1.5vw, 1.05rem); */
    line-height: clamp(1.6, 2vw, 1.75);
}

/* --- Founder Responsive: Tablet portrait --- */
@media (max-width: 900px) {
    .founder-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .founder-image {
        max-width: 70%;
        aspect-ratio: 3/4;
    }
}

/* --- Founder Responsive: Mobile --- */
@media (max-width: 768px) {
    .founder {
        padding: clamp(3.5rem, 8vw, 5rem) 0;
    }

    .founder-grid {
        gap: 2rem;
    }

    .founder-image {
        max-width: 100%;
        aspect-ratio: 4/5;
        border-radius: 12px;
    }

    .founder-quote {
        padding-left: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* --- Founder Responsive: Small phones --- */
@media (max-width: 480px) {
    .founder-image {
        border-radius: 10px;
    }

    .founder-quote {
        padding-left: 1rem;
    }
}

/* Disable team image hover on touch devices */
@media (hover: none) {
    .founder-image .founder-team-img {
        display: none;
    }
}


/* ========================================
   SERVICES
   ======================================== */
.services {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--cream);
}

.section-header {
    margin-bottom: 3rem;
}

/* --- Services Gallery Layout (Grid) --- */
.services-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
}

.services-gallery-grid-2 {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 2.5rem;
    padding-top: 1rem;
    padding-bottom: 3rem;
    margin-top: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

/* --- Portfolio Header & Navigation Arrows --- */
.portfolio-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.portfolio-nav {
    display: flex;
    gap: 0.75rem;
}

.portfolio-nav-btn {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1.5px solid rgba(10, 25, 47, 0.1);
    background: var(--white);
    color: rgba(10, 25, 47, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.portfolio-nav-btn:hover {
    border-color: rgba(10, 25, 47, 0.2);
    color: rgba(10, 25, 47, 0.5);
    transform: scale(1.05);
}

.portfolio-nav-btn--active {
    background: rgba(211, 47, 47, 0.06);
    border-color: rgba(211, 47, 47, 0.2);
    color: var(--accent);
}

.portfolio-nav-btn--active:hover {
    background: rgba(211, 47, 47, 0.12);
    border-color: rgba(211, 47, 47, 0.55);
    color: var(--accent-dark);
}

@media (max-width: 768px) {
    .portfolio-nav {
        display: none;
    }
}

.services-gallery-grid-2::-webkit-scrollbar {
    display: none;
}

.services-gallery-grid-2 .sg-card {
    flex: 0 0 400px;
    scroll-snap-align: start;
}

/* Showcase (Large Card) */
.sg-showcase {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: default;
}

.sg-card-large {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    min-height: 500px;
}

.sg-carousel {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.sg-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.sg-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s var(--ease-smooth);
    will-change: opacity;
}

.sg-slide.active {
    opacity: 1;
}

.sg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.2) 35%,
            transparent 70%);
    pointer-events: none;
    z-index: 2;
}

.sg-showcase-title {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2rem 2.25rem;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--white);
    z-index: 3;
    transition: opacity 0.4s ease;
}

/* Dot Indicators */
.sg-dots {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.sg-dot {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sg-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: none;
}

.sg-dot.active {
    background: rgba(255, 255, 255, 0.2);
}

.sg-dot.active::after {
    animation: dotProgress 3s linear forwards;
}

@keyframes dotProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.sg-dot.visited::after {
    width: 100%;
    background: var(--accent);
    transition: none;
}

/* Zoom Button */
.sg-zoom-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 4;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.sg-zoom-btn:hover {
    background: rgba(220, 38, 38, 0.6);
    border-color: rgba(220, 38, 38, 0.4);
    transform: scale(1.08);
}

/* Small Service Cards */
.sg-thumbs-slider {
    display: contents;
    /* Behaves like it doesn't exist for CSS Grid in desktop */
}

.sg-thumb {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    min-height: 240px;
    transition: transform 0.4s var(--ease-smooth), box-shadow 0.4s ease;
}

.sg-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-smooth);
}

.sg-thumb:hover img {
    transform: scale(1.08);
}

.sg-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sg-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 100%);
    pointer-events: none;
    transition: background 0.3s ease;
}

.sg-thumb:hover .sg-thumb-overlay {
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.15) 50%,
            transparent 100%);
}

.sg-thumb-title {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.8rem 1.1rem;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    z-index: 2;
}

/* Active thumb ring */
.sg-thumb.sg-thumb-active {
    box-shadow: inset 0 0 0 2px var(--accent), 0 4px 16px rgba(220, 38, 38, 0.2);
}

.sg-thumb.sg-thumb-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent);
    border-radius: 14px;
    pointer-events: none;
    z-index: 5;
}

/* Swap animation */
.sg-showcase.sg-swapping {
    animation: showcaseSwap 0.5s var(--ease-smooth);
}

@keyframes showcaseSwap {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    40% {
        opacity: 0;
        transform: scale(0.97);
    }

    60% {
        opacity: 0;
        transform: scale(1.01);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Zoom Overlay --- */
.sg-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}

.sg-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sg-zoom-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sg-zoom-close:hover {
    background: rgba(220, 38, 38, 0.5);
    border-color: rgba(220, 38, 38, 0.4);
    transform: rotate(90deg);
}

.sg-zoom-container {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.sg-zoom-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.4s var(--ease-smooth);
    transform: scale(0.92);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.sg-zoom-overlay.active .sg-zoom-img {
    transform: scale(1);
}

/* ========================================
   PORTFOLIO
   ======================================== */
.portfolio {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--cream);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.portfolio-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    min-height: 260px;
}

.portfolio-tall {
    grid-row: 1 / 3;
    min-height: 540px;
}

.portfolio-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-smooth);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-cat {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.55rem;
}

.portfolio-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--white);
    font-weight: 500;
}

/* ========================================
   TESTIMONIALS
   ======================================== */
.testimonials {
    padding: clamp(5rem, 10vw, 8rem) 0 0;
    background: var(--beige);
    overflow: hidden;
    /* Important to keep marquee from scrolling x-axis on body */
}

.testimonials-slider-wrap {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.testimonials-track {
    display: flex;
    width: max-content;
    gap: 2rem;
    padding: 1rem 2rem 2rem 0;
    padding-bottom: 8rem;
    /* padding-right 2rem fixes the math so 3 sets = perfectly 1/3 string length */
    animation: marquee 40s linear infinite;
}

.testimonials-slider-wrap:hover .testimonials-track {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    /* Moves exactly 1/3 of the width perfectly looping 3 identical sets */
    100% {
        transform: translateX(-33.333333%);
    }
}

.testimonial-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    width: 420px;
    flex-shrink: 0;
    /* Default looks normal on mobile without transform */
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease, box-shadow 0.6s ease;
}

@media (min-width: 769px) {
    .testimonial-card {
        /* Desktop: initially scaled down and translucent when not in the center */
        transform: scale(0.85);
        opacity: 0.4;
    }

    .testimonial-card.center-active {
        transform: scale(1.02);
        opacity: 1;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    }

    .testimonial-card.center-active:hover {
        transform: scale(1.05) translateY(-4px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    }
}

.quote-icon {
    color: var(--accent);
    opacity: 0.7;
    margin-bottom: 1.25rem;
}

.testimonial-text {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-style: normal;
    font-weight: 500;
    color: var(--navy-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 1.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ========================================
   CONTACT
   ======================================== */
.contact {
    padding: clamp(5rem, 10vw, 8rem) 0;
    background: var(--navy);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}

.contact-sub {
    color: var(--text-white-muted);
    font-size: 1.05rem;
    line-height: 1.625;
    margin: 1.5rem 0 3rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}

.contact-label-sm {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.15rem;
}

.contact-value {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    gap: 1.5rem;
}

#contact-form input,
#contact-form select,
#contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    padding: 0.85rem 0;
    outline: none;
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

#contact-form select {
    cursor: pointer;
    color: var(--white);
}

#contact-form select:invalid {
    color: rgba(255, 255, 255, 0.28);
}

#contact-form select option {
    background: var(--navy);
    color: var(--white);
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-bottom-color: var(--accent);
}

#contact-form textarea {
    resize: none;
    min-height: 100px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--navy-light);
    padding: clamp(3rem, 6vw, 5rem) 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1.25rem;
    border-radius: 5px;
    /* filter: brightness(0) invert(1); */
}

.footer-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.92rem;
    line-height: 1.25;
}

.footer-links h3 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

/* ========================================
   BACK TO TOP
   ======================================== */
.whatsapp-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4); */
    z-index: 1000;
}

.whatsapp-fab.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.whatsapp-fab:hover {
    transform: scale(1.1);
}

.whatsapp-fab svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ========================================
   PROJECTS GRID & CARDS
   ======================================== */
.projects-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    gap: 2.5rem;
    padding-top: 1rem;
    padding-bottom: 3rem;
    margin-top: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.projects-grid::-webkit-scrollbar {
    display: none;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/5;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    background: var(--bg-alt);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    flex: 0 0 400px;
    /* Default desktop width */
    scroll-snap-align: start;
}

@media (max-width: 1024px) {
    .projects-grid {
        gap: 2rem;
    }

    .project-card {
        flex: 0 0 320px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        gap: 1.25rem;
        padding: 0 1.5rem 2rem 1.5rem;
        margin: 2rem -1.5rem 0 -1.5rem;
    }

    .project-card {
        flex: 0 0 82%;
        scroll-snap-align: center;
    }
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(16, 24, 32, 0.8) 0%, transparent 100%);
    pointer-events: none;
}

.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-card-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.project-card-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
    width: 56px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}

.project-card-indicator::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), var(--accent));
    animation: indicator-shimmer 2.5s ease-in-out infinite;
}

@keyframes indicator-shimmer {
    0% {
        left: -50%;
    }

    100% {
        left: 130%;
    }
}

/* Image count badge on project cards */
.project-card-count {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 50px;
    height: 50px;
    font-size: 1.72rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-sans);

    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0;
}

/* ========================================
   PROJECT MODAL & DRAWER (MOBILE)
   ======================================== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #faf8f5;
    /* clean light bg */
    z-index: 9999;
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.5s step-end;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-modal.open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.pm-header {
    background: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pm-close {
    background: none;
    border: none;
    padding: 0.5rem;
    margin-left: -0.5rem;
    cursor: pointer;
    color: #1a1a1a;
}

.pm-header-titles {
    margin-left: 1rem;
    flex: 1;
}

.pm-header-titles .label {
    margin-bottom: 0.2rem;
    font-size: 0.65rem;
}

.pm-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 500;
}

.pm-body {
    /* flex: content; */
    display: flex;
    margin-top: 20%;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* padding-bottom: 15vh; */
    /* leave room for drawer */
}

/* Horizontal Gallery */
.pm-gallery {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
}

.pm-gallery::-webkit-scrollbar {
    display: none;
    /* Chrome */
}

.pm-gallery-track {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
    width: max-content;
}

.pm-gallery-track img,
.pm-media-item {

    height: 55vh;
    width: 85vw;
    border-radius: 20px;
    scroll-snap-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: pm-shimmer 2s infinite linear;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: block;
}

.pm-media-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.1;
    transition: opacity 0.5s ease;
}

.pm-media-element.loaded {
    opacity: 1;
    animation: none;
    background: #eee;
}

.pm-media-item:has(.pm-media-element.loaded) {
    background: none;
    animation: none;
}

/* Controls Overlay */
.pm-media-controls {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

/* Show controls only on hover for desktop, or on tap for devices that support it */
@media (hover: hover) {
    .pm-media-item:hover .pm-media-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Mobile: Show controls briefly or via active state */
@media (hover: none) {
    .pm-media-item.active .pm-media-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

.pm-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pm-control-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.pm-fs-toggle {
    align-self: flex-end;
}

.pm-audio-toggle {
    align-self: flex-end;
}

.pm-audio-toggle .unmute-icon {
    display: none;
}

.pm-audio-toggle.unmuted .unmute-icon {
    display: block;
}

.pm-audio-toggle.unmuted .mute-icon {
    display: none;
}

@keyframes pm-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Bottom Pull-up Drawer */
.pm-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    background: rgba(10, 24, 46, 0.85);
    /* Premium Glassmorphism */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 40px 40px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    /* Subtle inner glow */
    color: white;
    z-index: 10;
    /* Peek position: only header visible */
    transform: translateY(calc(100% - 60px));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.4);
}

.pm-drawer.dragging {
    transition: none;
    /* remove transition when dragging with finger */
}

/* Smooth lock transitions */
.pm-drawer.peeking {
    transform: translateY(calc(100% - 60px));
}

.pm-drawer.full-open {
    transform: translateY(0%);
}

.pm-drawer-header {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1.5rem;
    cursor: grab;
}

.pm-drawer-header:active {
    cursor: grabbing;
}

.pm-drawer-pill {
    width: 65px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.pm-drawer-header:hover .pm-drawer-pill {
    background: rgba(255, 255, 255, 0.45);
}

.pm-drawer-content {
    padding: 1.5rem 2.8rem 4rem;
    /* More breathable padding */
    height: calc(100% - 80px);
    overflow-y: auto;
}

.pm-drawer-content::before {
    content: "PROJECT DETAILS";
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 1.2rem;
    opacity: 0.85;
}

#pm-desc {
    font-family: var(--font-sans);
    font-size: 1.08rem;
    line-height: 1.8;
    color: #f1f5f9;
    /* Pure premium white */
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* --- Desktop Masonry Redesign --- */
body.modal-open {
    overflow: hidden !important;
    height: 100vh;
    height: 100dvh;
}

@media (min-width: 1025px) {
    .project-modal {
        overflow-y: auto;
        display: block;
        /* Change from flex to block to allow sticky headers to work predictably */
        overscroll-behavior: contain;
    }

    .pm-header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: rgba(250, 248, 245, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 1.5rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .pm-close {
        padding: 0.75rem;
        transition: transform 0.3s ease;
    }

    .pm-close:hover {
        transform: scale(1.1);
        color: var(--accent);
    }

    .pm-body {
        margin-top: 0;
        padding: 3rem clamp(2rem, 5vw, 6rem);
        max-width: 1400px;
        margin: 0 auto;
    }

    .pm-gallery {
        overflow: visible;
        scroll-snap-type: none;
    }

    .pm-gallery-track {
        display: block;
        column-count: 3;
        column-gap: 2rem;
        width: 100% !important;
        max-width: none;
        padding: 0;
    }

    .pm-media-item {
        width: 100% !important;
        height: auto !important;
        margin-bottom: 2rem;
        break-inside: avoid;
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.5s ease;
        opacity: 1 !important;
    }

    .pm-media-element {
        height: auto !important;
        width: 100% !important;
        opacity: 1 !important;
    }

    /* Fullscreen Master Fix */
    .pm-media-item:fullscreen,
    .pm-media-item:-webkit-full-screen,
    .pm-media-item:-ms-fullscreen {
        width: 100vw !important;
        height: 100vh !important;
        display: flex !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        align-items: center !important;
        justify-content: center !important;
        background: #000 !important;
    }

    .pm-media-item:fullscreen .pm-media-element,
    .pm-media-item:-webkit-full-screen .pm-media-element {
        position: relative;
        max-width: 90% !important;
        max-height: 90% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        margin: auto !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
        border-radius: 4px;
        display: block;
    }

    .pm-media-item:fullscreen .pm-media-controls {
        opacity: 0;
        background: transparent !important;
        /* Remove dark wash in fullscreen */
    }

    .pm-media-item:fullscreen:hover .pm-media-controls {
        opacity: 1;
    }

    /* Keep icons visible in fullscreen but background clear */
    .pm-media-item:fullscreen .pm-control-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .pm-video-audio-toggle.unmuted .mute-icon {
        display: none;
    }

    .pm-gallery-track img:hover,
    .pm-video-wrapper:hover {
        cursor: pointer;
    }

    .pm-drawer {
        display: none !important;
    }

    .pm-dots,
    .pm-drawer-overlay {
        display: none !important;
    }
}

/* --- Project Modal Zoom Overlay --- */
.pm-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 24, 46, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.pm-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.pm-zoom-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pm-zoom-close:hover {
    background: rgba(220, 38, 38, 0.5);
    border-color: rgba(220, 38, 38, 0.4);
    transform: rotate(90deg);
}

.pm-zoom-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-zoom-content img,
.pm-zoom-content video {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .hero {
        /* Gradients only — background image handled via ::before */
        background: linear-gradient(to bottom, rgba(10, 24, 46, 0.1), rgba(10, 24, 46, 0.55));
        padding: 5rem 0;
    }

    .hero::before {
        background: url('https://ik.imagekit.io/konceptinteriors/Koncept/hero-bg-mobile.webp') center / cover no-repeat;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 80px;
    }

    .hero-content {
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .ds-1 {
        top: 10% !important;
        left: 70% !important;
        width: 80px !important;
        height: 80px !important;
    }

    .hero-sub {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btns {
        justify-content: center;
        width: 100%;
    }

    .hero-btns a {
        width: 100%;
    }

    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-stat-trust {
        padding-left: 0;
        border-left: none;
        align-items: center;
    }

    .hero-stamp {
        display: none;
    }

    .hero-cards {
        display: none;
        /* Minimal mockup style */
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .services-gallery-grid {
        /* grid-template-columns: 1fr 1fr; */
    }

    .sg-card-large {
        grid-column: 1 / 3;
        min-height: 360px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .portfolio-tall {
        grid-row: auto;
        min-height: 300px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .nav-desktop,
    .btn-cta:not(.mobile-cta) {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-grid {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .hero-heading {
        font-size: 2.2rem;
    }

    .hero-cards {
        height: 320px;
    }

    .hero-card {
        width: 78%;
        height: 78%;
        border-radius: 14px;
    }

    .hero-card::after {
        border-radius: 14px;
    }

    .services-gallery-grid {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .sg-card-large {
        width: 100%;
        min-height: 380px;
    }



    .sg-thumbs-slider {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding-bottom: 1rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Bleed out of container */
        margin-right: calc(-1 * clamp(1.5rem, 4vw, 3rem));
        padding-right: clamp(1.5rem, 4vw, 3rem);
    }

    .sg-thumbs-slider::-webkit-scrollbar {
        display: none;
    }

    .sg-thumb {
        flex: 0 0 75%;
        scroll-snap-align: start;
        min-height: 220px;
    }

    .sg-showcase-title {
        font-size: 1.5rem;
        padding: 1.5rem 1.25rem;
    }

    .sg-thumb-title {
        font-size: 1.05rem;
        padding: 1rem 1.2rem;
    }

    .sg-dots {
        bottom: .5rem;
        padding: 6px 12px;
    }

    .sg-dot {
        width: 24px;
        height: 3px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-track {
        width: 100%;
        animation: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Padding matching the page layout so cards aren't flush against viewport edges */
        padding: 1rem clamp(1.5rem, 4vw, 3rem) 2rem;
    }

    .testimonials-track::-webkit-scrollbar {
        display: none;
    }

    .testimonial-card {
        width: 80vw;
        max-width: 320px;
        padding: 1.5rem;
        scroll-snap-align: center;
        cursor: pointer;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-heading {
        font-size: 2.8rem;
    }

    .section-heading {
        font-size: 1.875rem;
        letter-spacing: -0.025em;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

    .stat-number,
    .stat-suffix {
        font-size: 2rem;
    }

    .sg-card-large {
        min-height: 300px;
    }

    .sg-thumb {
        flex: 0 0 85%;
        min-height: 200px;
    }
}

/* Lenis core styles */
.lenis.lenis-smooth {
    scroll-behavior: auto !important
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain
}

.lenis.lenis-stopped {
    overflow: hidden
}

.lenis.lenis-smooth iframe {
    pointer-events: none
}