:root {
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --ink: #1e1c1a;
  --muted: #6e675f;
  --line: #e3ddd3;
  --accent: #6d4f7d;
  --sidebar: 260px;
  --gutter: clamp(16px, 4vw, 64px);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }

/* ── Right-hand sidebar ───────────────────────────── */
.sidebar {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  text-align: right;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
.wordmark {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1;
  text-decoration: none;
}
.tagline { margin: 10px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-links a {
  position: relative;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  right: -36px;
  top: 52%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .25s;
}
.nav-links a.active::after { width: 24px; }
.sidebar-foot { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.sidebar-foot a { text-decoration: none; }
.sidebar-foot a:hover { color: var(--ink); }

.mobile-bar, .scrim { display: none; }

/* ── Main content ─────────────────────────────────── */
main { grid-column: 1; grid-row: 1; min-width: 0; }
section { padding: 104px var(--gutter); scroll-margin-top: 0; }
section.alt { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: 48px; }
.section-head h2, #contact h2, #about h2 { font-size: clamp(44px, 5vw, 68px); }
.section-intro { max-width: 46ch; color: var(--muted); margin: 0; }
.eyebrow { margin: 0 0 16px; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--accent); }
.lede { font-size: 19px; color: var(--muted); max-width: 40ch; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: 500 14px var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.actions .btn { padding-inline: 18px; }

/* Artwork boxes (photo or placeholder) */
.art { width: 100%; overflow: hidden; border-radius: 2px; background: var(--line); }
.art img { width: 100%; height: auto; }
.art img.cover { height: 100%; object-fit: cover; }

/* Hero */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero h1 { font-size: clamp(48px, 6.4vw, 92px); }
.hero-art { display: block; justify-self: center; width: min(100%, 560px); }
.hero-art.clickable { cursor: zoom-in; }
.hero-art.photo { width: min(100%, 760px); }
.hero-art .art, .hero-art img { box-shadow: 0 30px 60px -30px rgba(30, 28, 26, .45); }
.hero-art img { width: 100%; height: auto; border-radius: 2px; }
.hero-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 14px var(--sans);
  cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.gallery { display: flex; align-items: flex-start; gap: 24px; }
.gallery-col { flex: 1; min-width: 0; }
.tile {
  all: unset;
  display: block;
  width: 100%;
  margin-bottom: 28px;
  break-inside: avoid;
  cursor: zoom-in;
}
.tile .art { transition: transform .4s ease, box-shadow .4s ease; }
.tile:hover .art, .tile:focus-visible .art { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(30, 28, 26, .5); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tile-cap { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 13px; }
.tile-cap span:last-child { color: var(--muted); }

/* Shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px 28px; }
.card .art { cursor: zoom-in; }
.shop-empty { grid-column: 1 / -1; margin: 0; max-width: 52ch; color: var(--muted); font-size: 17px; }
.shop-empty a { color: var(--accent); }
.card h3 { font-size: 26px; margin: 16px 0 2px; }
.card .meta { margin: 0; font-size: 13px; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { font-weight: 500; }
.text-link { font-size: 14px; color: var(--accent); text-underline-offset: 3px; }

/* Commissions */
.commission-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 56px; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 24px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; row-gap: 2px; }
.steps li::before { content: "0" counter(step); grid-row: span 2; font-family: var(--serif); font-size: 28px; color: var(--accent); line-height: 1; }
.steps span { color: var(--muted); }
.price-guide { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.price-guide h3 { font-size: 28px; margin-bottom: 16px; }
.price-guide dl { margin: 0; }
.price-guide dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.price-guide dd { margin: 0; font-weight: 500; white-space: nowrap; }
.commission-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  align-self: start;
}
.commission-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.commission-form .full { grid-column: 1 / -1; }
.commission-form input, .commission-form select, .commission-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  color: var(--ink);
  font: 15px var(--sans);
}
.commission-form :focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.commission-form textarea { resize: vertical; }
.form-note { margin: 0; font-size: 14px; color: var(--accent); min-height: 1em; }

/* About */
.about-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--line);
}
.about-layout h2 { margin-bottom: 24px; }
.about-layout p { max-width: 58ch; }

/* Contact */
#contact { text-align: center; }
#contact .section-intro { margin: 16px auto 32px; }
.big-link { font-family: var(--serif); font-size: clamp(30px, 4.5vw, 56px); text-decoration: none; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.big-link:hover { border-color: var(--accent); color: var(--accent); }

footer { padding: 32px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ── Lightbox ─────────────────────────────────────── */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 56px);
  border: 0;
  background: #161413;
  color: #f6f3ee;
  --lbh: calc(100vh - 112px);
}
.lightbox[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px) auto; align-items: center; gap: clamp(16px, 3vw, 48px); }
.lightbox::backdrop { background: transparent; }
.lb-art { display: flex; justify-content: center; align-items: center; height: 100%; min-height: 0; }
.lb-art .art { width: min(100%, calc(var(--lbh) * var(--r, 1))); }
.lb-art .art.photo { width: auto; background: none; }
.lb-art .art img { width: auto; max-width: 100%; max-height: var(--lbh); }
.lb-info h3 { font-size: 40px; margin-bottom: 8px; }
.lb-info .eyebrow { color: #c9b3d6; }
.lb-meta, .lb-count { color: #b5aea6; font-size: 14px; }
.lb-status { font-size: 18px; margin: 20px 0; }
.lightbox .btn { background: #f6f3ee; color: var(--ink); border-color: #f6f3ee; }
.lightbox .btn:hover { background: #c9b3d6; border-color: #c9b3d6; }
.lb-close, .lb-nav { background: none; border: 0; color: #f6f3ee; cursor: pointer; font-size: 44px; line-height: 1; opacity: .7; padding: 8px; }
.lb-close:hover, .lb-nav:hover { opacity: 1; }
.lb-close { position: absolute; top: 12px; right: 20px; }

/* ── Phones & small tablets ───────────────────────── */
@media (max-width: 900px) {
  body { display: block; }
  .mobile-bar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(246, 243, 238, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .mobile-bar .wordmark { font-size: 30px; }
  .menu-btn { padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: none; font: 500 14px var(--sans); color: var(--ink); }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 50;
    width: min(82vw, 320px);
    height: 100dvh;
    transform: translateX(100%);
    transition: transform .3s ease, box-shadow .3s ease;
  }
  .sidebar.open { transform: none; box-shadow: -20px 0 40px -20px rgba(0, 0, 0, .25); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(20, 18, 17, .35); }
  .scrim[hidden] { display: none; }

  section { padding-top: 72px; padding-bottom: 72px; scroll-margin-top: 60px; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 40px; }
  .hero-art { order: -1; width: min(100%, 420px); }
  .hero-art.photo { width: 100%; }
  .about-layout { grid-template-columns: 1fr; }
  .commission-form { grid-template-columns: 1fr; }

  .lightbox { --lbh: 56vh; padding-top: 64px; }
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto auto; align-content: center; }
  .lb-art { grid-column: 1 / -1; grid-row: 1; }
  .lb-info { grid-column: 1 / -1; grid-row: 2; }
  .lb-info h3 { font-size: 30px; }
  .lb-prev { grid-row: 3; justify-self: start; }
  .lb-next { grid-row: 3; justify-self: end; }
}

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