:root {
  --bg: #f3f5f8;
  --paper: #ffffff;
  --ink: #17191d;
  --muted: #5e646c;
  --accent: #2c3036;
  --max: 1152px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(900px 520px at 88% 0%, rgba(210, 222, 236, 0.55), transparent 60%),
    radial-gradient(700px 420px at 8% 18%, rgba(232, 236, 242, 0.9), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: Figtree, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wrap {
  width: min(var(--max), calc(100% - 64px));
  margin-inline: auto;
}

.kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.appbar {
  position: fixed;
  z-index: 30;
  inset: 16px 0 auto;
}

.appbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 4px 30px rgba(23, 25, 29, 0.07),
    0 1px 2px rgba(23, 25, 29, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.logo {
  font-family: 'Source Serif 4', serif;
  font-size: 26px;
  letter-spacing: 0.12em;
}

.intro {
  max-width: 52ch;
  padding: 140px 0 24px;
}

.intro h1 {
  margin: 14px 0 18px;
  font-size: clamp(44px, 5.6vw, 72px);
}

.intro p {
  color: var(--muted);
  font-size: 17px;
}

section {
  padding: 64px 0 88px;
}

.catalog-section {
  padding: 0 0 88px;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.catalog-item {
  overflow: hidden;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(23, 25, 29, 0.08);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.catalog-item:hover {
  box-shadow: 0 8px 24px rgba(23, 25, 29, 0.1);
  transform: translateY(-1px);
}

.catalog-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.catalog-media {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #fff;
}

.catalog-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-label {
  padding: 10px 8px 12px;
  border-top: 1px solid rgba(23, 25, 29, 0.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
  background: rgba(17, 19, 29, 0.96);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(920px, 100%);
  max-height: 100%;
}

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

.lightbox-caption {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.16);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.grid-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.grid-head h2 {
  font-size: 44px;
}

.grid-head p {
  max-width: 28ch;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.item {
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(23, 25, 29, 0.04);
}

a.item {
  display: block;
}

.item-media {
  aspect-ratio: 4 / 5;
  background: #d8dbe0;
}

.item-body {
  padding: 18px 18px 20px;
}

.item-body h3 {
  margin: 6px 0 4px;
  font-size: 22px;
}

.item-body p {
  color: var(--muted);
  font-size: 14px;
}

.item-media-play {
  position: relative;
}

.item-media-play::after {
  content: '';
  position: absolute;
  inset: auto 14px 14px auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(23, 25, 29, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 4px 16px rgba(23, 25, 29, 0.2);
}

.item-media-play::before {
  content: '';
  position: absolute;
  inset: auto 27px 27px auto;
  z-index: 1;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
}

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pagination-btn {
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(23, 25, 29, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: rgba(23, 25, 29, 0.28);
}

.pagination-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  min-width: 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.cta-band {
  padding: 72px 0;
  background: #17191d;
  color: #fff;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-band .kicker {
  color: rgba(255, 255, 255, 0.55);
}

.cta-band h2 {
  max-width: 16ch;
  margin: 10px 0 0;
  font-size: clamp(32px, 4vw, 48px);
}

.cta-band .btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--ink);
}

footer {
  padding: 56px 0 28px;
  background: #17191d;
  color: rgba(255, 255, 255, 0.68);
}

.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

footer .logo,
footer h3 {
  color: #fff;
}

footer h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

footer a:hover {
  color: #fff;
}

.copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .wrap {
    width: min(var(--max), calc(100% - 24px));
  }

  .intro {
    padding-top: 120px;
  }

  .catalog {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .grid-head {
    flex-direction: column;
    align-items: start;
  }

  .grid-head p {
    text-align: left;
  }

  .cta,
  .copy {
    flex-direction: column;
    align-items: start;
  }

  .foot {
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 64px 16px 24px;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }
}
