/* FotoMentum Galleries. Brand tokens match fotomentum.com and the tours site. */
:root {
  --sky: #F5F8FA;
  --paper: #FFFFFF;
  --ink: #16202B;
  --muted: #5C6B7A;
  --hairline: #DCE3E8;
  --blue: #1B4F8C;
  --amber: #D98E2B;
  --amber-deep: #B8721A;
  --amber-text: #9A5E12;
  --stage: #0E1620;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sky: #0E1620; --paper: #16202B; --ink: #EDF1F4; --muted: #9AA7B3;
    --hairline: #2A3844; --blue: #5B95D6; --amber: #E8A94C; --amber-deep: #D98E2B;
    --amber-text: #E8A94C; --stage: #070B10;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sky); color: var(--ink); font: 400 1rem/1.6 var(--font-body); }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .container { padding-left: 24px; padding-right: 24px; } }

.site-nav { display: flex; align-items: center; padding-block: 14px; }
.brand-logo { height: 64px; width: auto; }
@media (max-width: 480px) { .brand-logo { height: 46px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 0.95rem/1 var(--font-body); padding: 13px 22px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--amber); color: #1A1200; }
.btn--primary:hover { background: var(--amber-deep); }
.btn--ghost { background: transparent; border-color: var(--hairline); color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.status { padding: 48px 0; color: var(--muted); text-align: center; }
.status strong { display: block; font: 600 1.6rem/1.2 var(--font-display); color: var(--ink); margin-bottom: 8px; }

.gallery-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 16px 24px; padding-block: 12px 24px;
}
.gallery-head h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.description { margin: 8px 0 0; max-width: 65ch; }
.meta { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }

.back { display: inline-block; margin: 4px 0 8px; font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.jump a { padding: 6px 14px; border: 1px solid var(--hairline); border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.9rem; background: var(--paper); }
.jump a:hover { border-color: var(--amber); }
.photo-section { scroll-margin-top: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 14px; padding-top: 12px; border-top: 1px solid var(--hairline); }
.section-head h2 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }
.section-head .count { font: 600 0.85rem var(--font-body); color: var(--muted); margin-left: 10px; }
.btn--small { padding: 9px 16px; font-size: 0.85rem; }

/* Client page */
.client-head { padding-block: 12px 24px; }
.client-head h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.client-head p { margin: 6px 0 0; color: var(--muted); }
.cards { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: block; background: var(--paper); border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); height: 100%; }
.card:hover { border-color: var(--amber); }
.card .cover { position: relative; aspect-ratio: 3 / 2; background: var(--stage); overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .info { padding: 12px 14px 14px; }
.card strong { display: block; font: 600 1.1rem/1.25 var(--font-display); }
.card span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.card .badge { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: var(--hairline); color: var(--ink); font-size: 0.75rem; font-weight: 700; }
.card.expired .cover img { filter: grayscale(1); opacity: 0.6; }
body.wm .card .cover::after { content: ""; position: absolute; inset: 0; margin: auto; width: 55%; height: 40%; pointer-events: none; background: url(/assets/logo-white.png) center / contain no-repeat; opacity: 0.3; }

/* Masonry-style grid that keeps each photo's proportions. */
.grid { list-style: none; margin: 0 0 48px; padding: 0; columns: 2 160px; column-gap: 8px; }
@media (min-width: 720px) { .grid { columns: 3 260px; column-gap: 12px; } }
.grid li { break-inside: avoid; margin-bottom: 8px; }
@media (min-width: 720px) { .grid li { margin-bottom: 12px; } }
.grid a { display: block; position: relative; border-radius: 8px; overflow: hidden; background: var(--stage); }
.grid img { width: 100%; height: auto; transition: transform .25s; }
.grid a:hover img { transform: scale(1.02); }

.site-footer {
  padding-block: 28px 40px; border-top: 1px solid var(--hairline); color: var(--muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9rem;
}
.site-footer strong { font-family: var(--font-display); color: var(--ink); }
.site-footer a { color: var(--muted); }

/* Full-screen viewer */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(7, 11, 16, 0.97); color: #fff; }
.lightbox::backdrop { background: rgba(7, 11, 16, 0.97); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 52px 8px 76px; position: relative; }
.lightbox figure img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox figcaption { font-size: 0.85rem; color: #C9D2DA; }
.lightbox > button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font: 400 2rem/1 var(--font-body); width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.lightbox > button:hover { background: rgba(255, 255, 255, 0.26); }
.lb-close { top: 10px; right: 10px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; }
.lb-next { right: 10px; }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; }
.lb-download { border: 0; border-radius: 999px; padding: 12px 22px; background: var(--amber); color: #1A1200; font: 700 0.95rem/1 var(--font-body); cursor: pointer; }
@media (max-width: 720px) {
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
}

/* Name/email form */
.gate { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.gate::backdrop { background: rgba(7, 11, 16, 0.7); }
.gate form { padding: 22px; display: grid; gap: 12px; }
.gate p { margin: 0; color: var(--muted); }
.gate label { display: grid; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.gate input { font: inherit; padding: 11px 12px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--sky); color: var(--ink); }
.gate .form-error { color: #C0392B; font-weight: 600; }
@media (prefers-color-scheme: dark) { .gate .form-error { color: #FF8A7A; } }
.gate-actions { display: flex; justify-content: flex-end; gap: 10px; }
.gate .fine { font-size: 0.8rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Faint centred watermark on the web view only; files are untouched. */
body.wm .grid a::after,
body.wm .lightbox figure::after {
  content: ""; position: absolute; inset: 0; margin: auto; pointer-events: none;
  background: url(/assets/logo-white.png) center / contain no-repeat;
  opacity: 0.32; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
body.wm .grid a::after { width: 60%; height: 40%; }
body.wm .lightbox figure::after { width: min(44vw, 460px); height: 30vh; }
