/* ============================================================
   John Short — Photographer
   Plain, quiet portfolio chrome — white background, one light
   neutral grotesk, no color accent. The photos carry the design;
   nothing else should call attention to itself.

   Reference (kerryharrisonphotography.com) sets its whole site in
   Replica Light (Lineto, licensed — not something we can bundle).
   Work Sans at weight 300 is the closest free stand-in: same plain,
   light, ungeometric character, normal case, no tracking.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500&display=swap");

:root {
  --paper: #ffffff;
  --paper-dim: #f2f2f2;
  --ink: #111111;
  --mute: #737373; /* 4.74:1 on white — passes WCAG AA */
  --line: #e2e2e2;
  --stage: #ffffff; /* lightbox is white, same as the page */

  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: 24px;
  --page-margin: clamp(20px, 5vw, 64px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  background: var(--paper);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* stops the iOS long-press "Save Image" menu */
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- header / nav ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 40px;
  padding: 24px var(--page-margin) 48px;
  text-align: left;
}

.wordmark {
  order: 2;
  font-family: var(--sans);
  text-align: right;
}

.wordmark a {
  display: block;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wordmark-sub {
  display: block;
  margin-top: 5px;
  font-weight: 300;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}

.site-nav {
  order: 1;
  display: flex;
  justify-content: flex-start;
  gap: clamp(20px, 3vw, 36px);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(17px, 1.9vw, 21px);
  letter-spacing: normal;
  text-transform: none;
  color: var(--mute);
}

.site-nav a {
  position: relative;
  padding-bottom: 6px;
  color: var(--mute);
  transition: color 150ms var(--ease-out);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms var(--ease-out);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

/* Phones: menu and wordmark share one row, both scaling with the screen
   (the sizes meet the desktop ones at 520px, so nothing jumps). Below
   ~340px there's no room and the wordmark wraps under the menu. */
@media (max-width: 520px) {
  .site-header {
    column-gap: 16px;
  }

  .site-nav {
    gap: 14px;
    font-size: clamp(13px, 3.8vw, 17px);
  }

  .wordmark a {
    font-size: clamp(17px, 4.9vw, 24px);
  }

  .wordmark-sub {
    font-size: clamp(10px, 2.8vw, 12px);
  }
}

/* ---------- masonry grid ---------- */

.sheet {
  column-count: 1;
  column-gap: var(--gutter);
  padding: 0 var(--page-margin);
}

@media (min-width: 480px) {
  .sheet {
    column-count: 2;
  }
}

/* Portraits page only: bigger air between photos and from the page edge,
   side margin matching the gap. Its columns are fixed, laid out by hand in
   js/overview-order.js (three wide, two on phones), so they are real
   elements in a row rather than CSS columns that reflow. */
.sheet.sheet--overview {
  --overview-gap: 40px;
  display: flex;
  align-items: flex-start;
  gap: var(--overview-gap);
  padding: 0 var(--overview-gap);
}

.sheet--overview .sheet-col {
  flex: 1 1 0;
  min-width: 0;
}

.sheet.sheet--overview .frame {
  margin-bottom: var(--overview-gap);
}

.frame {
  position: relative;
  margin-bottom: var(--gutter);
  break-inside: avoid;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--paper-dim);
}

.frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .frame:hover img {
    opacity: 0.85;
  }
}

/* ---------- colour scope (home) ---------- */
/* A vectorscope drawn like ink on the white page, with the photos in the
   chosen colour beside it. The scope is the one loud thing here; the
   rest keeps the site's quiet chrome. Behaviour lives in js/scope.js. */

.scope-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--page-margin) 100px;
}

@media (min-width: 900px) {
  .scope-page {
    grid-template-columns: minmax(340px, 38%) minmax(0, 1fr);
    gap: clamp(40px, 4.5vw, 88px);
    align-items: start;
  }

  .scope-panel {
    position: sticky;
    top: 24px;
  }
}

.scope {
  position: relative;
  isolation: isolate; /* the photo trace multiplies onto the scope only */
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0 auto;
  touch-action: pan-y; /* phones: vertical swipes still scroll the page */
  cursor: crosshair;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 900px) {
  .scope {
    width: min(100%, 520px, calc(100svh - 120px));
    margin: 0;
  }
}

