/* ============================================================
   Rescue Photo — Editorial Cinematic frontend.
   Tokens (--bg, --text, --accent, --mid, --border, --bg-elev,
   --muted, --faint) are injected from settings via
   partials/head.ejs so admin theme changes cascade through.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:root {
  --max:      1440px;
  --gutter:   clamp(20px, 4vw, 48px);
  --ease:     cubic-bezier(0.2, 0, 0, 1);
  --label-sz: 11px;
  --label-tr: 0.22em;
}

/* ------------- Typography ------------- */

.display {
  font-family: var(--heading-font);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.narrative {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.65;
  color: var(--text);
  max-width: 58ch;
}
.narrative p + p { margin-top: 1em; }
.narrative a { color: var(--accent); border-bottom: 1px solid var(--accent); }

.label {
  font-family: var(--body-font);
  font-size: var(--label-sz);
  letter-spacing: var(--label-tr);
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ------------- Top nav: fixed, dims after idle ------------- */

#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  z-index: 50;
  transition: opacity 600ms var(--ease), background 400ms var(--ease), border-color 400ms var(--ease);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}

/* Over a photo hero — dark scrim for legibility on bright skies */
#main-nav.nav--over-photo {
  color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.2));
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(6px) saturate(1.05);
  -webkit-backdrop-filter: blur(6px) saturate(1.05);
}

.nav-logo {
  font-family: var(--heading-font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
  transition: opacity 200ms var(--ease);
}
.nav-links a:hover, .nav-links a.is-current { opacity: 1; }

.nav-user-pill {
  padding: 7px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px !important;
  letter-spacing: 0.22em !important;
  opacity: 1 !important;
}

/* Hamburger + mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  flex-direction: column;
  gap: 3px;
}
.nav-hamburger span {
  width: 18px; height: 1px; background: currentColor; display: block;
}
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px;
  background: var(--bg);
  color: var(--text);
}
.mobile-menu-overlay.is-open { display: flex; }
.mobile-menu-overlay a {
  font-family: var(--heading-font);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.04em;
}
.mobile-menu-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* Chrome dimming (hero + image viewer) */
.chrome-dim #main-nav,
.chrome-dim .hero-meta,
.chrome-dim #viewer-bar { opacity: 0.15; }
.chrome-dim #main-nav:hover,
.chrome-dim #viewer-bar:hover,
.chrome-dim .hero-meta:hover { opacity: 1; }

/* ------------- Hero: cinematic cross-fade ------------- */

.home-hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #000;
}
.home-hero .frame {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1600ms var(--ease);
}
.home-hero .frame.is-active { opacity: 1; }
.home-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 38%;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  pointer-events: none;
}
.home-hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 22%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0));
  pointer-events: none;
  z-index: 1;
}
.hero-meta {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: #fff;
  z-index: 5;
  transition: opacity 600ms var(--ease);
}
.hero-meta .caption {
  max-width: 40ch;
  font-family: var(--heading-font);
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.3;
  font-style: italic;
  opacity: 0.92;
}
.hero-meta .index {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.85;
}
.hero-meta .index .divider {
  width: 48px; height: 1px; background: rgba(255,255,255,0.5);
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  z-index: 5;
}
@media (max-width: 700px) {
  .scroll-hint { display: none; }
  .hero-meta { flex-direction: column; align-items: flex-start; }
}

/* ------------- Intro section (below hero) ------------- */

.section {
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.intro h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}
.intro h1 em { font-style: italic; }
.intro .intro-body { padding-top: 8px; }
@media (max-width: 800px) {
  .intro { grid-template-columns: 1fr; gap: 28px; }
}

/* ------------- Editorial feature spreads (home) ------------- */

.features {
  max-width: var(--max);
  margin: clamp(60px, 8vw, 120px) auto 0;
  padding: 0 var(--gutter);
}
.features-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 24px;
  margin-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--border);
}
.features-heading .lhs .label { margin-bottom: 8px; display: block; }
.features-heading h2 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.features-heading a.view-all {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 300ms var(--ease), gap 300ms var(--ease);
}
.features-heading a.view-all:hover { color: var(--text); gap: 16px; }

.feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-bottom: clamp(80px, 10vw, 140px);
}
.feature:nth-child(even) { grid-template-columns: 5fr 7fr; }
.feature:nth-child(even) .feature-image { order: 2; }
.feature:nth-child(even) .feature-body { order: 1; }
.feature-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
}
.feature-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1200ms var(--ease);
}
.feature:hover .feature-image img { transform: scale(1.03); }
.feature-image .feature-num {
  position: absolute;
  top: 20px; left: 20px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.feature-image .lock-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}
