/* =========================================================
    GLOBAL BASE
    ========================================================= */

html, body {
    margin: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, Segoe UI, Inter, Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --splash-duration: 3000ms;
    --nav-height: 80px;
    --logo-max: 48px;
    --bg: #ffffff;
    --ink: #111;
    --accent: #d1101c;
    --sidebar-w: 240px;
    --content-pad: 40px;
    --sidebar-stack-gap: 36px;
    --sidebar-link-gap: 14px;
    --hero-left-nudge: 200px;
    --hero-bottom-space: 48px;
}

/* =========================================================
    SPLASH ANIMATION
    ========================================================= */

.splash {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    z-index: 9999;
    pointer-events: none;
    animation: splash-seq var(--splash-duration) ease forwards;
}

    .splash .logo {
        max-width: 320px;
        width: 80vw;
        height: auto;
        display: block;
        opacity: 0;
        transform: scale(.96);
        animation: logo-seq var(--splash-duration) linear forwards;
        will-change: opacity, transform;
    }

@keyframes logo-seq {
    0% {
        opacity: 0;
        transform: scale(.96);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

@keyframes splash-seq {
    0%, 95% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .splash, .logo {
        animation: none;
    }

    .splash {
        display: none;
    }
}

.skip-splash #splash {
    display: none !important;
}

/* =========================================================
    NAVIGATION
    ========================================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 72px 0 24px;
    box-sizing: border-box;
    background: var(--bg);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .brand img {
        max-height: var(--logo-max);
        width: auto;
        display: block;
    }

    .brand .tagline {
        color: #444;
        font-size: 14px;
        line-height: 1.2;
        margin-top: 4px;
        letter-spacing: .02em;
        white-space: nowrap;
        text-align: center;
    }

body.layout--sidebar .brand .tagline {
    font-size: 16px;
}

.links {
    display: flex;
    gap: 28px;
    align-items: center;
}

    .links a {
        color: inherit;
        text-decoration: none;
        opacity: .85;
        transition: opacity .2s ease;
    }

        .links a:hover {
            opacity: 1;
        }

    .links .social img {
        height: 1.3em;
        width: auto;
        display: block;
        opacity: 0.85;
        vertical-align: middle;
        transition: opacity .2s ease;
    }

        .links .social img:hover {
            opacity: 1;
        }

    .links .menu-group {
        position: relative;
    }

        .links .menu-group > a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .links .menu-group .caret {
            font-size: .9em;
            opacity: .7;
        }

    .links .submenu {
        position: absolute;
        top: 100%;
        right: 0;
        display: none;
        background: var(--bg);
        border: 1px solid rgba(0,0,0,.08);
        box-shadow: 0 6px 24px rgba(0,0,0,.12);
        padding: 8px 0;
        min-width: 200px;
        z-index: 20;
    }

        .links .submenu a {
            display: block;
            padding: 10px 14px;
            white-space: nowrap;
            color: inherit;
            text-decoration: none;
            opacity: .9;
        }

            .links .submenu a:hover {
                opacity: 1;
            }

    .links .menu-group:hover .submenu,
    .links .menu-group:focus-within .submenu {
        display: block;
    }

/* =========================================================
    LAYOUT MODES (Topbar / Sidebar)
    ========================================================= */

main {
    padding-top: var(--nav-height);
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.layout--topbar .links {
    width: auto !important;
    text-align: initial;
    align-items: center;
    gap: 28px;
}

body.layout--sidebar .nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sidebar-stack-gap);
    padding: 24px;
    box-sizing: border-box;
}

body.layout--sidebar .brand img {
    max-height: 56px;
    width: auto;
}

body.layout--sidebar .links {
    display: flex;
    flex-direction: column;
    gap: var(--sidebar-link-gap);
    text-align: right;
    align-items: flex-end;
    margin: 0 0 0 -4px;
}

    body.layout--sidebar .links .submenu {
        position: static !important;
        display: none;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        margin-top: 6px;
        width: 100%;
        text-align: left;
        align-self: stretch;
    }

    body.layout--sidebar .links .menu-group:hover .submenu,
    body.layout--sidebar .links .menu-group:focus-within .submenu {
        display: block;
    }

    body.layout--sidebar .links .submenu a {
        display: block;
        padding: 4px 0 4px 12px;
        text-align: left;
        opacity: .9;
    }

        body.layout--sidebar .links .submenu a:hover {
            opacity: 1;
        }

