.photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(255, 250, 244, 1), rgba(240, 228, 210, 0.9));
  --newsletter-border: rgba(29, 39, 48, 0.05);
  --newsletter-label: rgba(29, 39, 48, 0.75);
  --newsletter-input: rgba(29, 39, 48, 0.85);
  --newsletter-placeholder: rgba(29, 39, 48, 0.45);
  --newsletter-button-bg: rgba(45, 32, 22, 0.95);
  --newsletter-button-fg: #fff;
  --newsletter-shadow: 0 35px 60px rgba(29, 39, 48, 0.07);
  --newsletter-button-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
  padding: 2rem 5vw 5rem;
  margin-top: 140px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body[data-theme="white-glass"].page-photos .photo-hero,
body[data-theme="white-glass"].page-photos .photo-album-bar,
body[data-theme="white-glass"].page-photos .album,
body[data-theme="white-glass"].page-photos .photo-tile,
body[data-theme="white-glass"].page-photos .album__tile {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(102, 132, 164, 0.2);
}

body[data-theme="white-glass"].page-photos .photo-footer {
  background: rgba(242, 249, 255, 0.88);
}

body[data-theme="dark-glass"].page-photos {
  color: #e6eef7;
}

body[data-theme="dark-glass"].page-photos .photo-hero,
body[data-theme="dark-glass"].page-photos .photo-album-bar,
body[data-theme="dark-glass"].page-photos .album,
body[data-theme="dark-glass"].page-photos .photo-tile,
body[data-theme="dark-glass"].page-photos .album__tile {
  background: rgba(17, 29, 41, 0.84);
  border-color: rgba(128, 160, 193, 0.22);
  box-shadow: 0 20px 34px rgba(4, 10, 16, 0.4);
}

body[data-theme="dark-glass"].page-photos .photo-hero p,
body[data-theme="dark-glass"].page-photos .filter-controls label,
body[data-theme="dark-glass"].page-photos .album__meta p,
body[data-theme="dark-glass"].page-photos .photo-tile {
  color: rgba(225, 236, 247, 0.8);
}

body[data-theme="dark-glass"].page-photos .filter-controls select,
body[data-theme="dark-glass"].page-photos .filter-controls input,
body[data-theme="dark-glass"].page-photos .hero-cta--ghost,
body[data-theme="dark-glass"].page-photos .album-page-btn {
  color: #e6eef7;
  background: rgba(12, 21, 30, 0.8);
  border-color: rgba(128, 160, 193, 0.3);
}

body[data-theme="dark-glass"].page-photos .hero-cta--primary,
body[data-theme="dark-glass"].page-photos .album-button.active {
  background: rgba(30, 51, 72, 0.9);
  border-color: rgba(137, 181, 217, 0.38);
}

body[data-theme="dark-glass"].page-photos .photo-footer {
  background: rgba(12, 21, 30, 0.86);
  border-top-color: rgba(128, 160, 193, 0.2);
}

body[data-theme="dark-glass"].page-photos .photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(15, 25, 35, 0.96), rgba(12, 21, 30, 0.92));
  --newsletter-border: rgba(128, 160, 193, 0.32);
  --newsletter-label: rgba(225, 236, 247, 0.78);
  --newsletter-input: rgba(230, 238, 247, 0.92);
  --newsletter-placeholder: rgba(200, 218, 236, 0.5);
  --newsletter-button-bg: rgba(74, 144, 226, 0.32);
  --newsletter-button-fg: #e6eef7;
  --newsletter-shadow: 0 30px 50px rgba(3, 9, 14, 0.45);
  --newsletter-button-shadow: 0 18px 28px rgba(4, 10, 16, 0.38);
}

body[data-theme="cyan-portal"].page-photos {
  color: #e8fbff;
}

body[data-theme="cyan-portal"].page-photos .photo-hero,
body[data-theme="cyan-portal"].page-photos .photo-album-bar,
body[data-theme="cyan-portal"].page-photos .album,
body[data-theme="cyan-portal"].page-photos .photo-tile,
body[data-theme="cyan-portal"].page-photos .album__tile {
  background: rgba(10, 34, 45, 0.84);
  border-color: rgba(0, 209, 255, 0.22);
  box-shadow: 0 20px 34px rgba(2, 12, 18, 0.44);
}

body[data-theme="cyan-portal"].page-photos .photo-hero p,
body[data-theme="cyan-portal"].page-photos .filter-controls label,
body[data-theme="cyan-portal"].page-photos .album__meta p,
body[data-theme="cyan-portal"].page-photos .photo-tile {
  color: rgba(224, 249, 255, 0.82);
}

