/* ============================================================
   LETTERS OF REFERENCE — the Adept page only.
   Three cards: who vouched, how they knew the proprietor, and
   where the letter itself is kept. Colours and type come from
   styles.css, so the alternate palette carries through.
   ============================================================ */

.refs { margin: 64px 0 0; }

.refs-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--oxblood);
  text-align: center;
  margin: 0 0 8px;
}

.refs-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 0.10em;
  line-height: 1.15;
  color: var(--ink);
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 10px;
}

.refs-lede {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.refs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* The card: a calling card with a double rule and a tab on its top edge. */
.ref-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 22px 22px;
  background: var(--paper-bright);
  border: 1px solid var(--gold-deep);
  text-align: center;
}
.ref-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.ref-card > * { position: relative; }

.ref-tab {
  position: absolute !important;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 2px 12px;
  background: var(--paper);
  border: 1px solid var(--gold-deep);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--oxblood);
  white-space: nowrap;
}

.ref-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 8px;
}

.ref-role {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  line-height: 1.8;
  text-transform: uppercase;
  color: var(--oxblood);
  margin: 0 0 16px;
}

.ref-gist {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 16px;
}

.ref-quote {
  margin: 0 0 16px;
  padding: 14px 4px 0;
  border-top: 1px dotted var(--gold-deep);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
}

/* Pinned to the foot of the card, so the three line up whatever the length above. */
.ref-filed {
  margin: auto 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  line-height: 2;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ref-filed a,
.refs-more a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--gold-deep);
  transition: color 200ms ease, border-color 200ms ease;
}
.ref-filed a:hover,
.ref-filed a:focus-visible,
.refs-more a:hover,
.refs-more a:focus-visible {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
}

.refs-more {
  max-width: 600px;
  margin: 30px auto 0;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* Tablet and phone: one card to a row. */
@media (max-width: 860px) {
  .refs-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
    margin: 0 auto;
    gap: 30px;
  }
}
@media (max-width: 560px) {
  .refs-title { font-size: 26px; letter-spacing: 0.08em; }
  .ref-name { font-size: 24px; }
  .ref-tab { letter-spacing: 0.26em; }
}

@media (prefers-reduced-motion: reduce) {
  .ref-filed a,
  .refs-more a { transition: none; }
}
