:root {
  /* Layout uses multiples of 8px, with 4px increments for small details. */
  --gallery-ink: #121211;
  --gallery-muted: #363633;
  --gallery-paper: #faf9f6;
  --gallery-white: #fff;
  --gallery-surface: var(--gallery-white);
  --gallery-rule: #deddd6;
  --gallery-serif: Georgia, "Times New Roman", serif;
  --gallery-sans: Arial, Helvetica, sans-serif;
  --gallery-gutter: 24px;
  --gallery-gap: 24px;
  --gallery-section: 48px;
  --gallery-header: 88px;
  --gallery-header-compact: 64px;
  --gallery-mark-size: 28px;
  --gallery-mark-gap: 8px;
  --gallery-wordmark-size: clamp(34px, 10vw, 44px);
  --gallery-wordmark-compact: clamp(30px, 8.8vw, 36px);
  --gallery-scroll-progress: 0;
  --gallery-header-live: calc(var(--gallery-header) - (var(--gallery-header) - var(--gallery-header-compact)) * var(--gallery-scroll-progress));
  --gallery-wordmark-live: calc(var(--gallery-wordmark-size) - (var(--gallery-wordmark-size) - var(--gallery-wordmark-compact)) * var(--gallery-scroll-progress));
  --gallery-hero-height: 320px;
  --gallery-art-row-gap: 32px;
  --gallery-max: 1440px;
}

@media (min-width: 768px) {
  :root {
    --gallery-gutter: 40px;
    --gallery-gap: 32px;
    --gallery-section: 64px;
    --gallery-header: 104px;
    --gallery-wordmark-size: 52px;
    --gallery-wordmark-compact: 48px;
    --gallery-art-row-gap: 40px;
  }
}

@media (min-width: 1100px) {
  :root {
    --gallery-gutter: 56px;
    --gallery-gap: 48px;
    --gallery-section: 80px;
    --gallery-header: 112px;
    --gallery-wordmark-size: 56px;
    --gallery-art-row-gap: 56px;
  }
}

html { scroll-padding-top: var(--gallery-header-live); }

body {
  --color-warm-white: var(--gallery-white);
  --color-off-white: var(--gallery-paper);
  --color-near-black: var(--gallery-ink);
  --color-charcoal: var(--gallery-ink);
  --color-soft-grey: var(--gallery-muted);
  --color-sage: var(--gallery-muted);
  --color-warm-border: var(--gallery-rule);
  background: var(--gallery-surface);
  color: var(--gallery-ink);
  font: 16px/24px var(--gallery-sans);
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--gallery-ink);
  outline-offset: 4px;
}

body > nav {
  background: var(--gallery-surface);
  border-bottom-color: var(--gallery-rule);
}

body > nav > div:first-child {
  height: var(--gallery-header-live);
  max-width: var(--gallery-max);
  padding-inline: var(--gallery-gutter);
}

body > nav > div:first-child > a:first-child { gap: var(--gallery-mark-gap); }

body > nav > div:first-child > a:first-child img {
  width: var(--gallery-mark-size);
  height: var(--gallery-mark-size);
}

body > nav a[href="/"] > span {
  font: 400 var(--gallery-wordmark-live)/1 var(--gallery-serif);
  letter-spacing: .01em;
  white-space: nowrap;
}

footer img + span {
  font: 400 24px/32px var(--gallery-serif);
  letter-spacing: .045em;
}

body > nav > div:first-child > div { gap: 20px; }

body > nav a:not([href="/"]) {
  font: 400 16px/24px var(--gallery-serif);
  letter-spacing: 0;
  border: 0;
  padding: 0;
}

body > nav a:not([href="/"]):hover,
body > nav a[data-gallery-current] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

body > nav button {
  display: grid;
  place-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-inline-end: -8px;
}

body > nav button > div { margin-top: 4px; }
body > nav button > div:first-child { margin-top: 0; }

@media (max-width: 375px) {
  :root {
    --gallery-mark-size: 20px;
    --gallery-mark-gap: 4px;
  }
}

@media (max-width: 1099px) {
  body > nav > div:first-child > div { display: none; }
  body > nav > div.fixed:not(:first-child, [hidden]) {
    display: flex;
    top: var(--gallery-header-live);
  }
}

@media (min-width: 1100px) {
  body > nav button { display: none; }
  body > nav > div:first-child > div { display: flex; gap: 28px; }
}

#main { padding-top: var(--gallery-header); }

