/* ══════════════════════════════════════════════════════════════════
   WALLWRIGHT STUDIO — gallery / portfolio layer
   Loaded only by /work/ pages, after wallwright.css.
   Inherits every token from :root in wallwright.css.
   ══════════════════════════════════════════════════════════════════ */

/* ───────── shared page header for work pages ───────── */
.work-hero {
  padding: 190px 0 0;
  position: relative;
  z-index: 2;
}
.work-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 0.99;
  letter-spacing: -0.025em;
  color: var(--clay);
  margin-bottom: 26px;
  max-width: 15ch;
}
.work-hero h1 em { font-style: italic; font-weight: 300; color: var(--ochre); }
.work-hero-sub {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--clay-mid);
  max-width: 560px;
}
.work-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 34px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay-soft);
}
.work-hero-meta span { padding: 6px 0; }
.work-hero-meta b { color: var(--ochre); font-weight: 400; }
@media (max-width: 820px) { .work-hero { padding: 140px 0 0; } }

/* ───────── discipline filter ───────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 64px 0 0;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.filter {
  flex: 1 1 auto;
  background: var(--paper);
  border: 0;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-mid);
  padding: 16px 20px;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.filter:hover { background: var(--lime); color: var(--clay); }
.filter[aria-pressed="true"] { background: var(--clay); color: var(--lime); }
.filter .count { color: var(--ochre); margin-left: 8px; }
.filter[aria-pressed="true"] .count { color: var(--lime-warm); }

/* ───────── album index grid ───────── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 40px;
  padding: 72px 0 130px;
}
@media (max-width: 1080px) { .album-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; } }
@media (max-width: 660px)  { .album-grid { grid-template-columns: 1fr; gap: 44px; } }

.album-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.album-card[hidden] { display: none; }
.album-card.filtered-out {
  opacity: 0.16;
  pointer-events: none;
}
.album-card-frame {
  position: relative;
  overflow: hidden;
  background: var(--lime-warm);
  aspect-ratio: 4 / 5;
}
.album-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 1.4s cubic-bezier(0.16, 0.7, 0.2, 1), filter 0.8s ease;
}
.album-card:hover .album-card-frame img { transform: scale(1.055); }
.album-card-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 36, 30, 0.42), transparent 46%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.album-card:hover .album-card-frame::after { opacity: 1; }
.album-card-count {
  position: absolute;
  top: 0; right: 0;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--clay);
  background: rgba(246, 240, 227, 0.9);
  backdrop-filter: blur(4px);
  padding: 9px 13px;
}
.album-card-open {
  position: absolute;
  left: 20px; bottom: 18px;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 0.7, 0.2, 1);
}
.album-card-open::after { content: ' →'; }
.album-card:hover .album-card-open { opacity: 1; transform: translateY(0); }

.album-card-body { padding-top: 20px; }
.album-card-place {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 10px;
}
.album-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--clay);
  margin-bottom: 12px;
  transition: color 0.25s;
}
.album-card:hover h3 { color: var(--ochre); }
.album-card-tags {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-soft);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ───────── album page ───────── */
.album-head { padding: 190px 0 0; position: relative; z-index: 2; }
.album-back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay-soft);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 34px;
  transition: color 0.2s, transform 0.3s;
}
.album-back::before { content: '← '; }
.album-back:hover { color: var(--ochre); transform: translateX(-4px); }
.album-head h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--clay);
  margin-bottom: 28px;
  max-width: 17ch;
}
.album-head h1 em { font-style: italic; color: var(--ochre); }
.album-intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
  padding-bottom: 18px;
}
.album-summary { font-size: 18px; line-height: 1.7; color: var(--clay-mid); }
.album-note {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.5;
  color: var(--clay-soft);
  padding-left: 26px;
  border-left: 1px solid var(--line-strong);
}
.album-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
.album-fact { padding: 18px 34px 18px 0; margin-right: 34px; border-right: 1px solid var(--line); }
.album-fact:last-child { border-right: 0; }
.album-fact-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay-soft);
  margin-bottom: 7px;
}
.album-fact-value { font-family: 'Fraunces', serif; font-size: 18px; color: var(--clay); }
@media (max-width: 900px) {
  .album-head { padding: 140px 0 0; }
  .album-intro { grid-template-columns: 1fr; gap: 30px; }
  .album-note { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--line-strong); }
}

