/* J.C. Stewart Photography — public site.
   Layout concept: photographs hung on a light grey wall, each with a thin dark grey line around it.
   Type stays small and quiet, like a gallery wall label, with one exception: a high-contrast fashion serif,
   used large and sparingly. Motion is slow throughout. */
:root {
  --paper: #e6e6e4;      /* light grey gallery wall */
  --ink: #1c1c1b;        /* near-black for type */
  --mute: #5f5e5a;       /* captions, secondary text (5.3:1 on paper) */
  --line: #c8c8c5;       /* hairlines */
  --tone: #d9d9d6;       /* behind photos while they load */
  --night: #dadad7;      /* the deeper grey band */
  --night-ink: #1c1c1b;
  --night-mute: #5a5955;
  --frame: #4a4a48;      /* the thin dark grey line around every photograph */
  --display: "Bodoni Moda", "Didot", "Bodoni 72", "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(18px, 4.2vw, 64px);
  --max: 1440px;
  --head: 76px;
  --ease: cubic-bezier(.25, .46, .25, 1);
  --slow: 1.8s;          /* base length of a transition */
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

.label { font-family: var(--sans); font-size: 13px; letter-spacing: .01em; color: var(--mute); }
.label.ink { color: var(--ink); }
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; letter-spacing: .01em; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); transition: text-decoration-color .8s, text-underline-offset .8s; }
.more:hover { text-decoration-color: currentColor; text-underline-offset: 8px; }

/* ---------- wordmark ---------- */
.mark { display: inline-flex; align-items: baseline; gap: 12px; line-height: 1; color: inherit; white-space: nowrap; }
.mark .n { font-family: var(--display); font-weight: 400; font-size: 25px; letter-spacing: .01em; font-variation-settings: "opsz" 28; }
.mark .p { font-family: var(--sans); font-size: 13px; color: inherit; opacity: .62; }

/* ---------- header ---------- */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; color: var(--ink); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: background-color 1.2s var(--ease), color 1.2s var(--ease), border-color 1.2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--head); }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 44px); }
.site-nav a { font-size: 14px; letter-spacing: .01em; padding: 12px 0; position: relative; opacity: .72; transition: opacity .6s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; }
.menu-btn { display: none; font-size: 14px; min-height: 44px; }
/* over the home cover: no bar until the cover scrolls away */
body.on-home .site-head { margin-bottom: calc(-1 * var(--head)); }
body.on-home .site-head.over { background: transparent; color: #fff; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- home cover ---------- */
/* The cover photograph is hung whole, never cropped: the script sizes each one to fit the space
   (so a horizontal photo on an upright phone shows in full, framed, instead of being cut down). */
/* Computers, tablets and phones held sideways: the cover fills the full width of the page, edge to edge,
   with the name and menu in white over it (as before update 5). */
.hero { --foot: clamp(96px, 11vw, 124px); position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1200px; background: #000; color: #fff; overflow: hidden; }
.hero .pane { position: absolute; inset: 0; }
.hero .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 3.6s var(--ease), transform 16s linear; }
.hero .slide.on { opacity: 1; transform: scale(1); }
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.hero::before { top: 0; height: 180px; background: linear-gradient(rgba(0,0,0,.32), transparent); }
.hero::after { bottom: 0; height: 220px; background: linear-gradient(transparent, rgba(0,0,0,.38)); }
.hero .open { position: absolute; inset: 0; z-index: 1; }
.hero .foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 0 var(--gutter) clamp(22px, 3.4vw, 40px); pointer-events: none; }
.hero-cap { display: grid; gap: 4px; min-width: 0; transition: opacity 1.4s var(--ease); }
.hero-cap.out { opacity: 0; }
.hero-cap .t { font-family: var(--display); font-style: italic; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.2; }
.hero-cap .g { font-size: 13px; opacity: .78; }
.hero .bars { display: flex; gap: 8px; pointer-events: auto; }
.hero .bars button { width: clamp(34px, 4vw, 56px); height: 44px; display: flex; align-items: center; }
.hero .bars button span { position: relative; display: block; width: 100%; height: 1px; background: rgba(255,255,255,.38); overflow: hidden; }
.hero .bars button span i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hero .bars button[aria-current="true"] span i { animation: bar var(--dwell, 9s) linear forwards; }
/* Phones held upright: the cover photograph hangs whole on the grey wall in its thin frame (never cropped);
   the script sizes it to fit. The "Phone cover" box in the admin picks which photos are used here. */
