:root {
  --gallery-archive-teal: #075a54;
  --gallery-deep-ink: #153f3d;
  --gallery-lime: #cfd547;
  --gallery-orchid: #7b3d92;
  --gallery-mist: #eaf3f0;
  --gallery-paper: #ffffff;
}

[data-photo-gallery-root] [hidden] {
  display: none !important;
}

.photo-gallery-page {
  width: min(1380px, calc(100% - clamp(2rem, 7vw, 7rem)));
  margin-inline: auto;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 clamp(5rem, 9vw, 8rem);
}

.photo-gallery-hero {
  min-height: min(35rem, 72vh);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 8vw, 8rem);
  color: var(--gallery-paper);
  background:
    linear-gradient(120deg, rgba(7, 90, 84, 0.96), rgba(7, 63, 59, 0.92)),
    linear-gradient(45deg, var(--gallery-orchid), var(--gallery-archive-teal));
  border-bottom: 10px solid var(--gallery-lime);
  padding: clamp(2rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.photo-gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 54px 54px;
  pointer-events: none;
}

.photo-gallery-hero-copy,
.photo-gallery-hero-index {
  position: relative;
  z-index: 1;
}

.photo-gallery-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gallery-orchid);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-gallery-hero .photo-gallery-eyebrow {
  color: var(--gallery-lime);
}

.photo-gallery-hero h1 {
  margin: 0;
  color: var(--gallery-paper);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: clamp(4.5rem, 12vw, 10.5rem);
  font-weight: 700;
  letter-spacing: -0.075em;
  line-height: 0.72;
}

.photo-gallery-hero h1 span {
  color: var(--gallery-lime);
}

.photo-gallery-hero-copy > p:last-child {
  max-width: 43rem;
  margin: clamp(2rem, 5vw, 4rem) 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.75;
}

.photo-gallery-hero-index {
  display: grid;
  justify-items: end;
  align-content: end;
  font-family: "Chakra Petch", "Prompt", sans-serif;
}

.photo-gallery-hero-index span,
.photo-gallery-hero-index small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.photo-gallery-hero-index strong {
  color: var(--gallery-paper);
  font-size: clamp(7rem, 14vw, 13rem);
  line-height: 0.82;
}

.photo-contact-strip {
  min-height: 3rem;
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gallery-paper);
  background: var(--gallery-deep-ink);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  animation: gallery-strip-arrive 650ms cubic-bezier(.2,.75,.25,1) both;
}

.photo-contact-strip i {
  width: 0.75rem;
  height: 0.75rem;
  flex: 0 0 auto;
  background: var(--gallery-paper);
  opacity: 0.22;
}

.photo-contact-strip strong {
  margin-left: auto;
  color: var(--gallery-lime);
}

.photo-gallery-collection {
  padding-top: clamp(3.5rem, 7vw, 6.5rem);
}

