:root {
  --purple: #351044;
  --purple-mid: #4a165d;
  --purple-dark: #16051f;
  --purple-deep: #0d0610;
  --gold: #d9b15f;
  --gold-bright: #f0c76b;
  --cream: #f7efe2;
  --ink: #211827;
  --muted: #6d6470;
  --white: #fff;
  --shadow: 0 22px 60px rgba(22, 5, 31, .15);
  --page-inset: clamp(24px, 3vw, 40px);
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--purple-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--serif);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--purple-dark);
  background: var(--gold-bright);
  border-radius: 8px;
  font-family: var(--sans);
  font-weight: 700;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  color: var(--white);
  background: #060506;
  border-bottom: 1px solid rgba(217, 177, 95, .45);
}

.header-inner {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  width: calc(100% - var(--page-inset));
  margin: 0 auto;
  padding: 12px 0 0;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--gold-bright);
  text-decoration: none;
}

.brand img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5));
}

.brand-copy {
  display: block;
  color: var(--gold-bright);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.brand-copy strong,
.brand-copy small { display: block; }

.brand-copy small {
  margin-top: 4px;
  color: #e7c67d;
  font-family: var(--sans);
  font-size: .62em;
  letter-spacing: .18em;
}

.header-actions {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-actions::-webkit-scrollbar { display: none; }

.header-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 10px 0 14px;
  color: rgba(255, 255, 255, .94);
  border-bottom: 2px solid transparent;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
}

.header-link:hover,
.header-link.active { color: var(--gold-bright); border-bottom-color: var(--gold-bright); }

.intro {
  position: relative;
  overflow: hidden;
  height: 430px;
  color: var(--white);
  background: #120714;
  border-bottom: 1px solid rgba(217, 177, 95, .38);
}

.intro::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(9, 3, 12, .08) 20%, rgba(9, 3, 12, .88) 100%);
  pointer-events: none;
}

.intro-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}

.intro-inner {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: flex-end;
  width: calc(100% - var(--page-inset));
  margin: 0 auto;
  padding-bottom: 68px;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .17em;
}

.eyebrow span { margin-right: 6px; }

.intro h1 {
  max-width: 10ch;
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(2.7rem, 13vw, 5.25rem);
  line-height: .98;
  text-shadow: 0 9px 30px rgba(0, 0, 0, .45);
}

.intro h1 span { color: var(--gold-bright); }

.lede {
  max-width: 56ch;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-family: var(--sans);
  font-size: 1rem;
}

.gallery-section {
  position: relative;
  z-index: 2;
  padding: 0 0 64px;
}

.gallery-shell {
  width: calc(100% - var(--page-inset));
  min-height: 340px;
  margin: -38px auto 0;
  padding: 25px 18px 32px;
  background: var(--white);
  border: 1px solid rgba(217, 177, 95, .3);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.gallery-heading-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 18px;
}

.gallery-heading-row .section-label,
.empty-state .section-label,
.error-state .section-label {
  color: #9b6e23;
}

.gallery-heading-row h2,
.empty-state h2,
.error-state h2 {
  margin: 0;
  color: var(--purple-dark);
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1.05;
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 12px;
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  background: #f2eaf4;
  border: 1px solid #e1d3e5;
  border-radius: 999px;
}

.view-button {
  min-height: 42px;
  padding: 8px 14px;
  color: #5a4d5e;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 800;
}

.view-button.is-active {
  color: var(--white);
  background: var(--purple-dark);
  box-shadow: 0 8px 18px rgba(22, 5, 31, .18);
}

.view-button:focus-visible,
.slideshow-toggle:focus-visible,
.slideshow-nav:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  color: #1c0c05;
  background: linear-gradient(180deg, #f5cd72, #c7953d);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(217, 177, 95, .25);
  cursor: pointer;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
}

.gallery-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  gap: 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 700;
}

.status-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e4d8e8;
  border-top-color: var(--purple-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.gallery-slideshow {
  overflow: hidden;
  background: var(--purple-deep);
  border: 1px solid rgba(217, 177, 95, .35);
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(22, 5, 31, .2);
}

.slideshow-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(74, 22, 93, .55), transparent 55%),
    #080509;
}

.slideshow-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.slideshow-image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .35s ease;
}

.slideshow-image-button img.is-loaded { opacity: 1; }

.slideshow-image-button:focus-visible {
  outline: 4px solid var(--gold-bright);
  outline-offset: -4px;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  display: grid;
  width: 42px;
  height: 50px;
  padding: 0;
  color: var(--white);
  background: rgba(8, 5, 9, .7);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  place-items: center;
}

