:root {
  color-scheme: light;
  --ink: #1d2528;
  --soft-ink: #4d5659;
  --paper: #fbf8f1;
  --wall: #f6efe3;
  --wall-shadow: #e3dac8;
  --floor: #cbbda9;
  --frame: #252a2b;
  --frame-light: #fffdf6;
  --teal: #0f766e;
  --poppy: #d84b35;
  --gold: #f3bd3f;
  --sky: #3f88a8;
  --rose: #f2a7a0;
  --shadow: 0 22px 70px rgb(31 36 38 / 16%);
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(90deg, rgb(31 37 40 / 4%) 1px, transparent 1px) 0 0 / 112px 100%,
    linear-gradient(180deg, var(--paper) 0%, var(--wall) 58%, #eee4d5 100%);
  overflow-x: hidden;
}

body::after {
  position: fixed;
  inset: auto 0 0;
  height: 16vh;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, transparent, rgb(65 52 38 / 12%)),
    repeating-linear-gradient(90deg, rgb(109 87 60 / 18%) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, var(--floor), #a99578);
  clip-path: polygon(0 24%, 100% 0, 100% 100%, 0 100%);
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgb(251 248 241 / 82%);
  border-bottom: 1px solid rgb(29 37 40 / 10%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.1rem;
  aspect-ratio: 1;
  place-items: center;
  color: #fff;
  background: conic-gradient(from 140deg, var(--poppy), var(--gold), var(--teal), var(--sky), var(--poppy));
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgb(29 37 40 / 18%);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 2.2vw, 1.6rem);
  color: var(--soft-ink);
  font-size: 0.95rem;
  font-weight: 750;
}

.site-nav a {
  position: relative;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.42rem;
  left: 0;
  height: 3px;
  content: "";
  background: var(--poppy);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.gallery-room {
  position: relative;
  width: min(100%, 1480px);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 4rem);
}

.gallery-room::before {
  position: absolute;
  inset: 0 clamp(1rem, 4vw, 4rem) auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgb(29 37 40 / 22%), transparent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1.12fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5.5rem);
  min-height: calc(84svh - var(--header-height));
  padding-block: clamp(1.6rem, 3vw, 3rem);
}

.hero-copy {
  max-width: 660px;
}

.eyebrow,
.room-label {
  margin: 0 0 0.8rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 0.96;
}

h1 {
  max-width: 8ch;
  font-size: 7.5rem;
}

h2 {
  max-width: 12ch;
  font-size: 4.7rem;
}

.hero-text,
.section-heading p,
.about-panel p {
  color: var(--soft-ink);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hero-text {
  max-width: 48rem;
  margin: 1.35rem 0 1.8rem;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 1.15rem;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  background: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 12px 24px rgb(29 37 40 / 18%);
  transition: transform 180ms ease, background 180ms ease;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--teal);
  transform: translateY(-2px);
}

.feature-stage {
  position: relative;
  display: grid;
  justify-items: center;
  isolation: isolate;
}

.feature-stage::before {
  position: absolute;
  top: -16%;
  left: 50%;
  width: min(560px, 84vw);
  height: 78%;
  content: "";
  background: radial-gradient(ellipse at top, rgb(255 255 255 / 92%) 0 18%, rgb(255 255 255 / 34%) 43%, transparent 72%);
  transform: translateX(-50%);
  z-index: -1;
}

.featured-piece {
  width: min(100%, 500px, 44svh);
  margin: 0;
}

.frame-shell,
.piece-frame {
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 78%), rgb(255 255 255 / 38%)),
    #fffaf0;
  border: clamp(12px, 2vw, 24px) solid var(--frame-light);
  outline: clamp(9px, 1.35vw, 16px) solid var(--frame);
  box-shadow:
    inset 0 0 0 1px rgb(29 37 40 / 14%),
    var(--shadow);
}

