/* ===========================================================
   Partner Catalogue — page-specific styles
   Inherits tokens, nav, footer, buttons from styles.css
   =========================================================== */

/* ---------- Page header ---------- */
.cat-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-deep);
  color: #fff;
  padding: clamp(120px, 16vh, 190px) 0 clamp(52px, 7vw, 86px);
}
.cat-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.cat-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.9;
}
.cat-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 880px;
}
.cat-eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--yellow);
}
.cat-hero h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.cat-hero p {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  max-width: 60ch;
}
.cat-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 56px);
  margin-top: 14px;
  padding-top: 26px;
  border-top: 1px solid var(--rule-dark);
}
.cat-hero-stat .n {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 38px);
  color: #fff;
  line-height: 1;
}
.cat-hero-stat .l {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Sticky A–Z bar ---------- */
.az-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 252, 253, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.az-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  flex-wrap: wrap;
}
.az-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.6;
  flex: none;
}
.az-track {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  flex: 1 1 auto;
}
.az-letter {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  letter-spacing: 0;
}
.az-letter:hover:not(:disabled) {
  background: var(--paper-warm);
}
.az-letter.is-active {
  background: var(--navy-deep);
  color: var(--yellow);
}
.az-letter:disabled {
  color: var(--navy);
  opacity: 0.22;
  cursor: default;
}
.az-reset {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--navy);
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  flex: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.az-reset:hover {
  background: var(--navy-deep);
  color: #fff;
  border-color: var(--navy-deep);
}

/* ---------- Catalogue body ---------- */
.cat-body {
  background: var(--paper);
  padding: clamp(40px, 6vw, 76px) 0 clamp(64px, 9vw, 120px);
}
.cat-count {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--navy);
  opacity: 0.6;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.cat-count strong { color: var(--blue-deep); opacity: 1; }

/* Letter group */
.letter-group {
  margin-bottom: clamp(20px, 3vw, 40px);
}
.letter-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(16px, 2vw, 26px);
}
.letter-head .ch {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  color: var(--blue);
}
.letter-head .rl {
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
}

/* Entry card */
.entry {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(24px, 3vw, 52px);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 44px);
  margin-bottom: 20px;
  scroll-margin-top: 92px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.entry.is-flash {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}
.entry:hover {
  box-shadow: 0 26px 60px -38px rgba(5, 60, 88, 0.5);
  border-color: #d6e6ef;
}

.entry-aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.entry-logo {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  aspect-ratio: 5 / 3.2;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 18px;
}
.entry-logo img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.entry-meta > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.entry-meta dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.5;
}
.entry-meta dd {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.entry-meta dd a {
  color: var(--blue-deep);
  text-decoration: none;
  word-break: break-word;
}
.entry-meta dd a:hover { text-decoration: underline; }

.entry-body {
  min-width: 0;
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.entry-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 7px 14px;
}
.entry-kind::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.kind-partner {
  color: var(--blue-deep);
  background: var(--paper-warm);
}
.kind-sponsor {
  color: #8a5a00;
  background: var(--yellow-soft);
}
.entry-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.62;
}
.entry-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(23px, 2.6vw, 32px);
  line-height: 1.08;
  color: var(--navy-deep);
  letter-spacing: -0.005em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.entry-text p {
  font-size: clamp(15px, 1.45vw, 16.5px);
  line-height: 1.72;
  color: var(--ink);
  margin-bottom: 14px;
  text-wrap: pretty;
}
.entry-text p:last-child { margin-bottom: 0; }
.entry-text h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--navy-deep);
  margin: 20px 0 6px;
}

/* Empty state */
.cat-empty {
  display: none;
  text-align: center;
  padding: clamp(50px, 8vw, 90px) 0;
  color: var(--navy);
}
.cat-empty.show { display: block; }
.cat-empty h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  color: var(--navy-deep);
  margin-bottom: 8px;
}
.cat-empty p { opacity: 0.65; }

.entry[hidden] { display: none; }
.letter-group[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .entry-aside {
    flex-direction: column;
  }
  .entry-logo {
    max-width: 240px;
    aspect-ratio: 5 / 3;
  }
  .az-label { display: none; }
}

/* ---------- Clickable partner cards on home page ---------- */
a.thanks-card {
  position: relative;
  text-decoration: none;
  cursor: pointer;
}
a.thanks-card::after {
  content: "View profile →";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy-deep);
  padding: 7px 10px;
  border-radius: 0 0 8px 8px;
  text-align: center;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
a.thanks-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Cross-browser fallbacks (older iOS Safari without aspect-ratio) ===== */
@supports not (aspect-ratio: 1 / 1) {
  .entry-logo { min-height: 150px; }
  .thanks-card { min-height: 120px; }
}