body.layout--sidebar main {
    margin-left: calc(var(--sidebar-w) + var(--content-pad));
    padding-top: var(--content-pad);
    padding-right: calc(var(--content-pad) * 0.6);
}

/* =========================================================
    HERO MODES
    ========================================================= */

.hero.full {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100svh - var(--nav-height));
    position: relative;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    flex-direction: column;
}

    .hero.full img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.hero.cinematic {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

    .hero.cinematic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

body.layout--sidebar .hero.full {
    width: auto;
    margin-left: var(--sidebar-w);
    padding: var(--content-pad);
    box-sizing: border-box;
}

/* =========================================================
    GALLERIES LANDING PAGE
    ========================================================= */

.page--galleries main {
    min-height: calc(100vh - var(--nav-height));
    display: grid;
    place-content: center;
    gap: 24px;
    padding: calc(var(--nav-height) + 6px) 40px 24px;
    box-sizing: border-box;
}

.gallery-landing {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 44px;
    justify-content: center;
    align-content: center;
}

    .gallery-landing .tile {
        position: relative;
        width: 310px;
        height: 560px;
        overflow: hidden;
        border-radius: 18px;
        outline: 1px solid rgba(0,0,0,.06);
        box-shadow: 0 10px 20px rgba(0,0,0,0.08);
        transition: box-shadow .3s ease, transform .3s ease;
    }

        .gallery-landing .tile img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            filter: grayscale(100%);
            transition: filter .3s ease, transform .3s ease;
        }

        .gallery-landing .tile:hover img {
            filter: grayscale(0%);
            transform: scale(1.03);
        }

        .gallery-landing .tile .label {
            position: absolute;
            top: 42%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 1.55rem;
            font-weight: 700;
            letter-spacing: .03em;
            text-shadow: 0 2px 12px rgba(0,0,0,.85);
            pointer-events: none;
            white-space: nowrap;
            z-index: 3;
        }

        .gallery-landing .tile:hover {
            box-shadow: 0 14px 28px rgba(0,0,0,0.15);
            transform: scale(1.02);
        }

@media (max-width: 1100px) {
    .gallery-landing {
        grid-template-columns: repeat(2, auto);
    }
}

@media (max-width: 720px) {
    .gallery-landing {
        grid-template-columns: 1fr;
    }

        .gallery-landing .tile {
            margin: 0 auto;
        }
}


/* =========================================================
    GALLERY PAGE (Masonry.js Layout)
    ========================================================= */

body.page--gallery {
    overflow: auto;
}

.page--gallery main {
    padding: calc(var(--nav-height) + 40px) 80px 0;
}

.gallery-title {
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: #333;
    margin: 40px 0 0;
    font-size: 2.2rem;
}

.gallery-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
}

.page--gallery .gallery-grid {
    display: block;
    width: 100%; /* <-- FIX: Added this */
    padding-bottom: 60px;
    margin: 0 auto;
    max-width: calc(3 * 350px + 2 * 28px);
}

@media (max-width: 1200px) {
    .page--gallery .gallery-grid {
        max-width: calc(2 * 350px + 28px);
    }
}

@media (max-width: 720px) {
    .page--gallery .gallery-grid {
        max-width: 350px;
    }
}

.page--gallery .card {
    width: 350px;
    margin-bottom: 28px;
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    perspective: 800px;
}

    .page--gallery .card img {
        width: 100%;
        height: auto;
        display: block;
        transform: scale(1) rotateX(0deg) rotateY(0deg);
        transform-origin: center center;
        transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.3s ease;
        will-change: transform;
    }

    .page--gallery .card:hover img {
        transform: scale(1.05) rotateX(3deg) rotateY(3deg);
        filter: brightness(1.05);
    }

    .page--gallery .card:hover {
        box-shadow: 0 10px 26px rgba(0,0,0,0.25);
    }

.card__badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 3;
}

@media (hover: none) and (pointer: coarse) {
    .page--gallery .card img {
        transform: scale(1);
    }

    .page--gallery .card:hover img {
        transform: scale(1.05);
        rotate: none;
    }
}


/* =========================================================
    LIGHTBOX STYLES
    ========================================================= */

dialog.lb {
    border: none;
    padding: 0;
    background: transparent;
    width: 100vw;
    max-width: none;
}

    dialog.lb::backdrop {
        background: rgba(0, 0, 0, 0.9);
    }

