/* ===== Photo gallery: public pages ===== */
:root {
    --bg: #0c0c0d;
    --bg-2: #151517;
    --line: rgba(255, 255, 255, .09);
    --text: #f2efe9;
    --muted: #9a958c;
    --gold: #c9a96e;
    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --gap: 6px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }
.eyebrow { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: .01em; }
.muted { color: var(--muted); }

/* Header */
.site-header { position: absolute; inset: 0 0 auto; z-index: 20; padding: 26px 0; }
.site-header[data-overlay] { position: fixed; transition: background .35s, padding .35s, border-color .35s; border-bottom: 1px solid transparent; }
.site-header[data-overlay].scrolled { background: rgba(12, 12, 13, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); padding: 16px 0; }
.site-header.solid { position: sticky; top: 0; background: rgba(12, 12, 13, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 16px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: .02em; line-height: 1; }
.brand small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.nav a { opacity: .8; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.nav .pill { border: 1px solid rgba(255, 255, 255, .35); padding: 8px 16px; border-radius: 99px; opacity: 1; }
.nav .pill:hover { background: #fff; color: #111; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; background: var(--hero-color, #222); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); animation: heroZoom 18s ease-out forwards; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.15) 55%, rgba(12,12,13,.96) 100%); }
.hero .content { position: relative; z-index: 2; padding: 0 0 12vh; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 8vw, 7rem); line-height: .95; margin: 14px 0 18px; letter-spacing: -.01em; }
.hero p { font-size: clamp(1rem, 1.6vw, 1.2rem); color: #d8d3c9; max-width: 560px; margin: 0 0 34px; font-weight: 300; }
.hero .credit { position: absolute; right: 24px; bottom: 24px; z-index: 2; font-size: .75rem; color: rgba(255,255,255,.65); letter-spacing: .05em; }
.hero .credit:hover { color: #fff; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 2; width: 22px; height: 36px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 12px; transform: translateX(-50%); }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; background: #fff; border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }
@keyframes heroZoom { to { transform: scale(1); } }
.hero.empty { min-height: 70svh; background: radial-gradient(circle at 30% 20%, #2a2620, var(--bg) 60%); }
.hero.empty::after { display: none; }

/* Buttons */
.btn-line { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 1px solid rgba(255,255,255,.55); border-radius: 99px; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; transition: .25s; }
.btn-line:hover { background: #fff; color: #111; border-color: #fff; }
.btn-line svg { width: 16px; height: 16px; }

/* Sections */
.section { padding: 110px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); margin: 8px 0 0; line-height: 1.05; }
.section-head .count { color: var(--muted); font-size: .9rem; }

/* Album cards */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 34px 28px; }
.album-card { display: block; }
.album-card .frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-2); }
.album-card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), opacity .6s; }
.album-card:hover .frame img { transform: scale(1.06); }
.album-card .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45)); opacity: 0; transition: opacity .4s; }
.album-card:hover .frame::after { opacity: 1; }
.album-card .meta { padding: 18px 2px 0; }
.album-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.65rem; margin: 0 0 4px; line-height: 1.15; }
.album-card .sub { color: var(--muted); font-size: .85rem; letter-spacing: .02em; }
.badge-private { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); padding: 5px 11px; border-radius: 99px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.badge-private svg { width: 12px; height: 12px; }

/* Justified photo grid: each tile grows in proportion to its aspect ratio (--r). */
.justified { display: flex; flex-wrap: wrap; gap: var(--gap); }
.justified::after { content: ""; flex-grow: 1e6; }
.justified .tile { --h: 280px; position: relative; flex: calc(var(--r) * 100) 1 calc(var(--r) * var(--h)); aspect-ratio: var(--r); overflow: hidden; background: var(--c, var(--bg-2)); cursor: zoom-in; }
.justified .tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
/* Fade-in effects only when the script is running, so content never stays hidden. */
.js .justified .tile img:not(.loaded) { opacity: 0; }
.justified .tile:hover img { transform: scale(1.035); }
.justified .tile .cap { position: absolute; inset: auto 0 0; padding: 30px 14px 12px; font-size: .82rem; background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transform: translateY(6px); transition: .35s; pointer-events: none; }
.justified .tile:hover .cap { opacity: 1; transform: none; }
.justified.compact .tile { --h: 200px; }
.edge { padding-inline: var(--gap); }

/* Album page */
.album-hero { position: relative; min-height: 72svh; display: grid; align-items: end; overflow: hidden; background: var(--hero-color, #222); }
.album-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.album-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.05) 35%, rgba(12,12,13,.97) 100%); }
.album-hero .content { position: relative; z-index: 2; padding-bottom: 60px; }
.album-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 1; margin: 12px 0 14px; }
.album-hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: #d6d0c5; font-size: .9rem; }
.album-intro { max-width: 720px; font-size: 1.12rem; font-weight: 300; color: #d6d0c5; margin: 0 0 56px; white-space: pre-line; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.back:hover { opacity: 1; }
.back svg { width: 16px; height: 16px; }
.share-note { display: inline-flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--gold); border: 1px solid rgba(201,169,110,.4); border-radius: 99px; padding: 6px 14px; margin-bottom: 28px; }

/* About + footer */
.about { max-width: 760px; margin: 0 auto; text-align: center; }
.about p { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.45; font-weight: 400; color: #e6e1d8; white-space: pre-line; }
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .82rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer a:hover { color: var(--text); }
.empty-state { text-align: center; padding: 120px 0; color: var(--muted); }
.empty-state h2 { font-family: var(--serif); font-weight: 400; font-size: 2.4rem; color: var(--text); margin: 0 0 8px; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* Lightbox (PhotoSwipe) extras */
.pswp { --pswp-bg: #050505; }
.pswp__custom-caption { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(820px, calc(100% - 32px)); text-align: center; font-size: .9rem; color: #eee; pointer-events: none; }
.pswp__custom-caption .exif { display: block; font-size: .75rem; color: #9a958c; margin-top: 4px; letter-spacing: .03em; }
.pswp__custom-caption:empty { display: none; }

/* Login */
.login { min-height: 100svh; display: grid; grid-template-columns: 1.2fr 1fr; }
.login .art { position: relative; background: var(--hero-color, #1d1b18); overflow: hidden; }
.login .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.login .panel { display: grid; place-items: center; padding: 48px 24px; }
.login form { width: min(380px, 100%); }
.login h1 { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; margin: 10px 0 6px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.25); color: var(--text); font: inherit; font-size: 1.05rem; padding: 10px 0; outline: none; transition: border-color .2s; }
.field input:focus { border-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); margin: 6px 0 28px; }
.btn-solid { width: 100%; padding: 15px; border: 0; border-radius: 99px; background: var(--text); color: #111; font: inherit; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: .2s; }
.btn-solid:hover { background: var(--gold); }
.error { color: #f5a3a3; font-size: .88rem; margin-bottom: 16px; }

@media (max-width: 900px) {
    .login { grid-template-columns: 1fr; }
    .login .art { display: none; }
}
@media (max-width: 640px) {
    .wrap { width: calc(100% - 32px); }
    .nav { gap: 16px; letter-spacing: .12em; }
    .nav .hide-sm { display: none; }
    .section { padding: 72px 0; }
    .justified .tile { --h: 170px; }
    .justified.compact .tile { --h: 130px; }
    :root { --gap: 4px; }
    .brand { font-size: 1.25rem; }
    .hero h1 { font-size: clamp(2.2rem, 11vw, 3.4rem); }
    .hero .credit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero img, .reveal, .justified .tile img { animation: none; transition: none; opacity: 1; transform: none; }
}
