:root {
    --gold: #c9a582;
    --gold-light: #e6d4bd;
    --gold-dark: #a88860;
    --sand: #e8d5b7;
    --sand-light: #f5efe6;
    --sand-dark: #d4c3a8;
    --dark-text: #4a3c28;
    --brown: #8b7355;
    --brown-dark: #6b5535;
    --brown-darker: #4a3c28;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    background:
        radial-gradient(circle at top, rgba(227, 196, 154, 0.22), transparent 28%),
        linear-gradient(180deg, #faf5ec 0%, #f5efe6 52%, #f0e6d8 100%);
    color: var(--dark-text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nav-open,
body.lightbox-open {
    overflow: hidden;
}

h1,
h2,
h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

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

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

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

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

.navbar {
    position: fixed;
    top: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 1.5rem 5.25rem;
    background: rgba(250, 246, 239, 0.95);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(201, 165, 130, 0.3);
    border-radius: 100px;
    box-shadow: 0 16px 50px rgba(139, 115, 85, 0.22);
    transition: all 0.4s ease;
    min-width: 1100px;
    max-width: 95vw;
    overflow: visible;
    isolation: isolate;
}

.navbar::before,
.navbar::after {
    display: none;
}

.navbar-trace {
    display: none;
}

.navbar.scrolled {
    top: 1rem;
    padding: 1rem 4rem;
    background: rgba(250, 246, 239, 0.98) url('https://dgohsyksrcfcdsraawqd.supabase.co/storage/v1/object/public/AMX/BG.jpg') center/cover;
    background-blend-mode: soft-light;
    box-shadow: 0 15px 60px rgba(139, 115, 85, 0.4);
}

.nav-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    white-space: nowrap;
    z-index: 1;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-logo span {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.09em;
    color: var(--brown-darker);
    white-space: nowrap;
}

.nav-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    gap: 2.9rem;
    align-items: center;
    flex-shrink: 0;
}

.nav-links a {
    color: var(--brown-darker);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.92rem;
    position: relative;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: var(--gold-dark);
}

.nav-book-btn {
    padding: 0.95rem 2.3rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.92rem;
    box-shadow: 0 10px 28px rgba(201, 165, 130, 0.42);
    text-decoration: none;
    text-shadow: none;
}

.nav-book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 165, 130, 0.6);
}

.hamburger {
    display: none;
}

.gallery-hero {
    padding: 10rem 5% 2.5rem;
}

.gallery-hero-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: 2.5rem;
    align-items: center;
}

.gallery-copy {
    display: grid;
    gap: 1.5rem;
    max-width: 700px;
}

.section-badge {
    justify-self: start;
    padding: 0.72rem 1.3rem;
    border: 1px solid rgba(168, 136, 96, 0.42);
    border-radius: 999px;
    color: var(--gold-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    background: rgba(255, 250, 242, 0.74);
}

.gallery-copy h1 {
    font-size: clamp(3.7rem, 7vw, 6.6rem);
    line-height: 0.95;
    color: #4a3424;
}

.gallery-copy p {
    max-width: 620px;
    font-size: 1.12rem;
    color: rgba(74, 60, 40, 0.8);
}

.gallery-preview {
    position: relative;
    min-height: 520px;
}

.gallery-preview-main,
.gallery-preview-floating {
    overflow: hidden;
    border-radius: 34px;
    box-shadow: 0 34px 70px rgba(87, 61, 39, 0.16);
}

.gallery-preview-main {
    height: 100%;
    background: rgba(255, 248, 239, 0.75);
    border: 1px solid rgba(201, 165, 130, 0.18);
}

.gallery-preview-main img,
.gallery-preview-floating img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-preview-floating {
    position: absolute;
    right: -2rem;
    bottom: 2.3rem;
    width: 54%;
    aspect-ratio: 4 / 4.8;
    border: 10px solid rgba(255, 250, 242, 0.95);
    transform: rotate(5deg);
}

.photo-wall {
    padding: 0 5% 5rem;
}

.photo-wall-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2.2rem 0 0;
    border-top: 1px solid rgba(168, 136, 96, 0.18);
}

.photo-wall-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.8rem;
    margin-bottom: 2rem;
}

.photo-wall-head h2 {
    margin-top: 0.9rem;
    font-size: clamp(2.5rem, 4vw, 4rem);
    color: #4a3424;
}

.photo-wall-head p {
    max-width: 430px;
    color: rgba(74, 60, 40, 0.72);
}

.photo-grid {
    columns: 3 280px;
    column-gap: 1.2rem;
}

