:root {
  --section-background: #f5f5f3;
  color-scheme: light;
  font-family: 'Open Sans', Arial, sans-serif;
  background: #fff;
  color: #292925;
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 240px;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: start center;
  align-content: start;
  padding: 0;
}

.gallery {
  width: min(calc(100% - 48px), 880px);
}

.gallery__intro {
  max-width: 640px;
  margin: 64px auto 0;
  color: #62625b;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

.gallery__divider {
  margin: 64px 0;
  border: 0;
  border-top: 1px solid #deded8;
}

.gallery__divider--end {
  margin: 64px 0 0;
}

.gallery__title {
  margin: 0 0 24px;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.gallery__picture {
  margin: 0;
  aspect-ratio: 22 / 13;
  overflow: hidden;
  background: #fff;
}

.gallery__picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery__buttons {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 18px;
}

.swatch {
  --swatch-color: #fff;
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.swatch::before {
  content: '';
  width: 19px;
  height: 19px;
  border: 1px solid rgb(48 48 40 / 22%);
  background: var(--swatch-color);
  transition: transform 150ms ease, outline-color 150ms ease;
  outline: 1px solid transparent;
  outline-offset: 4px;
}

.swatch:hover::before {
  transform: translateY(-2px);
}

.swatch[aria-pressed='true']::before {
  outline-color: #73736a;
}

.swatch:focus-visible {
  outline: 2px solid #3c5364;
  outline-offset: -2px;
  border-radius: 3px;
}

.swatch--olive { --swatch-color: #7a8450; }
.swatch--steel { --swatch-color: #565953; }
.swatch--rust { --swatch-color: #ab592e; }
.swatch--gold { --swatch-color: linear-gradient(135deg, #292925 50%, #be9a53 50%); }
.swatch--zinc { --swatch-color: #cbd0d1; }

.introduction {
  width: 100%;
  padding: 48px 24px;
  background: var(--section-background);
  text-align: center;
}

.introduction h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  padding-bottom: 6px;
  color: #292925;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.25;
}

.introduction h1::after {
  content: '';
  color: #686862;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(to bottom,
    currentColor 0 2px,
    transparent 2px 5px,
    currentColor 5px 6px);
}

.introduction__letter {
  font-size: 1.2em;
  font-weight: 700;
  color: #686862;
}

.introduction p {
  max-width: 560px;
  margin: 18px auto 0;
  color: #62625b;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.8;
}

.workshop {
  max-width: 680px;
  margin: 36px auto 0;
}

.workshop__thumbnails {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.workshop__thumbnail {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eeede8;
  cursor: zoom-in;
}

.workshop__thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workshop__thumbnail:hover {
  opacity: .85;
}

.workshop__thumbnail:focus-visible {
  outline: 2px solid #7a8450;
  outline-offset: 4px;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  width: min(calc(100% - 24px), 1100px);
  max-width: none;
  max-height: calc(100svh - 24px);
  padding: 16px;
  border: 0;
  background: #1d1e1a;
  color: #fff;
}

.lightbox::backdrop {
  background: rgb(15 17 12 / 88%);
}

.lightbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.lightbox__header h2 {
  margin: 0;
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.lightbox__stage {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.lightbox__stage img {
  display: block;
  width: 100%;
  height: min(70svh, 760px, calc(100svh - 180px));
  object-fit: contain;
}

.lightbox__button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: 32px/1 Arial, sans-serif;
  cursor: pointer;
}

.lightbox__button:hover {
  background: rgb(255 255 255 / 12%);
}

.lightbox__button:focus-visible {
  outline: 2px solid #d1dda5;
  outline-offset: 3px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  width: 100%;
  margin-top: 64px;
  padding: 32px 24px;
  background: var(--section-background);
  color: #62625b;
  font-size: 14px;
  line-height: 1.6;
}

.footer a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer a:focus-visible {
  outline: 2px solid #7a8450;
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .introduction { padding: 32px 16px; }
  .introduction p { font-size: 16px; }
  .gallery { width: calc(100% - 32px); }
  .gallery__picture {
    width: 100%;
    margin-inline: 0;
    aspect-ratio: 4 / 3;
  }
  .gallery__buttons { margin-top: 12px; }
  .workshop__thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lightbox { padding: 12px; }
  .lightbox__stage { gap: 4px; }
  .footer { gap: 12px; padding: 28px 16px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .swatch::before { transition: none; }
}