.lb__stage {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.lb__img {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.lb__close {
    position: fixed;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: #fff;
    text-decoration: none;
    z-index: 10;
    cursor: pointer;
}

dialog.lb-series {
    border: none;
    padding: 0;
    background: transparent;
    width: 100vw;
    max-width: none;
}

    dialog.lb-series::backdrop {
        background: rgba(0, 0, 0, 0.95);
    }

.lb-series .swiper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-series .swiper-slide {
    display: flex !important;
    justify-content: center;
    align-items: center !important;
    width: 60%;
    max-width: 800px;
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.6s ease, filter 0.6s ease;
    opacity: 0.5;
}

    .lb-series .swiper-slide:not(.swiper-slide-active) {
        transform: scale(0.7) !important;
        filter: blur(3px) brightness(0.7);
    }

.lb-series .swiper-slide-active {
    transform: scale(1) !important;
    opacity: 1;
    z-index: 3;
}

@keyframes fadeInScale {
    0% {
        opacity: 0.6;
        transform: scale(0.93);
        filter: brightness(0.85);
    }

    60% {
        opacity: 1;
        transform: scale(1.02);
        filter: brightness(1.08);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1);
    }
}

.lb-series .swiper-slide-active img {
    animation: fadeInScale 0.8s ease forwards;
}

.lb-series .swiper-slide img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
    transition: filter 0.6s ease, transform 0.6s ease, opacity 0.6s ease;
}

.lb-series .swiper-button-next,
.lb-series .swiper-button-prev {
    color: white;
}


/* =========================================================
    MISC & UTILITIES
    ========================================================= */

#mode-badge {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

    #mode-badge.show {
        opacity: 1;
        visibility: visible;
    }

/* =========================================
    HERO IMAGE & LAYOUT FIXES
    ========================================= */

html, body {
    overflow-x: hidden;
}

.hero.full {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100svh - var(--nav-height));
    position: relative;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

    .hero.full img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: none;
    }

body.layout--sidebar .hero.full {
    width: auto;
    margin-left: var(--sidebar-w);
    padding: var(--content-pad);
    box-sizing: border-box;
}

.hero.cinematic {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}

    .hero.cinematic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

@media (min-width: 1400px) and (min-aspect-ratio: 16/9) {
    .hero.full img {
        max-height: calc(100vh - var(--nav-height) + 20px) !important;
        object-fit: contain !important;
        transform: translateY(4%) translateX(3%) scale(0.97) !important;
    }
}


/* =========================================================
    PLACEHOLDER & CONTACT PAGES
    ========================================================= */

.page--placeholder main {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.page--placeholder .page-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.page--placeholder .page-subtitle {
    font-size: 1.1rem;
    color: #555;
    max-width: 500px;
    margin: 0 0 48px;
}

.coming-soon {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #888;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
}

.contact-info a {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease;
}

    .contact-info a:hover {
        border-color: var(--accent);
    }

/* =========================================================
    MOBILE & RESPONSIVE FIXES
    ========================================================= */

@media (max-width: 720px) {

    :root {
        --nav-height: 60px;
        --content-pad: 20px;
    }

    .brand img {
        max-height: 36px;
    }

    .nav {
        padding: 0 16px;
    }

    /* Mobile hero image size and positioning */
    .hero.full {
        height: 75vh;
        min-height: auto;
        padding-top: 0;
        justify-content: flex-start;
    }

        .hero.full img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transform: none !important;
        }

    .hero.cinematic {
        aspect-ratio: auto;
        min-height: 70vh;
    }

    .page--gallery main {
        padding: calc(var(--nav-height) + 20px) var(--content-pad) 0;
        align-items: center;
        overflow-x: hidden;
    }

    .page--gallery .gallery-grid {
        width: 100%; /* <-- FIX: Added this */
        max-width: 350px;
        margin: 0 auto;
        padding: 0;
    }

    .page--gallery .card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto 28px auto;
    }

    .page--placeholder main {
        padding: 16px;
    }

    .page--placeholder .page-title {
        font-size: 1.8rem;
    }

    .page--placeholder .page-subtitle {
        font-size: 1rem;
    }
    /* --- Fix Series Lightbox Size on Mobile --- */
    .lb-series .swiper-slide {
        width: 90% !important; /* Allow slide to be much wider */
        max-width: none !important; /* Remove max-width limit on mobile */
    }

        .lb-series .swiper-slide img {
            max-height: 90vh; /* Allow image to use more vertical space */
        }
    /* --- End Fix --- */
}