.photo-card {
    position: relative;
    width: 100%;
    margin: 0 0 1.2rem;
    padding: 0;
    border-radius: 28px;
    overflow: hidden;
    break-inside: avoid;
    background: rgba(255, 250, 242, 0.78);
    box-shadow: 0 22px 46px rgba(132, 97, 62, 0.12);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.photo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(21, 14, 9, 0.02), rgba(21, 14, 9, 0.15));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.photo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 55px rgba(132, 97, 62, 0.18);
}

.photo-card:hover::after {
    opacity: 1;
}

.photo-card img {
    width: 100%;
    height: auto;
}

.photo-grid.is-empty {
    columns: 1;
}

.photo-empty {
    padding: 2.2rem;
    border-radius: 28px;
    text-align: center;
    background: rgba(255, 250, 242, 0.82);
    border: 1px solid rgba(168, 136, 96, 0.18);
    color: rgba(74, 60, 40, 0.72);
}

.footer {
    position: relative;
    padding: 3rem 5% 2rem;
    background:
        radial-gradient(circle at 50% 0%, rgba(210, 170, 108, 0.14), transparent 18%),
        linear-gradient(180deg, #4a3424 0%, #2a1d13 100%);
    color: #f3e7d8;
    overflow: hidden;
    text-align: center;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%);
    opacity: 0.3;
    pointer-events: none;
}

.footer-inner {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    justify-items: center;
}

.footer-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.5rem;
    color: #f7ecde;
}

.footer-name img {
    display: block;
    width: auto;
    height: clamp(5.6rem, 14vw, 8.6rem);
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.24));
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 2rem;
    margin-bottom: 1.35rem;
}

.footer-links a {
    color: rgba(247, 236, 222, 0.88);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f2c98d;
}

.footer-rights {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(244, 230, 206, 0.1);
    color: rgba(243, 231, 216, 0.68);
    font-size: 0.92rem;
    line-height: 1.6;
    width: 100%;
    text-align: center;
}

.footer-credit {
    margin: 0.7rem 0 0;
    color: rgba(243, 231, 216, 0.62);
    font-size: 0.88rem;
    line-height: 1.6;
    width: 100%;
    text-align: center;
}

.footer-credit a {
    color: #6db8ff;
    font-weight: 700;
}

.footer-credit a:hover {
    color: #93ccff;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(18, 11, 6, 0.88);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-shell {
    display: grid;
    justify-items: center;
    gap: 1rem;
    min-width: 0;
}

.lightbox-image {
    width: auto;
    max-width: min(82vw, 1200px);
    max-height: 78vh;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    text-align: center;
    color: rgba(255, 248, 238, 0.94);
}

.lightbox-caption strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
}

