:root {
  --navy: #031a2b;
  --navy-deep: #00101d;
  --gold: #d79739;
  --gold-bright: #f0b95e;
  --gold-dim: #8f5c21;
  --cream: #f3e6ce;
  --parchment: #f2e8d5;
  --ink: #10263a;
}

html {
  background: var(--navy-deep);
}

body {
  color: var(--ink);
  font-family: "Libre Caslon Text", Georgia, serif;
}

a {
  color: inherit;
}

.catalog-page {
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 18% 20%, rgba(139, 93, 43, 0.055) 0 1px, transparent 1px),
    radial-gradient(circle at 82% 68%, rgba(139, 93, 43, 0.04) 0 1px, transparent 1px);
  background-size: 12px 14px, 18px 21px;
}

.catalog-inner {
  width: min(1420px, 100%);
  margin: 0 auto;
}

.catalog-intro {
  padding: clamp(48px, 6vw, 78px) 4vw 30px;
}

.catalog-intro h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.35rem, 5.8vw, 5.8rem);
  font-weight: 600;
  line-height: 0.95;
}

.catalog-intro__kicker {
  margin: 0 0 8px;
  color: #a16e24;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-intro p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #1c3047;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.62;
}

.catalog-intro__note {
  color: #4b3b2a;
  font-style: italic;
}

.catalog-ornament {
  display: flex;
  align-items: center;
  width: 150px;
  margin-top: 16px;
  color: var(--gold);
}

.catalog-ornament::before,
.catalog-ornament::after {
  flex: 1;
  height: 1px;
  background: var(--gold);
  content: "";
}

.catalog-ornament span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  margin: 0 7px;
  transform: rotate(45deg);
}

.catalog-browser {
  padding: 0 4vw clamp(44px, 6vw, 72px);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(161, 110, 36, 0.48);
  padding-top: 28px;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.catalog-filters label,
.catalog-reset {
  display: inline-flex;
  align-items: center;
}

.catalog-filters label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.catalog-filters select,
.catalog-reset {
  border-right: 1px solid rgba(161, 110, 36, 0.34);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  padding: 13px 22px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
}

.catalog-reset {
  border-left: 1px solid rgba(161, 110, 36, 0.34);
}

.catalog-filters select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, #a16e24 50%), linear-gradient(135deg, #a16e24 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.catalog-filters select:first-child {
  border-left: 1px solid rgba(161, 110, 36, 0.34);
}

.catalog-reset.is-active {
  border-color: var(--navy-deep);
  background: var(--navy-deep);
  color: var(--gold-bright);
}

.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
}

.catalog-controls label,
.view-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.catalog-controls select,
.view-toggle button {
  border: 1px solid rgba(161, 110, 36, 0.5);
  background: rgba(252, 247, 236, 0.72);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  padding: 8px 10px;
}

.catalog-card[hidden] {
  display: none;
}

.view-toggle button {
  display: grid;
  width: 42px;
  height: 38px;
  place-items: center;
  font-size: 1.1rem;
}

.view-toggle button.is-active {
  background: var(--navy-deep);
  color: var(--gold-bright);
}

.catalog-count {
  margin: 22px 0 18px;
  color: #1c3047;
  font-size: 0.95rem;
}

.publication-catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(16px, 1.6vw, 22px);
}

.catalog-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid rgba(161, 110, 36, 0.42);
  border-radius: 4px;
  background: rgba(252, 247, 236, 0.58);
  padding: 14px;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.catalog-card:hover,
.catalog-card:focus-within {
  border-color: rgba(161, 110, 36, 0.86);
  box-shadow: 0 7px 18px rgba(16, 38, 58, 0.1);
}

.catalog-card img,
.catalog-cover-placeholder {
  display: block;
  width: 100%;
  height: 205px;
  margin: 0 auto 14px;
  border: 1px solid rgba(161, 110, 36, 0.32);
  object-fit: contain;
  object-position: center;
}

.catalog-cover-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(2, 22, 37, 0.96), rgba(4, 31, 52, 0.94)),
    url("../images/hero-bg-texture.png");
  color: var(--gold-bright);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-cover-placeholder--green {
  background:
    linear-gradient(rgba(8, 42, 35, 0.96), rgba(12, 56, 43, 0.94)),
    url("../images/hero-bg-texture.png");
}

.catalog-cover-placeholder--brown {
  background:
    linear-gradient(rgba(58, 38, 22, 0.96), rgba(75, 48, 26, 0.94)),
    url("../images/hero-bg-texture.png");
}

.catalog-cover-placeholder--tan {
  background: linear-gradient(#d8c49b, #b99b66);
  color: var(--ink);
}

.catalog-cover-placeholder--red {
  background:
    linear-gradient(rgba(71, 23, 22, 0.96), rgba(92, 34, 30, 0.94)),
    url("../images/hero-bg-texture.png");
}

.catalog-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.18rem, 1.25vw, 1.45rem);
  font-weight: 700;
  line-height: 1.06;
}

.catalog-card p,
.catalog-card time {
  color: #1c3047;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  line-height: 1.15;
}

.catalog-card p {
  margin: 6px 0 0;
}

.catalog-card time {
  display: block;
  margin: 4px 0 12px;
  font-weight: 700;
}

.catalog-card a {
  display: inline-flex;
  justify-content: center;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(161, 110, 36, 0.46);
  color: #a16e24;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  padding: 7px 8px;
  text-decoration: none;
  text-transform: uppercase;
}

.catalog-card a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.catalog-card a:focus-visible {
  outline: 2px solid #a16e24;
  outline-offset: -3px;
}

.catalog-card a span {
  transition: transform 160ms ease;
}

.catalog-card a:hover span,
.catalog-card a:focus-visible span {
  transform: translateX(3px);
}

.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 34px;
}

.catalog-pagination > button,
.catalog-pagination > a,
.catalog-pagination > span {
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(161, 110, 36, 0.42);
  background: rgba(252, 247, 236, 0.58);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.catalog-pagination > button:last-child,
.catalog-pagination > a:last-child {
  min-width: 78px;
}

.catalog-pagination button.is-active,
.catalog-pagination a.is-active {
  background: var(--navy-deep);
  color: var(--gold-bright);
}

@media (max-width: 1180px) {
  .publication-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .catalog-intro {
    text-align: center;
  }

  .catalog-ornament {
    margin-right: auto;
    margin-left: auto;
  }

  .catalog-filters,
  .catalog-controls {
    width: 100%;
  }

  .catalog-filters label,
  .catalog-reset {
    flex: 1 1 50%;
  }

  .catalog-filters select,
  .catalog-reset {
    width: 100%;
    border: 1px solid rgba(161, 110, 36, 0.34);
    text-align: center;
  }

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

  .catalog-card img,
  .catalog-cover-placeholder {
    height: 190px;
  }
}

@media (max-width: 460px) {
  .publication-catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    width: min(280px, 100%);
    margin: 0 auto;
  }
}