#main > section,
#main + section {
  padding-inline: var(--gallery-gutter);
  padding-block: var(--gallery-section);
}

#main > section:first-child:not(.gallery-feature) {
  padding-block-start: calc(var(--gallery-section) / 2);
}

#main > section > div,
#main + section > div,
body > footer > div {
  max-width: calc(var(--gallery-max) - 2 * var(--gallery-gutter));
  margin-inline: auto;
}

#main > div:has(> .border-t) {
  max-width: var(--gallery-max);
  padding-inline: var(--gallery-gutter);
}

#main .grid,
#main + section .grid { gap: var(--gallery-gap); }

#main .gd-fade {
  animation: none;
  opacity: 1;
  transform: none;
}

.gallery-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--gallery-gap);
}

#main .gallery-info-copy h1 { margin: 0 0 24px; }
.gallery-info-copy > div:nth-child(n+3) { margin-top: 16px; }

#main .gallery-info-copy > div > * { margin-inline: 0; }
#main .gallery-info-copy > div > div { margin-bottom: 4px; }

#main .gallery-info-copy p {
  max-width: 48ch;
  margin-block: 0;
  color: var(--gallery-ink);
  font: 400 16px/24px var(--gallery-sans);
}

.gallery-info-visual {
  height: 240px;
  overflow: hidden;
}

.gallery-info-visual img,
.gallery-info-visual iframe,
.gallery-info-visual > div {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.gallery-info-visual img { object-fit: contain; opacity: 1; }

@media (min-width: 768px) {
  .gallery-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-info-visual { height: 288px; }
}

@media (min-width: 1100px) {
  .gallery-info-visual { height: 360px; }
}

#main :is(h1, h2, h3),
#main + section h2 {
  color: var(--gallery-ink);
  font-family: var(--gallery-serif);
  font-weight: 400;
  letter-spacing: -.02em;
}

#main h1 { font-size: var(--gallery-wordmark-compact); line-height: calc(var(--gallery-wordmark-compact) + 8px); margin-bottom: 16px; }
#main h2 { font-size: min(32px, var(--gallery-wordmark-compact)); line-height: 40px; }
#main h3 { font-size: 22px; line-height: 28px; }
#main .font-display.text-5xl:not(:is(h1, h2, h3)) { font-size: var(--gallery-wordmark-compact); }
#main :is(a, button)[class*="tracking-"] { letter-spacing: .04em; }
#main a[class*="border-b-2"] { border-bottom: 1px solid currentColor; }
#main a[class*="inline-flex"]:has(> span) { margin-bottom: 24px; }
#main a[class*="inline-flex"]:has(> span) > span { display: none; }
#main a[class*="inline-flex"]:has(> span):hover { text-decoration: underline; }
#main .text-xs { font-size: 14px; line-height: 20px; }
#main [class*="text-[11px]"] { font-size: 12px; line-height: 16px; }
#main .group:hover img { transform: none; }
#main .group > div > div[class*="group-hover:scale"] { transform: none; scale: none; }
#main .group:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 768px) {
  #main h2 { font-size: 36px; line-height: 44px; }
}

#main:has(> .gallery-feature) { min-height: 0; }

body:has(#main > .gallery-feature) > nav { border-bottom-width: 0; }

#main > .gallery-feature {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--gallery-header));
  max-height: calc(100svh - var(--gallery-header));
  padding: 0;
}

.gallery-feature-image {
  display: block;
  height: var(--gallery-hero-height);
  min-height: 0;
  overflow: hidden;
}

.gallery-feature-image > div {
  position: relative;
  height: 100%;
  background: var(--gallery-surface);
  aspect-ratio: auto !important;
}

#main > .gallery-feature img {
  object-fit: cover;
}

#main > .gallery-feature > .gallery-feature-caption {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: var(--gallery-max);
  margin-inline: auto;
  padding: 24px var(--gallery-gutter);
}

.gallery-feature-actions {
  display: flex;
  gap: 12px;
}

.gallery-feature-actions a {
  display: grid;
  min-width: 108px;
  min-height: 44px;
  place-items: center;
  padding: 8px 20px;
  border: 1px solid var(--gallery-ink);
  font: 400 16px/24px var(--gallery-serif);
  text-align: center;
}

.gallery-feature-actions a:hover {
  background: var(--gallery-ink);
  color: var(--gallery-white);
}

#main .gallery-hero-artist {
  margin: 0 0 4px;
  font: 400 var(--gallery-wordmark-compact)/calc(var(--gallery-wordmark-compact) + 8px) var(--gallery-serif);
  letter-spacing: -.02em;
}

