/* One bold move: the gallery is a painted museum wall with each painting hung
   on a linen mat. Everything else stays quiet. To change the wall colour, edit
   --wall (and --label if contrast drops below 4.5:1). */

@font-face {
  font-family: "Young Serif";
  src: url("fonts/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --wall: #2e4a40;   /* gallery green: makes oil paint glow */
  --paper: #fcfbf8;
  --ink: #26211e;
  --muted: #5e5650;
  --green: #2e5b4e;  /* links + buttons, 7.7:1 with white */
  --label: #e9e4da;  /* captions on the wall, 7.6:1 */
  --mat: #f4f1ea;
  --line: #cfc8be;
  --serif: "Young Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.6 var(--sans); /* 19px */
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
a { color: var(--green); text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.wall :focus-visible { outline-color: var(--label); }

/* Header */
.masthead { max-width: 80rem; margin: 0 auto; padding: 2.25rem 1.25rem 2rem; }
.masthead h1 { font-size: clamp(2.25rem, 8vw, 4rem); letter-spacing: -0.01em; }
.tagline { margin: 0.5rem 0 1.5rem; font-size: 1.25rem; color: var(--muted); max-width: 34ch; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #24493f; }

/* The wall */
.wall { background: var(--wall); padding: 3rem 1.25rem 3.5rem; }
.hang { max-width: 80rem; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.piece { margin: 0; }
.piece a {
  display: block;
  padding: 0.625rem;
  background: var(--mat);
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.3), 0 14px 28px -10px rgb(0 0 0 / 0.55);
}
.piece img { display: block; width: 100%; height: auto; }
.piece figcaption { margin-top: 0.875rem; color: var(--label); font-size: 1.0625rem; line-height: 1.4; }

@media (min-width: 48rem) {
  /* Justified rows: grow in proportion to aspect ratio so each row shares one
     height; nothing is cropped and newest-first order reads left to right. */
  .hang { flex-flow: row wrap; align-items: flex-start; gap: 3.5rem 2.5rem; }
  .piece { flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 15rem); }
  .hang::after { content: ""; flex: 10000 1 0; }
}

/* Text sections */
.prose { max-width: 40rem; margin: 0 auto; padding: 4.5rem 1.25rem 0; }
.prose h2 { font-size: clamp(1.875rem, 5vw, 2.5rem); margin-bottom: 1.25rem; }
.prose p { margin: 0 0 1rem; }

.steps { list-style: none; counter-reset: step; margin: 0 0 3rem; padding: 0; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; }
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--wall);
  color: var(--label);
  font: 1.25rem/1 var(--serif);
}
.steps h3 { font-size: 1.375rem; margin: 0.35rem 0 0.25rem; }
.steps p { margin: 0; }

.prices-title { font-size: 1.375rem; margin-bottom: 0.75rem; }
.prices { margin: 0; border-top: 1px solid var(--line); }
.prices div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.prices dd { margin: 0; font-weight: 600; white-space: nowrap; }

/* Form */
.enquiry { display: grid; gap: 0.375rem; margin-top: 1.5rem; }
.enquiry label { margin-top: 1rem; font-weight: 600; }
.enquiry .opt { font-weight: 400; color: var(--muted); }
.enquiry input, .enquiry select, .enquiry textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid #8c837b; /* 3.7:1 against white */
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
}
.enquiry textarea { resize: vertical; }
.enquiry .button { justify-self: start; margin-top: 1.75rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.colophon {
  max-width: 40rem;
  margin: 5rem auto 0;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
}

/* PhotoSwipe dynamic caption (from sigal's photoswipe theme) */
.pswp__dynamic-caption { color: #fff; position: absolute; width: 100%; left: 0; top: 0; font-size: 1.0625rem; transition: opacity 120ms linear !important; }
.pswp__dynamic-caption--faded { opacity: 0 !important; }
.pswp__dynamic-caption--below { width: auto; max-width: 700px; padding: 15px 0 0; }
.pswp__dynamic-caption--on-hor-edge { padding-left: 15px; padding-right: 15px; }
.pswp__dynamic-caption--mobile {
  width: 100%; background: rgb(0 0 0 / 0.6); padding: 12px 16px;
  right: 0; bottom: 0; top: auto !important; left: 0 !important;
}
