:root {
  --page: #ecebe6;
  --surface: #f3f2ec;
  --ink: #3a3936;
  --ink-strong: #191617;
  --muted: #77756f;
  --line: #d5d2c8;
  --line-strong: #c9c5ba;
  --accent: #982321;
  --accent-dark: #5f120c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 280px;
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--ink-strong);
  color: var(--page);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header,
main,
.site-footer {
  width: min(100%, 1800px);
  margin-inline: auto;
  padding-inline: clamp(16px, 4.5vw, 56px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: clamp(20px, 3vw, 34px);
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: clamp(16px, 2.4vw, 30px); }
.site-nav a {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.hero { padding-top: clamp(28px, 4vw, 54px); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding-bottom: clamp(22px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.hero-copy { max-width: 700px; }
.eyebrow,
.section-heading span {
  display: block;
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(52px, 6.6vw, 106px);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: .92;
  text-transform: uppercase;
}

.hero-deck {
  margin: 24px 0 28px;
  color: #5b4c50;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(24px, 2.2vw, 31px);
  font-style: italic;
  line-height: 1.25;
}

.hero-description {
  max-width: 640px;
  margin: 0;
  color: #55534d;
  font-size: 14.5px;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-instruction {
  max-width: 610px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
.hero-actions a {
  min-height: 44px;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .15em;
  line-height: 44px;
  text-transform: uppercase;
  text-underline-offset: 4px;
}
.hero-actions a:last-child { color: var(--accent); }

.hero-art { display: flex; min-width: 0; flex-direction: column; gap: 10px; margin: 0; }
.hero-art-button {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--line);
  box-shadow: 0 3px 18px rgba(0,0,0,.14);
  cursor: pointer;
}
.hero-art-button picture { display: block; }
.hero-art-button img { display: block; width: 100%; height: auto; transition: transform .55s ease; }
.hero-art-button:hover img { opacity: .94; }
.hero-art figcaption {
  color: #99898d;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.gallery-section { padding: clamp(48px, 6vw, 84px) 0 112px; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 34px;
}
.section-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(34px, 3.5vw, 54px);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
}
.section-heading p { justify-self: end; max-width: 480px; margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 52px) clamp(14px, 2.5vw, 26px);
}

.art-card { min-width: 0; content-visibility: auto; contain-intrinsic-size: 520px 680px; animation: reveal .5s both; animation-delay: calc(var(--index) * 35ms); }
.art-card.landscape { grid-column: span 2; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.art-button { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.art-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.art-frame img { display: block; width: 100%; height: auto; object-fit: contain; transition: transform .45s ease, filter .25s ease; }
.art-button:hover .art-frame img { filter: saturate(1.035); }

.art-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding-top: 11px;
}
.art-title {
  display: block;
  color: var(--ink-strong);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}
.art-year {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.art-price { display: block; margin-top: 1px; color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.physical-note { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.image-error { display: grid; height: 100%; place-items: center; padding: 24px; color: var(--muted); font-family: "Newsreader", serif; font-size: 20px; font-style: italic; text-align: center; }

.closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .65fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
  padding: clamp(52px, 7vw, 92px) 0;
  border-top: 1px solid var(--line-strong);
}
.closing h2 { margin: 0; color: var(--ink-strong); font-family: "Newsreader", Georgia, serif; font-size: clamp(38px, 4.5vw, 68px); font-style: italic; font-weight: 500; line-height: 1; }
.closing-copy p { margin: 0 0 24px; color: #55534d; font-size: 14px; line-height: 1.7; }
.closing-copy a { color: var(--accent); font-size: 12px; font-weight: 500; text-underline-offset: 4px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 15px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.no-script { padding: 30px; border: 1px solid var(--line); background: rgba(255,255,255,.18); color: var(--muted); text-align: center; }

.theme-toggle {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 18;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(25,22,23,.16);
  border-radius: 50%;
  background: rgba(236,235,230,.92);
  color: var(--ink-strong);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  cursor: pointer;
  backdrop-filter: blur(12px);
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.theme-toggle .theme-icon-sun,
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: color-mix(in oklab, var(--viewer-color, #553b43) 30%, #131112);
  color: #e8e2dc;
  transition: background .4s ease;
}
.viewer::backdrop { background: rgba(0,0,0,.86); }
.viewer-shell { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.viewer-shell:fullscreen { width: 100vw; height: 100vh; height: 100dvh; background: #131112; }
.viewer.is-focus-mode .viewer-shell { position: fixed; inset: 0; z-index: 2; width: 100vw; height: 100vh; height: 100dvh; background: #131112; }
.viewer.is-focus-mode .viewer-details,
.viewer.is-focus-mode .viewer-strip { display: none; }
.viewer-toolbar { display: flex; min-height: 62px; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.viewer-heading { max-width: 40%; margin: 0; overflow: hidden; color: rgba(232,226,220,.68); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-controls { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.viewer-controls button { height: 42px; padding: 0 12px; border: 0; border-radius: 6px; background: rgba(20,18,19,.55); color: #e8e2dc; font: 500 12px/1 "Archivo",sans-serif; cursor: pointer; }
.viewer-controls button:hover { background: rgba(20,18,19,.8); }
.viewer-controls .viewer-zoom,
.viewer-controls .viewer-close { width: 42px; padding: 0; font-size: 18px; }
.viewer-main { display: flex; flex: 1; min-height: 0; }
.viewer-stage { position: relative; display: grid; overflow: hidden; min-width: 0; min-height: 0; flex: 1; place-items: center; touch-action: none; }
.viewer-art { display: grid; width: 100%; height: 100%; min-width: 0; min-height: 0; padding: 18px 12px; place-items: center; cursor: grab; }
.viewer-art.is-dragging { cursor: grabbing; }
.viewer-stage img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; opacity: 0; transform-origin: center; transition: opacity .3s ease, transform .18s ease; user-select: none; -webkit-user-drag: none; }
.viewer-stage img.ready { opacity: 1; }
.viewer-loading { position: absolute; z-index: 2; color: #cfc7c1; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.viewer-loading.hidden { display: none; }
.viewer-nav { display: grid; width: 54px; flex: none; place-items: center; padding: 0; border: 0; background: transparent; color: #e8e2dc; font: 300 42px/1 "Newsreader",serif; cursor: pointer; transition: background .18s ease; }
.viewer-nav:hover { background: rgba(20,18,19,.48); }
.viewer-details { display: flex; width: 300px; min-width: 0; flex: none; flex-direction: column; gap: 16px; overflow-y: auto; padding: 12px 26px 22px 10px; scrollbar-color: rgba(232,226,220,.28) transparent; }
.viewer-details h2 { margin: 0; color: #f1ece7; font-size: clamp(21px,2vw,25px); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
.viewer-status { display: inline-flex; min-height: 28px; align-items: center; gap: 7px; margin: 12px 0 0; padding: 0 10px; border-radius: 999px; background: rgba(26,36,20,.75); color: #a9c9a0; font-size: 11px; font-weight: 500; }
.viewer-status span { width: 10px; height: 10px; border: 2px solid #a9c9a0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(26,36,20,.75); background: #3f7d4a; }
.viewer-facts { display: flex; flex-direction: column; gap: 7px; padding-top: 14px; border-top: 1px solid rgba(232,226,220,.18); color: #cfc7c1; font-size: 13px; line-height: 1.35; }
.viewer-facts p { margin: 0; }
.viewer-facts strong { color: #f1ece7; font-size: 13px; }
.viewer-description { padding-top: 14px; border-top: 1px solid rgba(232,226,220,.18); }
.viewer-description p { margin: 0; }
.viewer-description p:first-child { margin-bottom: 7px; color: #9f9893; font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.viewer-description p:last-child { color: #cfc7c1; font-family: "Newsreader",serif; font-size: 14px; line-height: 1.5; text-wrap: pretty; white-space: pre-line; }
.viewer-inquire { display: grid; min-height: 48px; place-items: center; border-radius: 8px; background: #9f352d; color: #f5efeb; font-size: 13px; font-weight: 700; text-decoration: none; }
.viewer-inquire:hover { background: #b13a31; color: #fff; }
.viewer-download,
.viewer-provenance { align-self: center; color: #cfc7c1; font-size: 12px; text-underline-offset: 3px; }
.viewer-download:hover,
.viewer-provenance:hover { color: #fff; }
.viewer-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.viewer-secondary-actions button { min-height: 46px; border: 1px solid rgba(232,226,220,.25); border-radius: 8px; background: transparent; color: #cfc7c1; font: 600 12px/1 "Archivo",sans-serif; cursor: pointer; }
.viewer-secondary-actions button:hover { border-color: rgba(232,226,220,.55); color: #fff; }
.viewer-related { padding-top: 14px; border-top: 1px solid rgba(232,226,220,.18); }
.viewer-related > p { margin: 0 0 10px; color: #9f9893; font-size: 11px; }
.viewer-related > div { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.viewer-related button { overflow: hidden; aspect-ratio: 1; padding: 0; border: 0; border-radius: 5px; background: rgba(232,226,220,.1); cursor: pointer; }
.viewer-related img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .18s ease, transform .18s ease; }
.viewer-related button:hover img { opacity: 1; }
.viewer-help { margin: auto 0 0; color: #8f8882; font-size: 11px; line-height: 1.5; }
.viewer-strip { display: flex; height: 72px; flex: none; gap: 8px; overflow-x: auto; padding: 6px 12px 8px; scrollbar-width: thin; }
.viewer-strip button { width: 58px; flex: none; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 6px; background: rgba(232,226,220,.08); cursor: pointer; opacity: .5; }
.viewer-strip button[aria-current="true"] { border-color: #e8e2dc; opacity: 1; }
.viewer-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.viewer-room { position: absolute; inset: 8px 4px; display: grid; overflow: hidden; place-items: center; border-radius: 8px; background: linear-gradient(#efede7,#dbd8cf); }
.viewer-room[hidden] { display: none; }
.viewer-room-frame { width: min(42%,30vh); padding: min(1.1vw,14px); background: linear-gradient(135deg,#fbfaf6,#e9e6dd); box-shadow: 0 18px 44px rgba(30,26,24,.38),0 3px 10px rgba(30,26,24,.25); }
.viewer-room-frame img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; opacity: 1; }
.viewer-room > span { position: absolute; bottom: 12px; left: 16px; color: #8b877c; font-size: 11.5px; }

html[data-theme="dark"] body {
  --page: #0c0d0f;
  --surface: #171719;
  --ink: #e8e2dc;
  --ink-strong: #f7f4ef;
  --muted: #aaa29b;
  --line: #333034;
  --line-strong: #4b4548;
  --accent: #df7c75;
  --accent-dark: #f09a93;
  background: var(--page);
}
html[data-theme="dark"] .hero-deck { color: #c6b8bd; }
html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .closing-copy p { color: var(--muted); }
html[data-theme="dark"] .art-frame { background: #252326; }
html[data-theme="dark"] .theme-toggle { border-color: rgba(232,226,220,.2); background: rgba(37,34,34,.92); color: #e8e2dc; }

@media (max-width: 1180px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .site-header { align-items: flex-start; }
  .section-heading,
  .closing { grid-template-columns: 1fr; }
  .section-heading p { justify-self: start; }
  .viewer-details { width: 280px; padding-right: 18px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header { display: block; }
  .wordmark { display: block; margin-bottom: 16px; }
  .site-nav { justify-content: flex-start; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: none; }
  .site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 9px; }
  .hero { padding-top: 24px; }
  .hero-grid { gap: 24px; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 1; }
  .hero-copy h1 { order: 2; }
  .hero-copy .hero-deck { order: 3; }
  .hero-art { order: 4; }
  .hero-copy .hero-description { order: 5; }
  .hero-copy .hero-actions { order: 6; }
  .hero h1 { font-size: clamp(48px, 17vw, 76px); }
  .hero-deck { margin: 4px 0 0; }
  .hero-description { font-size: 14px; line-height: 1.6; }
  .hero-actions { margin-top: 0; }
  .hero-art figcaption { font-size: 9px; }
  .gallery { grid-template-columns: 1fr; gap: 44px; }
  .art-card.landscape { grid-column: auto; }
  .closing { padding-block: 60px; }
  .site-footer { display: block; line-height: 1.8; }
  .site-footer span { display: block; }
  .viewer-toolbar { min-height: 54px; padding: 6px 10px; }
  .viewer-heading { display: none; }
  .viewer-controls { width: 100%; }
  .viewer-controls button { min-width: 40px; height: 40px; padding-inline: 10px; }
  .viewer-controls .viewer-zoom { display: none; }
  .viewer-controls .viewer-fullscreen { display: inline-flex; }
  .viewer-main { overflow-y: auto; overscroll-behavior: contain; flex-wrap: wrap; }
  .viewer-stage { width: calc(100% - 76px); height: clamp(280px, 58dvh, 520px); min-height: 0; flex: none; }
  .viewer-art { padding: 10px 4px; }
  .viewer-nav { width: 38px; height: clamp(280px, 58dvh, 520px); min-height: 0; font-size: 36px; }
  .viewer-details { width: 100%; min-height: 38dvh; overflow: visible; padding: 18px max(18px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); border-top: 1px solid rgba(232,226,220,.18); }
  .viewer-related,
  .viewer-help { display: none; }
  .viewer-strip { height: 66px; }
  .viewer-room-frame { width: min(58%,28vh); }
  .theme-toggle { right: 12px; bottom: 12px; width: 44px; height: 44px; }
}

@media (max-width: 430px) {
  .site-header, main, .site-footer { padding-inline: 14px; }
  .hero-actions { gap: 14px 22px; }
  .viewer-toolbar { align-items: stretch; }
  .viewer-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .viewer-controls button { width: auto; padding-inline: 6px; font-size: 10px; }
  .viewer-controls .viewer-close { font-size: 19px; }
  .viewer-stage { width: calc(100% - 68px); }
  .viewer-nav { width: 34px; }
  .viewer-secondary-actions { grid-template-columns: 1fr; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .viewer-toolbar { min-height: 48px; padding-block: 4px; }
  .viewer-stage, .viewer-nav { height: calc(100dvh - 48px); }
  .viewer-strip, .viewer-details { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