/* ───────── before / after wipe ───────── */
.ba {
  margin: 88px 0 0;
  background: var(--clay);
  padding: 44px 44px 40px;
  position: relative;
  overflow: hidden;
}
.ba-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime-warm);
  margin-bottom: 8px;
}
.ba-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 28px;
  color: var(--lime);
  margin-bottom: 26px;
}
.ba-stage {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  background: var(--clay-mid);
}
.ba-stage img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.ba-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
  will-change: width;
}
.ba-clip img {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  object-position: center;
}
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--lime);
  transform: translateX(-0.5px);
  pointer-events: none;
  will-change: left;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--lime);
  background: rgba(42, 36, 30, 0.55);
  backdrop-filter: blur(3px);
}
.ba-handle::before {
  content: '‹ ›';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--lime);
}
.ba-tag {
  position: absolute;
  bottom: 16px;
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 13px;
  background: rgba(42, 36, 30, 0.72);
  color: var(--lime);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.ba-tag-before { left: 16px; }
.ba-tag-after  { right: 16px; }
.ba-hint {
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(237, 228, 211, 0.5);
}
@media (max-width: 820px) { .ba { padding: 30px 22px 26px; margin-top: 60px; } .ba-title { font-size: 22px; } }

/* ───────── staged cross-fade ───────── */
.stages { margin: 88px 0 0; }
.stages-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 8px;
}
.stages-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 28px;
  line-height: 1.25;
  color: var(--clay);
  margin-bottom: 26px;
}
@media (max-width: 820px) { .stages-title { font-size: 22px; } }
.stages-frame {
  position: relative;
  background: var(--lime-warm);
  overflow: hidden;
  /* an explicit ratio, no max-height: with aspect-ratio set, a height cap
     would drive the width instead and shrink the module to half the column */
  aspect-ratio: var(--stage-ar, 3 / 2);
}
.stages-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.stages-frame img.on { opacity: 1; }
.stages-tabs {
  display: flex;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-top: 0;
}
.stages-tab {
  flex: 1;
  background: var(--paper);
  border: 0;
  cursor: pointer;
  padding: 17px 16px;
  text-align: left;
  transition: background 0.35s ease, color 0.35s ease;
}
.stages-tab:hover { background: var(--lime); }
.stages-tab[aria-selected="true"] { background: var(--clay); }
.stages-tab-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--ochre);
  display: block;
  margin-bottom: 6px;
}
.stages-tab[aria-selected="true"] .stages-tab-num { color: var(--lime-warm); }
.stages-tab-name {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: var(--clay);
  letter-spacing: -0.01em;
}
.stages-tab[aria-selected="true"] .stages-tab-name { color: var(--lime); }
@media (max-width: 660px) {
  .stages { margin-top: 60px; }
  .stages-tabs { flex-direction: column; }
  .stages-tab { text-align: left; padding: 13px 16px; }
  .stages-tab-name { font-size: 16px; }
}

/* ───────── the sequence ───────── */
.sequence {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 44px 34px;
  padding: 96px 0 40px;
  align-items: start;
}
.shot { grid-column: span 6; }
.shot-half  { grid-column: span 3; }
.shot-third { grid-column: span 2; }

.shot-frame {
  position: relative;
  overflow: hidden;
  background: var(--lime-warm);
  cursor: zoom-in;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
}
.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.001);
  transition: transform 1.5s cubic-bezier(0.16, 0.7, 0.2, 1);
}
.shot-frame:hover img { transform: scale(1.04); }
.shot-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(42, 36, 30, 0.1);
  pointer-events: none;
}
.shot-zoom {
  position: absolute;
  top: 0; right: 0;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--clay);
  background: rgba(246, 240, 227, 0.9);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.shot-frame:hover .shot-zoom { opacity: 1; transform: translateY(0); }