/* The ink is seen through a lens just wider than the rim, so the zoom
   between views stays inside the scope. */
.scope-lens {
  position: absolute;
  inset: 0;
  clip-path: circle(42.5% at 50% 50%);
  pointer-events: none;
}

.scope canvas,
.scope-graticule {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Hovering a photo swaps the full ink for that photo's own trace: in at
   180ms, back out quicker at 140ms. */
.scope-ink,
.scope-ink-photo {
  transition: opacity 140ms var(--ease-out);
}

.scope-ink-photo {
  mix-blend-mode: multiply;
  opacity: 0;
}

.scope.is-tracing .scope-ink {
  opacity: 0.18;
  transition-duration: 180ms;
}

.scope.is-tracing .scope-ink-photo {
  opacity: 1;
  transition-duration: 180ms;
}

/* The switch to black and white zooms in: the colour ink and its lines
   swell past the rim and fade while the tone wheel grows out of the centre
   dot, the one place every grey sat: 3x out, 1/3 in, so both layers move
   as one camera. Same 360ms both ways. */
.scope-ink,
.scope-ink-tone,
.g-colour,
.g-tone {
  transform-origin: 50% 50%;
  transition:
    opacity 140ms var(--ease-out),
    scale 360ms var(--ease-out);
}

.scope-ink-tone,
.g-tone {
  opacity: 0;
  scale: 0.333;
}

.g-colour,
.g-tone {
  transform-box: view-box;
}

.scope.is-bw .scope-ink,
.scope.is-bw .g-colour {
  opacity: 0;
  scale: 3;
  transition-duration: 260ms, 360ms;
}

.scope.is-bw .scope-ink-tone,
.scope.is-bw .g-tone {
  opacity: 1;
  scale: 1;
  transition-duration: 320ms, 360ms;
  transition-delay: 60ms, 0ms;
}

.scope.is-bw.is-tracing .scope-ink-tone {
  opacity: 0.18;
  transition-delay: 0ms;
}

.scope-graticule .g-ring {
  stroke-width: 0.032;
  vector-effect: none; /* a band in scope units, so it scales with the scope */
}

.g-edge {
  stroke: #cfcfcf;
  stroke-width: 1;
}

/* Each view's own target labels; the other view's are hidden and out of
   the tab order. */
.scope-target--tone,
.scope.is-bw .scope-target:not(.scope-target--tone) {
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms var(--ease-out), visibility 0s linear 160ms;
}

.scope.is-bw .scope-target--tone {
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms var(--ease-out) 120ms, visibility 0s;
}

/* The switch, in the scope's empty bottom-right corner: a colour disc and
   a grey ramp disc, the current view's disc at full strength. */
.scope-mode {
  position: absolute;
  left: 91%;
  top: 91%;
  translate: -50% -50%;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 150ms var(--ease-out), scale 120ms var(--ease-out);
}

.scope-mode::before {
  content: "";
  position: absolute;
  inset: -8px;
}

.scope-mode:active {
  scale: 0.96;
}

@media (hover: hover) and (pointer: fine) {
  .scope-mode:hover {
    border-color: #b3b3b3;
  }
}

.scope-mode:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.scope-mode-disc {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  opacity: 0.35;
  scale: 0.82;
  transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.scope-mode-disc--colour {
  background: conic-gradient(from 90deg, #d33 0deg, #d3d 60deg, #33d 120deg, #3dd 180deg, #3d3 240deg, #dd3 300deg, #d33 360deg);
}

.scope-mode-disc--bw {
  background: linear-gradient(90deg, #111 0%, #111 12%, #fff 88%, #fff 100%);
}

.scope-mode[aria-pressed="false"] .scope-mode-disc--colour,
.scope-mode[aria-pressed="true"] .scope-mode-disc--bw {
  opacity: 1;
  scale: 1;
  box-shadow: 0 0 0 1px #fff, 0 0 0 2px var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .scope-ink,
  .scope-ink-tone,
  .g-colour,
  .g-tone {
    scale: 1 !important;
  }
}

.scope.is-outside {
  cursor: default; /* the corners outside the ring don't pick anything */
}

.scope-graticule {
  overflow: visible;
}

.scope-graticule * {
  vector-effect: non-scaling-stroke;
  fill: none;
}

.g-chip {
  stroke: #fff;
  stroke-width: 1.5;
}

.g-rim {
  stroke: #b3b3b3;
  stroke-width: 1;
}

.g-half {
  stroke: #d6d6d6;
  stroke-width: 1;
  stroke-dasharray: 1 5;
}

.g-skin,
.g-cross {
  stroke: #bcbcbc;
  stroke-width: 1;
}

.g-vector {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.55;
}

/* The loupe: the circle of colour being matched. Positioned and sized by
   scope.js in % of the scope, so it scales with it. */
.scope-loupe {
  position: absolute;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.9),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.9);
  touch-action: none; /* the loupe is the drag handle on touch screens */
  cursor: grab;
  outline: none;
}

/* On touch screens, a grab area bigger than the ring: it's only ~20px
   across at the centre. A mouse doesn't need it. */
.scope-loupe::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

@media (pointer: coarse) {
  .scope-loupe::before {
    inset: -14px;
  }
}

.scope.is-dragging,
.scope.is-dragging .scope-loupe {
  cursor: grabbing;
}

.scope.is-dragging .scope-loupe {
  border-width: 2px; /* held */
}

.scope-loupe::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.9);
}