body[data-theme="cyan-portal"].page-photos .filter-controls select,
body[data-theme="cyan-portal"].page-photos .filter-controls input,
body[data-theme="cyan-portal"].page-photos .hero-cta--ghost,
body[data-theme="cyan-portal"].page-photos .album-page-btn {
  color: #e8fbff;
  background: rgba(8, 27, 36, 0.82);
  border-color: rgba(0, 209, 255, 0.34);
}

body[data-theme="cyan-portal"].page-photos .hero-cta--primary,
body[data-theme="cyan-portal"].page-photos .album-button.active {
  background: rgba(0, 175, 175, 0.26);
  border-color: rgba(0, 209, 255, 0.44);
}

body[data-theme="cyan-portal"].page-photos .photo-footer {
  background: rgba(8, 27, 36, 0.88);
  border-top-color: rgba(0, 209, 255, 0.2);
}

body[data-theme="cyan-portal"].page-photos .photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(10, 34, 45, 0.96), rgba(8, 27, 36, 0.92));
  --newsletter-border: rgba(0, 209, 255, 0.34);
  --newsletter-label: rgba(225, 249, 255, 0.82);
  --newsletter-input: rgba(232, 251, 255, 0.95);
  --newsletter-placeholder: rgba(184, 238, 248, 0.56);
  --newsletter-button-bg: rgba(0, 175, 175, 0.34);
  --newsletter-button-fg: #e8fbff;
  --newsletter-shadow: 0 30px 50px rgba(2, 12, 18, 0.45);
  --newsletter-button-shadow: 0 18px 28px rgba(2, 10, 15, 0.42);
}

body[data-theme="onyx-black"].page-photos {
  color: #f1f5fb;
}

body[data-theme="onyx-black"].page-photos .photo-hero,
body[data-theme="onyx-black"].page-photos .photo-album-bar,
body[data-theme="onyx-black"].page-photos .album,
body[data-theme="onyx-black"].page-photos .photo-tile,
body[data-theme="onyx-black"].page-photos .album__tile {
  background: rgba(15, 22, 32, 0.86);
  border-color: rgba(164, 182, 205, 0.24);
  box-shadow: 0 20px 34px rgba(2, 6, 10, 0.45);
}

body[data-theme="onyx-black"].page-photos .photo-hero p,
body[data-theme="onyx-black"].page-photos .filter-controls label,
body[data-theme="onyx-black"].page-photos .album__meta p,
body[data-theme="onyx-black"].page-photos .photo-tile {
  color: rgba(226, 235, 247, 0.8);
}

body[data-theme="onyx-black"].page-photos .filter-controls select,
body[data-theme="onyx-black"].page-photos .filter-controls input,
body[data-theme="onyx-black"].page-photos .hero-cta--ghost,
body[data-theme="onyx-black"].page-photos .album-page-btn {
  color: #f1f5fb;
  background: rgba(12, 18, 26, 0.84);
  border-color: rgba(164, 182, 205, 0.28);
}

body[data-theme="onyx-black"].page-photos .hero-cta--primary,
body[data-theme="onyx-black"].page-photos .album-button.active {
  background: rgba(127, 152, 180, 0.3);
  border-color: rgba(181, 197, 216, 0.44);
}

body[data-theme="onyx-black"].page-photos .photo-footer {
  background: rgba(10, 14, 21, 0.9);
  border-top-color: rgba(164, 182, 205, 0.2);
}

body[data-theme="onyx-black"].page-photos .photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(18, 26, 38, 0.98), rgba(11, 17, 26, 0.94));
  --newsletter-border: rgba(164, 182, 205, 0.32);
  --newsletter-label: rgba(228, 237, 248, 0.82);
  --newsletter-input: rgba(241, 245, 251, 0.95);
  --newsletter-placeholder: rgba(197, 213, 232, 0.55);
  --newsletter-button-bg: rgba(127, 152, 180, 0.34);
  --newsletter-button-fg: #f1f5fb;
  --newsletter-shadow: 0 30px 50px rgba(1, 4, 8, 0.5);
  --newsletter-button-shadow: 0 18px 28px rgba(1, 4, 8, 0.45);
}

body[data-theme="jungle-green"].page-photos {
  color: #e8fff2;
}

body[data-theme="jungle-green"].page-photos .photo-hero,
body[data-theme="jungle-green"].page-photos .photo-album-bar,
body[data-theme="jungle-green"].page-photos .album,
body[data-theme="jungle-green"].page-photos .photo-tile,
body[data-theme="jungle-green"].page-photos .album__tile {
  background: rgba(14, 44, 30, 0.84);
  border-color: rgba(115, 204, 156, 0.24);
  box-shadow: 0 20px 34px rgba(3, 14, 10, 0.45);
}

body[data-theme="jungle-green"].page-photos .photo-hero p,
body[data-theme="jungle-green"].page-photos .filter-controls label,
body[data-theme="jungle-green"].page-photos .album__meta p,
body[data-theme="jungle-green"].page-photos .photo-tile {
  color: rgba(224, 250, 236, 0.84);
}

