/* phiphotos — a print gallery.
   Paper and ink, one serif, one grid. Photographs are never cropped and never have rounded corners;
   they sit on the page the way prints sit on a wall. */

:root {
  --paper: #f6f4ef;
  --paper-2: #ece9e2;
  --white: #fffefb;
  --ink: #141412;
  --muted: #6d6a63;
  --faint: #a8a39a;
  --line: rgba(20, 20, 18, 0.14);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;
  /* One grid for the whole site: every section's content starts and ends on the same two edges. */
  --gutter: clamp(18px, 4vw, 48px);
  --max: 1320px;
  --container: calc(var(--max) + 2 * var(--gutter));
  --row: 300px;
  --shadow: 0 1px 2px rgba(20, 20, 18, 0.1), 0 18px 36px -18px rgba(20, 20, 18, 0.38);
  --shadow-sm: 0 1px 2px rgba(20, 20, 18, 0.1), 0 10px 22px -14px rgba(20, 20, 18, 0.34);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  -webkit-touch-callout: none; /* no "Save image" on iOS long-press */
  user-select: none;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--paper); }

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
}
.skip:focus { left: 8px; }

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

/* ---- Type ---- */

.label {
  margin: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.label a { text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.label a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.display,
.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.display { font-size: clamp(2.9rem, 7vw, 6.5rem); line-height: 0.96; }
.h2 { font-size: clamp(2.3rem, 4.6vw, 4rem); line-height: 1.02; }
.display em, .h2 em { font-style: italic; }
.h2 a { text-decoration: none; }
.h2 a:hover { font-style: italic; }

.lede { margin: 0; max-width: 46ch; color: var(--muted); font-size: 17px; line-height: 1.55; }
.note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.arr { width: 18px; height: 10px; flex-shrink: 0; transition: transform 0.35s var(--ease); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.link:hover .arr, .btn:hover .arr { transform: translateX(5px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

.ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Navigation ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  view-transition-name: nav;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-in {
  display: flex;
  align-items: center;
  gap: 34px;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  margin-right: auto;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links { display: flex; gap: 30px; }

.nav-links a,
.nav-cta {
  position: relative;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-links a { padding: 10px 0; transition: color 0.25s ease; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }

.nav-cta {
  padding: 11px 16px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.3s ease, color 0.3s ease;
}
.nav-cta:hover, .nav-cta[aria-current] { background: var(--ink); color: var(--paper); }

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.4s var(--ease);
}
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 26px; }
.menu-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  display: flex;
  flex-direction: column;
  padding: 28px var(--gutter);
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.menu a {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.15;
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.6s var(--ease-out);
}
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }
.menu-open .menu a { opacity: 1; transform: none; transition-delay: calc(60ms + var(--i) * 45ms); }
.menu-open body { overflow: hidden; }

/* ---- Reveal on scroll (only when JS runs and motion is welcome) ---- */

.motion .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease-out);
}
.motion .reveal.in { opacity: 1; transform: none; }

/* ---- Home: the opening.
   One photograph, then the whole wall. Without JS (or with reduced motion) this is a plain stack:
   headline, wall, gallery links. With motion it pins and the scroll pulls the view back. ---- */

.hero-pin {
  --wg: 10px;
  --wall-w: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 44px);
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 60px) var(--gutter) 0;
}

.hero-copy { text-align: center; }
.hero-copy .label { margin-bottom: 18px; }
.hero-copy .display { font-size: clamp(2.7rem, min(6.2vw, 9.4vh), 5.6rem); }
.ln { display: block; overflow: hidden; padding-bottom: 0.08em; }
.ln > span { display: block; }

.wall { display: flex; flex-direction: column; gap: var(--wg); }
.wall-row { display: flex; gap: var(--wg); }

.wt {
  position: relative;
  display: block;
  flex: var(--ar) 1 0%;
  min-width: 0;
  aspect-ratio: var(--ar);
  background-size: cover;
}
.wt img { display: block; width: 100%; height: 100%; }

.hero-cap { display: none; }

.motion .hero { height: calc(100svh - var(--nav-h) + 100vh); }