.scope-loupe:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* Swatch hover preview: where that colour sits, and the loupe it would get. */
.scope-ghost {
  position: absolute;
  translate: -50% -50%;
  border: 1.5px dashed var(--ink);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms var(--ease-out);
}

.scope-ghost::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  translate: -50% -50%;
  background: var(--c);
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--ink);
}

.scope-ghost.is-shown {
  opacity: 1;
  transition-duration: 160ms;
}

.scope-target {
  position: absolute;
  translate: -50% -50%;
  min-width: 30px;
  height: 30px;
  padding: 0 4px;
  border: 0;
  border-radius: 15px;
  background: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 30px;
  color: var(--mute);
  cursor: pointer;
  transition: color 150ms var(--ease-out), scale 120ms var(--ease-out);
}

.scope-target:active {
  scale: 0.95;
}

@media (hover: hover) and (pointer: fine) {
  .scope-target:hover {
    color: var(--ink);
  }
}

.scope-target:focus-visible {
  color: var(--ink);
  outline-offset: 0;
}

/* One reveal on load: the ink develops out from the centre (visible for
   about 600ms, the rim sits at 80%), and as it reaches the rim the loupe
   is set down onto it. The only motion that isn't a reply to the visitor. */
@property --develop {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

.scope.is-developing .scope-ink {
  -webkit-mask-image: radial-gradient(closest-side, #000 calc(var(--develop) - 14%), transparent var(--develop));
  mask-image: radial-gradient(closest-side, #000 calc(var(--develop) - 14%), transparent var(--develop));
  animation: scope-develop 850ms cubic-bezier(0.33, 1, 0.68, 1) both;
}

.scope.is-developing .scope-loupe {
  animation: scope-loupe-in 300ms var(--ease-out) 480ms both;
}

.scope.is-developing .g-vector {
  animation: scope-vector-in 300ms var(--ease-out) 480ms both;
}

@keyframes scope-develop {
  from { --develop: 0%; }
  to { --develop: 96%; }
}

@keyframes scope-loupe-in {
  from { opacity: 0; scale: 1.25; }
}

@keyframes scope-vector-in {
  from { opacity: 0; }
}

.scope-swatch {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pick, var(--paper-dim));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Phones: once the scope scrolls away, this pill keeps the colour in play
   (the dot) and takes you back to it. Never shown in the two-column layout. */
.scope-return {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  min-height: 46px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 23px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  translate: -50% 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms var(--ease-out), translate 160ms var(--ease-out), scale 120ms var(--ease-out),
    visibility 0s linear 160ms;
}

.scope-return.is-shown {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms var(--ease-out), translate 260ms var(--ease-out), scale 120ms var(--ease-out);
}

.scope-return:active {
  scale: 0.97;
}

.scope-return .scope-swatch {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

@media (min-width: 900px) {
  .scope-return {
    display: none;
  }
}

@media (max-width: 899px) {
  html {
    scroll-padding-bottom: 88px; /* keep focused photos clear of the pill */
  }
}

/* ---------- one screen (home) ---------- */
/* The colour page never scrolls: header, scope and photos, footer fill the
   viewport exactly, and scope.js fits the photos into what's left (--fit
   tells it to). A very short viewport (a phone on its side, a browser
   zoomed to 200%+) falls back to scrolling so nothing gets cut off. */

.one-screen,
.one-screen body {
  height: 100%;
  overflow: hidden;
}

.one-screen body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
}

.one-screen .site-header,
.one-screen .site-footer {
  flex: none;
}

.one-screen .site-footer {
  padding: 8px var(--page-margin) 14px;
}

.one-screen .scope-page {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding-bottom: 0;
}

.one-screen .results {
  min-height: 0;
  overflow: hidden;
}

.one-screen .rows {
  --fit: 1;
}

.one-screen .scope {
  touch-action: none; /* nothing to scroll: every drag on the scope is the loupe's */
}

/* Phones: the series name lives in the lightbox; under each photo, just
   its palette. */
.rows.is-compact .shot-cap a {
  display: none;
}

.rows.is-compact .shot-cap {
  justify-content: flex-start;
  padding-top: 2px;
}

.rows.is-compact .swatch {
  flex-basis: 18px;
  min-width: 11px;
  height: 22px;
}

.rows.is-compact .swatch::after {
  width: min(12px, calc(100% - 4px));
}

@media (min-width: 900px) {
  .one-screen .scope-page {
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  .one-screen .scope-panel {
    position: static;
    min-height: 0;
    container-type: size; /* the scope takes whichever is smaller: width or height */
    display: grid;
    align-items: center; /* level with the photo block, which is centred too */
  }

  .one-screen .scope {
    width: min(100cqw, 100cqh, 560px);
  }
}

@media (max-width: 899px) {
  .one-screen .site-header {
    padding-top: 22px;
    padding-bottom: 18px;
  }

  .one-screen .scope-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .one-screen .scope-panel {
    flex: none;
  }

  .one-screen .scope {
    width: min(100%, 36svh);
  }

  @media (max-height: 700px) {
    .one-screen .scope {
      width: min(100%, 33svh); /* small phones: a bit more room for photos */
    }
  }

  .one-screen .results {
    flex: 1;
  }
}

@media (max-height: 480px) {
  .one-screen,
  .one-screen body {
    height: auto;
    overflow: visible;
  }

  .one-screen body {
    display: block;
  }

  .one-screen .scope-page {
    padding-bottom: 60px;
  }

  .one-screen .scope-panel {
    container-type: normal;
  }

  .one-screen .scope {
    width: min(100%, 520px);
  }

  .one-screen .results {
    overflow: visible;
  }

  .one-screen .rows {
    --fit: 0;
  }

  .one-screen .scope {
    touch-action: pan-y;
  }
}

/* Photo rows: laid out (and animated between picks) by scope.js. */
.rows {
  position: relative;
  scroll-margin-top: 24px;
}

.scope {
  scroll-margin-top: 16px;
}

.shot {
  position: absolute;
  top: 0;
  left: 0;
}

.shot-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-dim);
  cursor: zoom-in;
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Caption: series name left, the photo's palette right. When the photo
   is too narrow for both, scope.js adds .is-stacked and the palette drops
   to its own line. */
.shot-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 5px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--mute);
}

.shot.is-stacked .shot-cap {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.shot-cap a {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 150ms var(--ease-out);
}

.shot-palette {
  display: flex;
  flex: none;
  max-width: 100%;
}

.shot.is-stacked .shot-palette {
  margin-left: -2px; /* line the first swatch up with the name */
}

/* Swatch buttons touch each other so hit areas never overlap; the visible
   square is drawn inside. Square like the target chips on the scope. */
.swatch {
  position: relative;
  flex: 0 1 15px; /* shrinks on a very narrow photo instead of spilling over */
  min-width: 12px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.swatch::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(11px, calc(100% - 4px));
  aspect-ratio: 1;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); /* keeps near-white swatches visible */
  transition: scale 120ms var(--ease-out);
}

.swatch.is-light::after {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.32);
}