.slideshow-previous { left: 10px; }
.slideshow-next { right: 10px; }

.slideshow-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px 16px;
  color: var(--white);
  gap: 16px;
}

.slideshow-details > div { min-width: 0; }

.slideshow-count {
  margin: 0 0 3px;
  color: var(--gold-bright);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.slideshow-caption {
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-family: var(--sans);
  font-size: .86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slideshow-toggle {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 14px;
  color: #1c0c05;
  background: linear-gradient(180deg, #f5cd72, #c7953d);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 800;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  background: #e9e1eb;
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(22, 5, 31, .12);
}

.photo-button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #e9e1eb;
  border: 0;
  cursor: zoom-in;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .3s ease, transform .4s ease;
}

.photo-card img.is-loaded {
  opacity: 1;
  transform: none;
}

.photo-button:hover img,
.photo-button:focus-visible img { transform: scale(1.025); }

.photo-button:focus-visible {
  outline: 4px solid var(--gold-bright);
  outline-offset: -4px;
}

.photo-card figcaption {
  padding: 12px 14px 14px;
  color: #433848;
  background: var(--white);
  font-family: var(--sans);
  font-size: .84rem;
}

.empty-state,
.error-state {
  max-width: 620px;
  margin: 18px auto 8px;
  padding: 30px 8px;
  text-align: center;
}

.empty-state > p:not(.section-label),
.error-state > p:not(.section-label) {
  margin: 13px auto 22px;
  color: var(--muted);
  font-family: var(--sans);
}

.empty-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  color: var(--purple-dark);
  background: linear-gradient(180deg, #f5cd72, #c7953d);
  border-radius: 50%;
  place-items: center;
}

.empty-icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.photo-viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  color: var(--white);
  background: rgba(7, 4, 8, .98);
  border: 0;
}

.photo-viewer::backdrop { background: rgba(7, 4, 8, .92); }

.viewer-surface {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  padding: max(58px, env(safe-area-inset-top)) 12px max(22px, env(safe-area-inset-bottom));
  place-items: center;
}

.viewer-surface figure {
  display: grid;
  max-width: 1100px;
  max-height: 100%;
  margin: 0;
  gap: 12px;
  place-items: center;
}

.viewer-surface img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
}

.viewer-surface figcaption {
  max-width: 70ch;
  color: rgba(255, 255, 255, .86);
  font-family: var(--sans);
  font-size: .88rem;
  text-align: center;
}

.viewer-close,
.viewer-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--white);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 2rem;
  line-height: 1;
  place-items: center;
}

.viewer-close {
  top: max(10px, env(safe-area-inset-top));
  right: 12px;
}

.viewer-nav {
  top: 50%;
  width: 44px;
  height: 54px;
  font-size: 2.4rem;
  transform: translateY(-50%);
}

.viewer-previous { left: 8px; }
.viewer-next { right: 8px; }
.viewer-nav[hidden] { display: none; }

.site-footer {
  padding: 34px 20px;
  color: rgba(255, 255, 255, .75);
  background: #080608;
  border-top: 1px solid rgba(217, 177, 95, .35);
  font-family: var(--sans);
  text-align: center;
}

.site-footer img { width: 54px; height: 54px; }
.site-footer p { margin: 8px 0 2px; color: var(--gold-bright); font-family: var(--serif); font-weight: 700; }
.site-footer small { font-size: .72rem; }

[hidden] { display: none !important; }

@media (min-width: 560px) {
  .gallery-actions { align-items: center; flex-direction: row; }
  .view-switch { min-width: 238px; }
  .share-button { flex: 0 0 auto; }
  .slideshow-stage { aspect-ratio: 16 / 9; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 780px) {
  .intro { height: auto; }
  .intro::before { display: none; }
  .intro-artwork { height: auto; object-fit: contain; object-position: center; }
  .intro-inner { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gallery-shell { margin-top: -48px; padding: 38px 34px 44px; }
  .gallery-heading-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .gallery-actions { justify-content: flex-end; width: auto; }
  .gallery-grid { gap: 14px; }
}

@media (min-width: 1040px) {
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .viewer-previous { left: 26px; }
  .viewer-next { right: 26px; }
}

@media (min-width: 1381px) {
  .gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .header-inner { align-items: center; flex-direction: row; justify-content: space-between; min-height: 94px; padding: 0; gap: 28px; }
  .brand { min-width: 330px; gap: 18px; }
  .brand img { width: 92px; height: 92px; }
  .brand-copy { font-size: clamp(1.1rem, 2vw, 1.45rem); }
  .header-actions { width: auto; gap: 34px; overflow: visible; }
  .header-link { padding: 34px 0; font-size: .98rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
