/* Overlook Galleries — public client gallery shell.
   DNA shared with overlookmedia.co: Fraunces display / Hanken Grotesk body,
   near-black ground, gold used only where it earns it. One stylesheet, no
   framework. Wide content scrolls inside itself; the page never scrolls
   sideways. */

:root {
  --bg: #0b0b0b;
  --bg-2: #111111;
  --text: #f2f0eb;
  --text-2: #b9b5ac;
  --text-3: #7d7a73;
  --line: #232323;
  --gold: #FFC62A;
  --f-display: 'Fraunces', 'Times New Roman', serif;
  --f-body: 'Hanken Grotesk', 'Gill Sans', -apple-system, sans-serif;
  --row-h: 300px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-weight: 300;
  min-height: 100vh;
}
img, video { display: block; max-width: 100%; }
button { font-family: var(--f-body); cursor: pointer; }
a { color: inherit; }

/* ── Boot / message states ─────────────────────────────────────────────── */
.state {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; text-align: center;
  padding: 24px;
}
.om-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.state h1 { font-family: var(--f-display); font-weight: 300; font-size: 28px; }
.state p { color: var(--text-2); font-size: 14px; max-width: 40ch; line-height: 1.6; }
.state .brand { margin-top: 26px; }

/* ── Password gate ─────────────────────────────────────────────────────── */
.gate { max-width: 340px; width: 100%; }
.gate h1 { font-family: var(--f-display); font-weight: 300; font-size: 30px; margin-bottom: 6px; }
.gate .sub { color: var(--text-2); font-size: 13px; margin-bottom: 26px; }
.gate form { display: flex; gap: 10px; }
.gate input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 3px; color: var(--text); font-family: var(--f-body);
  font-size: 15px; padding: 12px 14px; outline: none; letter-spacing: .04em;
}
.gate input:focus { border-color: var(--text-3); }
.gate button {
  background: var(--gold); color: #131313; border: 0; border-radius: 3px;
  font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  padding: 0 20px;
}
.gate .err { color: #e77; font-size: 12.5px; margin-top: 12px; min-height: 16px; }

/* ── Header ────────────────────────────────────────────────────────────── */
header {
  text-align: center; padding: clamp(56px, 12vh, 120px) 24px 34px;
}
.h-kicker {
  font-size: 10.5px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 22px;
}
.h-title {
  font-family: var(--f-display); font-weight: 300; letter-spacing: .01em;
  font-size: clamp(34px, 6vw, 62px); line-height: 1.08;
}
.h-client { color: var(--text-2); font-size: 14px; margin-top: 16px; letter-spacing: .06em; }
.h-rule { width: 46px; height: 1px; background: var(--gold); margin: 30px auto 0; }

/* ── Tabs ──────────────────────────────────────────────────────────────── */
nav.tabs {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
  padding: 6px 16px 30px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.tab {
  background: none; border: 1px solid transparent; border-radius: 999px;
  color: var(--text-3); font-size: 12px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; padding: 9px 16px; transition: color .18s, border-color .18s;
}
.tab:hover { color: var(--text-2); }
.tab.on { color: var(--text); border-color: var(--line); }
.tab .n { color: var(--text-3); font-weight: 300; margin-left: 6px; font-size: 11px; }

/* ── Justified grid (flex aspect-ratio technique — no JS layout) ───────── */
.grid { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px 4px; }
.gi {
  position: relative; overflow: hidden; background: var(--bg-2);
  height: var(--row-h); flex-grow: calc(var(--ar) * 100);
  flex-basis: calc(var(--ar) * var(--row-h)); cursor: zoom-in;
}
.gi img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .5s ease, transform .6s ease;
}
.gi img.ld { opacity: 1; }
.gi:hover img { transform: scale(1.025); }
.gi .dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  background: rgba(0,0,0,.62); color: var(--text); font-size: 11px;
  letter-spacing: .06em; padding: 3px 8px; border-radius: 3px;
  display: flex; align-items: center; gap: 6px;
}
.gi .dur svg { width: 9px; height: 9px; fill: var(--gold); }
.grid::after { content: ""; flex-grow: 1e4; }

/* ── Lightbox ──────────────────────────────────────────────────────────── */
.lb {
  position: fixed; inset: 0; z-index: 50; background: rgba(5,5,5,.96);
  display: flex; flex-direction: column; touch-action: none;
  animation: lbIn .22s ease;
}
@keyframes lbIn { from { opacity: 0; } }
.lb-top {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  font-size: 12px; color: var(--text-3); letter-spacing: .1em;
}
.lb-top .sp { flex: 1; }
.lb-btn {
  background: none; border: 0; color: var(--text-2); font-size: 12px;
  font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 10px; transition: color .15s;
}
.lb-btn:hover { color: var(--text); }
.lb-btn.x { font-size: 22px; line-height: 1; font-weight: 300; padding: 4px 10px; }
.lb-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 0; padding: 0 8px 20px; position: relative;
}
.lb-stage img, .lb-stage video {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}
.lb-nav {
  position: absolute; top: 0; bottom: 0; width: 22%; border: 0; background: none;
  color: transparent; font-size: 34px; font-weight: 300; z-index: 2;
}
.lb-nav:hover { color: var(--text-3); }
.lb-nav.prev { left: 0; text-align: left; padding-left: 18px; }
.lb-nav.next { right: 0; text-align: right; padding-right: 18px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  text-align: center; padding: 70px 24px 46px; color: var(--text-3);
}
.f-actions { margin-bottom: 44px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.f-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-2); font-size: 11.5px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; padding: 11px 22px; text-decoration: none;
  transition: border-color .18s, color .18s; display: inline-block;
}
.f-btn:hover { border-color: var(--gold); color: var(--text); }
.brand { display: inline-flex; align-items: center; gap: 10px; opacity: .85; }
.brand img { width: 22px; height: 22px; }
.brand span {
  font-size: 10.5px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase;
  color: var(--text-3);
}
.f-note { font-size: 11px; color: var(--text-3); margin-top: 18px; letter-spacing: .04em; }

@media (max-width: 720px) {
  :root { --row-h: 34vw; }
  .lb-nav { display: none; }         /* swipe carries navigation on touch */
  nav.tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap;
             scrollbar-width: none; }
  nav.tabs::-webkit-scrollbar { display: none; }
}