body[data-theme="jungle-green"].page-photos .filter-controls select,
body[data-theme="jungle-green"].page-photos .filter-controls input,
body[data-theme="jungle-green"].page-photos .hero-cta--ghost,
body[data-theme="jungle-green"].page-photos .album-page-btn {
  color: #e8fff2;
  background: rgba(10, 33, 22, 0.86);
  border-color: rgba(115, 204, 156, 0.3);
}

body[data-theme="jungle-green"].page-photos .hero-cta--primary,
body[data-theme="jungle-green"].page-photos .album-button.active {
  background: rgba(74, 196, 127, 0.32);
  border-color: rgba(97, 224, 161, 0.46);
}

body[data-theme="jungle-green"].page-photos .photo-footer {
  background: rgba(9, 30, 20, 0.9);
  border-top-color: rgba(115, 204, 156, 0.22);
}

body[data-theme="jungle-green"].page-photos .photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(16, 51, 35, 0.96), rgba(10, 33, 22, 0.92));
  --newsletter-border: rgba(115, 204, 156, 0.32);
  --newsletter-label: rgba(219, 247, 232, 0.82);
  --newsletter-input: rgba(232, 255, 242, 0.96);
  --newsletter-placeholder: rgba(170, 231, 200, 0.58);
  --newsletter-button-bg: rgba(74, 196, 127, 0.36);
  --newsletter-button-fg: #e8fff2;
  --newsletter-shadow: 0 30px 50px rgba(2, 12, 8, 0.46);
  --newsletter-button-shadow: 0 18px 28px rgba(2, 12, 8, 0.42);
}

body[data-theme="sunset-glow"].page-photos .photo-main {
  --newsletter-bg: linear-gradient(180deg, rgba(255, 242, 230, 1), rgba(255, 220, 191, 0.94));
  --newsletter-border: rgba(166, 86, 51, 0.2);
  --newsletter-label: rgba(83, 47, 30, 0.78);
  --newsletter-input: rgba(61, 34, 22, 0.92);
  --newsletter-placeholder: rgba(121, 66, 40, 0.5);
  --newsletter-button-bg: rgba(186, 95, 51, 0.94);
  --newsletter-button-fg: #fff5ef;
  --newsletter-shadow: 0 35px 60px rgba(140, 72, 33, 0.14);
  --newsletter-button-shadow: 0 20px 30px rgba(128, 62, 26, 0.24);
}

.photo-hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--ivory);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 30px 50px rgba(29, 39, 48, 0.07);
}

.photo-hero h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.25em;
}

.title-link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.photo-hero p {
  color: rgba(29, 39, 48, 0.8);
  max-width: 520px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hero-cta {
  border-radius: 999px;
  border: 1px solid var(--dark-leather);
  background: transparent;
  color: var(--dark-leather);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  padding: 0.6rem 1.6rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-cta--primary {
  background: var(--dark-leather);
  color: #fff;
  border-color: var(--dark-leather);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 15px 30px rgba(29, 39, 48, 0.25);
}

.hero-cta--ghost {
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark-leather);
}

.photo-album-bar {
  position: sticky;
  top: 72px;
  z-index: 15;
  background: rgba(253, 252, 248, 0.93);
  padding: 1rem 2.25rem;
  border-radius: 1.2rem;
  box-shadow: 0 20px 40px rgba(29, 39, 48, 0.05);
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.album-buttons {
  display: flex;
  gap: 0.9rem;
  flex-wrap: nowrap;
  padding: 0 0.3rem;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.album-buttons-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.album-page-btn {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--dark-leather) 35%, transparent);
  background: color-mix(in srgb, var(--ivory-deep) 78%, transparent);
  color: color-mix(in srgb, var(--dark-leather) 86%, #fff 14%);
  padding: 0.45rem 0.95rem;
  letter-spacing: 0.28em;
  font-size: 0.62rem;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.album-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.album-button {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--dark-leather) 38%, transparent);
  background: color-mix(in srgb, var(--ivory-deep) 80%, transparent);
  color: color-mix(in srgb, var(--dark-leather) 88%, #fff 12%);
  padding: 0.5rem 1.4rem;
  letter-spacing: 0.3em;
  font-size: 0.65rem;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
}

.album-button.active {
  border-color: var(--dark-leather);
  background: var(--dark-leather);
  color: #fff;
}

.filter-controls {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  flex-wrap: nowrap;
  margin-left: auto;
  justify-content: flex-end;
}

.filter-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 0.4rem;
  color: rgba(45, 39, 35, 0.7);
}

.filter-controls select,
.filter-controls input {
  border-radius: 0.9rem;
  border: 1px solid rgba(45, 39, 35, 0.2);
  background: #fff;
  padding: 0.65rem 1rem;
  min-width: 140px;
}

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

.photo-featured-gap {
  grid-column: 1 / -1;
  height: 0.9rem;
}

.photo-grid.inactive {
  display: none;
}

.photo-tile {
  height: auto;
  min-height: 0;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid rgba(45, 39, 35, 0.12);
  box-shadow: 0 20px 35px rgba(29, 39, 48, 0.06);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  color: rgba(45, 39, 35, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.4em;
}

.photo-tile.placeholder::after {
  content: "coming soon";
  font-size: 0.75rem;
  pointer-events: none;
}

.photo-tile.placeholder {
  min-height: 260px;
  padding: 0.5rem 0.9rem;
}

.photo-tile--image {
  overflow: hidden;
  align-items: flex-start;
  justify-content: flex-start;
  background: transparent;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--dark-leather) 34%, transparent);
  padding: 0;
}

