/* Art & Stories page – extends styles.css */

.art-head {
  display: flex; align-items: center; gap: clamp(16px, 2vw, 28px);
  padding: clamp(44px, 6vw, 96px) var(--pad) 0;
}
.art-head .label { margin: 0; font-size: clamp(14px, 1.4vw, 22px); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.art-head .rule { flex: 1; min-width: 12px; height: 1px; background: var(--line); }

.pager { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 20px); font-size: clamp(15px, 1.3vw, 20px); letter-spacing: .12em; }
.pager button { display: grid; place-items: center; padding: 10px; margin: -10px; background: none; border: 0; color: #fff; cursor: pointer; transition: opacity .2s; }
.pager button:hover { opacity: .6; }
.pager .icon { width: 24px; height: 24px; }
.count { display: flex; gap: .6em; font-variant-numeric: tabular-nums; }
.sep { color: var(--muted); }
.total { color: var(--muted); }

/* ---------- Slide ---------- */
.art {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(40px, 5vw, 110px);
  align-items: start;
  padding: clamp(36px, 4.5vw, 72px) var(--pad) clamp(56px, 6vw, 96px);
  transition: opacity .22s ease;
}
.art.is-changing { opacity: 0; }

.kicker { display: flex; gap: .7em; margin: 0 0 20px; font-size: clamp(13px, 1vw, 16px); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.art-text h1 { max-width: none; font-size: clamp(38px, 4.4vw, 68px); line-height: 1.05; }
.sub { margin: 14px 0 0; font-size: clamp(22px, 2.1vw, 32px); font-weight: 300; color: var(--muted); }
.art-text hr { border: 0; border-top: 1px solid var(--line); margin: clamp(28px, 3vw, 44px) 0; }

.desc p { margin: 0 0 22px; max-width: 52ch; font-size: clamp(17px, 1.35vw, 21px); font-weight: 300; line-height: 1.7; color: var(--soft); }

.credits { display: grid; gap: 28px; margin: clamp(36px, 4vw, 60px) 0 0; padding-left: clamp(24px, 2.4vw, 38px); border-left: 1px solid var(--line); }
.credits dt { margin: 0 0 8px; font-size: clamp(12px, .95vw, 15px); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.credits dd { margin: 0; font-weight: 700; font-size: clamp(20px, 1.7vw, 26px); }
.credits ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.credits li:not(:last-child)::after { content: "·"; margin: 0 .45em; font-weight: 400; color: var(--muted); }

/* ---------- Image stage ---------- */
.stage { position: relative; margin: 0; aspect-ratio: 3 / 2; background: #0e1a36; overflow: hidden; touch-action: pan-y; }
.stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .ph {
  position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px;
  color: var(--muted); font-size: 16px;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 14px, transparent 14px 28px);
  border: 1px dashed var(--line);
}
.stage .ph code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: #fff; }
.stage.is-missing img { display: none; }
.stage.is-missing .ph { display: grid; }

/* ---------- Per-slide layouts ---------- */
.art[data-layout="image-left"] { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.art[data-layout="image-left"] .stage { order: -1; }
.art[data-shape="portrait"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.art[data-shape="portrait"] .stage { width: 100%; max-width: 640px; }
.art[data-shape="portrait"][data-layout="image-left"] .stage { justify-self: start; }
.art[data-shape="portrait"][data-layout="image-right"] .stage { justify-self: end; }

/* ---------- Credit details ---------- */
.credits dd .detail { display: block; margin-top: 4px; font-weight: 300; font-size: clamp(17px, 1.4vw, 21px); color: var(--soft); }
.ig { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; font-weight: 400; font-size: 18px; }
.ig span { text-decoration: underline; text-underline-offset: 4px; }
.ig .icon { width: 24px; height: 24px; }
.ig .ext { width: 18px; height: 18px; }
.ig:hover { opacity: .75; }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1024px) {
  .art, .art[data-layout], .art[data-shape="portrait"] { grid-template-columns: 1fr; gap: 40px; }
  .art .stage, .art[data-layout] .stage { order: -1; }
  .art[data-shape="portrait"] .stage, .art[data-shape="portrait"][data-layout] .stage { max-width: none; justify-self: stretch; }
  .desc p { max-width: 62ch; }
}

/* Tablet: tall images sit beside the text instead of stacking */
@media (min-width: 681px) and (max-width: 1024px) {
  .art[data-shape="portrait"] { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; }
  .art[data-shape="portrait"][data-layout="image-right"] { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .art[data-shape="portrait"][data-layout="image-right"] .stage { order: 0; }
}

@media (max-width: 680px) {
  .art-head .label { letter-spacing: .14em; }
  .art-text h1 { font-size: clamp(34px, 10vw, 44px); }
  .art[data-shape="portrait"] .stage { max-height: 78svh; }
  .credits { gap: 22px; }
}