@media (max-width: 760px) and (orientation: portrait) {
  .hero { --foot: 92px; background: var(--paper); color: var(--ink); min-height: 480px; }
  .hero::before, .hero::after { display: none; }
  .hero .pane { inset: auto; top: calc(var(--head) + 4px); left: var(--gutter); right: var(--gutter); bottom: var(--foot); }
  .hero .slide { inset: auto; left: 0; top: 0; object-fit: contain; border: 1px solid var(--frame); background: var(--tone); transform: scale(1.02); }
  .hero .slide.on { transform: scale(1); }
  .hero .foot { height: var(--foot); align-items: center; padding: 0 var(--gutter); }
  .hero-cap .g { opacity: 1; color: var(--mute); }
  .hero .bars button span { background: var(--line); }
  .hero .bars button span i { background: var(--frame); }
  .hero .foot .play { color: var(--ink); }
  body.on-home .site-head.over { color: var(--ink); }
}
@keyframes bar { to { transform: scaleX(1); } }
/* the one orchestrated moment: the cover rises out of the wall, then the words arrive */
.hero.intro-play .pane { animation: fade 2.8s var(--ease) both; }
.hero.intro-play .foot { animation: fade 2s var(--ease) 1.6s both; }
body.on-home .site-head.intro-play { animation: fade 2s var(--ease) 1.2s both; }
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }

/* ---------- home headline ---------- */
.intro { padding-block: clamp(96px, 13vw, 200px) clamp(64px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.intro h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(46px, 7.6vw, 124px); line-height: .98; letter-spacing: -.015em; font-variation-settings: "opsz" 96; text-wrap: balance; max-width: 11em; }

/* ---------- home selected work: a magazine spread ---------- */
.spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(14px, 2vw, 32px); row-gap: clamp(72px, 10vw, 160px); align-items: start; }
.spread figure { margin: 0; min-width: 0; }
.spread figure:nth-child(5n+1) { grid-column: 1 / span 7; }
.spread figure:nth-child(5n+2) { grid-column: 9 / span 4; margin-top: clamp(80px, 16vw, 280px); }
.spread figure:nth-child(5n+3) { grid-column: 2 / span 4; }
.spread figure:nth-child(5n+4) { grid-column: 7 / span 6; margin-top: clamp(60px, 10vw, 180px); }
.spread figure:nth-child(5n+5) { grid-column: 3 / span 8; }
.spread figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--mute); }
.spread figcaption b { font-weight: 400; color: var(--ink); }
.tile { position: relative; overflow: hidden; background: var(--tone); display: block; border: 1px solid var(--frame); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 2.8s var(--ease), opacity var(--slow) var(--ease); opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.025); }
.tile .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.42)); color: #fff; font-size: 13px; opacity: 0; transition: opacity 1.2s var(--ease); }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.spread-foot { display: flex; justify-content: center; padding-top: clamp(56px, 7vw, 96px); }

/* ---------- deeper grey band ---------- */
.statement { margin-top: clamp(120px, 14vw, 220px); background: var(--night); color: var(--night-ink); }
.statement-in { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 140px) var(--gutter); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 110px); align-items: end; }
.statement .frame { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--tone); max-height: 88vh; border: 1px solid var(--frame); }
.statement .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); opacity: 0; transition: opacity 2.4s var(--ease); will-change: transform; }
.statement .frame img.loaded { opacity: 1; }
.statement .label { color: var(--night-mute); }
.statement h2 { margin: 10px 0 26px; font-family: var(--display); font-weight: 400; font-size: clamp(44px, 6vw, 96px); line-height: .98; letter-spacing: -.01em; font-variation-settings: "opsz" 96; color: var(--ink); }
.statement p { margin: 0 0 24px; color: var(--night-mute); max-width: 26em; }
.statement .more { color: var(--night-ink); }

/* ---------- clients ---------- */
.clients { padding-top: clamp(110px, 13vw, 200px); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; align-items: baseline; }
.clients ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px clamp(26px, 3.4vw, 54px); font-family: var(--display); font-size: clamp(26px, 3vw, 44px); line-height: 1.25; font-variation-settings: "opsz" 48; }

/* ---------- page titles (portfolio, gallery, about) ---------- */
.page-title { padding-block: clamp(72px, 10vw, 150px) clamp(40px, 5vw, 72px); display: grid; gap: 18px; justify-items: start; }
.page-title h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(54px, 9vw, 150px); line-height: .95; letter-spacing: -.02em; font-variation-settings: "opsz" 96; }
.page-title .rule { display: none; }
.page-title p { margin: 0; max-width: 34em; color: var(--mute); font-size: 17px; }

