/* Photos page (public/photoshoots.html). Uses the site tokens from styles.css:
   --ink, --crimson, --crimson-hot, --gold, --gold-dim, --gold-faint, --ivory,
   --text-secondary, --text-muted, --font-display, --font-body. */

.ph { max-width: 1180px; margin: 0 auto; padding: 0 20px 96px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header ─────────────────────────────────────────────── */
.ph-head { padding: 40px 0 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ph-head h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.95; letter-spacing: -0.02em; color: var(--ivory); margin: 0;
}
.ph-head p { color: var(--text-secondary); margin: 10px 0 0; max-width: 46ch; font-size: 1.02rem; line-height: 1.55; }

/* ── The latest photo ───────────────────────────────────── */
.ph-latest {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: center;
  padding: 28px; border: 1px solid var(--gold-faint); border-radius: 4px;
  background: radial-gradient(120% 90% at 20% 0%, rgba(196, 31, 62, 0.10), transparent 60%), rgba(23, 16, 19, 0.6);
}
.ph-frame {
  position: relative; display: block; justify-self: center; border: 0; padding: 0; cursor: zoom-in;
  background: #000; box-shadow: 0 0 0 1px var(--gold-dim), 0 40px 80px -30px rgba(0, 0, 0, 0.9);
  line-height: 0; border-radius: 2px; overflow: hidden;
}
/* Sized so the photo and its details (date, likes, countdown) fit on one screen */
.ph-frame img { display: block; max-height: clamp(420px, calc(100vh - 300px), 880px); max-width: 100%; width: auto; height: auto; user-select: none; -webkit-user-drag: none; }
.ph-frame:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.ph-frame.is-locked { cursor: default; }
.ph-frame.is-locked img { filter: blur(26px) saturate(0.7) brightness(0.65); transform: scale(1.15); width: min(440px, 80vw); max-height: none; aspect-ratio: 3 / 4; object-fit: cover; }

.ph-side { display: flex; flex-direction: column; gap: 22px; padding-bottom: 6px; }
.ph-posted { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; color: var(--ivory); margin: 0; }
.ph-posted small { display: block; font-family: var(--font-body); font-size: 0.92rem; color: var(--text-muted); margin-top: 6px; letter-spacing: 0; }
.ph-caption { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.55; margin: 0; }
.ph-stats { display: flex; gap: 10px; }

.ph-next { border-top: 1px solid var(--gold-faint); padding-top: 18px; }
.ph-next span { display: block; color: var(--text-muted); font-size: 0.9rem; }
.ph-next strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.55rem; color: var(--gold); margin-top: 2px; font-variant-numeric: tabular-nums; }

.ph-locked-note h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--ivory); margin: 0 0 8px; line-height: 1.15; }
.ph-locked-note p { color: var(--text-secondary); margin: 0; line-height: 1.55; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────── */
.ph-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--gold-dim); background: transparent; color: var(--ivory);
  font: 600 0.95rem var(--font-body); cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s, color .15s;
}
.ph-btn:hover { border-color: var(--gold); background: rgba(196, 154, 100, 0.08); }
.ph-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ph-btn.primary { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.ph-btn.primary:hover { background: var(--crimson-hot); border-color: var(--crimson-hot); }
.ph-btn svg { width: 18px; height: 18px; flex: none; }
.ph-btn[disabled] { opacity: 0.5; cursor: default; }

.ph-like.is-liked { color: var(--crimson-hot); border-color: rgba(238, 47, 82, 0.55); }
.ph-like.is-liked svg { fill: currentColor; }
.ph-like.pop svg { animation: ph-pop .35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes ph-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ── Earlier photos ─────────────────────────────────────── */
.ph-archive-head { display: flex; align-items: baseline; justify-content: space-between; margin: 64px 0 18px; }
.ph-archive-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; color: var(--ivory); margin: 0; }
.ph-archive-head span { color: var(--text-muted); font-size: 0.95rem; }

.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ph-tile {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border: 0; padding: 0; cursor: zoom-in;
  background: #1a1215; border-radius: 2px;
}
.ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; transition: transform .5s ease; }
.ph-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 45%); opacity: 0; transition: opacity .2s; }
.ph-tile .ph-tile-meta {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; display: flex; gap: 14px; align-items: center;
  color: #fff; font-size: 0.88rem; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.ph-tile .ph-tile-meta svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.ph-tile .ph-tile-meta time { margin-left: auto; font-weight: 500; opacity: 0.8; }
.ph-tile:hover img { transform: scale(1.03); }
.ph-tile:hover::after, .ph-tile:focus-visible::after { opacity: 1; }
.ph-tile:hover .ph-tile-meta, .ph-tile:focus-visible .ph-tile-meta { opacity: 1; transform: none; }
.ph-tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ph-more { display: flex; justify-content: center; margin-top: 28px; }

.ph-empty, .ph-error { text-align: center; padding: 80px 20px; color: var(--text-secondary); }
.ph-empty h2, .ph-error h2 { font-family: var(--font-display); color: var(--ivory); font-size: 1.8rem; margin: 0 0 8px; }

/* ── Viewer ─────────────────────────────────────────────── */
/* Above the cookie notice (9999): the viewer is a full-screen dialog the visitor opened */
.ph-viewer { position: fixed; inset: 0; z-index: 10001; display: grid; grid-template-columns: minmax(0, 1fr) 380px; background: rgba(5, 3, 4, 0.97); }
.ph-viewer[hidden] { display: none; }
.ph-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 24px 72px; }
.ph-stage img { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; user-select: none; -webkit-user-drag: none; animation: ph-in .22s ease-out; }
@keyframes ph-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.ph-nav, .ph-close {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(243, 236, 230, 0.18); background: rgba(11, 8, 9, 0.6); color: var(--ivory); cursor: pointer;
}
.ph-nav:hover, .ph-close:hover { border-color: var(--gold); }
.ph-nav:focus-visible, .ph-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ph-nav[disabled] { opacity: 0.25; cursor: default; }
.ph-nav svg, .ph-close svg { width: 20px; height: 20px; }
.ph-prev { left: 16px; top: 50%; translate: 0 -50%; }
.ph-next-btn { right: 16px; top: 50%; translate: 0 -50%; }
.ph-close { top: 16px; left: 16px; }