.feature-body .kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: block;
}
.feature-body h3 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(32px, 4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.feature-body p {
  font-family: var(--heading-font);
  font-size: clamp(16px, 1.1vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
  margin-bottom: 28px;
}
.feature-body .feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--text);
  transition: gap 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.feature-body .feature-cta:hover {
  gap: 20px; color: var(--accent); border-color: var(--accent);
}
@media (max-width: 800px) {
  .feature, .feature:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .feature-image { order: 1; }
  .feature:nth-child(even) .feature-body { order: 2; }
  .feature-image { aspect-ratio: 3/2; }
}

/* ------------- Private galleries CTA bar (home) ------------- */

.private-bar {
  max-width: var(--max);
  margin: 0 auto clamp(80px, 10vw, 140px);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.private-bar-inner {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 28px 32px;
  border: 1px solid var(--border);
  transition: border-color 300ms var(--ease), background 300ms var(--ease);
}
.private-bar-inner:hover { border-color: var(--accent); background: var(--bg-elev); }
.private-bar-left { display: flex; align-items: center; gap: 20px; }
.private-bar .lock-icon { color: var(--muted); flex-shrink: 0; }
.private-bar h4 {
  font-family: var(--heading-font);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 4px;
}
.private-bar p { color: var(--muted); font-size: 14px; }
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 300ms var(--ease), gap 300ms var(--ease);
}
.private-bar-inner:hover .arrow-link { color: var(--text); gap: 16px; }
@media (max-width: 700px) {
  .private-bar-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ------------- Page header (collection / gallery / archive) ------------- */

.page-header {
  padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(40px, 5vw, 80px);
  max-width: var(--max);
  margin: 0 auto;
}
.breadcrumb {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { margin: 0 10px; opacity: 0.5; }

.page-header h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  /* max-width: 18ch was clipping multi-word titles ("Summer 2024 in Japan"
   * → "Japan" wrapping to its own line) even on wide screens. The outer
   * .page-header is already constrained to the site's --max width, so the
   * title naturally fills that container without a separate ch cap. */
}
.page-header .subtitle {
  font-family: var(--heading-font);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 24px);
  margin-top: 14px;
  max-width: 48ch;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.meta-cell .label { display: block; margin-bottom: 6px; }
.meta-cell .value {
  font-family: var(--heading-font);
  font-size: 19px;
  font-weight: 400;
}

/* Narrative block — rendered conditionally */
.narrative-block {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(60px, 7vw, 100px);
}
.narrative-block .narrative {
  margin-left: auto;
  margin-right: auto;
}

/* ------------- Galleries grid (collection page) ------------- */

.galleries-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 80px) var(--gutter) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 5vw, 90px) clamp(32px, 4vw, 64px);
}
.gal-card { display: block; position: relative; }
.gal-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}
.gal-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease), filter 400ms var(--ease);
}
.gal-card:hover .gal-card-img img { transform: scale(1.03); filter: brightness(1.06); }
.gal-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 18px;
  gap: 16px;
}
.gal-card h3 {
  font-family: var(--heading-font);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 400;
  line-height: 1.2;
}
.gal-card .gal-num, .gal-card .gal-date {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.gal-card p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
  max-width: 52ch;
}
.gal-card .lock-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}
@media (max-width: 800px) {
  .galleries-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ------------- Collections archive (/collections) ------------- */

.collections-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(48px, 6vw, 96px) clamp(32px, 4vw, 64px);
}
.coll-card { display: block; position: relative; }
.coll-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.coll-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1200ms var(--ease);
}
.coll-card:hover .coll-card-img img { transform: scale(1.04); }
.coll-card .num-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.coll-card .card-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}
.coll-card h3 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.coll-card p {
  font-family: var(--heading-font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
}
@media (max-width: 800px) {
  .collections-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* ------------- Masonry photo grid (gallery page) -------------
 * Row-major CSS grid with auto-rows of a small base unit; each tile claims
 * a row span proportional to its aspect ratio (computed server-side from
 * the image's width/height). This yields a masonry look while preserving
 * left-to-right, top-to-bottom reading order — unlike column-count, which
 * fills each column top-to-bottom before moving on. */

.photo-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* auto-rows + gap are tuned to match the rowSpan formula in gallery.ejs
   * (Math.round(ratio * 32) + 1). With 8px rows and 4px gaps a 3:2 image
   * claims ~22 rows → tile height ~260px at ~400px tile width. Any
   * mismatch here causes object-fit:cover to badly crop. */
  grid-auto-rows: 8px;
  gap: 4px;
}
.photo-grid .photo-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  height: 100%;
}
.photo-grid .photo-thumb img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  transition: transform 900ms var(--ease), filter 400ms var(--ease);
}
.photo-grid .photo-thumb:hover img {
  transform: scale(1.03); filter: brightness(1.06);
}
.thumb-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transition: opacity 300ms var(--ease);
}
.photo-thumb:hover .thumb-overlay { opacity: 1; }
.thumb-title {
  font-family: var(--heading-font);
  font-style: italic;
  font-size: 15px;
}
@media (max-width: 1000px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 3px; }
}
@media (max-width: 540px) {
  .photo-grid { grid-template-columns: 1fr; gap: 2px; }
}