.lightbox-caption span {
    color: rgba(255, 248, 238, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.lightbox-close,
.lightbox-nav {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff7ee;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lightbox-close {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    font-size: 2rem;
    z-index: 1;
}

.lightbox-nav {
    font-size: 2.1rem;
}

@media (max-width: 1180px) {
    .navbar {
        min-width: auto;
        width: 95%;
        max-width: 95%;
    }

    .nav-container {
        gap: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(250, 246, 239, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.4s ease;
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        border-left: 2px solid var(--gold);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(201, 165, 130, 0.2);
    }

    .nav-book-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1000;
        position: relative;
    }

    .hamburger span {
        width: 28px;
        height: 3px;
        background: var(--brown-darker);
        border-radius: 3px;
        transition: 0.3s;
    }

    .gallery-hero {
        padding-top: 8.8rem;
    }

    .gallery-hero-inner {
        grid-template-columns: 1fr;
    }

    .gallery-preview {
        min-height: 420px;
        max-width: 680px;
    }

    .photo-wall-head {
        flex-direction: column;
        align-items: start;
    }
}

@media (max-width: 720px) {
    .navbar {
        padding: 1rem 1.1rem;
        width: 96%;
    }

    .nav-logo span {
        font-size: 1.2rem;
    }

    .gallery-copy h1 {
        font-size: clamp(2.8rem, 15vw, 4rem);
    }

    .gallery-copy p {
        font-size: 1rem;
    }

    .gallery-preview {
        min-height: 320px;
    }

    .gallery-preview-floating {
        right: -0.2rem;
        bottom: 1.25rem;
        width: 50%;
        border-width: 7px;
    }

    .photo-grid {
        columns: 2 160px;
        column-gap: 0.9rem;
    }

    .photo-card {
        margin-bottom: 0.9rem;
        border-radius: 20px;
    }

    .footer {
        padding: 2.6rem 1.25rem 1.7rem;
    }

    .footer-name {
        margin-bottom: 1.05rem;
    }

    .footer-name img {
        height: 4.8rem;
    }

    .footer-links {
        gap: 0.75rem 1.2rem;
    }

    .footer-links a {
        font-size: 0.78rem;
        letter-spacing: 0.12em;
    }

    .lightbox {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.9rem;
        padding: 4.6rem 1rem 1.25rem;
    }

    .lightbox-shell {
        width: 100%;
    }

    .lightbox-image {
        max-width: 100%;
        max-height: 68vh;
    }

    .lightbox-nav {
        position: static;
        order: 2;
    }
}

@media (max-width: 520px) {
    .photo-grid {
        columns: 1;
    }
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 1180px) {
    .navbar {
        top: max(0.8rem, env(safe-area-inset-top));
        width: min(96%, 760px);
        padding: 0.95rem 1rem;
        border-radius: 30px;
    }

    .nav-container {
        gap: 0.75rem;
    }

    .nav-logo span {
        letter-spacing: 0.05em;
    }

    .nav-links {
        width: min(84vw, 320px);
        min-height: 100svh;
        padding: calc(5rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
        gap: 0.8rem;
        background:
            radial-gradient(circle at top right, rgba(224, 188, 132, 0.18), transparent 28%),
            linear-gradient(180deg, rgba(255, 251, 245, 0.985), rgba(245, 236, 223, 0.985));
        border-left: 1px solid rgba(201, 165, 130, 0.24);
        border-radius: 28px 0 0 28px;
        box-shadow: -18px 0 44px rgba(37, 24, 15, 0.18);
        overflow-y: auto;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 52px;
        padding: 0.95rem 1rem;
        border: 0;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.58);
        font-size: 0.92rem;
        letter-spacing: 0.08em;
    }

    .nav-book-btn {
        margin-top: 0.25rem;
        width: 100%;
        border-radius: 18px;
    }

    .nav-links .nav-book-btn {
        justify-content: center;
        background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
        color: var(--white);
        box-shadow: 0 14px 30px rgba(169, 136, 96, 0.2);
    }

    .hamburger {
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: 0 12px 24px rgba(52, 38, 24, 0.12);
        backdrop-filter: blur(12px);
    }

    .hamburger span {
        width: 22px;
        height: 2.5px;
    }

    .gallery-hero {
        padding: 7.9rem 1rem 2.2rem;
    }

    .gallery-preview {
        min-height: clamp(320px, 62vw, 460px);
    }

    .gallery-preview-main,
    .gallery-preview-floating,
    .photo-card {
        box-shadow: 0 20px 48px rgba(52, 38, 24, 0.12);
    }

    .photo-wall {
        padding: 0 1rem 4rem;
    }

    .photo-wall-inner {
        padding-top: 1.8rem;
    }

    .photo-wall-head {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 720px) {
    .navbar {
        top: max(0.65rem, env(safe-area-inset-top));
        width: calc(100% - 1rem);
        padding: 0.82rem 0.92rem;
        border-radius: 24px;
    }

    .nav-logo span {
        font-size: clamp(1.05rem, 5vw, 1.3rem);
        letter-spacing: 0.04em;
    }

    .nav-links {
        width: min(86vw, 320px);
        padding: calc(4.8rem + env(safe-area-inset-top)) 0.9rem calc(1rem + env(safe-area-inset-bottom));
    }

    .gallery-hero {
        padding: 7.2rem 0.9rem 1.8rem;
    }

    .gallery-copy {
        gap: 1rem;
    }

    .gallery-copy h1 {
        font-size: clamp(2.5rem, 14vw, 4rem);
        line-height: 0.96;
        text-wrap: balance;
    }

    .gallery-preview {
        min-height: 290px;
    }

    .gallery-preview-main,
    .gallery-preview-floating {
        border-radius: 26px;
    }

    .gallery-preview-floating {
        right: 0;
        bottom: 1rem;
        width: min(48%, 180px);
    }

    .photo-wall {
        padding: 0 0.9rem 3.4rem;
    }

    .photo-grid {
        columns: 2 145px;
        column-gap: 0.85rem;
    }

    .photo-card {
        margin-bottom: 0.85rem;
        border-radius: 22px;
    }

    .footer {
        padding-bottom: calc(1.6rem + env(safe-area-inset-bottom));
    }

    .footer-links {
        justify-content: center;
    }

    .footer-rights,
    .footer-credit {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .gallery-preview {
        min-height: 250px;
    }

    .photo-grid {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navbar::after {
        animation: navbarBorderTrace 6.8s linear infinite !important;
    }
}