.motion .hero-pin {
  --wall-w: min(calc(100% - 2 * var(--gutter)), var(--max), calc((100svh - var(--nav-h) - 96px) * 2.2));
  position: sticky;
  top: var(--nav-h);
  display: block;
  height: calc(100svh - var(--nav-h));
  max-width: none;
  padding: 0;
  overflow: clip;
  opacity: 0;
  animation: hero-failsafe 0.01s 3s forwards; /* never leave the page blank if the script fails */
}
.motion .hero-pin.ready { opacity: 1; animation: none; transition: opacity 0.9s ease; }
@keyframes hero-failsafe { to { opacity: 1; } }

.motion .hero-copy {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  top: clamp(18px, 4.2vh, 52px);
  opacity: var(--copy, 1);
  transform: translateY(calc((1 - var(--copy, 1)) * -40px));
  pointer-events: none;
}
.motion .hero-pin.ready .ln > span { animation: rise 1.2s var(--ease-out) both; }
.motion .hero-pin.ready .ln:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { from { transform: translateY(105%); } }

.motion .wall-fit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--wall-w);
  transform: translate(-50%, -50%);
}
.motion .wall { transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--k, 1)); }
.motion .wt:not(.wt-hero) { opacity: var(--o, 0); }
.motion .wall:not(.open) .wt:not(.wt-hero) { pointer-events: none; }
.motion .wt-hero { box-shadow: 0 30px 60px -34px rgba(20, 20, 18, calc(0.55 * var(--cap, 1))); }

/* Caption under the opening photograph: its title on the left, a scroll cue on the right. */
.motion .hero-cap {
  position: absolute;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  opacity: var(--cap, 1);
  pointer-events: none;
}
.hero-cue { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.hero-cue .arr { transform: rotate(90deg); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 4px; } }

/* ---- Sections ---- */

.sec { margin-top: clamp(96px, 13vw, 176px); }
.sec-head { margin-bottom: clamp(32px, 5vw, 64px); }
.sec-head .label { margin-bottom: 16px; }
.sec-head .lede { margin-top: 22px; }
.sec-foot { margin: 40px 0 0; }

.page-head { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(36px, 5vw, 64px); }
.page-head .label { margin-bottom: 18px; }
.page-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 28px;
}

/* ---- Gallery rows ---- */

.gals { border-bottom: 1px solid var(--line); }

.gal {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 190px;
  align-items: center;
  gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.gal-text { display: block; transition: transform 0.6s var(--ease-out); }
.gal-name { display: block; font-family: var(--serif); font-size: clamp(2.5rem, 5.4vw, 5rem); line-height: 0.98; letter-spacing: -0.015em; }
.gal-blurb { display: block; max-width: 46ch; margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }

.gal-thumbs { display: flex; align-items: center; gap: 10px; }
.gal-thumbs img {
  display: block;
  width: auto;
  height: clamp(84px, 9vw, 124px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.7s var(--ease-out);
}

.gal-go { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; color: var(--ink); white-space: nowrap; }

.gal:hover .gal-text { transform: translateX(14px); }
.gal:hover .gal-name { font-style: italic; }
.gal:hover .gal-thumbs img { transform: translateY(-6px); }
.gal:hover .gal-thumbs img:nth-child(2) { transition-delay: 0.05s; }
.gal:hover .gal-thumbs img:nth-child(3) { transition-delay: 0.1s; }
.gal:hover .arr { transform: translateX(6px); }

/* ---- On your wall: a print drawn to scale.
   Everything in the scene is sized in centimetres: --cm is one centimetre in pixels, derived from
   the scene's width (container query units), so the print, bench and frame stay in true proportion. ---- */

.room { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: clamp(28px, 4vw, 64px); }

.room-scene {
  --tone: #efede7;
  --base: #fbfaf7;
  --rw: 400;
  position: relative;
  container-type: inline-size;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--tone);
  transition: background 0.6s ease;
}
.room-scene[data-wall-tone="linen"] { --tone: #d9d0c1; --base: #f1ece3; }
.room-scene[data-wall-tone="sage"] { --tone: #a9b3a4; --base: #e6e9e1; }
.room-scene[data-wall-tone="navy"] { --tone: #2b3644; --base: #e9e7e1; }
.room-scene[data-wall-tone="charcoal"] { --tone: #2f2f2d; --base: #e9e7e1; }
.room-scene > * { --cm: calc(100cqw / var(--rw)); }

.room-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 85% at 50% 6%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 62%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.1));
}

.room-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(34 * var(--cm));
  background: linear-gradient(to bottom, #b39a7d, #c6ae91 45%, #d5c0a5);
}
.room-floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-7 * var(--cm));
  height: calc(7 * var(--cm));
  background: var(--base);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0, 0, 0, 0.2);
  transition: background 0.6s ease;
}
.room-floor::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.045) 0 1px, transparent 1px calc(38 * var(--cm))), linear-gradient(to bottom, rgba(0, 0, 0, 0.16), transparent 30%);
}