#main .gallery-hero-title {
  margin: 0;
  font: 400 24px/32px var(--gallery-serif);
}

#main .gallery-hero-dates {
  margin: 8px 0 0;
  color: var(--gallery-muted);
  font: 400 16px/24px var(--gallery-serif);
}

.gallery-feature-credit:hover .gallery-hero-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (min-width: 600px) {
  :root { --gallery-hero-height: 392px; }
}

@media (max-width: 767px) {
  .gallery-feature-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(72px, 1.3fr) minmax(0, 2.2fr);
    gap: 8px;
    width: 100%;
    max-width: 392px;
  }

  .gallery-feature-actions a {
    min-width: 0;
    padding-inline: 8px;
  }
}

@media (min-width: 768px) {
  #main > .gallery-feature > .gallery-feature-caption {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 900px) {
  :root { --gallery-hero-height: 544px; }
  #main > .gallery-feature > .gallery-feature-caption { padding-block: 32px; }
}

@media (min-width: 1280px) and (min-height: 840px) {
  :root { --gallery-hero-height: 608px; }
}

/* Screen artwork undistorted and align its metadata across each row. */
#main .grid:has(a[href^="/artworks/"].group) { row-gap: var(--gallery-art-row-gap); }

#main a[href^="/artworks/"].group > div:first-child {
  margin-bottom: 16px;
  background: transparent;
}

#main a[href^="/artworks/"].group img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  object-position: center bottom;
}

#main a[href^="/artworks/"].group p { margin-top: 4px; }
#main .gallery-card-price { color: var(--gallery-ink); }
#main .gallery-hidden { display: none; }

#main[data-gallery-page="artworks"] > section h1 { margin-bottom: 32px; }

#main[data-gallery-page="artworks"] > section > div > .grid {
  --gallery-art-row-gap: 64px;
  column-gap: 40px;
}

#main[data-gallery-page="artists"] > section p[class*="max-w-"] {
  margin-bottom: 40px;
}

#main :is(.gallery-sold, .gallery-on-hold) {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

#main .gallery-sold {
  font-size: 0;
  color: transparent;
}

#main :is(.gallery-sold, .gallery-on-hold)::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
}

#main .gallery-sold::before {
  background: #b22d33;
}

#main .gallery-on-hold::before {
  background: #245cab;
}

#main[data-gallery-page="artworks-detail"] > section:first-child .grid > div:first-child img {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
}

#main[data-gallery-page="artworks-detail"] > section:first-child .grid > div:first-child .bg-off-white {
  background: transparent;
}

#main a[class*="bg-near-black"],
#main button[class*="bg-near-black"],
#main + section button {
  padding: 12px 24px;
  background: var(--gallery-ink);
  color: var(--gallery-white);
  font-size: 12px;
  line-height: 20px;
}

#main a[class*="bg-near-black"]:hover,
#main button[class*="bg-near-black"]:hover,
#main + section button:hover { background: #44443f; }

#main[data-gallery-page="home"] a[href="/artists/brian-gormley"] div[style*="aspect-ratio"],
#main[data-gallery-page="artists"] a[href="/artists/brian-gormley"] div[style*="aspect-ratio"],
#main[data-gallery-page="artists-detail"] img[alt="Brian Gormley"] {
  aspect-ratio: 5 / 4 !important;
  object-fit: cover;
}

@media (min-width: 1100px) {
  #main[data-gallery-page="artworks"] > section > div > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(64px, 6vw, 112px);
    --gallery-art-row-gap: max(144px, calc(100svh - 650px));
  }

  #main[data-gallery-page="artworks"] a[href^="/artworks/"].group img {
    height: clamp(320px, 42svh, 480px);
  }

  #main[data-gallery-page="exhibitions"] > section > div > .grid { grid-template-columns: 1fr; }

  #main[data-gallery-page="exhibitions"] a.group {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: var(--gallery-gap);
    align-content: center;
    grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
    align-items: start;
  }

  #main[data-gallery-page="exhibitions"] a.group > div:first-child {
    grid-row: 1 / 6;
    margin: 0;
  }

  #main[data-gallery-page="exhibitions"] a.group > div:nth-child(2) { grid-row: 2; }
  #main[data-gallery-page="exhibitions"] a.group > h3 { grid-row: 3; }
  #main[data-gallery-page="exhibitions"] a.group > p:first-of-type { grid-row: 4; }
  #main[data-gallery-page="exhibitions"] a.group > p:last-of-type { grid-row: 5; }
}