/* Pagination */
.pagination {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(60px, 7vw, 100px);
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 200ms var(--ease);
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination .active {
  background: var(--text); color: var(--bg); border-color: var(--text);
}

/* ------------- Image viewer ------------- */

.viewer {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
#viewer-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  z-index: 20;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border);
  transition: opacity 500ms var(--ease);
}
.viewer-bar-slot { flex: 1; }
.img-back {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 200ms var(--ease);
}
.img-back:hover { opacity: 1; }
.img-counter {
  text-align: center;
  font-family: var(--heading-font);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
  display: block;
}
.img-arrows {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.btn-square {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  text-decoration: none;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.btn-square:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-square.is-disabled { opacity: 0.25; pointer-events: none; }

.viewer-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 100vh;
}
.img-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 40px;
  background: var(--bg);
}
.img-photo img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}
.img-sidebar {
  padding: 120px 36px 48px;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  color: var(--text);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.img-sidebar h2,
.img-sidebar .img-title {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.img-sidebar .label.kicker {
  display: block;
  margin-bottom: 12px;
}
.field {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.field:last-of-type { border-bottom: 1px solid var(--border); }
.field label, .field .label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.field .value {
  font-family: var(--heading-font);
  font-size: 16px;
}
.field .value.mono, .field.mono .value {
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--muted);
}
.img-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.img-tags .tag {
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-download, .img-download-btn {
  width: 100%;
  padding: 16px;
  margin-top: 28px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}
.btn-download:hover, .img-download-btn:hover {
  background: transparent; color: var(--text);
}
.guest-download-msg {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.guest-download-msg a { color: var(--accent); border-bottom: 1px solid var(--accent); }

@media (max-width: 900px) {
  .viewer-stage { grid-template-columns: 1fr; }
  .img-sidebar {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 48px var(--gutter);
  }
  .img-photo { padding: 88px 0 24px; }
}

/* ------------- About page ------------- */

.about-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(80px, 10vw, 140px);
}
.about-header { margin-bottom: clamp(48px, 6vw, 80px); }
.about-header h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.about-header .sub {
  font-family: var(--heading-font);
  font-style: italic;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 22px);
  margin-top: 14px;
  max-width: 48ch;
}
.about-content {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.about-content.headshot-right {
  grid-template-columns: 1fr 360px;
}
.about-headshot img {
  width: 100%; height: auto; display: block;
}
.about-headshot figcaption {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-body {
  font-family: var(--heading-font);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.65;
}
.about-body p + p { margin-top: 1em; }
.about-body h2, .about-body h3 {
  font-family: var(--heading-font);
  font-weight: 400;
  margin: 1.4em 0 0.4em;
}
.about-body h2 { font-size: clamp(24px, 2.4vw, 32px); }
.about-body h3 { font-size: clamp(20px, 1.8vw, 24px); }
.about-body a { color: var(--accent); border-bottom: 1px solid var(--accent); }
@media (max-width: 800px) {
  .about-content, .about-content.headshot-right {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ------------- Private gate page ------------- */

.private-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--gutter) 80px;
}
.private-card {
  max-width: 440px;
  width: 100%;
  text-align: center;
  padding: 48px 32px;
  border: 1px solid var(--border);
}
.private-card .lock-svg {
  color: var(--muted);
  margin: 0 auto 20px;
  opacity: 0.5;
}
.private-card h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.05;
  margin-bottom: 10px;
}
.private-card .sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}
.private-card input[type="password"],
.private-card input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--body-font);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-align: center;
  transition: border-color 200ms var(--ease);
}
.private-card input:focus {
  outline: none; border-color: var(--accent);
}
.private-card button {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  background: var(--text); color: var(--bg);
  border: 1px solid var(--text);
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.private-card button:hover { background: transparent; color: var(--text); }
.private-error {
  margin-top: 18px;
  color: #e87676;
  font-size: 13px;
}

/* ------------- Footer ------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  max-width: var(--max);
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-left { display: flex; flex-direction: column; gap: 6px; }
.footer-left .wordmark {
  font-family: var(--heading-font);
  font-size: 14px;
  letter-spacing: 0.28em;
  color: var(--text);
}
.footer-center { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-center a:hover { color: var(--text); }
.footer-right { text-align: right; }
@media (max-width: 700px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }
  .footer-right { text-align: left; }
}

/* ------------- Profile (kept minimal-editorial) ------------- */

.profile-page {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(80px, 10vw, 140px);
}
.profile-page h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(38px, 5vw, 56px);
  letter-spacing: -0.015em;
  margin-bottom: 40px;
}
.profile-card {
  border: 1px solid var(--border);
  padding: 32px;
  margin-bottom: 24px;
  background: var(--bg-elev);
}
.profile-card h2 {
  font-family: var(--heading-font);
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 18px;
}
.profile-card label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.profile-card input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--body-font);
  font-size: 14px;
  margin-bottom: 16px;
}
.profile-card button {
  padding: 12px 24px;
  background: var(--text); color: var(--bg);
  border: 1px solid var(--text);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.profile-card button:hover { background: transparent; color: var(--text); }

/* Error / 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--gutter);
}
.error-page h1 {
  font-family: var(--heading-font);
  font-weight: 300;
  font-size: clamp(48px, 6vw, 80px);
  margin-bottom: 14px;
}
.error-page p { color: var(--muted); }
