:root {
    --paper: #fffaf8;
    --blush: #f3dfe2;
    --rose: #c88494;
    --sage: #b9c8b3;
    --mist: #dce7e3;
    --ink: #322b2b;
    --muted: #74696b;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(67, 45, 51, .15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", sans-serif;
    min-height: 100vh;
}

body::before {
    background: url("../flower-silhouette.svg") bottom left / min(48vw, 680px) auto no-repeat;
    content: "";
    inset: auto auto 0 0;
    height: min(85vh, 920px);
    opacity: .2;
    pointer-events: none;
    position: fixed;
    width: min(52vw, 720px);
    z-index: -1;
}

body.lightbox-open { overflow: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

.skip-link {
    background: var(--ink);
    color: var(--white);
    left: 16px;
    padding: 10px 14px;
    position: fixed;
    top: -60px;
    z-index: 100;
}

.skip-link:focus { top: 16px; }

.site-header {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 32px 30px 25px;
    position: relative;
}

.brand-lockup {
    align-items: center;
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: center;
}

.brand-mark {
    height: 72px;
    object-fit: contain;
    object-position: center;
    width: 44px;
}

.brand-lockup h1 {
    font-family: "Passions Conflict", cursive;
    font-size: clamp(3.25rem, 6vw, 5.4rem);
    font-weight: 400;
    letter-spacing: .01em;
    margin: -5px 0 -3px;
}

.brand-lockup p {
    color: var(--muted);
    font-size: .66rem;
    letter-spacing: .28em;
    margin: 0;
    text-transform: uppercase;
}

.category-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: center;
    margin-top: 28px;
}

.category-button {
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .13em;
    padding: 7px 2px;
    position: relative;
    text-transform: uppercase;
}

.category-button::after {
    background: var(--rose);
    bottom: 0;
    content: "";
    height: 1px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%) scaleX(0);
    transition: transform .25s ease;
    width: 100%;
}

.category-button span {
    color: #ae9fa1;
    font-size: .55rem;
    margin-left: 2px;
    vertical-align: super;
}

.category-button:hover,
.category-button.is-active { color: var(--ink); }

.category-button.is-active::after { transform: translateX(-50%) scaleX(1); }

.category-button:focus-visible,
.gallery-open:focus-visible,
.load-more:focus-visible,
.lightbox button:focus-visible,
.site-footer a:focus-visible {
    outline: 2px solid var(--rose);
    outline-offset: 4px;
}

.gallery-shell { padding: 0 10px; }

.gallery-intro {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: .66rem;
    gap: 12px;
    justify-content: center;
    letter-spacing: .12em;
    margin: 0 auto 12px;
    text-transform: uppercase;
}

.gallery-intro p { margin: 0; }

.gallery-rule { background: var(--sage); height: 1px; width: 26px; }

.masonry-gallery {
    column-count: 6;
    column-gap: 8px;
    margin: 0 auto;
    max-width: 2200px;
}

.gallery-card {
    animation: reveal .7s cubic-bezier(.22, .8, .24, 1) both;
    break-inside: avoid;
    display: inline-block;
    margin: 0 0 8px;
    overflow: hidden;
    vertical-align: top;
    width: 100%;
}

.gallery-card[hidden] { display: none; }

.gallery-open {
    background: var(--blush);
    border: 0;
    color: var(--white);
    cursor: zoom-in;
    display: block;
    padding: 0;
    position: relative;
    text-align: left;
    width: 100%;
}

.media-frame { display: block; overflow: hidden; position: relative; }

.gallery-open img,
.gallery-open video {
    display: block;
    height: auto;
    transform: scale(1.002);
    transition: filter .45s ease, transform .8s cubic-bezier(.2,.65,.25,1);
    width: 100%;
}

.gallery-open:hover img,
.gallery-open:hover video { filter: saturate(.88); transform: scale(1.035); }

.card-wash {
    background: linear-gradient(180deg, transparent 48%, rgba(35, 27, 29, .58));
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity .35s ease;
}

.gallery-open:hover .card-wash,
.gallery-open:focus-visible .card-wash { opacity: 1; }

.card-caption {
    align-items: flex-end;
    bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    left: 0;
    opacity: 0;
    padding: 20px 14px 13px;
    position: absolute;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
    width: 100%;
    z-index: 1;
}

.gallery-open:hover .card-caption,
.gallery-open:focus-visible .card-caption { opacity: 1; transform: translateY(0); }

.card-caption strong {
    font-size: .74rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-caption small {
    font-size: .52rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.video-badge {
    align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.75);
    border-radius: 99px;
    color: var(--ink);
    display: flex;
    font-size: .6rem;
    font-weight: 700;
    height: 44px;
    justify-content: center;
    left: 50%;
    letter-spacing: .08em;
    position: absolute;
    text-transform: uppercase;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
}

.load-more-wrap { display: flex; justify-content: center; padding: 44px 20px 62px; }

.load-more {
    align-items: center;
    background: transparent;
    border: 1px solid #d8c9ca;
    border-radius: 99px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    font-size: .67rem;
    font-weight: 700;
    gap: 14px;
    letter-spacing: .13em;
    padding: 14px 21px;
    text-transform: uppercase;
    transition: background .25s, border-color .25s, transform .25s;
}

.load-more:hover { background: var(--blush); border-color: var(--blush); transform: translateY(-2px); }
.load-more[hidden] { display: none; }
.load-more svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.6; width: 15px; }

