/* Liz Nicholson Fine Art — palette and type carried from 2026-06-10-polish.css */
:root {
  --ln-paper:  #faf8f3;
  --ln-ink:    #23211d;
  --ln-muted:  #7a7164;
  --ln-line:   #e6dfd2;
  --ln-accent: #8a6f4d;
  --ln-card:   #fffdf9;

  --fs-small:  clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.217), 1rem);
  --fs-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.217), 1.125rem);
  --fs-large:  clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.217), 1.875rem);
  --fs-xl:     2.25rem;

  --serif: 'Cormorant', Georgia, 'Times New Roman', serif;

  /* Collection grid: paintings are drawn to true relative scale.
     One constant — pixels per real inch of canvas. 48in max reads ~456px. */
  --ppi: clamp(4.5px, 0.58vw, 9.5px);
}

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

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

body {
  margin: 0;
  background: var(--ln-paper);
  color: var(--ln-ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-medium);
  line-height: 1.8;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

img { border-style: none; }

a { color: var(--ln-accent); text-decoration: none; border-bottom: 1px solid var(--ln-line); }
a:hover { color: var(--ln-ink); border-bottom-color: var(--ln-accent); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 0.5em; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-large); }
h3 { font-size: var(--fs-medium); }
p { margin: 0 0 1.35em; }
em, i { font-style: italic; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.wrap-wide { max-width: 1580px; }
.measure { max-width: 34em; }
.center { text-align: center; }
.measure-center { max-width: 34em; margin-left: auto; margin-right: auto; }

.sep {
  border: 0;
  border-top: 1px solid var(--ln-line);
  max-width: 180px;
  margin: clamp(48px, 7vw, 84px) auto;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ln-muted);
  line-height: 1.6;
}

/* ---------- header / nav ---------- */

.site-head { padding: clamp(32px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); text-align: center; }

.wordmark {
  display: inline-block;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ln-ink);
  border: 0;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ln-accent); }
.wordmark-sub { display: block; margin-top: 6px; }

.site-nav { margin-top: clamp(20px, 3vw, 30px); border-top: 1px solid var(--ln-line); border-bottom: 1px solid var(--ln-line); }
.site-nav ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px clamp(20px, 3.5vw, 44px);
  list-style: none; margin: 0; padding: 14px 0;
}
.site-nav a {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ln-muted);
  border: 0;
  padding: 2px 0;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ln-ink); }
.site-nav a[aria-current="page"] { color: var(--ln-ink); box-shadow: inset 0 -1px 0 var(--ln-accent); }

main { display: block; padding-bottom: clamp(64px, 9vw, 120px); }

.page-head { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lede { color: var(--ln-muted); max-width: 34em; margin: 0; }

/* ---------- collection grid ----------
   Each card is a subgrid of the parent, so every image in a row shares one
   bottom baseline and every caption in a row starts at the same y. */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(48 * var(--ppi)), 1fr));
  gap: clamp(26px, 2.6vw, 44px) clamp(22px, 2.4vw, 44px);
  list-style: none; margin: 0; padding: 0;
}

.piece { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.piece a { display: grid; grid-row: span 2; grid-template-rows: subgrid; color: inherit; border: 0; }

.piece .frame {
  display: flex; align-items: flex-end; justify-content: flex-start;
  overflow: hidden;
}
.piece .frame img {
  /* true scale: real canvas inches × --ppi */
  width: calc(var(--iw, 24) * var(--ppi));
  aspect-ratio: var(--iw, 24) / var(--ih, 24);
  max-width: 100%; height: auto; display: block;
  border-radius: 2px;
  transform-origin: bottom left;
  transition: transform 300ms ease, filter 300ms ease, opacity 300ms ease;
}
.piece a:hover .frame img { transform: scale(1.012); filter: brightness(1.05); }

@supports not (grid-template-rows: subgrid) {
  .piece, .piece a { display: block; }
  .piece .meta { min-height: 5.5em; }
}

.piece .meta { align-self: start; padding-top: 16px; }
.piece .title {
  display: inline-block;
  font-size: 1.2rem; font-weight: 700; line-height: 1.35;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.piece a:hover .title { border-bottom-color: var(--ln-accent); }
.piece .line { font-size: var(--fs-small); color: var(--ln-muted); }
.piece .price {
  font-size: 1.05rem; font-weight: 700; color: var(--ln-ink);
  letter-spacing: 0.01em; margin-top: 4px;
}

.sold-mark {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ln-accent);
}
.piece.is-sold .frame img { opacity: 0.5; filter: saturate(0.8); }
.piece.is-sold a:hover .frame img { opacity: 0.6; filter: saturate(0.85) brightness(1.03); transform: none; }

.note {
  font-size: var(--fs-small);
  color: var(--ln-muted);
  font-style: italic;
}

/* ---------- individual piece ---------- */

.piece-view {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
  padding-top: clamp(28px, 4vw, 52px);
}
.piece-view .plate { display: flex; justify-content: center; }
.piece-view .plate img {
  max-width: 100%;
  max-height: 78vh;
  width: auto; height: auto; display: block;
  border-radius: 2px;
}
.piece-view h1 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin-bottom: 0.6em; }

.spec { margin: 0 0 clamp(24px, 3vw, 34px); }
.spec div { display: flex; gap: 16px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--ln-line); }
.spec div:last-child { border-bottom: 1px solid var(--ln-line); }
.spec dt {
  flex: 0 0 6.5em;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ln-muted); line-height: 1.7;
}
.spec dd { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-medium); line-height: 1.7; }

