/* Mobile first: base styles are for phones, the media query at the bottom adds the desktop layout. */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: #222;
  font: 300 16px/1.7 "Jost", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, .logo { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; }

/* Header */
header { text-align: center; padding: 28px 16px 8px; }
.logo { font-size: 34px; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
nav { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
nav a {
  padding: 12px 12px; /* big enough to tap */
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #666;
}
nav a:hover { color: #000; }

main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 64px; }

/* Gallery */
.grid { display: grid; gap: 48px; }
.card { text-decoration: none; text-align: center; }
.card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #f3f3f3; transition: opacity .3s; }
.card:hover img { opacity: .85; }
.card h2 { font-size: 22px; margin: 14px 0 0; }
.card p { margin: 0; font-size: 13px; letter-spacing: .05em; color: #6b6b6b; }
.sold { color: #a33; text-transform: uppercase; letter-spacing: .15em; font-size: 12px; }

/* Painting page: on phones, image → info → extra images */
.painting { display: grid; gap: 24px; }
.main-img, .more-imgs img { width: 100%; background: #f3f3f3; }
.more-imgs { display: grid; gap: 24px; }
.zoomable { cursor: zoom-in; }
.info h1 { font-size: 34px; line-height: 1.1; margin: 0 0 8px; }
.info p { color: #555; margin: 0 0 16px; }
.price { font-size: 22px; color: #222 !important; }
.buy {
  display: block;
  text-align: center;
  padding: 16px;
  margin-bottom: 24px;
  background: #222;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.buy:hover { background: #000; }
.back { font-size: 14px; }

/* Lightbox: tap to zoom, then swipe (or move the mouse) to look around */
.lightbox {
  position: fixed; inset: 0; z-index: 10;
  background: #fff;
  overflow: auto;
  display: grid; place-items: center;
}
.lightbox img { max-width: 100vw; max-height: 100vh; cursor: zoom-in; }
.lightbox img.zoomed { max-width: none; max-height: none; width: 250vw; cursor: zoom-out; }
.lightbox button {
  position: fixed; top: 8px; right: 8px;
  width: 48px; height: 48px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  font-size: 32px; line-height: 1; cursor: pointer; color: #444;
}

/* About / Contact */
.text { display: grid; gap: 32px; max-width: 1000px; margin: 0 auto; }
.text.narrow { max-width: 560px; text-align: center; }
.text h1 { font-size: 34px; margin: 0 0 12px; }
.email { font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; }

footer { text-align: center; padding: 32px 16px; font-size: 12px; letter-spacing: .15em; color: #999; }

/* Tablet and desktop */
@media (min-width: 700px) {
  header { padding: 48px 24px 24px; }
  .logo { font-size: 44px; }
  nav { gap: 16px; }
  main { padding: 24px 24px 80px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 64px 40px; }

  .painting {
    grid-template-columns: 3fr 2fr;
    grid-template-areas: "img info" "more info";
    gap: 24px 64px;
    align-items: start;
  }
  .main-img { grid-area: img; }
  .more-imgs { grid-area: more; }
  .info { grid-area: info; position: sticky; top: 40px; }
  .info h1 { font-size: 40px; }
  .buy { display: inline-block; padding: 14px 56px; }
  .lightbox img.zoomed { width: 200vw; }

  .text { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .text.narrow { grid-template-columns: 1fr; }
  .text h1 { font-size: 40px; }
}
