/* Base reset and Stitch support styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1c1c;
    background-color: #f9f9f9;
}

body {
    min-height: 100vh;
    background-color: #f9f9f9;
}

html {
    scroll-behavior: smooth;
}

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

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

button {
    cursor: pointer;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.hero-slide {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    opacity: 1;
}

.gold-underline,
.reveal-underline,
.service-underline,
.text-underline-gold {
    position: relative;
}

.gold-underline::after,
.reveal-underline::after,
.service-underline::after,
.text-underline-gold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #775a19;
    transition: width 0.3s ease;
}

.gold-underline:hover::after,
.reveal-underline:hover::after,
.service-underline:hover::after,
.text-underline-gold:hover::after {
    width: 100%;
}

.hairline-divider {
    height: 1px;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.1);
}

.masonry-item:nth-child(even) {
    transform: translateY(40px);
}

.luxury-transition {
    transition: all 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-card:hover .project-image,
.image-zoom-container:hover img {
    transform: scale(1.03);
}

.image-zoom-container {
    overflow: hidden;
}

.image-zoom-container img {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.grid-asymmetric {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
}

.sticky-filter {
    backdrop-filter: blur(8px);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
}

::-webkit-scrollbar-thumb {
    background: #c9c6c2;
    border-radius: 3px;
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.brand {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1a1c1c;
}

.site-nav {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.site-nav a {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5f5e5e;
    transition: color 0.25s ease;
}

.site-nav a:hover {
    color: #775a19;
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #5f5e5b;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    border-radius: 9999px;
    transition: background-color 0.25s ease;
}

.site-header__cta:hover {
    background-color: #775a19;
}

.site-main {
    min-height: calc(100vh - 128px);
}

.page-section {
    padding: 96px 0;
}

.page-section h1 {
    font-family: 'Bodoni Moda', serif;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
}

.page-section p {
    max-width: 680px;
    color: #474741;
    font-size: 1rem;
}

.site-footer {
    background: #f3f3f4;
    border-top: 1px solid rgba(26, 26, 26, 0.08);
    padding: 48px 0;
}

.site-footer__inner {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: 'Bodoni Moda', serif;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.85rem;
    color: #5f5e5e;
    transition: color 0.25s ease;
}

.footer-nav a:hover {
    color: #775a19;
}

.error-page {
    padding: 120px 0;
    text-align: center;
}

.error-page h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 24px;
}

.error-page p {
    margin-bottom: 28px;
    color: #5f5e5e;
}

.button {
    display: inline-flex;
    padding: 14px 28px;
    background: #5f5e5b;
    color: #ffffff;
    border-radius: 9999px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
}

@media (max-width: 768px) {
    .site-header__inner,
    .site-footer__inner,
    .container {
        width: calc(100% - 32px);
    }

    .site-nav {
        gap: 16px;
    }

    .masonry-item:nth-child(even) {
        transform: translateY(0);
    }

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

    .grid-asymmetric > * {
        grid-column: auto / span 1 !important;
    }

    .text-display-lg {
        font-size: clamp(2.75rem, 12vw, 4.5rem) !important;
        line-height: 1.05 !important;
    }

    .px-margin-desktop {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .left-margin-desktop {
        left: 24px !important;
    }

    .right-margin-desktop {
        right: 24px !important;
    }
}

/* ============================================================
   Hero slider — guarantee only the active slide is visible.
   Higher specificity (#id) + visibility defeats any utility
   cascade from the Tailwind Play CDN.
   ============================================================ */
#slider-container .hero-slide { opacity: 0; visibility: hidden; z-index: 0; }
#slider-container .hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }

/* ============================================================
   Mobile off-canvas navigation
   ============================================================ */
