/* Martine Elliott: site styles */
:root {
  --paper: #f3f0e9;
  --paper-deep: #e8e3d8;
  --ink: #1d1c1a;
  --ink-soft: #5d5a54;
  --line: #cfc8ba;
  --lilac: #6f6788;      /* the violet skies in Arturo and Vic Falls */
  --ochre: #a9772a;      /* metal leaf and desert rock */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --max: 82rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--body); }
img { display: block; max-width: 100%; height: auto; background: var(--paper-deep); }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lilac); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 350; line-height: 1.08; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
p { margin: 0 0 1.1em; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; color: var(--ink-soft); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }

.eyebrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.25rem; }
.eyebrow a { text-decoration: none; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; max-width: 34em; }
.button { display: inline-block; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: .85rem 1.5rem; font: 500 .95rem var(--body); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.button:hover { background: transparent; color: var(--ink); }
.text-link { margin-left: 1.25rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.actions .text-link { margin-left: 0; }
.section-head .text-link, aside .text-link, .split .text-link:first-child, p > .text-link:first-child { margin-left: 0; }

/* header and footer */
.site-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; padding: 1.5rem var(--gutter); max-width: var(--max); margin: 0 auto; }
.wordmark { font: 400 1.35rem var(--display); letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.wordmark span, .site-footer span[aria-hidden] { color: var(--ochre); letter-spacing: .05em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
.site-header nav a { font-size: .92rem; text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current] { border-bottom-color: currentColor; }
.site-footer { margin-top: 6rem; padding: 3rem var(--gutter) 3.5rem; border-top: 1px solid var(--line); text-align: center; }
.site-footer p { margin-bottom: .5em; }

/* shared sections */
main > section, main > article, main > nav { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.band { margin-top: clamp(3.5rem, 8vw, 6.5rem) !important; }
.page-head { padding-top: clamp(2rem, 6vw, 4.5rem) !important; }
.page-head h1 { margin-bottom: 1.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.section-head p { margin: 0; }

/* home hero: the painting seen through an aircraft window */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1rem clamp(2rem, 6vw, 6rem); align-items: center; padding-top: clamp(1.5rem, 5vw, 4rem) !important; }
.hero h1 { margin-bottom: 1.75rem; }
.hero .lede { margin-bottom: 2rem; }
.hero-window { grid-row: span 2; display: block; aspect-ratio: 5 / 7; max-height: 78vh; justify-self: center; width: min(100%, 26rem); border-radius: 46% / 34%; overflow: hidden; box-shadow: 0 0 0 .7rem var(--paper), 0 0 0 calc(.7rem + 1px) var(--line), 0 2rem 4rem -2rem rgba(29, 28, 26, .45); }
.hero-window img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.hero-window:hover img { transform: scale(1.04); }
.hero-caption { font-size: .82rem; color: var(--ink-soft); margin: .75rem 0 0; }
.hero > .hero-caption { grid-column: 2; text-align: center; margin-top: 1.25rem; }

/* home: recognition strip under the hero */
.credits { margin-top: clamp(2.5rem, 6vw, 4.5rem) !important; }
.credits ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2.75rem; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-soft); text-align: center; }
.follow { text-align: center; }
.follow .lede { max-width: none; margin-bottom: 0; }

/* painting cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 3.5rem clamp(1.5rem, 3vw, 3rem); align-items: end; }
.card a { display: block; text-decoration: none; }
.card-img { display: block; margin-bottom: 1rem; }
.card-img img { width: 100%; max-height: 30rem; object-fit: contain; object-position: left bottom; background: none; transition: opacity .25s; }
.card a:hover img { opacity: .86; }
.card-title { display: block; font: 400 1.35rem var(--display); }
.card-meta { display: block; font-size: .9rem; color: var(--ink-soft); }
.tag { font: 500 .68rem var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ochre); border: 1px solid currentColor; padding: .1rem .45rem; margin-left: .4rem; vertical-align: middle; }

.statement { margin-top: clamp(3.5rem, 8vw, 6.5rem) !important; max-width: none !important; background: var(--ink); color: var(--paper); padding: clamp(3rem, 8vw, 6rem) var(--gutter) !important; }
.statement h2, .statement p { max-width: 46rem; margin-left: auto; margin-right: auto; }
.statement h2 { color: #d9b877; margin-bottom: 1.5rem; }
.statement p { font: 300 clamp(1.2rem, 2vw, 1.5rem)/1.5 var(--display); margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: center; }
.split h2 { margin-bottom: 1.25rem; }
.split.about { align-items: start; grid-template-columns: 1.1fr .9fr; }
.story p { max-width: 38em; }
.story .button { margin-top: .75rem; }

.masonry { columns: 2 18rem; column-gap: 2rem; }
.masonry li { break-inside: avoid; margin-bottom: 2rem; }

/* single painting */
.work { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; padding-top: clamp(1.5rem, 4vw, 3rem) !important; }
.work-media { display: grid; gap: 1rem; }
.work-main img { width: 100%; max-height: 88vh; object-fit: contain; background: none; margin: 0 auto; }
.work-details { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.work-details li { grid-column: span 3; }
.work-details img { width: 100%; aspect-ratio: 1; object-fit: cover; }
/* three details sit in one row; a single detail runs full width */
.work-details li:first-child:nth-last-child(3), .work-details li:first-child:nth-last-child(3) ~ li { grid-column: span 2; }
.work-details li:only-child { grid-column: 1 / -1; }
.work-details li:only-child img { aspect-ratio: 3 / 2; }
.work-info { position: sticky; top: 1.5rem; }
.work-info h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
.subtitle { font: italic 300 1.25rem var(--display); color: var(--ink-soft); margin-top: .5rem; }
.specs { margin: 2rem 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); padding-top: .2em; }
.specs dd { margin: 0; }
.status { font-size: .8rem; color: #3f6b45; margin-left: .6rem; }
.status::before { content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: currentColor; margin-right: .4em; vertical-align: .08em; }
.work .story { margin-top: 2.5rem; }
.credit-line { font-size: .88rem; color: var(--ink-soft); margin: 1.25rem 0 0; max-width: 34em; }
.enquire-again { margin-top: 2.5rem; padding: 1.5rem 1.5rem 1.75rem; background: var(--paper-deep); }
.enquire-again h2 { font-size: 1.5rem; margin-bottom: .75rem; }
.enquire-again p:last-child { margin-bottom: 0; }
.in-person-note { font-size: .92rem; color: var(--ink-soft); margin: 1.5rem 0 0; max-width: 38em; }
.archive-status { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: .6rem 0 0; }
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: 5rem !important; padding-top: 1.5rem !important; border-top: 1px solid var(--line); }
.pager a { font: 400 1.35rem var(--display); text-decoration: none; }
.pager a:last-child { text-align: right; }
.pager span { display: block; font: 400 .78rem var(--body); letter-spacing: .14em; text-transform: uppercase; }

/* exhibitions */
.event { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem 2rem; padding: 2.5rem 0; border-top: 1px solid var(--line); }
.event-year { font: 300 2rem/1 var(--display); color: var(--lilac); margin: 0; }
.event h2 { font-size: 1.6rem; margin-bottom: .9rem; }
.event p { max-width: 40em; }
.event-pics { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.event-pics img { height: 11rem; width: auto; }

/* contact */
.contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem clamp(2rem, 6vw, 6rem); margin-top: 3rem !important; }
.contact label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 1.5rem 0 .5rem; }
.contact label:first-child { margin-top: 0; }
.contact input, .contact select, .contact textarea { width: 100%; font: inherit; color: inherit; background: #fbfaf6; border: 1px solid var(--line); border-radius: 0; padding: .8rem .9rem; }
.contact input:focus, .contact select:focus, .contact textarea:focus { border-color: var(--ink); outline: none; }
.contact .button { margin: 1.75rem 0 1rem; }
.contact aside h2 { font-size: 1.4rem; margin: 0 0 .75rem; }
.contact aside h2:not(:first-child) { margin-top: 2.25rem; }
.error { color: #9a2f22; }

/* image enlarge */
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.event-pics .zoom { width: auto; }
.lightbox { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(20, 19, 18, .94); padding: 2.5vmin; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 95vh; width: auto; height: auto; object-fit: contain; background: none; }
.lightbox button { position: absolute; top: 1rem; right: 1rem; background: none; border: 1px solid #77736b; color: #f3f0e9; font: 500 .85rem var(--body); padding: .5rem .9rem; cursor: pointer; }

@media (max-width: 52rem) {
  .hero, .split, .split.about, .work, .contact { grid-template-columns: 1fr; }
  .hero-window { grid-row: auto; width: min(78%, 20rem); margin-top: 1.5rem; }
  .hero > .hero-caption { grid-column: 1; }
  .work-info { position: static; }
  /* phones: main photo, then title, price and Enquire, then the detail photos and the story */
  .work-media, .work-info { display: contents; }
  .work-main { order: 1; }
  .work-head { order: 2; }
  .work-details { order: 3; }
  .work-body { order: 4; }
  .work { gap: 2rem; }
  .work .story { margin-top: 0; }
  .work .specs { margin-bottom: 1.5rem; }
  .card-img img { max-height: none; }
  .in-person .split-img { order: 2; }
  .event { grid-template-columns: 1fr; }
  .event-pics img { height: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