@media (hover: none) and (pointer: coarse) {
  .swatch {
    flex-basis: 22px;
    min-width: 16px;
    height: 28px;
  }

  .swatch::after {
    width: min(14px, calc(100% - 6px));
  }
}

@media (hover: hover) and (pointer: fine) {
  .swatch:hover::after {
    scale: 1.18;
  }
}

.swatch:active::after {
  scale: 0.85; /* at 11px, a subtler press wouldn't register */
}

.swatch:focus-visible {
  outline-offset: -1px;
}

.shot-cap a:hover,
.shot-cap a:focus-visible {
  color: var(--ink);
}

.results-empty {
  max-width: 34ch;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.5;
}

.results-empty a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.results-empty-jump {
  margin-top: 18px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), scale 120ms var(--ease-out);
}

.results-empty-jump:active {
  scale: 0.97;
}

@media (hover: hover) and (pointer: fine) {
  .results-empty-jump:hover {
    background: var(--ink);
    color: var(--paper);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.roll-count {
  font-size: 13px;
  color: var(--mute);
  padding-top: 2px;
  flex-shrink: 0;
}

/* ---------- gallery page (category) ---------- */

.gallery-head {
  max-width: 900px;
  margin: 0 auto;
  padding: 4px var(--page-margin) 30px;
  text-align: center;
}

.gallery-head h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 32px);
}

