:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --ink: #24241f;
  --wine: #632337;
  --cream: #fff5db;
  --gutter: clamp(1.25rem, 5vw, 6rem);
  --serif: "Baskervville", Baskerville, "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
h1, h2, p, figure { margin: 0; }
h1, h2, figcaption { font-family: var(--serif); font-weight: 400; }
a { color: inherit; text-underline-offset: .3em; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #397abe; outline-offset: 4px; }
.skip { position: fixed; z-index: 3; top: .5rem; left: .5rem; background: white; padding: .6rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
.masthead, footer { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.1rem var(--gutter); }
.logo { display: block; width: clamp(11rem, 18vw, 16rem); height: auto; mix-blend-mode: multiply; }
nav { display: flex; flex-wrap: wrap; gap: clamp(1rem, 3vw, 3rem); }
nav a { padding: .35rem 0; border-bottom: 1px solid transparent; font-size: .95rem; text-decoration: none; }
nav a:hover, nav a[aria-current] { border-color: var(--wine); color: var(--wine); }
.feature { display: grid; grid-template-columns: .88fr 1.12fr; background: var(--wine); color: var(--cream); }
.feature-copy { padding: clamp(2.4rem, 5.4vw, 6.5rem) var(--gutter); align-self: center; }
h1 { font-size: clamp(4.8rem, 8.9vw, 9.6rem); line-height: .88; letter-spacing: -.055em; margin: .28em 0 .24em; }
h1 em { font-weight: inherit; }
.intro { max-width: 29rem; font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.6; }
.explore { display: inline-block; margin-top: clamp(1.35rem, 2.6vw, 2.5rem); border: 1px solid #dbbbaa; padding: .68rem 1.25rem; text-decoration: none; }
.explore:hover { background: var(--cream); color: var(--wine); }
.feature-art { position: relative; min-height: 100%; }
.feature-art button { display: block; width: 100%; height: 100%; border: 0; background: none; padding: 0; cursor: zoom-in; }
.feature-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-art img[src="art/fields-near-st-andrews-large.webp"] { object-position: center 44%; }
.feature-art figcaption { position: absolute; right: 0; bottom: 0; padding: .5rem 1rem; background: var(--paper); color: var(--ink); font-size: 1.05rem; font-style: italic; pointer-events: none; }
.collection { padding: clamp(2.8rem, 5vw, 6rem) var(--gutter); scroll-margin-top: 1rem; }
h2 { font-size: clamp(2.3rem, 4.6vw, 5rem); line-height: 1.03; letter-spacing: -.045em; }
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem) clamp(1rem, 2.6vw, 3rem); }
.work button { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; aspect-ratio: 1.12; padding: clamp(1rem, 2.3vw, 2.75rem); background: #e7e4dc; border: 0; cursor: zoom-in; }
.work:nth-child(3n + 2) button { background: #e5e8dc; }
.work:nth-child(3n) button { background: #ece1d7; }
.work img { width: 100%; height: 100%; min-height: 0; object-fit: contain; transition: transform .25s ease; }
.work button.wall-display {
  padding: clamp(1.5rem, 3.5vw, 4rem);
  background:
    radial-gradient(ellipse at 28% 12%, #ffffff38, transparent 72%),
    linear-gradient(150deg, transparent 25%, #36291e13),
    var(--wall-colour);
}
.work .wall-display img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 0 1px #29241f25, 2px 4px 5px #29241f40, 8px 15px 20px #29241f36;
}
.work button:hover img { transform: scale(1.035); }
.work figcaption { padding: .75rem 0; font-size: clamp(1.1rem, 1.55vw, 1.55rem); line-height: 1.25; }
.work-details { display: block; margin-top: .35rem; font: .9rem/1.4 var(--sans); }
.work .work-details { color: #555047; }
.artist { display: grid; grid-template-columns: 1fr 1.7fr; gap: 2rem; background: #e4e6da; padding: clamp(3rem, 6vw, 7rem) var(--gutter); }
.artist h2 { font-size: clamp(1.8rem, 3vw, 3rem); }
.artist p:first-child { font: clamp(1.6rem, 2.6vw, 2.9rem)/1.24 var(--serif); max-width: 34ch; }
.signature { margin-top: 1.6rem; font: italic 1.2rem var(--serif); }
footer { font-size: .95rem; padding-block: 1.5rem; }
footer span { font: 1.5rem var(--serif); }
dialog { color: var(--cream); background: #232522; border: 0; padding: 1rem; max-width: 96vw; max-height: 96dvh; }
dialog::backdrop { background: #11140feb; }
dialog form { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
dialog button { background: transparent; border: 1px solid #a8aaa0; padding: .35rem 1rem; }
dialog img { display: block; max-width: 85vw; max-height: 70dvh; margin: auto; }
dialog h2 { font-size: 1.6rem; margin: .75rem 0 .25rem; letter-spacing: -.025em; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
@media (max-width: 52rem) {
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr 1fr; }
  h1 { font-size: clamp(4rem, 10vw, 6rem); }
}
@media (max-width: 40rem) {
  .masthead { flex-direction: column; gap: .65rem; padding-block: .85rem; }
  nav { justify-content: center; gap: 1.2rem; }
  .feature, .artist { grid-template-columns: 1fr; }
  .feature-copy { padding-block: 2.3rem; }
  h1 { font-size: clamp(4rem, 15vw, 6rem); }
  .feature-art { aspect-ratio: 1.55; }
  .works { grid-template-columns: 1fr; }
  .artist { gap: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work img { transition: none; }
}