.piece-nav {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 20px;
  border-top: 1px solid var(--ln-line);
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.piece-nav a { color: var(--ln-muted); border: 0; }
.piece-nav a:hover { color: var(--ln-ink); }

/* ---------- about ---------- */

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(230px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-body .prose { max-width: 34em; }
.portrait { margin: 0; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait figcaption {
  font-size: var(--fs-small);
  color: var(--ln-muted);
  padding-top: 10px;
}

@media (max-width: 780px) {
  .about-body { grid-template-columns: 1fr; }
  .portrait { max-width: 380px; }
}

/* ---------- prose ---------- */

.prose h2 { margin-top: clamp(40px, 6vw, 64px); }
.prose h3 { letter-spacing: 0.04em; }
.prose .attrib { color: var(--ln-accent); font-size: var(--fs-small); }

.memorial-title { font-size: clamp(2rem, 4.5vw, 3.1rem); text-align: center; margin-bottom: 0.25em; }
.memorial-dates { text-align: center; color: var(--ln-muted); font-style: italic; letter-spacing: 0.06em; }

blockquote.tribute {
  background: var(--ln-card);
  border: 1px solid var(--ln-line);
  border-left: 3px solid var(--ln-accent);
  margin: 0 0 clamp(32px, 4vw, 48px);
  padding: clamp(24px, 3.5vw, 40px) clamp(22px, 3.5vw, 44px);
}
blockquote.tribute > :last-child { margin-bottom: 0; }
blockquote.tribute h3 { margin-bottom: 0.8em; letter-spacing: 0.04em; }
blockquote.tribute .attrib { display: block; margin-top: 1.4em; font-style: italic; }

.cta {
  text-align: center;
  margin: clamp(40px, 6vw, 72px) auto 0;
  max-width: 34em;
}
.cta .btn {
  display: inline-block;
  margin: 10px 0 18px;
  padding: 13px 30px;
  border: 1px solid var(--ln-accent);
  color: var(--ln-accent);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  white-space: nowrap;
}
.cta .btn:hover { background: var(--ln-accent); color: var(--ln-paper); }
.cta p { font-size: var(--fs-small); color: var(--ln-muted); }

/* ---------- memorial photo gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 17vw, 210px), 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  align-items: start;
  list-style: none; margin: 0; padding: 0;
}
.gallery figure { margin: 0; }
.gallery button {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 0; background: none; cursor: zoom-in;
  font: inherit; color: inherit;
}
.gallery img {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover; background: var(--ln-line);
  transition: opacity 200ms ease;
}
.gallery button:hover img { opacity: 0.85; }
.gallery figcaption {
  font-size: 0.8rem; line-height: 1.5; color: var(--ln-muted);
  padding: 8px 2px 0; text-align: left;
}
.gallery-count { color: var(--ln-muted); font-size: var(--fs-small); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: none;
  background: rgba(35, 33, 29, 0.95);
  /* extra left/right room so the prev/next arrows never sit over the photo */
  padding: clamp(16px, 3vw, 40px) clamp(48px, 6vw, 80px);
  overflow: hidden;
}
.lightbox[open], .lightbox.is-open { display: flex; flex-direction: column; }
/* min-height:0 lets the stage shrink below the image's intrinsic height,
   so max-height:100% on the img has a real box to measure against */
.lightbox .lb-stage {
  flex: 1 1 auto;
  min-height: 0; min-width: 0;
  display: flex; align-items: center; justify-content: center;
}
.lightbox img {
  display: block;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.lightbox .lb-bar { flex: 0 0 auto; }
.lightbox .lb-cap {
  text-align: center; color: #efe9dd; font-size: var(--fs-small);
  padding-top: 16px; margin: 0; min-height: 1.6em;
}
.lightbox button {
  position: absolute;
  background: none; border: 0; cursor: pointer;
  color: #efe9dd; font-family: var(--serif); font-size: 1.6rem; line-height: 1;
  padding: 14px 18px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.lightbox button:hover { color: #fff; }
.lb-close { top: 6px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* On narrow screens the side gutters cost too much of the photo, so the
   arrows drop into the caption bar and the image gets the full width. */
@media (max-width: 640px) {
  .lightbox { padding-left: 16px; padding-right: 16px; }
  .lightbox .lb-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
  }
  .lightbox .lb-cap { flex: 1 1 auto; padding-top: 0; }
  .lightbox .lb-prev, .lightbox .lb-next {
    position: static; transform: none;
    flex: 0 0 auto; padding: 14px 16px;
  }
}

/* ---------- sale preview strip ---------- */

.strip {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(24px, 3vw, 44px);
}
.strip .frame { max-height: clamp(150px, 17vw, 220px); }
.strip .title { font-size: 1.05rem; }

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

.site-foot {
  border-top: 1px solid var(--ln-line);
  padding: clamp(32px, 5vw, 56px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  color: var(--ln-muted);
  font-size: var(--fs-small);
}
.site-foot a { color: var(--ln-muted); }
.site-foot a:hover { color: var(--ln-ink); }
.site-foot .rule { display: block; margin: 0 auto 22px; width: 180px; border-top: 1px solid var(--ln-line); }

.js-status { color: var(--ln-muted); font-size: var(--fs-small); font-style: italic; }

@media (max-width: 820px) {
  .piece-view { grid-template-columns: 1fr; }
  .piece-view .plate img { max-height: 64vh; }
}
