@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300&display=swap");

body {
  margin: 0;
  background: #f6f2ea;
  color: #29241f;
  font-family: Georgia, serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 16px clamp(20px, 4vw, 52px);
  background: #f6f2ea;
}

.site-brand {
  font-size: 1.1rem;
}

.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px clamp(12px, 3vw, 32px);
  margin-left: auto;
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.site-header a:hover,
.site-header a:focus-visible,
.site-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.welcome {
  background: #191816;
}

.welcome-painting {
  margin: 0;
}

.welcome-artwork {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.open-painting {
  appearance: none;
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}

.open-painting img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  border: 0;
}

.welcome-artwork h1 {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 12px;
  color: rgb(255 252 245 / 82%);
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: clamp(1.2rem, 4vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 4px #0006;
  pointer-events: none;
  animation: name-fade-in 3s ease-out both;
}

.painting-caption {
  padding: 14px 20px;
  background: #f6f2ea;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
}

.interior-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  line-height: 1.6;
}

.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #0b0b0b;
  color: #fff;
}

.viewer-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: 100%;
  background: #0b0b0b;
}

.viewer-frame {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.viewer-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  max-height: 100dvh;
}

.viewer-control {
  position: absolute;
  top: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffffb3;
  border-radius: 4px;
  background: #141414;
  color: #fff;
  cursor: pointer;
}

.viewer-control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viewer-control:hover {
  background: #3a3a3a;
}

.viewer-control:focus-visible,
.open-painting:focus-visible {
  outline: 2px solid #87b6c9;
  outline-offset: -4px;
}

.expand {
  left: 12px;
}

.close {
  right: 12px;
}

.viewer-message {
  position: absolute;
  bottom: 16px;
  margin: 0 16px;
  padding: 8px 12px;
  background: #141414;
  text-align: center;
}

.viewer-message:empty {
  display: none;
}

@keyframes name-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-artwork h1 {
    animation: none;
  }
}
.painting-gallery {
  min-height: 85vh;
  padding: 16px clamp(8px, 3vw, 36px) 24px;
  background: #191816;
  color: #f6f2ea;
}

.gallery-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: clamp(6px, 2vw, 24px);
}

.gallery-stage .open-painting img {
  max-height: 74vh;
}

.gallery-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #292725;
  color: #f6f2ea;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}

.gallery-arrow:hover {
  background: #44413e;
}

.gallery-arrow:focus-visible {
  outline: 2px solid #87b6c9;
  outline-offset: 3px;
}

.gallery-caption {
  margin: 16px 0 0;
  text-align: center;
}

#gallery-count {
  margin-left: 10px;
  font-size: 0.8rem;
  color: #d4cdc2;
}