.empty-gallery { padding: 14vh 20px 20vh; text-align: center; }
.empty-gallery span { color: var(--rose); font-size: 2rem; }
.empty-gallery h2 { font-family: "Passions Conflict", cursive; font-size: clamp(3rem, 7vw, 5rem); font-weight: 400; margin: 12px 0 -5px; }
.empty-gallery p { color: var(--muted); font-size: .82rem; }

.site-footer {
    align-items: center;
    border-top: 1px solid rgba(116,105,107,.16);
    color: var(--muted);
    display: flex;
    font-size: .64rem;
    justify-content: space-between;
    letter-spacing: .08em;
    margin: 0 18px;
    padding: 22px 4px 28px;
    text-transform: uppercase;
}

.site-footer p { margin: 0; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--rose); }

.lightbox {
    background: transparent;
    border: 0;
    color: var(--white);
    height: 100%;
    max-height: none;
    max-width: none;
    opacity: 0;
    padding: 0;
    transition: opacity .3s ease, display .3s allow-discrete;
    width: 100%;
}

.lightbox[open] { opacity: 1; }
.lightbox::backdrop { background: rgba(31, 24, 27, .94); backdrop-filter: blur(13px); }

.lightbox-bloom {
    background: radial-gradient(circle, rgba(200,132,148,.22), transparent 62%);
    height: min(70vw, 760px);
    left: 50%;
    pointer-events: none;
    position: fixed;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(70vw, 760px);
}

.lightbox-figure {
    align-items: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    margin: 0;
    padding: 34px 96px;
    position: relative;
}

.lightbox-media {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.lightbox-media img,
.lightbox-media video {
    animation: develop .62s cubic-bezier(.18,.8,.25,1) both;
    box-shadow: var(--shadow);
    display: block;
    max-height: calc(100vh - 170px);
    max-width: 100%;
    object-fit: contain;
}

.lightbox-figure figcaption {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    max-width: 1100px;
    padding-top: 18px;
    width: 100%;
}

.lightbox-category { color: #d9a8b3; font-size: .58rem; font-weight: 700; letter-spacing: .2em; margin: 0 0 4px; text-transform: uppercase; }
.lightbox-figure h2 { font-family: "Passions Conflict", cursive; font-size: clamp(2.5rem, 5vw, 4.1rem); font-weight: 400; line-height: .88; margin: 0; }
.lightbox-caption { color: #d7ced0; font-size: .74rem; line-height: 1.6; margin: 10px 0 0; max-width: 650px; }
.lightbox-caption:empty { display: none; }
.lightbox-count { color: #b9abad; font-size: .62rem; letter-spacing: .16em; margin: 9px 0 0; white-space: nowrap; }

.lightbox button {
    align-items: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: center;
    position: fixed;
    transition: background .2s, transform .2s;
    z-index: 2;
}

.lightbox button:hover { background: rgba(255,255,255,.17); transform: scale(1.04); }
.lightbox button svg { fill: none; height: 20px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.5; width: 20px; }
.lightbox-close { height: 44px; right: 24px; top: 22px; width: 44px; }
.lightbox-nav { height: 48px; top: 46%; width: 48px; }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@keyframes reveal {
    from { clip-path: inset(0 0 100% 0); opacity: .35; transform: translateY(12px); }
    to { clip-path: inset(0 0 0 0); opacity: 1; transform: translateY(0); }
}

@keyframes develop {
    from { clip-path: inset(50% 0 50% 0); filter: blur(8px) saturate(.4); opacity: .2; transform: scale(.96); }
    to { clip-path: inset(0 0 0 0); filter: blur(0) saturate(1); opacity: 1; transform: scale(1); }
}

@media (max-width: 1399px) { .masonry-gallery { column-count: 5; } }
@media (max-width: 1099px) { .masonry-gallery { column-count: 4; } }
@media (max-width: 799px) {
    .site-header { padding-top: 25px; }
    .masonry-gallery { column-count: 3; }
    .lightbox-figure { padding: 60px 68px 24px; }
    .lightbox-nav { height: 42px; width: 42px; }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
}

@media (max-width: 560px) {
    body::before { width: 86vw; }
    .site-header { padding-inline: 16px; }
    .brand-mark { height: 58px; width: 36px; }
    .brand-lockup h1 { font-size: 3.55rem; }
    .category-nav { gap: 5px 13px; margin-top: 22px; }
    .category-button { font-size: .64rem; }
    .gallery-shell { padding: 0 6px; }
    .masonry-gallery { column-count: 2; column-gap: 6px; }
    .gallery-card { margin-bottom: 6px; }
    .card-caption { display: none; }
    .lightbox-figure { padding: 70px 16px 80px; }
    .lightbox-media img, .lightbox-media video { max-height: calc(100vh - 210px); }
    .lightbox-figure figcaption { padding: 15px 4px 0; }
    .lightbox-figure h2 { font-size: 2.7rem; }
    .lightbox-count { margin-left: 16px; }
    .lightbox-nav { bottom: 20px; top: auto; }
    .lightbox-prev { left: calc(50% - 52px); }
    .lightbox-next { right: calc(50% - 52px); }
    .lightbox-close { right: 14px; top: 14px; }
    .site-footer { align-items: flex-start; flex-direction: column; gap: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