#main + section {
  background: var(--gallery-paper);
  border-block: 1px solid var(--gallery-rule);
}

#main + section h2 {
  font-size: 28px;
  line-height: 36px;
  margin-bottom: 8px;
}

#main + section input,
#main :is(input, select, textarea) {
  padding: 12px 16px;
  background: var(--gallery-surface);
  border-color: var(--gallery-rule);
  font: 16px/24px var(--gallery-sans);
}

#main + .gallery-newsletter {
  padding-block: 0;
  scroll-margin-top: 16px;
  background: var(--gallery-surface);
  border: 0;
  color: var(--gallery-ink);
}

#main + .gallery-newsletter > div:not(.gallery-newsletter-content) {
  display: none;
}

#main + .gallery-newsletter > .gallery-newsletter-content {
  padding-block-start: 8px;
  border-top: 1px solid var(--gallery-rule);
}

#main + .gallery-newsletter summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  font: 400 18px/24px var(--gallery-serif);
  text-decoration: underline;
  text-decoration-color: var(--gallery-rule);
  text-underline-offset: 4px;
}

#main + .gallery-newsletter summary::-webkit-details-marker { display: none; }
#main + .gallery-newsletter summary:hover { text-decoration-color: currentColor; }

.gallery-newsletter-content form {
  display: grid;
  justify-items: start;
  align-items: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 608px;
  padding-block: 4px 16px;
}

.gallery-newsletter-content label {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
  color: var(--gallery-muted);
  font-size: 14px;
  line-height: 20px;
}

#main + .gallery-newsletter input {
  width: 100%;
  height: 44px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #73736d;
  color: var(--gallery-ink);
}

#main + .gallery-newsletter input:focus {
  outline: none;
  box-shadow: none;
  border-bottom-color: var(--gallery-ink);
  border-bottom-width: 2px;
}

#main + .gallery-newsletter button {
  min-height: 44px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #73736d;
  color: var(--gallery-ink);
  font: 400 16px/24px var(--gallery-serif);
  cursor: pointer;
}

#main + .gallery-newsletter button:hover { background: var(--gallery-paper); }
#main + .gallery-newsletter :is(button, summary):focus-visible {
  outline: 2px solid var(--gallery-ink);
  outline-offset: 4px;
}
.gallery-newsletter-content button[type="submit"] { grid-column: 1 / -1; }
.gallery-mailing-message { grid-column: 1 / -1; }
.gallery-mailing-message:empty { margin: 0; height: 0; display: none; }

@media (min-width: 640px) {
  .gallery-newsletter-content form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .gallery-newsletter-content button[type="submit"] { grid-column: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(#main[data-gallery-page="home"]) { scroll-behavior: smooth; }
}

body > footer {
  padding: 32px var(--gallery-gutter) 24px;
  background: var(--gallery-surface);
  color: var(--gallery-muted);
}

body > .gallery-compact-footer > div:not(.gallery-footer-line) { display: none; }

.gallery-footer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14px;
  line-height: 20px;
}

.gallery-footer-line a { color: var(--gallery-ink); }

@media (max-width: 767px) {
  .gallery-footer-line {
    flex-direction: column;
    align-items: flex-start;
  }
}

body > footer > div > .grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

body > footer > div > .grid > div:has(a[href="/artworks"]) { display: none; }
body > footer > div > .grid > div > div:first-child { margin-bottom: 4px; }
body > footer > div > .grid > div > div:has(> img) { gap: 8px; margin-bottom: 8px; }
body > footer > div > .grid p { line-height: 20px; }
body > footer > div > .grid div:has(> a[href*="instagram.com"]) { margin-top: 4px; }
body > footer :is(.text-warm-white, a:hover) { color: var(--gallery-ink); }
body > footer img { width: 24px; height: 24px; filter: brightness(0); }
body > footer img + span { font-size: 20px; line-height: 24px; }
body > footer .border-t { padding-top: 12px; gap: 8px; border-color: var(--gallery-rule); }
body > footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 640px) {
  body > footer > div > .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.gallery-blog-menu {
  position: fixed;
  inset: var(--gallery-header-live) 0 0;
  padding: 40px var(--gallery-gutter);
  background: var(--gallery-surface);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gallery-blog-menu[hidden] { display: none; }
body > nav .gallery-blog-menu a { font-size: 24px; line-height: 32px; }

@media (min-width: 1100px) {
  .gallery-blog-menu { display: none; }
}
