:root {
  --ink: #111;
  --muted: #777;
  --paper: #fff;
  /* Copperplate ships with macOS/iOS; Marcellus SC fills in elsewhere */
  --caps: Copperplate, "Copperplate Gothic Light", "Marcellus SC", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--caps);
  font-variant: small-caps;
}
a { color: inherit; }

/* Home page */
.hero {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 1080 / 516;
  object-fit: cover;
}
/* On phones, crop tighter and taller so both faces sit centered */
@media (max-width: 600px) {
  .hero {
    aspect-ratio: 4 / 3;
    object-position: 35% 50%;
  }
}
main {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 16px 0;
}
@media (min-width: 600px) { main { padding-left: 40px; padding-right: 40px; } }
.artist + .artist { margin-top: clamp(2.5rem, 7vw, 4.5rem); }
h2 {
  margin: 0 0 .6em;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  letter-spacing: .04em;
  line-height: 1.1;
}
p {
  margin: 0 0 .9em;
  font-size: clamp(1.05rem, 2.8vw, 1.45rem);
  letter-spacing: .05em;
  line-height: 1.45;
}
.more-link {
  display: inline-block;
  margin: -.5em 0 1.1em;
  font-size: clamp(.85rem, 2.1vw, 1rem);
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.more-link:hover { color: var(--ink); }
.signature {
  margin: clamp(2.5rem, 7vw, 4rem) 0 0;
  padding-bottom: clamp(4rem, 12vw, 8rem);
  text-align: center;
}
.signature img {
  display: block;
  width: min(705px, 90%);
  height: auto;
  margin: 0 auto;
}

/* Gallery pages */
.gallery-page {
  --accent: #6f8f8b;          /* each artist page sets its own accent */
  --wash: #f7f4ee;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--wash);
}
.gallery-page.kate { --accent: #5f8f8c; --wash: #f6f4ef; }   /* sea glass on sand */
.gallery-page.terri { --accent: #8a9a5b; --wash: #f8f5ee; }  /* sage and blossom */
.site-header {
  padding: clamp(1.5rem, 4vw, 2.5rem) 16px 0;
  text-align: center;
}
.site-header img {
  width: min(300px, 58%);
  height: auto;
}
.gallery-page main { max-width: 1160px; }
.gallery-page h1 {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.6rem, 4.6vw, 2.6rem);
  letter-spacing: .04em;
  line-height: 1.15;
}
.ornament {
  display: block;
  width: min(220px, 50%);
  height: auto;
  margin: .9rem auto 1.1rem;
  color: var(--accent);
}
.lede {
  max-width: 34em;
  margin: 0 auto clamp(2.5rem, 7vw, 4rem);
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 300;
  color: var(--muted);
}
/* Staggered columns so every piece keeps its own shape */
.gallery {
  columns: 3 280px;
  column-gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.gallery li {
  break-inside: avoid;
  margin-bottom: clamp(1rem, 3vw, 2rem);
}
/* Terri's paintings follow a set order, so they read across in rows like a gallery wall */
.terri .gallery {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.terri .gallery li { margin: 0; }
.gallery figure { margin: 0; }
.gallery a {
  display: block;
  text-decoration: none;
  padding: clamp(8px, 1.4vw, 14px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 10px 30px -12px rgba(40, 30, 20, .25);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s;
}
.gallery a:hover,
.gallery a:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(40, 30, 20, .08), 0 22px 40px -14px rgba(40, 30, 20, .32);
}
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}
.gallery figcaption {
  margin-top: .7em;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  letter-spacing: .05em;
  text-align: center;
}
/* Pieces drift up into place as you scroll (set up by gallery.js) */
.gallery li.reveal { opacity: 0; transform: translateY(24px); }
.gallery li.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-reduced-motion: reduce) {
  .gallery li.reveal { opacity: 1; transform: none; }
  .gallery a { transition: none; }
}
.back-link {
  display: table;
  margin: clamp(3rem, 8vw, 5rem) auto 0;
}
.gallery-page main { padding-bottom: clamp(3rem, 8vw, 5rem); }

/* Full-size viewer */
.viewer {
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
}
.viewer[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.viewer::backdrop { background: rgba(255, 255, 255, .97); }
.viewer img {
  max-width: 100%;
  max-height: calc(100% - 4rem);
  object-fit: contain;
}
.viewer p { margin: 1em 0 0; text-align: center; }
.viewer p:empty { display: none; }
.viewer button {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 2rem;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