/* portfolio: an index of galleries, with the cover answering the pointer */
.index { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 110px); align-items: start; padding-bottom: 40px; }
.index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li { border-bottom: 1px solid var(--line); }
.index li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 20px; padding-block: clamp(18px, 2.4vw, 30px); }
.index .nm { font-family: var(--display); font-size: clamp(38px, 5.2vw, 84px); line-height: 1; letter-spacing: -.01em; font-variation-settings: "opsz" 96; transition: transform 1.4s var(--ease), opacity .9s; }
.index .ct { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.index li a:hover .nm, .index li a:focus-visible .nm, .index li.on .nm { transform: translateX(14px); }
.index ol:hover li:not(:hover) .nm { opacity: .38; }
.index li .thumb { display: none; }
.index .peek { position: sticky; top: calc(var(--head) + 32px); aspect-ratio: 4 / 5; background: var(--tone); overflow: hidden; border: 1px solid var(--frame); }
.index .peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--slow) var(--ease); }
.index .peek img.on { opacity: 1; }
.index .peek .d { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 18px 16px; color: #fff; font-size: 13px; background: linear-gradient(transparent, rgba(0,0,0,.4)); }

/* gallery: quiet links + masonry */
.chips { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 10px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; color: var(--mute); position: relative; transition: color .6s; }
.chips a:hover { color: var(--ink); }
.chips a[aria-current="page"] { color: var(--ink); }
.chips a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; }
.masonry { column-count: 3; column-gap: clamp(14px, 2vw, 28px); padding-bottom: 40px; }
.masonry .tile { break-inside: avoid; margin-bottom: clamp(14px, 2vw, 28px); }
.masonry .tile img { height: auto; }
.count-line { margin: 0 0 28px; }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 120px); align-items: start; padding-bottom: 40px; }
.about .tile { aspect-ratio: 4 / 5; }
.about .body > p { margin: 0 0 18px; white-space: pre-line; font-family: var(--display); font-size: clamp(22px, 2vw, 28px); line-height: 1.45; font-variation-settings: "opsz" 28; max-width: 26em; }
.contact { display: grid; grid-template-columns: max-content 1fr; gap: 12px 32px; margin: 18px 0 0; padding-top: 26px; border-top: 1px solid var(--line); align-items: baseline; }
.contact dt { margin: 0; }
.contact dd { margin: 0; font-size: 17px; }
.contact dd a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--line); }
.contact dd a:hover { text-decoration-color: currentColor; }

/* ---------- footer: commissions first ---------- */
.site-foot { margin-top: clamp(120px, 14vw, 220px); border-top: 1px solid var(--line); }
.commission { padding-block: clamp(64px, 9vw, 140px) clamp(48px, 6vw, 90px); display: grid; gap: 14px; }
.commission a { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 6.4vw, 104px); line-height: 1; letter-spacing: -.015em; font-variation-settings: "opsz" 96; overflow-wrap: anywhere; justify-self: start; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; padding-bottom: 10px; transition: background-size 1.6s var(--ease); }
.commission a:hover { background-size: 100% 1px; }
.foot-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding-block: 28px 40px; border-top: 1px solid var(--line); }
.foot-row nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 30px; }
.foot-row nav a, .foot-row small { font-size: 13px; color: var(--mute); }
.foot-row nav a { display: inline-flex; min-height: 40px; align-items: center; }
.foot-row nav a:hover { color: var(--ink); }
.foot-row .mark .n { font-size: 19px; }

/* ---------- full-screen viewer ---------- */
/* The photograph is always shown whole, as large as the screen allows (fitted on both sides, never cropped,
   never enlarged further on click). --r is the photo's width ÷ height, set by the script. */
.viewer { position: fixed; inset: 0; z-index: 60; background: var(--paper); color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: fade 1.2s var(--ease) both;
  --aw: calc(100vw - 184px); --ah: calc(100vh - 196px); }
@supports (height: 100dvh) { .viewer { --ah: calc(100dvh - 196px); } }
.viewer .top { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); }
.viewer .top .n { font-family: var(--display); font-size: 21px; }
.viewer .top .r { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.viewer .icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); opacity: .6; transition: opacity .6s; }
.viewer .icon:hover { opacity: 1; }
.viewer .stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 84px; min-height: 0; }
.viewer .shot { position: relative; line-height: 0; cursor: default; }
.viewer .stage img { width: min(var(--aw), calc(var(--ah) * var(--r, 1))); height: auto; max-width: var(--aw); max-height: var(--ah); object-fit: contain; opacity: 0; transition: opacity var(--slow) var(--ease);
  border: 1px solid var(--frame); background: var(--tone); }
