/* ============================================================
   Ten Friends — dark gallery
   ============================================================ */

:root {
  --bg:        #0a0a0c;
  --bg-raise:  #131316;
  --ink:       #ece7dd;   /* soft warm off-white  */
  --ink-dim:   #9a938a;   /* muted labels         */
  --ink-faint: #5f5952;   /* footer / fine print  */
  --line:      #26241f;   /* hairline borders     */
  --glow:      rgba(0, 0, 0, 0.6);
  --accent:    #c9a86a;   /* warm brass, used sparingly */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --edge: clamp(1.25rem, 5vw, 5rem);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  /* soft vignette so the paintings sit in a pool of light */
  background-image:
    radial-gradient(120% 80% at 50% -10%, #17161a 0%, var(--bg) 55%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* very subtle film grain over everything */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.75rem) var(--edge);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-dim); }
.nav-item.is-current { color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }

/* ---------- Intro ---------- */
.intro {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 44rem;
  margin: clamp(3rem, 12vh, 8rem) auto clamp(3rem, 9vh, 6rem);
  padding: 0 var(--edge);
}

.overline {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.4rem;
}

.series-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0;
}

.series-note {
  color: var(--ink-dim);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  max-width: 32rem;
  margin: 1.75rem auto 0;
}

/* ---------- Gallery grid ---------- */
.gallery {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 3rem) var(--edge) clamp(4rem, 10vh, 7rem);
}

.plate { margin: 0; }

.plate-frame {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    0 18px 40px -18px rgba(0,0,0,0.85);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1), box-shadow 0.5s ease;
}

.plate-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) saturate(0.98);
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
}

.plate-frame::after {
  /* inner spotlight that warms on hover */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 70% at 50% 35%, transparent 55%, rgba(0,0,0,0.45) 100%);
  opacity: 0.9;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.plate-frame:hover,
.plate-frame:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.5),
    0 40px 70px -25px rgba(0,0,0,0.9),
    0 0 0 1px rgba(201,168,106,0.25);
  outline: none;
}
.plate-frame:hover img,
.plate-frame:focus-visible img { filter: brightness(1.04) saturate(1.05); transform: scale(1.03); }
.plate-frame:hover::after,
.plate-frame:focus-visible::after { opacity: 0.35; }

.plate-label {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(2.5rem, 8vh, 5rem) var(--edge);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.site-footer .muted { color: var(--ink-faint); font-size: 0.78rem; margin-top: 0.4rem; letter-spacing: 0.04em; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(92vw, 780px);
  max-height: 100%;
}

.lb-image {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.9);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.lb-image.is-loaded { opacity: 1; transform: scale(1); }

.lb-caption {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.lb-count { color: var(--ink-faint); }

.lb-close, .lb-nav {
  position: fixed;
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.25s ease, transform 0.25s ease;
  z-index: 51;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.lb-close:hover, .lb-nav:hover { color: var(--ink); }

.lb-close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2.25rem); font-size: 2.4rem; }
.lb-nav { top: 50%; transform: translateY(-50%); font-size: clamp(2.5rem, 6vw, 4rem); padding: 0 0.5rem; }
.lb-nav:hover { transform: translateY(-50%) scale(1.12); }
.lb-prev { left: clamp(0.25rem, 2vw, 1.5rem); }
.lb-next { right: clamp(0.25rem, 2vw, 1.5rem); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; gap: 2rem; }
  .lb-nav { top: auto; bottom: clamp(1rem, 5vw, 2rem); transform: none; }
  .lb-nav:hover { transform: scale(1.12); }
  .lb-prev { left: 25%; }
  .lb-next { right: 25%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .plate-frame:hover { transform: none; }
}