.mobile-menu { position: fixed; inset: 0; z-index: 60; visibility: hidden; pointer-events: none; }
.mobile-menu.open { visibility: visible; pointer-events: auto; }
.mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(20, 18, 15, .5); opacity: 0; transition: opacity .35s ease; }
.mobile-menu.open .mobile-menu__backdrop { opacity: 1; }
.mobile-menu__panel {
    position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 360px);
    background: #f9f9f9; box-shadow: -20px 0 50px rgba(0, 0, 0, .18);
    transform: translateX(100%); transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column; padding: 92px 32px 32px; gap: 2px;
}
.mobile-menu.open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__panel a {
    font-family: 'Bodoni Moda', serif; font-size: 1.45rem; color: #1a1c1c; text-decoration: none;
    padding: 15px 0; border-bottom: 1px solid rgba(26, 26, 26, .08); transition: color .2s ease;
}
.mobile-menu__panel a:hover { color: #775a19; }
.mobile-menu__cta {
    margin-top: 22px; border: none !important; background: #5f5e5b; color: #fff !important;
    text-align: center; border-radius: 9999px; font-family: 'DM Sans', sans-serif !important;
    font-size: .8rem !important; letter-spacing: .12em; text-transform: uppercase; padding: 17px !important;
}
.mobile-menu__close { position: absolute; top: 26px; right: 26px; background: none; border: none; cursor: pointer; color: #1a1c1c; }
body.menu-open { overflow: hidden; }

/* ============================================================
   Mobile hero layout (does not affect >= 768px)
   ============================================================ */
@media (max-width: 767px) {
    .hero-section { height: 86vh; min-height: 540px; }
    .hero-section #slider-container h1,
    .hero-section #slider-container h2 {
        font-size: clamp(38px, 12.5vw, 60px);
        line-height: 1.04;
        margin-bottom: 1.25rem;
        word-break: break-word;
    }
    .hero-section #slider-container .tracking-\[0\.4em\] { letter-spacing: .25em; font-size: 11px; }
    .hero-section .relative.z-10 { padding-left: 24px; padding-right: 24px; }
}

/* Mobile header: shrink brand so the hamburger stays on-screen (desktop unchanged) */
@media (max-width: 767px) {
    header nav > a:first-child {
        font-size: 1.15rem;
        letter-spacing: .14em;
        line-height: 1.15;
        max-width: 70vw;
    }
    #mobile-menu-toggle { flex: none; }
}

/* ============================================================
   Prevent horizontal scroll on mobile
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100%; }

/* The off-canvas menu panel is parked off-screen at translateX(100%);
   clip it at the fixed full-viewport container so it never widens the page. */
.mobile-menu { overflow: hidden; }

/* ============================================================
   Gallery masonry (these classes were undefined, so images
   rendered unconstrained and overflowed the viewport).
   ============================================================ */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 300px;
    grid-auto-flow: dense;
    gap: 24px;
}
.masonry-grid > div { overflow: hidden; }
.masonry-grid > div img { width: 100%; height: 100%; object-fit: cover; }
.masonry-item-tall { grid-row: span 2; }
.masonry-item-wide { grid-column: span 2; }
@media (max-width: 1024px) {
    .masonry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .masonry-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; gap: 16px; }
    .masonry-item-tall { grid-row: span 1; }
    .masonry-item-wide { grid-column: span 1; }
}

/* ============================================================
   Mobile fit: shrink desktop-only padding and the 32px grid
   gutter so 12-column editorial grids fit narrow viewports
   (32px gutter * 11 gaps forced a 352px minimum width).
   Desktop (>= 768px) is unaffected.
   ============================================================ */
@media (max-width: 767px) {
    body .px-margin-desktop { padding-left: 24px !important; padding-right: 24px !important; }
}

/* ============================================================
   Scale oversized display headings on mobile so page <h1>/<h2>
   (text-display-lg = 84px, text-headline-lg = 48px) don't clip.
   `body` prefix beats the Tailwind utility regardless of load
   order; desktop (>= 768px) keeps the original sizes.
   ============================================================ */
@media (max-width: 767px) {
    body .text-display-lg { font-size: clamp(40px, 11vw, 62px); line-height: 1.06; }
    body .text-headline-lg { font-size: clamp(30px, 7.5vw, 44px); line-height: 1.12; }
}
