/* Lumière Gallery — custom styles */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Header: transparent over hero, solid on scroll */
#siteHeader { color: #fff; }
#siteHeader .nav-brand,
#siteHeader .nav-link { color: #fff; }
#siteHeader.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    backdrop-filter: saturate(180%) blur(8px);
}
#siteHeader.scrolled .nav-brand,
#siteHeader.scrolled .nav-link { color: #1f1f1f; }
/* Pages without a hero get the solid header immediately */
#siteHeader.solid {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    backdrop-filter: saturate(180%) blur(8px);
}
#siteHeader.solid .nav-brand,
#siteHeader.solid .nav-link { color: #1f1f1f; }

/* Ken-burns hero */
@keyframes kenburns {
    0%   { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.kenburns { animation: kenburns 18s ease-out forwards; }

/* Masonry gallery via CSS columns */
.masonry {
    column-gap: 1rem;
}
@media (min-width: 640px)  { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
@media (min-width: 1536px) { .masonry { column-count: 4; } }
.masonry .tile {
    break-inside: avoid;
    margin-bottom: 1rem;
}

/* Image reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

.tile img { transition: transform .6s ease, filter .6s ease; }
.tile:hover img { transform: scale(1.04); }

/* Favorite heart */
.fav-btn { transition: transform .15s ease; }
.fav-btn:active { transform: scale(.85); }
.fav-btn.is-fav i { fill: #e0245e; color: #e0245e; }

/* Lightbox */
#lightbox {
    position: fixed; inset: 0; z-index: 70;
    background: rgba(15, 15, 15, .96);
    display: none; align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
    max-width: 92vw; max-height: 86vh;
    object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lb-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(255,255,255,.08);
    transition: background .2s ease; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }

/* Utility */
.tracking-widest-xl { letter-spacing: .35em; }

/* 500px-style photo grid */
.photo-grid-500 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px)  { .photo-grid-500 { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1024px) { .photo-grid-500 { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1280px) { .photo-grid-500 { grid-template-columns: repeat(5, 1fr); } }

.photo-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}
.photo-card-inner {
    aspect-ratio: 1;
    background: #f5f5f5;
}
.photo-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.photo-card:hover .photo-card-inner img { transform: scale(1.04); }

.photo-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    transition: opacity .2s;
}
.act-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    background: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #525252;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    cursor: pointer;
    border: none;
    transition: transform .15s, color .15s;
}
.act-btn:hover { transform: scale(1.08); }
.act-btn.active { color: #0099e5; }
.act-btn.active[data-type="like"] { color: #e0245e; }
.act-btn.active[data-type="favorite"] { color: #f59e0b; }

.photo-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    font-size: 11px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0,0,0,.55));
    opacity: 0;
    transition: opacity .2s;
}
.photo-card:hover .photo-meta { opacity: 1; }
