/* John Martin Digital Imaging — site styles (2026 refresh)
   One stylesheet for every page. No build step needed. */

/* Typefaces are served from this site (assets/fonts), not from Google */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Covered By Your Grace"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/covered-by-your-grace.woff2") format("woff2"); }

:root {
  --paper: #ffffff;      /* gallery wall */
  --proof: #d7d7d3;      /* neutral proofing grey: hero / workspace */
  --proof-deep: #c9c9c4;
  --ink: #191919;
  --muted: #5b5b57;
  --line: #c2c2bd;
  --lime: #8dc63f;       /* from the original logo */
  --lime-ink: #3d690c;   /* text-safe lime on paper */
  --pencil: #d4352b;     /* the art director's red pencil: hand notes and the stamp only */
  --hand: "Covered By Your Grace", "Segoe Print", "Bradley Hand", cursive;
  --viewing: #242424;    /* dark viewing room */
  --viewing-line: #3a3a38;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;      /* headings, labels and buttons */
  --text: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.375rem;
  --step-4: clamp(2.75rem, 5.2vw, 4.75rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1240px;
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 112px; }
@media (max-width: 860px) { html { scroll-padding-top: 92px; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.07; margin: 0 0 .5em; letter-spacing: .006em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: 1.45rem; line-height: 1.18; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6em 1em; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1; margin-right: auto; }
.wordmark img { height: 58px; width: auto; max-width: none; align-self: flex-start; }
.site-footer .wordmark img { height: 48px; }
@media (max-width: 860px) { .site-header .wrap { min-height: 68px; } .wordmark img { height: 44px; } }
.wordmark b { font: 600 1.65rem/1 var(--display); letter-spacing: .005em; }
.wordmark span { font: 500 .8rem/1 var(--text); letter-spacing: .14em; color: var(--muted); margin-top: .3rem; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-weight: 500; font-size: 1rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { border-color: var(--lime); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .75rem; font: 500 1rem var(--text); color: var(--ink); cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 1.05rem/1 var(--display); letter-spacing: .03em;
  padding: .85rem 1.35rem; border-radius: var(--radius);
  text-decoration: none; border: 2px solid var(--ink); cursor: pointer;
  background: var(--ink); color: var(--paper);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: #000; }
.btn--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn--lime:hover { background: #a3d65a; border-color: #a3d65a; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: .6; cursor: progress; }
.nav .btn { padding: .7rem 1.1rem; border-bottom-width: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line);
         flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-color: var(--line); color: var(--lime-ink); }
  .nav .btn { margin-top: 1rem; border: 2px solid var(--lime); }
}

/* ---------- before / after compare ---------- */
.compare { position: relative; overflow: hidden; background: var(--proof-deep); user-select: none; -webkit-user-select: none; touch-action: pan-y; --pos: 50%; }
.compare img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.compare .compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .compare-before img { position: absolute; inset: 0; }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); pointer-events: none; }
/* the knob is a registration mark — the printer's target used to line up colour plates */
.compare-knob { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgba(25,25,25,.78); border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.compare-knob::before, .compare-knob::after { content: ""; position: absolute; background: #fff; }
.compare-knob::before { left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; }
.compare-knob::after { top: 50%; left: 6px; right: 6px; height: 2px; margin-top: -1px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.compare-range:focus-visible + .compare-line .compare-knob { outline: 3px solid var(--lime); outline-offset: 3px; }
.compare-tag { position: absolute; top: .75rem; font: 600 .95rem/1 var(--display); letter-spacing: .04em; color: #fff; background: rgba(25,25,25,.72); padding: .4rem .6rem; border-radius: 2px; pointer-events: none; transition: opacity .2s; }
.compare-tag--before { left: .75rem; }
.compare-tag--after { right: .75rem; }
.compare[data-pos-low] .compare-tag--before, .compare[data-pos-high] .compare-tag--after { opacity: 0; }

/* ---------- home: featured-work carousel (the original coverflow, rebuilt) ---------- */
.showcase { background: var(--proof); border-bottom: 1px solid var(--line); padding: clamp(1rem, 2.4vw, 1.75rem) 0 clamp(1.1rem, 2.4vw, 1.75rem); overflow: hidden; }
.showcase-tagline { margin: 0 0 clamp(.9rem, 2vw, 1.5rem); text-align: center; white-space: nowrap; overflow: hidden; height: 1.2em; font: 500 clamp(.72rem, 2.9vw, 1.3rem)/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.showcase-tagline span { color: var(--lime-ink); margin: 0 .35em; }
.cf { --w: min(790px, 58vw); position: relative; perspective: 1700px; height: calc(var(--w) * 440 / 790); max-width: 1440px; margin: 0 auto; touch-action: pan-y; }
.cf-track { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.cf-slide { --d: 0; --s: 1; position: absolute; top: 0; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2);
  transform: translateX(calc(var(--d) * 36%)) scale(var(--s)) rotateY(calc(var(--d) * -15deg)); opacity: 0; z-index: 1; pointer-events: none;
  transition: transform .65s cubic-bezier(.22, .61, .36, 1), opacity .45s, filter .45s, box-shadow .45s; filter: brightness(.82); }
.cf-slide a { display: block; cursor: pointer; }
.cf-slide img { width: 100%; height: auto; background: var(--proof-deep); }
.cf-slide.is-near { opacity: 1; z-index: 2; pointer-events: auto; box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .45); }
.cf-slide.is-near:hover { filter: brightness(.95); }
.cf-slide.is-current { opacity: 1; z-index: 3; pointer-events: auto; filter: none; box-shadow: 0 34px 50px -28px rgba(0, 0, 0, .6); }
.cf-btn { position: absolute; top: 50%; z-index: 5; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .88); color: var(--ink);
  font: 400 1.9rem/1 var(--text); padding: 0 0 .18em; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); transition: background-color .15s, transform .15s; }
.cf-btn:hover { background: #fff; transform: scale(1.06); }
.cf-btn--prev { left: clamp(.5rem, 2.5vw, 2.5rem); }
.cf-btn--next { right: clamp(.5rem, 2.5vw, 2.5rem); }
.cf-dots { display: flex; justify-content: center; gap: .15rem; margin-top: clamp(1rem, 2.2vw, 1.6rem); }
.cf-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.cf-dots button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #a3a39e; transition: background-color .2s, transform .2s; }
.cf-dots button:hover::before { background: var(--ink); }
.cf-dots button[aria-current="true"]::before { background: var(--ink); transform: scale(1.35); }
@media (max-width: 700px) {
  .cf { --w: 82vw; }
  .cf-btn { width: 42px; height: 42px; margin-top: -21px; font-size: 1.5rem; }
}

/* ---------- home hero ---------- */
.hero { background: var(--paper); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.hero h1 { max-width: 11ch; }
.hero-lede { font-size: var(--step-1); line-height: 1.45; max-width: 30em; color: #2c2c2a; }
.hero-pillars { font: 500 var(--step-1)/1.2 var(--display); color: var(--muted); margin: 1.5rem 0 2rem; display: flex; gap: 1.25rem; flex-wrap: wrap; padding: 0; list-style: none; }
.hero-pillars li { padding-left: 1rem; border-left: 3px solid var(--lime); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-figure { margin: 0 0 0 auto; width: min(100%, 520px, calc((100vh - 290px) * 662 / 942)); min-width: min(100%, 300px); }
.hero-figure .compare { aspect-ratio: 662 / 942; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.hero-figure figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .85rem; min-height: 4.2em; }
.hero-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.hero-picks button { font: 600 .95rem/1 var(--display); letter-spacing: .03em; padding: .55rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.hero-picks button:hover { border-color: var(--ink); }
.hero-picks button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.compare.is-swapping img { opacity: 0; }
.compare img { transition: opacity .18s; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure { margin: 0 auto; width: min(100%, 520px); }
}

/* ---------- billing block (client credits) ---------- */
.credits { padding: clamp(2.5rem, 6vw, 4.5rem) 0; text-align: center; border-bottom: 1px solid var(--line); }
.credits h2 { font-size: var(--step-2); font-weight: 600; color: var(--ink); margin-bottom: 1.25rem; }
.billing { font: 500 clamp(1.05rem, 2.1vw, 1.55rem)/1.35 var(--display); letter-spacing: .01em; max-width: 60rem; margin: 0 auto; text-wrap: balance; color: var(--ink); }
.billing span { white-space: nowrap; padding: 0 .6em; display: inline-block; }

/* client logo wall drifting upward behind the billing block (home and About pages) */
.credits--logos { position: relative; overflow: hidden; isolation: isolate; }
.credits--logos::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -2;
  height: calc(100% + 458px);
  background: url("../img/client-logos.png") center top / 900px 458px repeat;
  animation: logo-drift 40s linear infinite;
}
/* soft wash so the names stay readable over the logos */
.credits--logos::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 70% at 50% 55%, rgba(255,255,255,.84), rgba(255,255,255,.4) 70%, rgba(255,255,255,.18));
}
@keyframes logo-drift { to { transform: translateY(-458px); } }
@media (max-width: 600px) {
  .credits--logos::before { height: calc(100% + 305px); background-size: 600px 305px; animation-name: logo-drift-sm; }
}
@keyframes logo-drift-sm { to { transform: translateY(-305px); } }

/* ---------- hand notes: the art director's pencil, in John's own words ---------- */
.note { font: 400 1.5rem/1.08 var(--hand); color: var(--pencil); margin: 0; transform: rotate(-3deg); transform-origin: left center; max-width: 12.5em; }
.note > span { display: block; transition: opacity .5s; }
.note-arrow { width: 84px; height: 35px; flex: none; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.note-arrow--down { width: 30px; height: 42px; display: block; margin: .15rem 0 0 1.5rem; }
.note-arrow path { stroke-dasharray: 160; stroke-dashoffset: 0; transition: stroke-dashoffset .7s .25s ease-out; }
.note.is-armed > span { opacity: 0; }
.note.is-armed .note-arrow path { stroke-dashoffset: 160; }
.note--side { display: flex; align-items: flex-end; gap: .6rem; margin-top: 2.5rem; }
.note--above { position: absolute; left: 6%; right: 2%; bottom: 100%; margin-bottom: .35rem; }
.chapter-gallery > li { position: relative; }
.chapter--retouching .note { color: #ffd84d; }
.chapter--illustration .note--side { flex-direction: row-reverse; justify-content: flex-end; transform: rotate(2.5deg); }
.chapter--illustration .note--side .note-arrow { transform: scaleX(-1); }
.note--hero { position: absolute; right: 100%; top: 9%; margin-right: .9rem; white-space: nowrap; display: flex; align-items: flex-end; gap: .5rem; transform: rotate(-5deg); z-index: 2; }
.hero-figure { position: relative; }
@media (max-width: 1180px) { .note--hero { display: none; } }
.note--footer { margin-top: 1rem; font-size: 1.6rem; transform: rotate(-2deg); }
.note--me { margin: .6rem 0 0 1.5rem; font-size: 1.6rem; transform: rotate(-4deg); }
.note--sign { font-size: 2rem; margin-top: 1.25rem; transform: rotate(-3deg); }
.pull { margin: 2rem 0 1rem; padding: 0 0 0 1.1rem; border-left: 4px solid var(--lime); font: 500 clamp(1.5rem, 2.4vw, 1.9rem)/1.2 var(--display); text-wrap: balance; }
.pull::before { content: "“"; }
.pull::after { content: "”"; }
@media (max-width: 900px) {
  .note--above { position: static; margin: 0 0 .5rem; font-size: 1.3rem; }
  .note--side { margin-top: 1.5rem; }
  .note--side .note-arrow { display: none; }
}

/* the stamp: lands when a before/after is dragged all the way to "after" */
.stamp { position: absolute; right: 6%; bottom: 9%; z-index: 4; font: 600 clamp(1.1rem, 2.1vw, 1.65rem)/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--pencil);
  background: rgba(255, 255, 255, .9); border: 3px solid currentColor; outline: 1.5px solid currentColor; outline-offset: 3px; border-radius: 5px; padding: .42em .55em .36em .7em;
  transform: rotate(-11deg); opacity: 0; pointer-events: none; }
.compare.is-approved .stamp { animation: stamp-land 2.4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes stamp-land {
  0% { opacity: 0; transform: rotate(-11deg) scale(1.9); }
  8% { opacity: 1; transform: rotate(-11deg) scale(.96); }
  12%, 78% { opacity: 1; transform: rotate(-11deg) scale(1); }
  100% { opacity: 0; transform: rotate(-11deg) scale(1); }
}
.stamp--static { opacity: .9; background: none; right: var(--gutter); bottom: auto; top: clamp(2.5rem, 6vw, 4.5rem); font-size: clamp(1.4rem, 2.6vw, 2.1rem); transform: rotate(-9deg); }
.intro .wrap { position: relative; }
@media (max-width: 760px) { .stamp--static { display: none; } }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section--tight { padding-top: clamp(2rem, 5vw, 3.5rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 34em; }
.text-link { font-weight: 500; color: var(--lime-ink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.text-link:hover { color: var(--ink); }

/* services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.services h3 { font-size: var(--step-2); margin-bottom: .4rem; }
.services p { color: var(--muted); margin: 0 0 .75rem; font-size: 1rem; }
.services .text-link { font-size: 1rem; }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .services { grid-template-columns: 1fr; } }

/* ---------- work grid (home + portfolio) ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); grid-auto-flow: dense; gap: clamp(1rem, 2vw, 1.5rem); margin: 0; padding: 0; list-style: none; }
.work-grid > li[hidden] { display: none; }
.work-grid .is-wide { grid-column: span 2; }
.work-grid .is-xwide { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; }
  .work-grid .is-wide { grid-column: 1 / -1; }
  .work-card .work-meta { font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .work-badge { font-size: .75rem; left: .4rem; bottom: .4rem; }
}
.work-card { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; text-align: left; color: inherit; font: inherit; cursor: zoom-in; text-decoration: none; }
.work-card picture { display: block; background: var(--proof); overflow: hidden; position: relative; }
.work-card img { width: 100%; height: auto; }
/* a hairline so white-background pieces still have an edge on the white wall */
.work-card picture::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .09); pointer-events: none; }
/* the retoucher's loupe: on desktop, a lens follows the cursor over any before/after piece and shows the "before" through it */
@property --r { syntax: "<length>"; inherits: true; initial-value: 0px; }
.work-card picture { --r: 0px; transition: --r .4s cubic-bezier(.3, .7, .3, 1); }
.work-card.has-peek:hover picture { --r: var(--rmax, 110px); }
.work-card .work-peek { position: absolute; inset: 0; background: var(--proof) center / cover no-repeat; clip-path: circle(var(--r) at var(--mx, 50%) var(--my, 50%)); }
.work-card .work-loupe { position: absolute; left: var(--mx, 50%); top: var(--my, 50%); width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(0, 0, 0, .2); pointer-events: none; opacity: 0; transition: opacity .25s; }
.work-card.has-peek:hover .work-loupe { opacity: 1; }
.work-card.has-peek:hover { cursor: none; }
.work-badge i { font-style: normal; }
.work-badge i + i { display: none; }
.work-card.has-peek:hover .work-badge { background: var(--lime); color: var(--ink); }
.work-card.has-peek:hover .work-badge i { display: none; }
.work-card.has-peek:hover .work-badge i + i { display: inline; }
.work-card .work-meta { display: block; padding-top: .6rem; font-size: .95rem; line-height: 1.4; color: var(--muted); }
.work-card .work-kind { display: inline-block; font: 600 .9rem/1 var(--display); letter-spacing: .03em; color: var(--ink); margin-right: .35rem; }
.work-badge { position: absolute; z-index: 1; left: .6rem; bottom: .6rem; font: 600 .85rem/1 var(--display); letter-spacing: .03em; background: rgba(25,25,25,.8); color: #fff; padding: .35rem .5rem; border-radius: 2px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.filters button { font: 600 1rem/1 var(--display); letter-spacing: .03em; padding: .65rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters .count { color: var(--muted); font-weight: 500; margin-left: .3rem; }
.filters button[aria-pressed="true"] .count { color: #b9b9b4; }

/* key art: a wall of one-sheets drifting in two directions; pauses when you point at it */
.wall { background: #191919; color: #ecece8; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.wall .section-head h2 { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: .012em; }
.wall .text-link { color: var(--lime); }
.wall .text-link:hover { color: #fff; }
.wall-rows { display: grid; gap: 1rem; }
.wall-row { overflow: hidden; }
.wall-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; width: max-content; animation: wall-drift 110s linear infinite; }
.wall-row--rev .wall-track { animation-direction: reverse; }
.wall:hover .wall-track, .wall:focus-within .wall-track { animation-play-state: paused; }
.wall-track li { width: clamp(124px, 13vw, 190px); flex: none; }
.wall-track picture { aspect-ratio: 662 / 942; background: #111; }
.wall-track .work-card img { transition: filter .25s, transform .25s; filter: brightness(.86); }
.wall-track .work-card:hover img, .wall-track .work-card:focus-visible img { filter: none; transform: scale(1.03); }
@keyframes wall-drift { to { transform: translateX(calc(-50% - .5rem)); } }
@media (prefers-reduced-motion: reduce) { .wall-row { overflow-x: auto; } }

/* key art strip */
.strip { --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); display: grid; grid-auto-flow: column; grid-auto-columns: clamp(140px, 16vw, 200px); gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--edge); padding: 0 var(--edge) 1rem; margin: 0; list-style: none; scrollbar-color: var(--line) transparent; }
.strip li { scroll-snap-align: start; }
.strip-tools { display: flex; align-items: center; gap: .5rem; }
.strip-tools .text-link { margin-right: .75rem; }
.strip-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 400 1.5rem/1 var(--text); cursor: pointer; padding: 0 0 .15em; }
.strip-btn:hover { border-color: var(--ink); }
.strip-btn[disabled] { opacity: .35; cursor: default; }
@media (hover: none) { .strip-btn { display: none; } }
.strip .work-card picture { aspect-ratio: 662 / 942; }

/* masonry for the full portfolio: pieces keep their own proportions, like prints on a wall */
.work-grid--masonry { display: block; columns: 4 230px; column-gap: clamp(1rem, 2vw, 1.75rem); }
.work-grid--masonry > li { break-inside: avoid; margin: 0 0 clamp(1.25rem, 2.4vw, 2rem); }
.work-grid--masonry .work-meta { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 560px) { .work-grid--masonry { columns: 2; column-gap: .75rem; } }

/* ---------- home: three rooms — photography, retouching, illustration ---------- */
.chapter { padding: clamp(3.5rem, 9vw, 7.5rem) 0; }
.chapter-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.chapter-text { position: sticky; top: 124px; }
.chapter-text h2 { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1.04; letter-spacing: .012em; margin-bottom: .4em; }
.chapter-text p { color: var(--muted); max-width: 30em; margin-bottom: 1.25rem; }
.chapter-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); align-items: start; }
.chapter .work-kind { display: none; }
.chapter .work-meta { font-size: .9rem; line-height: 1.45; max-width: 34em; padding-top: .7rem; }

/* photography: one large print with two smaller ones beneath, on the white wall */
.chapter--photography .g-a { grid-column: 1 / -1; }
.chapter--photography .g-b { grid-column: 1 / 3; }
.chapter--photography .g-c { grid-column: 3 / 7; margin-top: clamp(1.5rem, 4vw, 3.5rem); }

/* retouching: the dark viewing room, four one-sheets hung at staggered heights */
.chapter--retouching { background: var(--viewing); color: #ecece8; }
.chapter--retouching .chapter-inner { display: block; }
.chapter--retouching .chapter-text { position: static; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 0 clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.chapter--retouching .chapter-text h2 { margin: 0; grid-row: span 2; }
.chapter--retouching .chapter-text p { color: #bdbdb8; }
.chapter--retouching .text-link { color: var(--lime); justify-self: start; }
.chapter--retouching .text-link:hover { color: #fff; }
.chapter--retouching .chapter-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chapter--retouching .chapter-gallery li:nth-child(even) { margin-top: clamp(4.5rem, 7.5vw, 7rem); }
.chapter--retouching .work-meta { color: #a9a9a4; }
.chapter--retouching .work-card picture { background: #1b1b1b; }

/* illustration: matted pieces on the grey wall, text on the right */
.chapter--illustration { background: var(--proof); }
.chapter--illustration .chapter-inner { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.chapter--illustration .chapter-text { order: 2; }
.chapter--illustration .g-a { grid-column: 1 / 4; }
.chapter--illustration .g-b { grid-column: 4 / 7; margin-top: clamp(4.5rem, 8vw, 7.5rem); }
.chapter--illustration .g-c { grid-column: 2 / 6; }
.chapter--illustration .work-card picture { border: clamp(7px, .9vw, 13px) solid #fff; box-shadow: 0 22px 40px -24px rgba(0, 0, 0, .5); }
.chapter--illustration .work-meta { color: #4a4a47; }

@media (max-width: 900px) {
  .chapter-inner, .chapter--illustration .chapter-inner { grid-template-columns: 1fr; }
  .chapter-text, .chapter--illustration .chapter-text { position: static; order: 0; }
  .chapter--retouching .chapter-text { display: block; }
  .chapter--retouching .chapter-text h2 { margin-bottom: .45em; }
  .chapter--retouching .chapter-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- dark band / CTA ---------- */
.band { background: var(--lime); color: var(--ink); }
.band .wrap { padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: clamp(3rem, 8vw, 5.5rem); display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem 4rem; align-items: end; }
.band h2 { font-size: var(--step-4); margin: 0; max-width: 15ch; text-wrap: balance; }
.band p { color: #22330b; }
.band p a { color: var(--ink); font-weight: 500; }
.band .contact-lines { font: 500 var(--step-2)/1.3 var(--display); margin-bottom: 1.5rem; }
.band .contact-lines a { text-decoration: none; display: block; }
.band .contact-lines a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.band .btn--lime { background: var(--ink); border-color: var(--ink); color: #fff; }
.band .btn--lime:hover { background: #000; border-color: #000; }
@media (max-width: 860px) { .band .wrap { grid-template-columns: 1fr; } }

/* ---------- page intro ---------- */
.intro { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.intro h1 { max-width: 16ch; }
.intro p { font-size: var(--step-1); line-height: 1.45; color: #2c2c2a; max-width: 36em; margin: 0; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 273px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about-photo img { width: 100%; max-width: 273px; filter: grayscale(.15); }
.about-photo figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .6rem; }
.about-body { max-width: 38em; }
.about-body .lead { font: 500 var(--step-2)/1.25 var(--display); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 2.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); }
.facts dt { font: 600 var(--step-1)/1.1 var(--display); margin-bottom: .3rem; }
.facts dd { margin: 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; } }

/* ---------- how I help ---------- */
.questions { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.questions li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem 3rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.questions h2 { font-size: var(--step-2); line-height: 1.15; margin: 0; }
.questions p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .questions li { grid-template-columns: 1fr; } }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.ways h3 { font-size: var(--step-2); }
.ways p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; margin-bottom: .35rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1.0625rem/1.4 var(--text); color: var(--ink);
  padding: .8rem .9rem; background: #fff; border: 1px solid #a9a9a4; border-radius: var(--radius);
}
.field textarea { min-height: 11rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--lime); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .95rem; margin: .35rem 0 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; padding: 1rem 1.1rem; border-radius: var(--radius); margin: 0; font-weight: 500; }
.form-status[hidden] { display: none; }
.form-status.is-ok { background: #e4f1d2; border: 1px solid #a8cf74; }
.form-status.is-error { background: #f8e1df; border: 1px solid #e0a39e; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-actions small { color: var(--muted); }
.contact-card { background: var(--proof); padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius); }
.contact-card h2 { font-size: var(--step-2); }
.contact-card dl { margin: 0 0 1.5rem; }
.contact-card dt { font-weight: 500; margin-top: 1rem; }
.contact-card dd { margin: 0; }
.contact-card dd a { color: var(--ink); }
.map { margin-top: 1.25rem; aspect-ratio: 4 / 3; background: var(--proof-deep); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.6); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.5rem 2rem; }
.site-footer .wordmark { color: var(--ink); margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .25rem 0; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; }
.site-footer .legal { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .875rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- lightbox ---------- */
.viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: var(--viewing); color: #ecece8; }
.viewer::backdrop { background: rgba(10,10,10,.85); }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
/* the room takes on the colours of the piece on show, like light spilling off a screen */
.viewer-ambient { position: absolute; inset: -12%; z-index: 0; background: center / cover no-repeat; filter: blur(70px) saturate(1.5) brightness(.5); opacity: 0; transition: opacity .7s, background-image .5s; pointer-events: none; }
.viewer-ambient.is-on { opacity: .9; }
.viewer > :not(.viewer-ambient) { position: relative; z-index: 1; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem clamp(.75rem, 2vw, 1.5rem); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.viewer-count { font: 500 1.05rem/1 var(--display); letter-spacing: .03em; color: #a9a9a4; }
.viewer-btn { background: transparent; border: 1px solid #5a5a57; color: #fff; border-radius: var(--radius); font: 600 1rem/1 var(--display); letter-spacing: .03em; padding: .6rem .9rem; cursor: pointer; }
.viewer-btn:hover { border-color: #fff; }
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: clamp(.75rem, 2vw, 1.5rem) clamp(3.5rem, 7vw, 6rem); min-height: 0; }
.viewer-stage > * { max-width: 100%; max-height: 100%; }
.viewer-stage .compare { background: #1b1b1b; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.viewer-stage > img { box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); }
.viewer-stage iframe { width: min(100%, 1280px); aspect-ratio: 16 / 9; height: auto; max-height: 100%; border: 0; background: #000; }
.viewer-stage iframe.is-pano { aspect-ratio: 1224 / 526; }
.viewer-stage > img { width: auto; height: auto; max-height: 100%; object-fit: contain; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border-radius: var(--radius); border: 1px solid #5a5a57; background: rgba(36,36,36,.7); color: #fff; font: 400 2rem/1 var(--text); cursor: pointer; }
.viewer-nav:hover { border-color: #fff; }
.viewer-nav--prev { left: clamp(.4rem, 1.5vw, 1rem); }
.viewer-nav--next { right: clamp(.4rem, 1.5vw, 1rem); }
.viewer-caption { padding: .9rem clamp(.75rem, 2vw, 1.5rem) 1.1rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: baseline; max-width: 70rem; margin: 0 auto; width: 100%; }
.viewer-caption b { font: 600 1.1rem/1.2 var(--display); letter-spacing: .02em; color: var(--lime); }
.viewer-caption span { color: #d6d6d2; }
.viewer-hint { color: #8d8d88; font-size: .9rem; }
@media (max-width: 640px) {
  .viewer-stage { padding: .5rem .5rem 4.5rem; }
  .viewer-nav { top: auto; bottom: .5rem; transform: none; }
}

/* soft cross-fade between pages in browsers that support it; the header stays put */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }
  .site-header { view-transition-name: site-header; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