.photo-gallery-collection > header,
.photo-gallery-heading {
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.photo-gallery-collection h2,
.photo-gallery-heading h2 {
  margin: 0;
  color: var(--gallery-deep-ink);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: clamp(2rem, 4vw, 3.75rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.photo-gallery-collection > header > p,
.photo-gallery-heading > div > p:last-child {
  margin: 0.55rem 0 0;
  color: #617977;
}

.photo-gallery-collection > header > p {
  padding: 0.5rem 0.75rem;
  color: var(--gallery-archive-teal);
  background: var(--gallery-mist);
  font-size: 0.75rem;
  font-weight: 700;
}

.photo-gallery-feature {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.photo-gallery-feature .photo-contact-strip {
  margin-bottom: 1.25rem;
}

.photo-gallery-all-link {
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--gallery-paper);
  background: var(--gallery-archive-teal);
  border: 1px solid var(--gallery-archive-teal);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.photo-gallery-all-link:hover {
  color: var(--gallery-deep-ink);
  background: var(--gallery-lime);
  border-color: var(--gallery-lime);
}

.photo-album-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
}

.photo-album-grid-featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.photo-album-card {
  min-width: 0;
  background: var(--gallery-paper);
  border: 1px solid rgba(7, 90, 84, 0.2);
  border-radius: 2px;
  box-shadow: 0 14px 36px rgba(7, 63, 59, 0.08);
  overflow: hidden;
  animation: gallery-card-arrive 480ms ease-out both;
  animation-delay: calc(var(--album-index, 0) * 70ms);
}

.photo-album-card > a {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.photo-album-cover {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(207, 213, 71, 0.9), rgba(7, 90, 84, 0.94));
  border-bottom: 6px solid var(--gallery-lime);
}

.photo-album-cover[data-cover-tone="2"] {
  background: linear-gradient(135deg, #7b3d92, #153f3d);
}

.photo-album-cover[data-cover-tone="3"] {
  background: linear-gradient(135deg, #eaf3f0, #075a54);
}

.photo-album-cover[data-cover-tone="4"] {
  background: linear-gradient(135deg, #153f3d 42%, #cfd547 42%);
}

.photo-album-cover::after {
  content: "PULINET · PHOTO ARCHIVE";
  position: absolute;
  right: 0.7rem;
  bottom: 0.55rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.photo-album-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.photo-album-cover-fallback {
  color: rgba(255, 255, 255, 0.92);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.08em;
}

.photo-album-body {
  min-height: 14rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  display: flex;
  flex: 1;
  flex-direction: column;
}

.photo-album-body time {
  color: var(--gallery-orchid);
  font-size: 0.7rem;
  font-weight: 700;
}

.photo-album-body h3 {
  margin: 0.55rem 0 0;
  color: var(--gallery-deep-ink);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.photo-album-body p {
  display: -webkit-box;
  margin: 0.65rem 0 0;
  overflow: hidden;
  color: #617977;
  font-size: 0.78rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.photo-album-action {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gallery-archive-teal);
  border-top: 1px solid rgba(7, 90, 84, 0.14);
  font-size: 0.76rem;
  font-weight: 700;
}

.photo-album-card a:hover .photo-album-cover img {
  transform: scale(1.035);
}

.photo-album-card a:hover .photo-album-action,
.photo-album-card a:focus-visible .photo-album-action {
  color: var(--gallery-orchid);
}

.photo-gallery-status {
  min-height: 9rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #617977;
  background: var(--gallery-mist);
  border: 1px dashed rgba(7, 90, 84, 0.28);
}

.photo-gallery-status > span:not(.photo-gallery-empty-mark) {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(7, 90, 84, 0.22);
  border-top-color: var(--gallery-archive-teal);
  border-radius: 50%;
  animation: gallery-spin 700ms linear infinite;
}

.photo-gallery-error,
.photo-gallery-empty {
  justify-content: space-between;
}

.photo-gallery-error strong,
.photo-gallery-empty strong {
  color: var(--gallery-deep-ink);
  font-size: 1.05rem;
}

.photo-gallery-error p,
.photo-gallery-empty p {
  margin: 0.25rem 0 0;
  color: #617977;
  font-size: 0.78rem;
}

.photo-gallery-error button,
.photo-gallery-empty a {
  min-height: 2.75rem;
  padding: 0.6rem 0.9rem;
  color: var(--gallery-paper);
  background: var(--gallery-archive-teal);
  border: 1px solid var(--gallery-archive-teal);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.photo-gallery-empty-mark {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  color: var(--gallery-paper);
  background: var(--gallery-orchid);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.photo-gallery-pagination {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.photo-gallery-pagination a,
.photo-gallery-pagination span {
  min-width: 2.7rem;
  min-height: 2.7rem;
  display: grid;
  place-items: center;
  color: var(--gallery-deep-ink);
  border: 1px solid rgba(7, 90, 84, 0.25);
  font-family: "Chakra Petch", "Prompt", sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.photo-gallery-pagination a[aria-current="page"] {
  color: var(--gallery-paper);
  background: var(--gallery-archive-teal);
}

@keyframes gallery-strip-arrive {
  from { opacity: 0; transform: translateX(-1.5rem); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes gallery-card-arrive {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 1080px) {
  .photo-album-grid,
  .photo-album-grid-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .photo-gallery-page {
    width: min(100% - 1.5rem, 1380px);
    padding-top: 1.25rem;
  }

  .photo-gallery-hero {
    min-height: 33rem;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
  }

  .photo-gallery-hero h1 {
    font-size: clamp(4rem, 23vw, 7rem);
  }

  .photo-gallery-hero-index {
    justify-items: start;
  }

  .photo-gallery-hero-index strong {
    font-size: 6rem;
  }

  .photo-gallery-heading,
  .photo-gallery-collection > header,
  .photo-gallery-error,
  .photo-gallery-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-gallery-heading {
    display: flex;
  }

  .photo-album-grid,
  .photo-album-grid-featured {
    grid-template-columns: 1fr;
  }

  .photo-album-body {
    min-height: 12rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-contact-strip,
  .photo-album-card,
  .photo-gallery-status > span:not(.photo-gallery-empty-mark) {
    animation: none;
  }

  .photo-album-cover img {
    transition: none;
  }
}