.gallery-head p {
  margin-top: 10px;
  color: var(--mute);
  font-size: 14px;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.subgallery-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.subgallery-nav a {
  color: var(--mute);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.subgallery-nav a:hover,
.subgallery-nav a:focus-visible,
.subgallery-nav a[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.sub-block {
  max-width: 1400px;
  margin: 0 auto 46px;
  padding: 0 var(--gutter);
}

.sub-block-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 0 8px 12px;
  max-width: 1400px;
  margin: 0 auto;
}

.sub-block-title h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  flex: 1;
}

.sub-block-title .roll-count {
  font-size: 12px;
}

/* ---------- info page ---------- */

.info-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px var(--page-margin) 100px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}

@media (min-width: 780px) {
  .info-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

/* Just one column of copy now (no booking form) — let it sit centered
   and readable rather than stretched across the old two-column grid. */
.info-wrap--single {
  grid-template-columns: 1fr;
  max-width: 760px;
}

@media (min-width: 780px) {
  .info-wrap--single {
    grid-template-columns: 1fr;
  }
}

.info-col h1 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 52px);
  margin-bottom: 24px;
}

.info-col p {
  margin-bottom: 20px;
  color: var(--ink);
  max-width: 42ch;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.5;
}

.contact-list {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.contact-list dt {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 18px;
}

.contact-list dd {
  font-size: clamp(20px, 2.6vw, 26px);
  margin-top: 4px;
}

.contact-list dd a:hover,
.contact-list dd a:focus-visible {
  color: var(--mute);
}

.form-note {
  margin-top: 28px;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.5;
  color: var(--mute);
  max-width: 42ch;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 30px var(--page-margin) 46px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mute);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: var(--stage);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms var(--ease-out), visibility 200ms;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 220ms var(--ease-out), visibility 220ms;
}

.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
}

.lightbox.is-open img {
  opacity: 1;
  transform: scale(1);
}

/* prev/next: a quick blur-out masks the instant src swap, then it resolves
   back to sharp — reads as one photo dissolving into the next, not a jump cut */
.lightbox img.is-swapping {
  opacity: 0.3;
  filter: blur(8px);
  transform: scale(0.99);
  transition: opacity 110ms var(--ease-in-out), filter 110ms var(--ease-in-out), transform 110ms var(--ease-in-out);
}

.lightbox-cap {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mute);
}

.lightbox-cap a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color 150ms var(--ease-out);
}

.lightbox-cap a:hover,
.lightbox-cap a:focus-visible {
  color: var(--ink);
}

.lb-btn {
  position: absolute;
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 14px;
  transition: color 150ms var(--ease-out), transform 120ms var(--ease-out);
}

.lb-btn:focus-visible {
  color: var(--ink);
}

.lb-btn:active {
  transform: scale(0.88);
  transition-duration: 80ms;
}

@media (hover: hover) and (pointer: fine) {
  .lb-btn:hover {
    color: var(--ink);
  }
}

.lb-close {
  top: 14px;
  right: 14px;
  font-size: 18px;
}

.lb-prev {
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:active,
.lb-next:active {
  transform: translateY(-50%) scale(0.88);
}

@media (max-width: 640px) {
  .lb-prev,
  .lb-next {
    padding: 10px;
    font-size: 18px;
  }
}
