:root {
  color-scheme: dark;
  --bg: #151815;
  --surface: #20241f;
  --text: #ebe7dc;
  --muted: #b9b8ab;
  --line: rgba(235,231,220,.20);
  --accent: #b7ad93;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: Inter, sans-serif; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; background: var(--text); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.mono { font-family: 'Geist Mono', monospace; text-transform: uppercase; letter-spacing: .17em; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 76px; padding: 0 clamp(22px,5vw,76px);
  background: rgba(21,24,21,.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.site-mark { display: inline-flex; align-items: baseline; gap: .35em; font-size: .78rem; font-weight: 500; letter-spacing: .20em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.site-mark em { color: var(--accent); font: italic 400 1.13rem 'Playfair Display',serif; letter-spacing: .03em; text-transform: none; }
.site-mark small { margin-left: .45em; color: var(--muted); font-size: .6rem; letter-spacing: .2em; }
.site-nav { display: flex; gap: clamp(18px,3vw,40px); }
.site-nav a { color: var(--muted); font-size: .62rem; text-decoration: none; }
.site-nav a:hover { color: var(--text); }

.opening { position: relative; isolation: isolate; display: flex; align-items: center; min-height: calc(100svh - 76px); overflow: hidden; padding: 100px clamp(24px,6vw,96px); background: #222; }
.opening::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url('assets/homepage-architectural-coast.jpg') center / cover no-repeat; }
.opening::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(13,16,14,.84) 0%,rgba(13,16,14,.62) 38%,rgba(13,16,14,.05) 85%),linear-gradient(0deg,rgba(13,16,14,.65),transparent 38%); }
.opening-inner { width: min(100%,830px); }
.eyebrow { display: flex; align-items: center; gap: 16px; margin: 0 0 31px; color: #dedacb; font-size: .64rem; }
.eyebrow::before { content: ""; width: 46px; height: 1px; background: var(--accent); }
.opening h1 { margin: 0; font: 400 clamp(4rem,7vw,8.1rem)/.92 'Playfair Display',serif; letter-spacing: -.052em; text-wrap: balance; }
.opening h1 em { color: #c7bca1; font-weight: 400; }
.opening-copy { max-width: 430px; margin: 34px 0 0; color: #e0ded5; font-size: clamp(1rem,1.4vw,1.1rem); font-weight: 300; line-height: 1.72; }
.text-link { display: inline-flex; align-items: center; gap: 26px; width: fit-content; padding: 0 0 11px; border-bottom: 1px solid var(--accent); color: inherit; font: 600 .68rem Inter,sans-serif; letter-spacing: .18em; text-decoration: none; text-transform: uppercase; }
.text-link::after { content: "↗"; color: var(--accent); font-size: 1.1rem; transition: transform .25s ease; }
.text-link:hover::after { transform: translate(3px,-3px); }
.opening .text-link { margin-top: 46px; }
.opening-corner { position: absolute; right: clamp(24px,6vw,96px); bottom: 30px; color: #dedacb; font-size: .58rem; }

.collection-section { padding: clamp(85px,9vw,145px) 0 100px; background: var(--surface); scroll-margin-top: 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 50px; max-width: 1500px; margin: 0 auto 47px; padding: 0 clamp(24px,6vw,96px); }
.section-kicker { margin: 0 0 22px; color: var(--accent); font-size: .64rem; }
.section-heading h2, .work-heading h2 { margin: 0; font: 400 clamp(3.3rem,6vw,6.7rem)/.98 'Playfair Display',serif; letter-spacing: -.05em; }
.section-heading > p { max-width: 310px; margin: 0 0 6px; color: var(--muted); font-size: .94rem; line-height: 1.7; }
.rail-bar { display: flex; justify-content: space-between; align-items: center; max-width: 1500px; margin: 0 auto 17px; padding: 0 clamp(24px,6vw,96px); }
.rail-bar p { margin: 0; color: var(--muted); font-size: .58rem; }
.rail-hint-mobile { display: none; }
.rail-controls { display: flex; gap: 9px; }
.rail-controls button, .viewer-controls button { display: inline-flex; align-items: center; justify-content: center; width: 41px; height: 41px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.rail-controls button:hover, .viewer-controls button:hover { border-color: var(--accent); }
.rail-controls button:disabled { opacity: .4; cursor: default; }
.collection-rail { display: flex; gap: clamp(14px,2vw,28px); overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; padding: 17px max(24px,calc((100vw - 1300px)/2)) 27px; }
.collection-rail::-webkit-scrollbar { display: none; }
.rail-timeline { display: flex; align-items: center; gap: clamp(14px,2vw,28px); max-width: 1300px; margin: 10px auto 0; padding: 0 clamp(24px,6vw,96px); }
.rail-timeline__number { flex: none; color: var(--muted); font-size: .56rem; }
.rail-scrubber { --progress: 0%; display: block; flex: 1; min-width: 0; height: 44px; margin: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: ew-resize; touch-action: pan-x; }
.rail-scrubber::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg,var(--accent) var(--progress),rgba(235,231,220,.23) var(--progress)); }
.rail-scrubber::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(235,231,220,.23); }
.rail-scrubber::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--accent); }
.rail-scrubber::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -8px; border: 2px solid var(--accent); border-radius: 3px; appearance: none; -webkit-appearance: none; background: var(--surface); box-shadow: 0 0 0 4px var(--surface); transform: rotate(45deg); }
.rail-scrubber::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid var(--accent); border-radius: 3px; background: var(--surface); transform: rotate(45deg); }
.rail-scrubber:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.volume-case { position: relative; flex: 0 0 clamp(185px,20vw,250px); height: clamp(280px,29vw,345px); overflow: hidden; scroll-snap-align: center; border: 1px solid rgba(235,231,220,.18); border-radius: 2px; background: #30332d; box-shadow: 14px 19px 26px rgba(0,0,0,.26); color: #fff; cursor: pointer; text-align: left; transform: perspective(800px) rotateY(-7deg); transform-origin: left center; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.volume-case:hover, .volume-case[aria-pressed="true"] { transform: perspective(800px) rotateY(0) translateY(-8px); border-color: var(--accent); box-shadow: 18px 24px 36px rgba(0,0,0,.36); }
.volume-case::before { content: ""; position: absolute; z-index: 2; left: 0; top: 0; bottom: 0; width: 14px; border-right: 1px solid rgba(255,255,255,.3); background: linear-gradient(90deg,rgba(0,0,0,.75),rgba(255,255,255,.08),rgba(0,0,0,.26)); }
.volume-case img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.72) brightness(.85); }
.volume-shade { position: absolute; inset: 0; background: linear-gradient(0deg,rgba(0,0,0,.90),rgba(0,0,0,.06) 62%,rgba(0,0,0,.25)); }
.volume-top, .volume-bottom { position: absolute; z-index: 1; left: 30px; right: 16px; }
.volume-top { top: 19px; color: #f4f0e7; font-size: .53rem; }
.volume-bottom { bottom: 23px; }
.volume-kind { display: block; margin-bottom: 8px; color: #d8d4c8; font-size: .55rem; }
.volume-name { display: block; font: 400 clamp(1.35rem,2.1vw,2rem)/1.05 'Playfair Display',serif; }
.volume-state { display: inline-block; margin-top: 12px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,.5); color: #e4dfd5; font-size: .5rem; }

.work-section { max-width: 1500px; margin: 0 auto; padding: clamp(95px,10vw,155px) clamp(24px,6vw,96px); scroll-margin-top: 76px; }
.work-section[hidden] { display: none; }
.work-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.work-heading h2 { max-width: 800px; }
.work-heading > p { max-width: 300px; margin: 0 0 6px; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.work-meta { display: flex; gap: 22px; flex-wrap: wrap; margin: 19px 0 45px; color: var(--muted); font-size: .59rem; }
.work-state { max-width: 600px; padding: 40px 0; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.work-state[hidden], .work-grid[hidden], .load-more[hidden] { display: none; }
.work-grid { columns: 3 260px; column-gap: clamp(16px,2vw,30px); }
.work-item { display: block; width: 100%; padding: 0; margin: 0 0 clamp(16px,2vw,30px); break-inside: avoid; border: 0; background: none; color: inherit; cursor: zoom-in; }
.work-item img { display: block; width: 100%; height: auto; background: #2a2e29; transition: filter .3s ease; }
.work-item:hover img { filter: brightness(1.09); }
.work-item span { display: block; margin-top: 8px; color: var(--muted); font-size: .54rem; text-align: left; }
.load-more { display: block; margin: 52px auto 0; padding: 13px 24px; border: 1px solid var(--accent); border-radius: 2px; background: none; color: var(--text); cursor: pointer; font-size: .65rem; }
.load-more:hover { background: rgba(183,173,147,.13); }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 35px clamp(24px,6vw,96px); color: var(--muted); font-size: .56rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 25px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.photo-viewer { position: fixed; inset: 0; width: min(96vw,1250px); max-width: none; max-height: 96vh; padding: 50px clamp(14px,3vw,40px) 25px; border: 1px solid var(--line); border-radius: 2px; background: #111411; color: var(--text); }
.photo-viewer::backdrop { background: rgba(0,0,0,.92); }
.photo-viewer img { display: block; max-width: 100%; max-height: calc(96vh - 160px); width: auto; height: auto; margin: auto; object-fit: contain; }
.viewer-close { position: absolute; top: 12px; right: 14px; padding: 5px 9px; border: 0; background: none; color: var(--text); cursor: pointer; font-size: 1.5rem; }
.viewer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 17px; color: var(--muted); font-size: .58rem; }
.viewer-controls { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .site-header { height: 66px; padding: 0 20px; }
  .site-mark { font-size: .69rem; letter-spacing: .13em; }
  .site-mark small { display: none; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: .57rem; }
  .opening { min-height: calc(100svh - 66px); padding: 85px 24px; }
  .opening::before { background-position: 62% center; }
  .opening::after { background: linear-gradient(90deg,rgba(13,16,14,.83),rgba(13,16,14,.35) 90%),linear-gradient(0deg,rgba(13,16,14,.66),transparent 46%); }
  .opening h1 { font-size: clamp(3.6rem,12vw,6.4rem); }
  .opening-corner { right: 24px; }
  .section-heading, .work-heading { display: block; }
  .section-heading > p, .work-heading > p { margin-top: 23px; }
  .collection-section, .work-section { scroll-margin-top: 66px; }
  .collection-rail { padding-left: 24px; padding-right: 24px; }
  .volume-case { flex-basis: clamp(220px,42vw,300px); height: clamp(310px,52vw,390px); }
  .rail-bar { gap: 16px; }
  .rail-bar p { line-height: 1.5; }
  .rail-hint-desktop { display: none; }
  .rail-hint-mobile { display: inline; }
  .rail-controls button { width: 44px; height: 44px; }
  .rail-timeline { padding: 0 24px; }
  .work-grid { columns: 2 220px; }
}
@media (max-width: 480px) {
  .collection-section { padding-top: 66px; padding-bottom: 68px; }
  .section-heading { gap: 0; margin-bottom: 26px; }
  .section-kicker { margin-bottom: 14px; font-size: .58rem; }
  .section-heading > p { margin-top: 17px; font-size: .88rem; line-height: 1.55; }
  .opening h1 { font-size: clamp(3.4rem,14vw,4.8rem); }
  .opening-corner { display: none; }
  .section-heading h2, .work-heading h2 { font-size: clamp(2.8rem,11vw,3.4rem); }
  .collection-rail { gap: 14px; padding: 8px 28px 20px; scroll-snap-type: x mandatory; }
  .volume-case { flex-basis: min(calc(100vw - 56px),360px); height: clamp(340px,110vw,440px); }
  .rail-bar { margin-bottom: 12px; }
  .rail-bar p { font-size: .68rem; letter-spacing: .1em; }
  .rail-controls { flex: none; gap: 8px; }
  .rail-controls button { width: 48px; height: 48px; }
  .rail-timeline { gap: 14px; margin-top: 4px; padding: 0 28px; }
  .rail-timeline__number { font-size: .62rem; }
  .rail-scrubber { height: 56px; }
  .rail-scrubber::-webkit-slider-runnable-track { height: 6px; }
  .rail-scrubber::-moz-range-track, .rail-scrubber::-moz-range-progress { height: 6px; }
  .rail-scrubber::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -11px; border: 4px solid var(--surface); border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--accent); transform: none; }
  .rail-scrubber::-moz-range-thumb { width: 22px; height: 22px; border: 3px solid var(--surface); border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--accent); transform: none; }
  .work-grid { columns: 1; }
  .site-footer { flex-direction: column; }
  .photo-viewer { width: 100vw; max-height: 100vh; padding-bottom: 17px; }
  .photo-viewer img { max-height: calc(100vh - 155px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