.ph-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--gold-faint); background: #120d0f; }
.ph-panel-head { padding: 22px 22px 16px; border-bottom: 1px solid var(--gold-faint); display: flex; flex-direction: column; gap: 14px; }
.ph-panel-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: var(--ivory); margin: 0; }
.ph-panel-head h2 small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.ph-panel-head p { margin: 0; color: var(--text-secondary); line-height: 1.5; }

.ph-comments { flex: 1; overflow-y: auto; padding: 8px 22px; overscroll-behavior: contain; }
.ph-comment { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(196, 154, 100, 0.08); }
.ph-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #2a1d21; display: grid; place-items: center; color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.ph-comment-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ph-comment-top b { color: var(--ivory); font-size: 0.93rem; }
.ph-comment-top b.is-admin { color: var(--gold); }
.ph-comment-top time { color: var(--text-muted); font-size: 0.8rem; }
.ph-comment-top button { margin-left: auto; border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0; }
.ph-comment-top button:hover { color: var(--crimson-hot); }
.ph-comment p { margin: 4px 0 0; color: var(--text-secondary); line-height: 1.5; font-size: 0.95rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.ph-comments-empty { color: var(--text-muted); padding: 28px 0; text-align: center; font-size: 0.95rem; }

.ph-compose { border-top: 1px solid var(--gold-faint); padding: 14px 22px 18px; }
.ph-compose textarea {
  width: 100%; min-height: 44px; max-height: 160px; resize: none; box-sizing: border-box; padding: 11px 14px;
  border-radius: 10px; border: 1px solid rgba(196, 154, 100, 0.22); background: #0b0809; color: var(--ivory);
  font: 0.95rem/1.45 var(--font-body);
}
.ph-compose textarea:focus { outline: none; border-color: var(--gold); }
.ph-compose-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 10px; }
.ph-compose-row small { color: var(--text-muted); font-size: 0.8rem; }
.ph-compose-error { color: var(--crimson-hot); font-size: 0.85rem; margin: 8px 0 0; }
.ph-compose-locked { color: var(--text-secondary); font-size: 0.92rem; margin: 0; }
.ph-compose-locked a { color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .ph-latest { grid-template-columns: 1fr; gap: 24px; padding: 18px; }
  .ph-side { padding: 0; }
  .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-viewer { grid-template-columns: 1fr; grid-template-rows: minmax(0, 58vh) minmax(0, 1fr); }
  .ph-stage { padding: 12px 56px; }
  .ph-stage img { max-height: calc(58vh - 24px); }
  .ph-panel { border-left: 0; border-top: 1px solid var(--gold-faint); }
}
@media (max-width: 560px) {
  .ph { padding: 0 14px 72px; }
  .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ph-tile .ph-tile-meta { opacity: 1; transform: none; font-size: 0.8rem; }
  .ph-tile::after { opacity: 1; }
  .ph-stage { padding: 8px; }
  .ph-nav { width: 40px; height: 40px; background: rgba(11, 8, 9, 0.75); }
  .ph-prev { left: 8px; } .ph-next-btn { right: 8px; } .ph-close { top: 8px; left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ph-tile img, .ph-tile::after, .ph-tile .ph-tile-meta, .ph-btn { transition: none; }
  .ph-stage img, .ph-like.pop svg { animation: none; }
}