.viewer .stage img.loaded { opacity: 1; }
.viewer .stage img.out { opacity: 0 !important; transition-duration: .9s; }
.viewer .t, .viewer .m, .viewer .top .r > span { transition: opacity .9s var(--ease); }
.viewer.changing .t, .viewer.changing .m, .viewer.changing .top .r > span { opacity: 0; }
.viewer .prev, .viewer .next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer .prev { left: 18px; } .viewer .next { right: 18px; }
.viewer .bottom { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 16px var(--gutter) 22px; }
.viewer .t { font-family: var(--display); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.2; }
.viewer .m { font-size: 13px; color: var(--mute); margin-top: 4px; }
.viewer :focus-visible { outline-color: var(--ink); }
.viewer .shot .shield { position: absolute; inset: 0; }
/* click to enlarge: full resolution, move around by dragging, scrolling or swiping */
.viewer .shot { cursor: zoom-in; }
.viewer.zoomed .stage { display: block; overflow: auto; padding: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.viewer.zoomed .stage::-webkit-scrollbar { display: none; }
.viewer.zoomed .shot { display: flex; align-items: center; justify-content: center; width: max-content; min-width: 100%; min-height: 100%; cursor: grab; }
.viewer.zoomed .stage.grabbing .shot { cursor: grabbing; }
.viewer.zoomed .stage img { height: auto; max-width: none; max-height: none; border: 0; }
.viewer.zoomed .prev, .viewer.zoomed .next { display: none; }

.empty { color: var(--mute); padding: 40px 0; }

/* ---------- discourage saving photographs ---------- */
.tile, .tile img, .hero, .hero img, .statement .frame, .statement .frame img, .viewer .stage, .viewer .stage img, .index .peek img, .index .thumb img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.fade-in { animation: fade var(--slow) var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- unveil on scroll (large photographs only) ---------- */
/* the frame is there first and the photograph unveils inside it (clipping the frame itself would hide it from the scroll watcher) */
.reveal > img { clip-path: inset(0 0 100% 0); transition: clip-path 2.6s var(--ease), opacity var(--slow) var(--ease), transform 2.8s var(--ease); }
.reveal.in > img { clip-path: inset(0 0 0 0); }
.reveal-text { opacity: 0; transform: translateY(18px); transition: opacity 2s var(--ease), transform 2.2s var(--ease); }
.reveal-text.in { opacity: 1; transform: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .masonry { column-count: 2; }
  .index { grid-template-columns: 1fr; }
  .index .peek { display: none; }
  .index li a { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; }
  .index li .thumb { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--tone); border: 1px solid var(--frame); }
  .index li .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .clients { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  :root { --head: 64px; }
  .menu-btn { display: inline-flex; align-items: center; position: relative; z-index: 2; }
  .site-nav { display: none; position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 0 var(--gutter); background: var(--paper); color: var(--ink); }
  .site-nav.open { display: flex; animation: fade 1s var(--ease) both; }
  .site-nav a { font-family: var(--display); font-size: 44px; line-height: 1.15; opacity: 1; padding: 6px 0; }
  .site-nav a[aria-current="page"]::after { bottom: 4px; }
  body.menu-open .site-head { color: var(--ink) !important; }
  .mark .p { display: none; }
  .mark .n { font-size: 22px; }
  .intro { grid-template-columns: 1fr; }
  .spread { row-gap: 56px; }
  .spread figure:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .spread figure:nth-child(5n+2), .spread figure:nth-child(5n+3) { grid-column: span 6; }
  .spread figure:nth-child(5n+3) { margin-top: 90px; }
  .spread figure:nth-child(5n+2) figcaption, .spread figure:nth-child(5n+3) figcaption { flex-direction: column; gap: 0; }
  .statement-in { grid-template-columns: 1fr; }
  .masonry { column-count: 2; column-gap: 10px; }
  .masonry .tile { margin-bottom: 10px; }
  .about { grid-template-columns: 1fr; }
  .index li a { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; }
  .foot-row { grid-template-columns: 1fr; justify-items: start; }
  .foot-row nav { justify-content: flex-start; }
  .viewer { --aw: calc(100vw - 34px); --ah: calc(100vh - 186px); }
  @supports (height: 100dvh) { .viewer { --ah: calc(100dvh - 186px); } }
  .viewer .stage { padding: 0 16px; }
  .viewer .top { padding-block: 8px; }
  .viewer .prev, .viewer .next { display: none; }
  /* portfolio list: name above the count, nothing sliding sideways */
  .index li a { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 18px; row-gap: 4px; align-items: end; padding-block: 16px; }
  .index li .thumb { grid-row: 1 / 3; align-self: center; }
  .index .nm { font-size: clamp(30px, 9vw, 40px); overflow-wrap: anywhere; }
  .index .ct { grid-column: 2; align-self: start; }
  .index li a:hover .nm, .index li a:focus-visible .nm, .index li.on .nm { transform: none; }
  .index ol:hover li:not(:hover) .nm { opacity: 1; }
  .page-title h1 { font-size: clamp(46px, 14vw, 64px); }
  .hero { min-height: 480px; }
  .commission a { font-size: clamp(26px, 8vw, 40px); }
}
/* phones held sideways: keep the photograph as large as possible */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0; }
  .viewer .top { padding-block: 4px; }
  .viewer .bottom { padding-block: 4px 8px; }
  .viewer { --ah: calc(100vh - 120px); }
  @supports (height: 100dvh) { .viewer { --ah: calc(100dvh - 120px); } }
  .site-nav.open { overflow-y: auto; justify-content: flex-start; padding-top: 72px; }
  .site-nav.open a { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .slide, .tile img, .viewer, .viewer .stage img, .fade-in, .statement .frame img, .index .nm, .index .peek img { transition: none; animation: none; transform: none; }
  .hero.intro-play .pane, .hero.intro-play .foot, body.on-home .site-head.intro-play { animation: none; }
  .hero .bars button[aria-current="true"] span i { animation: none; transform: scaleX(1); }
  .reveal > img, .reveal.in > img { clip-path: none; transition: none; }
  .reveal-text { opacity: 1; transform: none; transition: none; }
}


/* ---------- slideshow buttons ---------- */
.play { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; letter-spacing: .01em; color: inherit; opacity: .82; transition: opacity .6s; }
.play:hover, .play:focus-visible { opacity: 1; }
.play svg { flex: none; }
.hero-tools { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); pointer-events: auto; }
.hero .play { color: #fff; }
.count-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.count-line .play { color: var(--ink); margin-right: -4px; }

/* ---------- slideshow ---------- */
/* full-screen, on the same grey wall, one framed photograph at a time */
.show { position: fixed; inset: 0; z-index: 80; background: var(--paper); color: var(--ink); overflow: hidden; cursor: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; animation: fade 1.2s var(--ease) both; }
.show.awake, .show.paused { cursor: default; }
.show .layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: clamp(64px, 9vh, 104px) clamp(20px, 6vw, 120px); opacity: 0; transition: opacity 3s var(--ease); pointer-events: none; }
.show .layer.on { opacity: 1; }
.show .layer img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform-origin: 50% 50%; -webkit-user-drag: none; border: 1px solid var(--frame); }
/* a slow drift in scale; four variations so consecutive photographs never move the same way */
.show .layer.on.kb0 img { animation: kb-in 12s linear both; }
.show .layer.on.kb1 img { animation: kb-out 12s linear both; transform-origin: 40% 45%; }
.show .layer.on.kb2 img { animation: kb-in 12s linear both; transform-origin: 60% 40%; }
.show .layer.on.kb3 img { animation: kb-out 12s linear both; transform-origin: 50% 60%; }
.show.paused .layer.on img { animation-play-state: paused; }
@keyframes kb-in { from { transform: scale(1); } to { transform: scale(1.03); } }
@keyframes kb-out { from { transform: scale(1.03); } to { transform: scale(1); } }
.show .ui { position: absolute; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; gap: 24px; padding: 18px var(--gutter); opacity: 0; transition: opacity 1.4s var(--ease); }
.show.awake .ui, .show.paused .ui, .show .ui:focus-within { opacity: 1; }
.show .top { top: 0; align-items: center; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.show .top .n { font-family: var(--display); font-size: 21px; letter-spacing: .01em; }
.show .top .r { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.show .bottom { bottom: 0; align-items: end; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
/* the caption stays, quietly, even when the controls are away */
.show .bottom .cap { display: grid; gap: 4px; min-width: 0; }
.show .ui.bottom { opacity: 1; background: none; }
.show .ui.bottom .ctl { opacity: 0; transition: opacity 1.4s var(--ease); }
.show.awake .ui.bottom .ctl, .show.paused .ui.bottom .ctl, .show .ctl:focus-within { opacity: 1; }
.show .cap .t { font-family: var(--display); font-style: italic; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.2; color: var(--ink); }
.show .cap .g { font-size: 13px; color: var(--mute); }
.show .ctl { display: flex; gap: 6px; }
.show .icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); opacity: .6; transition: opacity .6s; }
.show .icon:hover, .show .icon:focus-visible { opacity: 1; }
.show .icon[hidden] { display: none !important; }
.show :focus-visible { outline-color: var(--ink); }
.show .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; z-index: 3; background: var(--line); }
.show .prog i { position: absolute; inset: 0; background: var(--frame); transform: scaleX(0); transform-origin: left; }
.show.paused .prog i { animation-play-state: paused !important; }
@media (max-width: 760px) {
  .show .layer { padding: calc(58px + env(safe-area-inset-top, 0px)) 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  .show .top { padding-block: calc(6px + env(safe-area-inset-top, 0px)) 6px; }
  .show .top .n { font-size: 19px; }
  .hero-tools .play span { display: none; } /* just the play symbol on the phone cover */
}
@media (max-height: 520px) and (orientation: landscape) {
  .show .layer { padding: 8px 64px; }
  .show .ui.bottom .cap { display: none; }
}
/* ---------- slideshow title page and closing page ---------- */
.show .layer .card { display: none; }
.show .layer.card-on img { display: none; }
.show .layer.card-on .card { display: grid; place-items: center; width: 100%; height: 100%; text-align: center; }
.show .layer.on .card { pointer-events: auto; }
.show.at-end { cursor: default; }
.show .card .plate { display: grid; justify-items: center; gap: clamp(20px, 3vw, 34px); padding: clamp(44px, 7vw, 100px) clamp(26px, 7vw, 110px); border: 1px solid var(--frame); max-width: 100%; }
.show .card .by { font-family: var(--display); font-style: italic; font-size: clamp(20px, 2.4vw, 32px); line-height: 1.25; color: var(--mute); font-variation-settings: "opsz" 28; }
.show .card .nm { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 10vw, 160px); line-height: .95; letter-spacing: -.02em; font-variation-settings: "opsz" 96; white-space: nowrap; }
.show .card .mail { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 6.4vw, 96px); line-height: 1; letter-spacing: -.015em; font-variation-settings: "opsz" 96; overflow-wrap: anywhere; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; padding-bottom: 10px; transition: background-size 1.6s var(--ease); }
.show .card .mail:hover, .show .card .mail:focus-visible { background-size: 100% 1px; }
.show .card .rule { width: clamp(60px, 8vw, 120px); height: 1px; background: var(--frame); transform: scaleX(0); }
.show .card .again { display: flex; gap: 28px; }
.show .card .again button { min-height: 44px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); transition: color .9s var(--ease); }
.show .card .again button:hover, .show .card .again button:focus-visible { color: var(--ink); }
.show .card .by, .show .card .nm, .show .card .mail, .show .card .again { opacity: 0; }
.show .layer.on .card .by { animation: lift 2.4s var(--ease) .4s both; }
.show .layer.on .card .nm, .show .layer.on .card .mail { animation: lift 2.8s var(--ease) 1.1s both; }
.show .layer.on .card .rule { animation: draw 2.2s var(--ease) 2.2s both; }
.show .layer.on .card .again { animation: fade 2s var(--ease) 3s both; }
@keyframes lift { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { transform: scaleX(1); } }
@media (max-width: 520px) { .show .card .nm { white-space: normal; font-size: clamp(44px, 13vw, 64px); } .show .card .mail { font-size: clamp(28px, 8.4vw, 40px); } }
@media (max-height: 520px) and (orientation: landscape) { .show .card .plate { gap: 12px; padding: 20px 44px; } .show .card .nm { font-size: clamp(40px, 14vh, 64px); } .show .card .mail { font-size: clamp(28px, 10vh, 44px); } }
@media (prefers-reduced-motion: reduce) {
  .show .card .by, .show .card .nm, .show .card .mail, .show .card .again { opacity: 1; animation: none !important; }
  .show .card .rule { transform: none; animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .show .layer { transition-duration: .6s; }
  .show .layer.on img { animation: none !important; transform: none; }
}