.photo-tile--image img {
  width: 100%;
  height: auto;
  object-fit: initial;
  object-position: initial;
  border-radius: 0;
  display: block;
  background: transparent;
}

.album-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.album-stream.inactive {
  display: none;
}

.album {
  background: var(--ivory-deep);
  padding: 1.3rem 1.5rem;
  border-radius: 1.2rem;
  box-shadow: inset 0 0 0 1px rgba(45, 39, 35, 0.05);
}

.album.active {
  border-color: rgba(45, 39, 35, 0.25);
  box-shadow: 0 25px 40px rgba(29, 39, 48, 0.08);
}

.album__meta h3 {
  margin: 0;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.album__meta p {
  margin: 0.5rem 0 0;
  color: rgba(29, 39, 48, 0.7);
}

.album__gallery {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.album__tile {
  height: 160px;
  border-radius: 0.8rem;
  background: #fff;
  border: 1px solid rgba(45, 39, 35, 0.1);
}

.album.inactive {
  display: none;
}

.photo-footer {
  padding: 2rem 5vw 5rem;
  background: #fdfbf5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(29, 39, 48, 0.08);
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-newsletter {
  width: min(520px, 100%);
  max-width: 640px;
  margin-bottom: 0;
}

.hero-newsletter {
  width: min(520px, 100%);
  background: var(--newsletter-bg);
  border-radius: 999px;
  border: 1px solid var(--newsletter-border);
  padding: 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), var(--newsletter-shadow);
}

.hero-newsletter__form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
}

.hero-newsletter__label {
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--newsletter-label);
  flex-shrink: 0;
}

.hero-newsletter input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  color: var(--newsletter-input);
  padding: 0.35rem 0.8rem;
}

.hero-newsletter input::placeholder {
  color: var(--newsletter-placeholder);
}

.hero-newsletter button {
  border-radius: 999px;
  border: none;
  background: var(--newsletter-button-bg);
  color: var(--newsletter-button-fg);
  padding: 0.45rem 1.8rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 0.72rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--newsletter-button-shadow);
  cursor: pointer;
}

.hero-newsletter button:hover {
  transform: translateY(-1px);
  box-shadow: 0 25px 35px rgba(0, 0, 0, 0.3);
}

.photo-footer__row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: min(300px, 100%);
}

.photo-footer__row p {
  margin: 0;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.photo-footer button {
  margin-left: auto;
}

@media (max-width: 900px) {
  .photo-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .photo-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .filter-controls {
    flex-direction: column;
    width: 100%;
    margin-left: 0;
  }

  .hero-caption,
  .photo-hero p {
    margin-inline: auto;
  }

  .photo-grid,
  .album__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-ctas {
    justify-content: center;
  }

  .photo-album-bar {
    top: 120px;
    padding: 1rem;
    flex-wrap: wrap;
  }

  .album-buttons {
    justify-content: center;
    width: auto;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .album-buttons-wrap {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer-newsletter {
    margin-inline: auto;
  }

  .photo-footer {
    justify-content: center;
    text-align: center;
  }

  .photo-footer__row {
    justify-content: center;
  }

  .photo-footer button {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .photo-main {
    margin-top: 148px;
    gap: 1.35rem;
    padding-bottom: calc(7.2rem + env(safe-area-inset-bottom));
  }

  .photo-hero {
    padding: 1.45rem 1rem;
    border-radius: 1.1rem;
  }

  .photo-hero h1 {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .hero-ctas {
    width: 100%;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .photo-album-bar {
    position: static;
    border-radius: 1rem;
  }

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

  .hero-newsletter {
    border-radius: 1rem;
  }

  .hero-newsletter__form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.8rem;
  }

  .hero-newsletter__label {
    text-align: center;
  }

  .hero-newsletter button {
    width: 100%;
  }
}