@media (max-width: 480px) {
    .links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-end;
    }
}

@media (max-width: 400px) {
    .page--gallery main {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* =========================================================
   MOBILE HAMBURGER MENU
   ========================================================= */
#menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
}

    #menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--ink);
        border-radius: 2px;
        transition: 0.3s ease;
    }

    #menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(8px);
    }

    #menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    #menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-8px);
    }

#mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: white;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.5s ease;
    pointer-events: none;
}

    #mobile-menu-overlay.open {
        right: 0;
        pointer-events: auto;
    }

#menu-close {
    position: absolute;
    top: 16px;
    right: 24px;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    z-index: 10000;
}

    .mobile-menu-links li {
        margin: 18px 0;
    }

    .mobile-menu-links a {
        text-decoration: none;
        color: white;
        font-size: 1.4rem;
        transition: color 0.3s;
        position: relative;
        z-index: 10001;
    }

        .mobile-menu-links a:hover {
            color: #ddd;
        }

    .mobile-menu-links .submenu {
        display: none;
        margin-top: 8px;
        opacity: 0;
        transform: translateX(10px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

        .mobile-menu-links .submenu.open {
            display: block;
            opacity: 1;
            transform: translateX(0);
        }

        .mobile-menu-links .submenu a {
            font-size: 1.1rem;
        }

.mobile-ig {
    position: absolute;
    bottom: 40px;
}

    .mobile-ig img {
        width: 28px;
        filter: brightness(0) invert(1);
        transition: opacity 0.3s ease;
        content: url("img/instagram.svg");
    }

        .mobile-ig img:hover {
            opacity: 0.7;
        }

/* Show hamburger only on mobile */
@media (max-width: 720px) {
    #menu-toggle {
        display: flex;
    }

    .links {
        display: none;
    }
}

/* =========================================================
   MENU LINK ANIMATIONS
   ========================================================= */
.mobile-menu-links li {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#mobile-menu-overlay.open .mobile-menu-links li {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu-overlay.open .mobile-m-links li:nth-child(1) {
    transition-delay: 0.1s;
}

#mobile-menu-overlay.open .mobile-menu-links li:nth-child(2) {
    transition-delay: 0.2s;
}

#mobile-menu-overlay.open .mobile-menu-links li:nth-child(3) {
    transition-delay: 0.3s;
}

#mobile-menu-overlay.open .mobile-menu-links li:nth-child(4) {
    transition-delay: 0.4s;
}

#mobile-menu-overlay.open .mobile-menu-links li:nth-child(5) {
    transition-delay: 0.5s;
}

/* =========================================================
   CONTACT FORM STYLES
   ========================================================= */

/* Replace placeholder centering with a flexible container */
.page--contact main {
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
    padding-bottom: 60px; /* Add space at the bottom */
}
.page--contact .page-title {
    font-size: 2.4rem;
    font-weight: 600;
    text-align: center;
    margin-top: 60px;
    letter-spacing: 0.02em;
}

.page--contact .page-subtitle {
    font-size: 1.1rem;
    color: #444;
    text-align: center;
    max-width: 640px;
    margin: 12px auto 48px;
    line-height: 1.6;
    font-style: italic;
}


.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px; /* Space between form groups */
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Space between label and input */
    width: 100%;
}

/* This creates the side-by-side fields */
.form-group-split {
    display: flex;
    gap: 24px;
    width: 100%;
}

.contact-form label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

/* Base styling for all input fields */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="date"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-family: inherit; /* Use the site's font */
    color: var(--ink);
    background: var(--bg);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box; /* IMPORTANT: keeps padding inside the width */
}

/* Make textareas only resizable vertically */
.contact-form textarea {
    resize: vertical;
}

/* Style the submit button */
.form-submit-btn {
    background: var(--accent); /* Use your site's accent color */
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    align-self: flex-start; /* Align button to the left */
}

    .form-submit-btn:hover {
        opacity: 0.85;
    }

/* Responsive: Stack the split fields on mobile */
@media (max-width: 600px) {
    .form-group-split {
        flex-direction: column;
        gap: 24px;
    }
}