/*
  The site's look. Colors and fonts are the tokens right below: change them here and the whole
  site follows. (A first version, until Mom picks her own colors.)
  Idea: gallery walls. Cool paper-white walls, each piece hung whole on a white mat and never
  cropped, Prussian blue from her cyanotypes for links and buttons, and a red dot on sold
  pieces, the way galleries mark them.
*/
:root {
  --wall: #f6f7f5;
  --mat: #ffffff;
  --ink: #1c2530;
  --muted: #5d6874;
  --line: #dde2e0;
  --blue: #1d3f73;
  --blue-ink: #ffffff;
  --blue-soft: #e4eaf3;
  --red: #c0362c;
  --shadow: 0 1px 2px rgba(28, 37, 48, .08), 0 6px 18px -8px rgba(28, 37, 48, .18);
  --display: "Alegreya", Georgia, "Times New Roman", serif;
  --text: "Alegreya Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wall: #14181d; --mat: #1e242b; --ink: #e9ecef; --muted: #a3adb8; --line: #2c333b;
    --blue: #9dbde9; --blue-ink: #0f1a2b; --blue-soft: #1d2a3c; --red: #e46a5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px -8px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--wall); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 720px; }
.block { padding-block: 40px 8px; display: flex; flex-direction: column; gap: 14px; }
.lede { margin: 0; color: var(--muted); max-width: 60ch; }
.empty, .notice { color: var(--muted); }
.notice { margin: 20px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--mat); }
.fineprint { font-size: 14px; color: var(--muted); }

/* header */
.header { border-bottom: 1px solid var(--line); background: var(--wall); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.name { font-family: var(--display); font-size: 26px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .menu-panel a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.menu-btn { display: none; font: inherit; font-weight: 500; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.menu-panel { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 6px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.menu-panel[hidden] { display: none; }
.menu-panel a { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 19px; }
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a[aria-current] { color: var(--blue); }
@media (max-width: 860px) { .nav { display: none; } .menu-btn { display: inline-block; } }
@media (min-width: 861px) { .menu-panel { display: none !important; } }

/* a piece on its mat: always whole, never cropped */
.mat { background: var(--mat); box-shadow: var(--shadow); aspect-ratio: 4 / 5; padding: 8%; display: grid; place-items: center; }
.mat img { width: 100%; height: 100%; object-fit: contain; }
.no-photo { font-family: var(--display); color: var(--muted); text-align: center; }

/* grids of pieces */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 34px 26px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; } }
.card, .room, .lead { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.card .mat, .room .mat { margin-bottom: 8px; transition: box-shadow .2s; }
.card:hover .mat, .room:hover .mat, .lead:hover .mat { box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.card-title { font-family: var(--display); font-size: 19px; line-height: 1.25; }
.card-meta { font-size: 15px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: 0; }

/* front page */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding-block: 48px 16px; }
.intro-text { display: flex; flex-direction: column; gap: 12px; }
.intro-text h1 { font-size: clamp(40px, 7vw, 68px); }
.intro-text p { margin: 0; font-size: 20px; color: var(--muted); max-width: 32ch; }
.intro > .empty { grid-column: 1 / -1; }
.lead .mat { aspect-ratio: 1 / 1; padding: 6%; }
.lead-cap { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 26px; padding-block: 40px 8px; }
.room-title { font-family: var(--display); font-size: 23px; }
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 24px; padding-block: 28px 8px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
}

/* subject filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a { border: 1px solid var(--line); background: var(--mat); border-radius: 999px; padding: 5px 13px; font-size: 15px; color: var(--ink); text-decoration: none; }
.filters a[aria-current] { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }

/* one piece */
.back { display: inline-block; margin: 22px 0 14px; font-size: 15px; }
.back::before { content: "‹ "; }
.piece { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.stage .mat { aspect-ratio: auto; height: min(78vh, 760px); padding: 5%; }
.thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 64px; height: 64px; padding: 4px; border: 1px solid var(--line); background: var(--mat); cursor: pointer; border-radius: 4px; }
.thumbs button[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.gallery { min-width: 0; }
.info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.facts { margin: 0; color: var(--muted); }
.price { margin: 0; font-size: 22px; font-variant-numeric: tabular-nums; }
.buy { display: flex; flex-direction: column; gap: 8px; }
.btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 6px; background: var(--blue); color: var(--blue-ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.btn:hover { filter: brightness(1.12); }
.btn-price { font-weight: 500; font-variant-numeric: tabular-nums; }
.buy-note { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.sold-note { margin: 0; padding: 12px 14px; background: var(--mat); border: 1px solid var(--line); border-radius: 6px; }
.also { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.tags a { font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; text-decoration: none; color: var(--muted); }
@media (max-width: 860px) {
  .piece { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .stage .mat { height: auto; aspect-ratio: 4 / 5; }
}

/* text pages and descriptions */
.prose { max-width: 62ch; }
.prose p, .prose ul { margin: 0 0 12px; white-space: pre-line; }
.prose ul { white-space: normal; padding-left: 20px; }
.prose h2 { font-size: 21px; margin: 18px 0 6px; }
.page h1 { margin-bottom: 14px; }
.page figure { margin: 18px 0; }
.page figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.email { font-size: 20px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.email span { user-select: all; }
.link-btn { font: inherit; font-size: 15px; color: var(--blue); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }

/* footer */
.footer { margin-top: 64px; border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: 15px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 10px; }
.footer p { margin: 4px 0; max-width: 70ch; }
.footer .fineprint { font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
