/* estherepstein.com — gallery white
   The paintings carry the colour; everything else stays out of their way. */

:root {
  --ground: #fbfbfa;
  --ink: #16161a;
  --muted: #6a6a6a;
  --hair: #e3e2df;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
main a:not(.work-link):not(.btn) {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  text-decoration-color: #c8c7c3;
}
main a:not(.work-link):not(.btn):hover { text-decoration-color: var(--ink); }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--ground); padding: 0.75rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

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

/* ---------- masthead ---------- */

.masthead { padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.25rem); }

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.wordmark {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead nav ul {
  display: flex;
  gap: clamp(1.1rem, 3vw, 2.25rem);
  margin: 0; padding: 0; list-style: none;
}
.masthead nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- page furniture ---------- */

/* padding-block only — a shorthand here would zero .wrap's horizontal gutter
   and pull every page heading out of line with the content below it. */
.page-head {
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.lede {
  max-width: var(--measure);
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: #33333a;
  margin: 0;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.35em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- work grid (columns keep each canvas's true proportions) ---------- */

.grid {
  columns: 3 17rem;
  column-gap: clamp(1.25rem, 3vw, 2.75rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.work {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 clamp(1.75rem, 4vw, 3.25rem);
}

.work-link { display: block; }

.work figure { margin: 0; }

.work .frame {
  background: #f1f0ed;
  overflow: hidden;
}
.work img { width: 100%; transition: opacity 0.35s ease; }
.work-link:hover img { opacity: 0.86; }

.work figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
}

.work-title {
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: 0.005em;
}

.status {
  flex: none;
  font-size: 0.6875rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.status.is-sold { color: #a4a29d; }

/* ---------- filter ---------- */

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.9rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.filter button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0 0 2px;
  font: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filter .count { margin-left: auto; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- single work ---------- */

.work-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.work-detail .plate { background: #f1f0ed; }
.work-detail .plate img { width: 100%; }

.work-detail h1 { margin-bottom: 1.25rem; }

.meta { margin: 0; font-size: 0.9375rem; }
.meta div { display: flex; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--hair); }
.meta dt { flex: none; width: 5.5rem; color: var(--muted); font-size: 0.8125rem; letter-spacing: 0.04em; }
.meta dd { margin: 0; }

.enquire { margin-top: 1.75rem; }

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.7rem 1.4rem;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.btn:hover { background: var(--ink); color: var(--ground); }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hair);
  padding: 1.5rem 0 clamp(2.5rem, 6vw, 4rem);
  font-size: 0.875rem;
}
.pager a { color: var(--muted); }
.pager a:hover { color: var(--ink); }

/* ---------- home ---------- */

/* The hero painting sizes to its own proportions and centres — no frame,
   no crop, capped by viewport height so portrait canvases stay in view. */
.hero { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.hero figure { margin: 0; }
.hero img {
  max-height: 74vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  background: #f1f0ed;
}
.hero figcaption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1rem;
}
.hero-statement {
  max-width: 40rem;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.45;
  font-weight: 300;
  letter-spacing: -0.005em;
  margin: 0 0 clamp(2rem, 5vw, 3.25rem);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 0.9rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.section-head h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.section-head a { font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.section-head a:hover { color: var(--ink); }

/* ---------- exhibitions ---------- */

.exhibitions { max-width: 46rem; margin: 0; padding: 0; list-style: none; }
.exhibitions li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 2rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--hair);
}
.exhibitions .venue { font-size: 1.0625rem; }
.exhibitions .detail { display: block; font-size: 0.875rem; color: var(--muted); }
.exhibitions .dates { font-size: 0.875rem; color: var(--muted); text-align: right; white-space: nowrap; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hair);
  margin-top: clamp(2rem, 6vw, 4rem);
  padding: 1.75rem 0 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.site-footer p { margin: 0; font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- narrow ---------- */

@media (max-width: 46rem) {
  .work-detail { grid-template-columns: minmax(0, 1fr); }
  .exhibitions li { grid-template-columns: minmax(0, 1fr); }
  .exhibitions .dates { text-align: left; }
  .masthead-inner { gap: 0.9rem 1.5rem; }
}

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