.shot-cap {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding-top: 14px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}
.shot-state {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
}
.shot-state.is-before { color: var(--clay-soft); }
.shot-text { font-size: 15px; line-height: 1.6; color: var(--clay-mid); }

@media (max-width: 900px) {
  .sequence { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; padding: 60px 0 30px; }
  .shot, .shot-half { grid-column: span 2; }
  .shot-third { grid-column: span 1; }
  .shot-third .shot-text { font-size: 13.5px; }
}
@media (max-width: 560px) {
  .sequence { grid-template-columns: 1fr; }
  .shot, .shot-half, .shot-third { grid-column: span 1; }
}

/* ───────── album footer nav (a div: the global nav{} rule is position:fixed) ───────── */
.album-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-strong);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  margin-top: 40px;
}
.album-nav a {
  background: var(--paper);
  padding: 44px 40px;
  text-decoration: none;
  transition: background 0.35s ease;
}
.album-nav a:hover { background: var(--lime); }
.album-nav a.is-next { text-align: right; }
.album-nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 12px;
}
.album-nav-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 26px;
  line-height: 1.15;
  color: var(--clay);
  letter-spacing: -0.018em;
}
@media (max-width: 660px) {
  .album-nav { grid-template-columns: 1fr; }
  .album-nav a { padding: 28px 24px; }
  .album-nav a.is-next { text-align: left; }
}

/* ───────── lightbox ───────── */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 22, 18, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lb.open { opacity: 1; pointer-events: auto; }
.lb-figure {
  max-width: min(1180px, 92vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.965);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16, 0.7, 0.2, 1), opacity 0.4s ease;
}
.lb.open .lb-figure { transform: scale(1); opacity: 1; }
.lb-figure.swapping { opacity: 0; transform: scale(0.99); transition-duration: 0.18s; }
.lb-figure img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  display: block;
}
.lb-cap {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding-top: 16px;
  margin-top: 14px;
  border-top: 1px solid rgba(237, 228, 211, 0.22);
  width: 100%;
  max-width: 820px;
}
.lb-state {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime-warm);
  flex: 0 0 auto;
}
.lb-text { font-size: 15px; line-height: 1.6; color: rgba(237, 228, 211, 0.8); }
.lb-count {
  position: absolute;
  top: 26px; left: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(237, 228, 211, 0.55);
}
.lb-btn {
  position: absolute;
  background: none;
  border: 1px solid rgba(237, 228, 211, 0.3);
  color: var(--lime);
  cursor: pointer;
  width: 52px; height: 52px;
  font-size: 18px;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.lb-btn:hover { background: rgba(237, 228, 211, 0.1); border-color: var(--lime); }
.lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 26px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }
.lb-close { top: 22px; right: 26px; }
@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: 22px; transform: none; width: 46px; height: 46px; }
  .lb-prev { left: 22px; } .lb-next { right: 22px; }
  .lb-prev:hover, .lb-next:hover { transform: none; }
  .lb-cap { flex-direction: column; gap: 8px; }
}

/* ───────── motion opt-out ───────── */
@media (prefers-reduced-motion: reduce) {
  .album-card-frame img,
  .shot-frame img,
  .lb-figure,
  .stages-frame img { transition: none !important; transform: none !important; }
  .album-card:hover .album-card-frame img,
  .shot-frame:hover img { transform: none; }
}

/* a lone full-row portrait is inset rather than blown up to full measure */
.shot-inset { grid-column: 2 / span 4; }
@media (max-width: 900px) { .shot-inset { grid-column: span 2; } }
@media (max-width: 560px) { .shot-inset { grid-column: span 1; } }

/* ───────── work teaser (designer.html) ─────────
   Four album cards on a page that has no filter bar, so the grid runs 4-up and
   drops the standalone .album-grid page padding. Cards themselves are unchanged. */
.work-teaser { padding: 140px 0; background: var(--lime); }
.work-teaser .album-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  padding: 0 0 48px;
}
@media (max-width: 1080px) { .work-teaser .album-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px)  { .work-teaser .album-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px)  { .work-teaser { padding: 100px 0; } }