.frame-shell {
  min-height: 0;
  aspect-ratio: 4 / 5;
  padding: clamp(1rem, 3vw, 2rem);
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-frame {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgb(29 37 40 / 54%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.8rem;
  text-align: center;
  background:
    linear-gradient(120deg, transparent 0 48%, rgb(15 118 110 / 16%) 48% 52%, transparent 52%),
    linear-gradient(30deg, transparent 0 45%, rgb(216 75 53 / 12%) 45% 55%, transparent 55%),
    #fffdf7;
}

.featured-piece figcaption {
  display: grid;
  gap: 0.28rem;
  width: min(84%, 460px);
  margin: 1.45rem auto 0;
  padding-top: 0.95rem;
  text-align: center;
  border-top: 1px solid rgb(29 37 40 / 16%);
}

@media (min-width: 881px) {
  .featured-piece {
    position: relative;
  }

  .featured-piece figcaption {
    position: absolute;
    top: calc(100% + 0.9rem);
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
  }
}

.featured-piece figcaption span,
.piece-title {
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.featured-piece figcaption strong {
  font-size: 1.7rem;
  line-height: 1.15;
}

.gallery-section {
  min-height: 100svh;
  padding-block: clamp(0.5rem, 1vw, 1rem) clamp(4rem, 8vw, 8rem);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 7rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-heading p {
  max-width: 42rem;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  align-items: start;
  gap: clamp(1.8rem, 4vw, 4.5rem) clamp(1.35rem, 3vw, 3.5rem);
}

.gallery-piece {
  --tilt: 0deg;
  margin: 0;
  transform: rotate(var(--tilt));
}

.gallery-piece:nth-child(4n + 1) {
  margin-top: clamp(0rem, 3vw, 3.2rem);
}

.gallery-piece:nth-child(4n + 3) {
  margin-top: clamp(0rem, 4vw, 5rem);
}

.gallery-button {
  display: grid;
  width: 100%;
  gap: 1rem;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
}

.piece-frame {
  min-height: 250px;
  aspect-ratio: 4 / 5;
  padding: clamp(0.75rem, 1.8vw, 1.2rem);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.piece-frame::before {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  width: 0.55rem;
  aspect-ratio: 1;
  content: "";
  background: var(--gold);
  border: 2px solid var(--frame);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 10px rgb(29 37 40 / 18%);
}

.piece-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-button:hover .piece-frame,
.gallery-button:focus-visible .piece-frame {
  box-shadow:
    inset 0 0 0 1px rgb(29 37 40 / 14%),
    0 28px 80px rgb(15 118 110 / 22%);
  transform: translateY(-8px) scale(1.015);
}

.piece-title {
  display: block;
  padding-inline: 0.35rem;
  text-align: center;
}

.gallery-empty {
  display: none;
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem);
  color: var(--soft-ink);
  text-align: center;
  border-block: 1px solid rgb(29 37 40 / 18%);
}

.gallery-empty.is-visible-empty {
  display: block;
}

.gallery-empty p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.7rem;
  line-height: 1.1;
}

.about-section {
  padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 4vw, 4rem);
  background:
    linear-gradient(90deg, rgb(15 118 110 / 12%), transparent 22% 78%, rgb(216 75 53 / 12%)),
    var(--ink);
}

.about-panel {
  width: min(100%, 980px);
  margin: 0 auto;
  color: #fffaf0;
}

.about-panel .eyebrow {
  color: var(--gold);
}

.about-panel h2 {
  max-width: 11ch;
}

.about-panel p {
  max-width: 820px;
  color: rgb(255 250 240 / 82%);
}

.site-footer {
  padding: 1.6rem clamp(1rem, 4vw, 4rem);
  color: rgb(255 250 240 / 78%);
  background: #141a1c;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(3rem, 0.18fr) minmax(0, 1fr) minmax(3rem, 0.18fr);
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgb(18 23 25 / 92%);
  backdrop-filter: blur(18px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-art {
  display: grid;
  justify-items: center;
  gap: 1rem;
  min-width: 0;
  margin: 0;
}

.lightbox-art img {
  max-width: min(100%, 1100px);
  max-height: 82svh;
  object-fit: contain;
  background: #fffaf0;
  border: 14px solid #fffdf6;
  box-shadow: 0 26px 90px rgb(0 0 0 / 42%);
}

.lightbox-art figcaption {
  color: #fffaf0;
  font-weight: 850;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  display: inline-grid;
  place-items: center;
  color: #fffaf0;
  cursor: pointer;
  background: rgb(255 250 240 / 10%);
  border: 1px solid rgb(255 250 240 / 28%);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-height: 2.8rem;
  padding: 0 1rem;
  border-radius: 999px;
}

.lightbox-nav {
  width: clamp(2.8rem, 6vw, 4.4rem);
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 3rem;
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible,
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgb(255 250 240 / 20%);
}

.reveal {
  --reveal-rotate: 0deg;
  opacity: 0;
  transform: translateY(34px) scale(0.98) rotate(var(--reveal-rotate));
}

.reveal.is-visible {
  animation: popIn 760ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(34px) scale(0.96) rotate(var(--reveal-rotate));
  }

  68% {
    opacity: 1;
    transform: translateY(-4px) scale(1.012) rotate(var(--reveal-rotate));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(var(--reveal-rotate));
  }
}

@media (max-width: 880px) {
  :root {
    --header-height: 64px;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .brand {
    font-size: 0.95rem;
  }

  .site-nav {
    gap: 0.78rem;
    font-size: 0.86rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.8rem;
  }

  h1 {
    max-width: 7ch;
    font-size: 5.35rem;
  }

  h2 {
    font-size: 3.45rem;
  }

  .featured-piece {
    width: min(100%, 520px);
  }

  .frame-shell {
    min-height: auto;
    max-height: 72svh;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .gallery-piece:nth-child(n) {
    margin-top: 0;
  }

  .piece-frame {
    min-height: 210px;
  }

  .featured-piece figcaption strong {
    font-size: 1.45rem;
  }

  .lightbox {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "art art"
      "previous next";
    align-content: center;
  }

  .lightbox-art {
    grid-area: art;
  }

  .lightbox-nav.previous {
    grid-area: previous;
    justify-self: start;
  }

  .lightbox-nav.next {
    grid-area: next;
    justify-self: end;
  }
}

@media (max-width: 540px) {
  .brand-mark {
    width: 1.85rem;
  }

  .site-nav a {
    padding-block: 0.4rem;
  }

  .hero-text,
  .section-heading p,
  .about-panel p {
    font-size: 1rem;
  }

  .hero {
    gap: 1.35rem;
    padding-top: 1.8rem;
  }

  .hero-text {
    display: none;
  }

  h1 {
    font-size: 3.75rem;
  }

  h2 {
    font-size: 2.85rem;
  }

  .empty-frame {
    font-size: 2.35rem;
  }

  .featured-piece {
    position: relative;
    width: min(100%, 310px);
  }

  .featured-piece figcaption {
    display: none;
  }

  .gallery-empty p {
    font-size: 2.25rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .piece-frame {
    min-height: 260px;
  }
}

@media (max-width: 420px) {
  .brand span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-nav {
    gap: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