.room-bench {
  position: absolute;
  left: 50%;
  bottom: calc(15 * var(--cm));
  width: calc(150 * var(--cm));
  height: calc(44 * var(--cm));
  transform: translateX(-50%);
}
.room-bench::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(8 * var(--cm));
  border-radius: calc(0.8 * var(--cm));
  background: linear-gradient(#2d2c2a, #1a1918);
}
.room-bench::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: calc(-3.5 * var(--cm));
  height: calc(7 * var(--cm));
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.3), transparent);
}
.room-bench i { position: absolute; top: calc(8 * var(--cm)); bottom: 0; width: calc(3 * var(--cm)); background: #1f1e1c; }
.room-bench i:first-child { left: 9%; }
.room-bench i:last-child { right: 9%; }

.room-print {
  --iw: calc(var(--w-cm) * var(--cm));
  --ih: calc(var(--h-cm) * var(--cm));
  --fr: calc(2.2 * var(--cm));
  --mt: calc(7 * var(--cm));
  --th: calc(var(--ih) + 2 * (var(--fr) + var(--mt)));
  position: absolute;
  left: 50%;
  bottom: max(calc(168 * var(--cm) - var(--th) / 2), calc(92 * var(--cm)));
  width: calc(var(--iw) + 2 * (var(--fr) + var(--mt)));
  padding: var(--mt);
  border: var(--fr) solid #161615;
  background: #fdfcf9;
  box-shadow:
    0 calc(1.6 * var(--cm)) calc(4.5 * var(--cm)) calc(-1 * var(--cm)) rgba(0, 0, 0, 0.5),
    0 calc(0.3 * var(--cm)) calc(0.8 * var(--cm)) rgba(0, 0, 0, 0.22);
  transform: translateX(-50%);
  transition: width 0.8s var(--ease-out), bottom 0.8s var(--ease-out), padding 0.6s var(--ease-out),
    border-width 0.6s var(--ease-out), border-color 0.4s ease;
}
.room-print[data-frame="white"] { border-color: #f1efea; outline: 1px solid rgba(0, 0, 0, 0.1); }
.room-print[data-frame="oak"] { border-color: #c4a073; border-image: linear-gradient(120deg, #d2b48c, #b98f5f 45%, #d6b991) 1; }
.room-print[data-frame="canvas"] { --fr: 0px; --mt: 0px; }

.room-mat { display: block; }
.room-mat img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--par);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

.field { margin-bottom: 26px; }
.field .label { display: flex; justify-content: space-between; margin-bottom: 12px; }
.room-size-out { color: var(--ink); letter-spacing: 0.08em; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg button {
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--paper-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.swatches { display: flex; gap: 12px; }
.swatches button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow 0.25s ease;
}
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--ink); }
.swatches [data-tone="white"] { background: #efede7; }
.swatches [data-tone="linen"] { background: #d9d0c1; }
.swatches [data-tone="sage"] { background: #a9b3a4; }
.swatches [data-tone="navy"] { background: #2b3644; }
.swatches [data-tone="charcoal"] { background: #2f2f2d; }

.room-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.room-picks button { height: 52px; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0.6; transition: opacity 0.25s ease; }
.room-picks button:hover, .room-picks button[aria-pressed="true"] { opacity: 1; }
.room-picks button[aria-pressed="true"] { outline: 1px solid var(--ink); outline-offset: 3px; }
.room-picks img { display: block; width: auto; height: 100%; }

.room-buy { width: 100%; margin: 6px 0 16px; }

/* ---- How prints work ---- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 clamp(28px, 4vw, 64px); margin: 0; padding: 0; list-style: none; }
.steps li { padding-top: 22px; border-top: 1px solid var(--ink); }
.step-n { color: var(--muted); font-family: var(--serif); font-size: 22px; font-style: italic; }
.steps h3 { margin: 26px 0 12px; font-family: var(--serif); font-size: clamp(1.7rem, 2.4vw, 2.1rem); font-weight: 400; line-height: 1.1; }
.steps p { margin: 0; max-width: 38ch; color: var(--muted); font-size: 15.5px; }

.closing { margin-top: clamp(110px, 15vw, 200px); text-align: center; }
.closing .ctas { justify-content: center; margin-top: 40px; }

/* ---- Justified photo grid: every row shares one height, nothing is cropped ---- */

.jgrid { display: flex; flex-wrap: wrap; gap: 40px 14px; }
.jgrid::after { content: ""; flex-grow: 1000000; }

.tile {
  display: block;
  flex: calc(var(--ar) * 100) 1 calc(var(--ar) * var(--row));
  text-decoration: none;
}
.tile-img {
  display: block;
  aspect-ratio: var(--ar);
  background-size: cover;
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.tile-img img { display: block; width: 100%; height: 100%; }
.tile-cap { display: block; padding-top: 12px; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.tile:hover .tile-img { transform: translateY(-5px); box-shadow: var(--shadow); }
.tile:hover .tile-cap { font-style: italic; }

/* ---- All photographs ---- */

.filters {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 30px;
  margin-bottom: clamp(32px, 4vw, 56px);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.search input {
  width: 190px;
  height: 34px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.search input:focus { border-bottom-color: var(--ink); }
.filter-count { margin-left: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 52px 32px; }
.card { display: flex; flex-direction: column; text-decoration: none; }
/* Every cell is 3:2; the photograph sits uncropped on the cell's bottom edge, so captions line up. */
.card-img { position: relative; display: block; aspect-ratio: 3 / 2; }
.card-img img {
  position: absolute;
  inset: 0;
  display: block;
  margin: auto auto 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.card:hover .card-img img { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 16px; }
.card-title { font-family: var(--serif); font-size: 21px; line-height: 1.2; }
.card:hover .card-title { font-style: italic; }
.card-series { color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.empty { margin: 60px 0; color: var(--muted); text-align: center; }

/* ---- Photo page ---- */

.photo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
  padding-top: clamp(20px, 3.4vw, 44px);
}

.photo-stage { display: flex; justify-content: flex-start; margin: 0; }
.photo-zoom { display: block; max-width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100svh - var(--nav-h) - 84px);
  box-shadow: var(--shadow);
  view-transition-name: stage;
}

.photo-info { position: sticky; top: calc(var(--nav-h) + 28px); }
.photo-info > .label { display: flex; justify-content: space-between; gap: 12px; }
.photo-title { margin: 18px 0 28px; font-family: var(--serif); font-size: clamp(2.6rem, 4.2vw, 3.7rem); font-weight: 400; line-height: 0.98; letter-spacing: -0.015em; text-wrap: balance; }
.photo-actions { display: grid; gap: 10px; }
.photo-info .note { margin: 20px 0; }
.photo-tools { display: flex; gap: 26px; }

.photo-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; border-top: 1px solid var(--line); }
.photo-nav a { display: flex; flex-direction: column; gap: 6px; padding: 18px 0 0; text-decoration: none; }
.photo-nav a > span:last-child { font-family: var(--serif); font-size: 20px; line-height: 1.15; }
.photo-nav a:hover > span:last-child { font-style: italic; }
.photo-nav a[rel="next"] { text-align: right; }

.strip { container-type: inline-size; }
.strip-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px max(var(--gutter), (100cqw - var(--max)) / 2) 18px;
  scrollbar-width: none;
}
.strip-rail::-webkit-scrollbar { display: none; }
.strip-rail a {
  flex: 0 0 auto;
  width: calc(116px * var(--ar));
  height: 116px;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.strip-rail a:hover { opacity: 1; }
.strip-rail a[aria-current] { opacity: 1; outline: 1px solid var(--ink); outline-offset: 4px; }
.strip-rail img { display: block; width: 100%; height: 100%; }

/* ---- Full-screen viewer ---- */

.lb {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0c0b;
  color: #f6f4ef;
}
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade 0.4s ease both; }
.lb::backdrop { background: #0c0c0b; }
.lb .label { color: rgba(246, 244, 239, 0.6); }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px var(--gutter); }
.lb-title { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 clamp(8px, 6vw, 84px); }
.lb-img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; transition: opacity 0.25s ease; }
.lb-btn {
  padding: 10px 0;
  border: 0;
  background: none;
  color: #f6f4ef;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.lb-btn:hover { text-decoration: underline; text-underline-offset: 5px; }
.lb-nav { position: absolute; top: 0; bottom: 0; width: clamp(44px, 6vw, 84px); padding: 0; }
.lb-nav .arr { width: 22px; height: 12px; }
.lb-prev { left: 0; }
.lb-prev .arr { transform: scaleX(-1); }
.lb-next { right: 0; }
.lb-open body, .sheet-open body { overflow: hidden; }

/* ---- Ads ---- */
/* Space is reserved up front so the page doesn't jump when an ad loads. If Google has no ad to
   show (or an ad blocker removes it), the whole block collapses. */

.ad-wrap { margin-top: clamp(72px, 9vw, 120px); }
.ad { max-width: 970px; margin: 0 auto; padding-top: 16px; border-top: 1px solid var(--line); }
.ad-label { margin-bottom: 12px; text-align: center; }
.ad ins.adsbygoogle { min-height: 250px; }
.ad ins.adsbygoogle[data-ad-status] { min-height: 0; }
.ad-wrap:has(ins[data-ad-status="unfilled"]),
.ad-wrap:has(ins.adsbygoogle:empty[data-adsbygoogle-status="done"]) { display: none; }

/* ---- Text pages & shop ---- */

.prose { max-width: calc(720px + 2 * var(--gutter)); margin-left: max(0px, (100% - var(--container)) / 2); }
.prose h2 { margin: 52px 0 12px; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #45423d; font-size: 16.5px; line-height: 1.65; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

.shop-frame { display: block; width: 100%; height: 1400px; border: 1px solid var(--line); background: #fff; }

/* ---- Buy sheet ---- */

.sheet {
  width: min(1120px, 94vw);
  height: min(880px, 90vh);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.6s var(--ease-out) both; }
.sheet.closing { animation: sheet-out 0.3s ease both; }
.sheet::backdrop { background: rgba(20, 20, 18, 0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.4s ease both; }
.sheet.closing::backdrop { animation: fade 0.3s ease reverse both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(40px); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(30px); } }
@keyframes fade { from { opacity: 0; } }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px 16px 28px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 4px 0 0; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.05; }
.sheet-close { padding: 10px 0; border: 0; background: none; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }
.sheet-close:hover { text-decoration: underline; text-underline-offset: 5px; }
.sheet-body { position: relative; flex: 1; min-height: 0; }
.sheet-body iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.4s ease; }
.sheet.loaded iframe { opacity: 1; }
.sheet-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.sheet-loading span { width: 26px; height: 26px; border: 1px solid var(--faint); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; }
.sheet.loaded .sheet-loading { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet-foot { margin: 0; padding: 12px 28px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 400;
  padding: 13px 20px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateX(-50%);
  animation: toast 2.2s var(--ease) both;
}
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  12%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 8px); }
}

/* ---- Cursor label (mouse only) ---- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  padding: 9px 13px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  scale: 0.7;
  transform-origin: 0 0;
  transition: opacity 0.2s ease, scale 0.35s var(--ease-out);
}
.cursor.on { opacity: 1; scale: 1; }

/* ---- Footer ---- */

.foot { margin-top: clamp(110px, 14vw, 190px); padding: clamp(56px, 7vw, 88px) 0 28px; background: var(--ink); color: var(--paper); overflow: hidden; }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; }
.foot-line { margin: 0; max-width: 15ch; font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.04; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.foot .label { margin-bottom: 14px; color: rgba(246, 244, 239, 0.5); }
.foot-cols a { display: block; padding: 4px 0; color: rgba(246, 244, 239, 0.78); font-size: 15px; text-decoration: none; }
.foot-cols a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.foot .wrap { container-type: inline-size; }
/* Sized from the container so the wordmark always spans the grid exactly. */
.foot-mark { margin: clamp(40px, 6vw, 80px) 0 0 -0.012em; padding-bottom: 0.14em; font-family: var(--serif); font-size: 31.4cqw; line-height: 0.8; letter-spacing: -0.03em; white-space: nowrap; user-select: none; }
.foot-fine { margin: clamp(36px, 5vw, 64px) 0 0; padding-top: 20px; border-top: 1px solid rgba(246, 244, 239, 0.16); color: rgba(246, 244, 239, 0.55); font-size: 12px; line-height: 1.6; }

/* ---- View transitions: the clicked thumbnail becomes the photograph; filters glide ---- */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  /* Let clicks through while a transition plays, so quick filter changes are never swallowed. */
  ::view-transition { pointer-events: none; }
  ::view-transition-group(*) { animation-duration: 0.55s; animation-timing-function: var(--ease-out); }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0.35s; }
  ::view-transition-old(stage),
  ::view-transition-new(stage) { height: 100%; object-fit: cover; mix-blend-mode: normal; }
}

/* ---- Responsive ---- */

@media (max-width: 1180px) {
  .nav-in { gap: 22px; }
  .nav-links { gap: 20px; }
  .gal { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .gal-go { display: none; }
}

@media (max-width: 1068px) {
  :root { --row: 250px; }
  .room { grid-template-columns: 1fr; }
  .room-ui { max-width: 560px; }
  .photo { grid-template-columns: 1fr; }
  .photo-info { position: static; max-width: 560px; }
  .photo-img { max-height: none; }
}

@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .gal { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 28px 0; }
  .gal-num { display: none; }
  .gal-thumbs img { height: 92px; }
  .gal-go { display: inline-flex; justify-content: flex-start; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .foot-top { grid-template-columns: 1fr; }
}

@media (max-width: 734px) {
  :root { --row: 100vw; --nav-h: 60px; }
  .brand { font-size: 26px; }
  .hero-pin { --wg: 6px; }
  .wt-desk { display: none; }
  .motion .hero-pin { --wall-w: min(calc(100% - 2 * var(--gutter)), calc((100svh - var(--nav-h) - 96px) * 0.8)); }
  .hero-cap { font-size: 9.5px; letter-spacing: 0.12em; white-space: nowrap; }
  .jgrid { gap: 28px 10px; }
  .tile { flex-basis: 100%; }
  .gal-thumbs { gap: 8px; overflow: hidden; }
  .gal-thumbs img { height: 76px; }
  .room-scene { --rw: 300; aspect-ratio: 1 / 1; }
  .filters { position: static; gap: 12px 16px; }
  .search, .search input { width: 100%; }
  .filter-count { margin-left: 0; }
  .cards { grid-template-columns: 1fr 1fr; gap: 30px 14px; }
  .card-cap { flex-direction: column; gap: 4px; padding-top: 10px; }
  .card-title { font-size: 18px; }
  .strip-rail a { width: calc(88px * var(--ar)); height: 88px; }
  .shop-frame { border: 0; }
  .sheet { width: 100vw; height: 94svh; margin: auto 0 0; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
  .sheet-head { padding: 14px 16px 12px 20px; }
  .sheet-head h2 { font-size: 24px; }
  .lb-nav { display: none; }
  .menu a { font-size: 34px; }
}

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