:root {
  --color-background: #f5f4fa;
  --color-surface: rgba(255, 255, 255, 0.85);
  --color-surface-solid: #ffffff;
  --color-primary: #bdb5d5;
  --color-primary-dark: #9f96b9;
  --color-accent: #e4e0f4;
  --color-text: #2d2a44;
  --color-text-light: rgba(45, 42, 68, 0.72);
  --color-border: rgba(189, 181, 213, 0.4);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-light: 0 12px 30px rgba(0, 0, 0, 0.08);
  --max-width: 1200px;
  --transition-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: 240ms var(--transition-ease);
  --transition-slow: 600ms var(--transition-ease);
  --radius-large: 24px;
  --radius-medium: 18px;
  --radius-small: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Work Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--color-text);
  background: var(--color-background);
  min-height: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: clamp(2rem, 4vw, 5rem) clamp(1.5rem, 5vw, 3rem);
  background: linear-gradient(135deg, rgba(189, 181, 213, 0.6), rgba(228, 224, 244, 0.75)),
    url('assets/hero-texture.svg');
  background-size: cover;
  overflow: hidden;
  isolation: isolate;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: min(var(--max-width), 48rem);
  text-align: center;
  padding: clamp(2rem, 5vw, 4rem);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-large);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.hero__title {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  margin: 0 0 1rem;
}

.hero__subtitle {
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 40ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.button:focus-visible {
  outline: 3px solid rgba(193, 122, 107, 0.5);
  outline-offset: 4px;
}

.button--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-light);
}

.button--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(189, 181, 213, 0.45);
}

.button--ghost:hover {
  border-color: rgba(159, 150, 185, 0.7);
  transform: translateY(-2px);
}

.main {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 6vw, 3rem);
}

.filters {
  margin: 0 auto clamp(3rem, 5vw, 4.5rem);
  max-width: var(--max-width);
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-large);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-light);
}

.filters__heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.filters__heading h2 {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0;
}

.filters__summary {
  margin: 0;
  color: var(--color-text-light);
}

.filters__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters__buttons button {
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.filters__buttons button[aria-pressed='true'] {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-light);
}

.filters__buttons button:hover {
  transform: translateY(-1px);
}

.highlights {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: var(--max-width);
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.highlights[hidden] {
  display: none;
}

.highlight {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: var(--color-surface);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-light);
  display: grid;
  grid-template-rows: 180px auto;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.highlight:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.highlight--active {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(45, 42, 68, 0.18);
  border: 1px solid rgba(189, 181, 213, 0.8);
}

.highlight--active .highlight__cta {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
}

.highlight__cover {
  background: linear-gradient(135deg, rgba(189, 181, 213, 0.55), rgba(228, 224, 244, 0.65));
}

.highlight__details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight__title {
  margin: 0;
  font-family: 'Playfair Display', 'Times New Roman', serif;
}

.highlight__meta {
  margin: 0;
  color: var(--color-text-light);
}

.highlight__cta {
  align-self: flex-start;
}

.gallery {
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(1.2rem, 4vw, 2rem);
}

.gallery__empty {
  margin: 4rem auto;
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 2rem;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(189, 181, 213, 0.3);
}

.card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-medium);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-light);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  contain: layout style paint;
  content-visibility: auto;
}

.card__image-wrapper {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base), opacity var(--transition-base), filter var(--transition-base);
  opacity: 1;
  will-change: transform;
  content-visibility: auto;
}

.card:hover .card__image {
  transform: scale(1.04);
}

.card__image--loading {
  opacity: 0.3;
  filter: blur(12px);
}

.card__image--loaded {
  opacity: 1;
  filter: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.card__actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1.25rem;
}

.footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-light);
  background: rgba(189, 181, 213, 0.15);
  margin-top: clamp(4rem, 8vw, 6rem);
  display: grid;
  gap: 0.5rem;
}

.footer__download {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.gallery__locked {
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.2rem;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(189, 181, 213, 0.3);
}

.gallery__pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--color-surface);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.pagination__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pagination__btn {
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base);
}

.pagination__btn:hover:not(:disabled) {
  background: var(--color-accent);
  transform: translateY(-1px);
}

.pagination__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination__info {
  color: var(--color-text);
  font-weight: 500;
}

.pagination__size {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pagination__select {
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: var(--color-surface-solid);
  font-weight: 500;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: clamp(1rem, 5vw, 4rem);
  z-index: 1000;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__content {
  position: relative;
  max-width: min(900px, 100%);
  width: 100%;
  background: #fff;
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-soft);
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

.lightbox__close:hover {
  background: rgba(0, 0, 0, 0.14);
}

.lightbox__content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-small);
  margin-bottom: 1rem;
}

.lightbox__actions {
  display: flex;
  justify-content: flex-end;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes softGlow {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__overlay {
    animation: softGlow 6s ease-in-out infinite alternate;
  }

  .hero__content {
    animation: fadeInUp 0.9s var(--transition-ease) both;
  }

  .filters {
    animation: fadeInUp 1.05s var(--transition-ease) 0.08s both;
  }

  .highlights .highlight {
    animation: fadeInUp 0.85s var(--transition-ease) both;
  }

  .highlights .highlight:nth-of-type(2) {
    animation-delay: 0.12s;
  }

  .highlights .highlight:nth-of-type(3) {
    animation-delay: 0.18s;
  }

  .gallery__grid {
    animation: fadeIn 0.7s var(--transition-ease) 0.1s both;
  }

  .gallery__grid .card {
    animation: fadeInUp 0.7s var(--transition-ease) both;
  }

  .gallery__grid .card:nth-child(2n) {
    animation-delay: 0.1s;
  }

  .gallery__grid .card:nth-child(3n) {
    animation-delay: 0.15s;
  }

  .gallery__grid .card:nth-child(4n) {
    animation-delay: 0.22s;
  }

  .footer {
    animation: fadeIn 1s var(--transition-ease) 0.2s both;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
  }

  .filters__heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .card__actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .lightbox {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero__content {
    padding: 1.6rem;
  }

  .filters,
  .card,
  .highlight,
  .gallery__empty {
    border-radius: var(--radius-small);
  }

  .gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
