/*
 * The Marriage Board, introduced: /marriage-board and each member's page (2026-10-12).
 *
 * A card per member — portrait, role, name, temple, their words — in a grid that is one column
 * on a phone, two from 40rem and three from 64rem. The name is the only link and its box is
 * stretched over the card, so the whole card opens the page and is announced once.
 *
 * Tokens only, like every stylesheet here.
 */

.board-empty {
  max-width: 40rem;
  margin: 0 auto var(--space-16);
  padding: var(--space-8);
  text-align: center;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--brand-accent-200);
  border-radius: var(--radius-2xl);
}

.board-grid {
  display: grid;
  gap: clamp(var(--space-5), 3vw, var(--space-8));
  margin: 0 0 clamp(var(--space-12), 6vw, var(--space-20));
  padding: 0;
  list-style: none;
}

/* Up to three to a row, and centred: a Board of one or two does not sit at the left with
   empty columns beside it. */
@media (min-width: 40rem) {
  .board-grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem));
    justify-content: center;
  }
}

.board-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-1);
  transition:
    box-shadow var(--duration-base) var(--ease-out),
    translate var(--duration-base) var(--ease-out);
}

@media (hover: hover) {
  .board-card:hover {
    translate: 0 -3px;
    box-shadow: var(--shadow-3);
  }

  .board-card:hover .board-card__photo img {
    scale: 1.03;
  }
}

.board-card:focus-within {
  outline: 2px solid var(--brand-primary-800);
  outline-offset: 3px;
}

.board-card__photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-band-blush), var(--brand-accent-200));
}

.board-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: scale 600ms var(--ease-out);
}

/* No photograph yet: their initials, large, in the display face. */
.board-card__initials {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 8vw, var(--text-4xl));
  letter-spacing: var(--tracking-wide);
  color: var(--brand-secondary-700);
}

.board-card__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-6) var(--space-6);
}

.board-card__role {
  margin: 0;
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--brand-accent-600);
}

.board-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
}

.board-card__name a {
  color: inherit;
  text-decoration: none;
}

/* The link's box covers the card: the whole card opens the page. */
.board-card__name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.board-card__name a:focus-visible {
  outline: none;
}

.board-card__temple {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.board-card__temple svg {
  flex-shrink: 0;
  margin-top: 0.15em;
  color: var(--brand-primary-800);
}

.board-card__quote {
  display: -webkit-box;
  margin: var(--space-2) 0 0;
  padding-left: var(--space-4);
  overflow: hidden;
  border-left: 2px solid var(--brand-accent-500);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-snug);
  color: var(--text-secondary);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.board-card__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--brand-primary-800);
}

/* ------------------------------------------------------------ a member's page */

.board-crumbs {
  justify-content: flex-start;
  margin-top: clamp(var(--space-6), 4vw, var(--space-10));
}

.board-member {
  display: grid;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: start;
  margin-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}

@media (min-width: 52rem) {
  .board-member {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  /* The portrait stays in view beside a long page. */
  .board-member__photo {
    position: sticky;
    top: calc(var(--site-header-h, var(--layout-header-h)) + var(--space-6));
  }
}

.board-member__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  max-width: 28rem;
  width: 100%;
  margin-inline: auto;
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg-band-blush), var(--brand-accent-200));
  border: 1px solid var(--brand-accent-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2);
}

.board-member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.board-member__text .eyebrow {
  margin-bottom: var(--space-2);
}

.board-member__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  color: var(--text-primary);
}

.board-member__temple {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
}

.board-member__quote {
  margin: var(--space-8) 0 0;
  padding: var(--space-6) var(--space-6) var(--space-5);
  background: var(--glass-bg);
  border: 1px solid var(--brand-accent-200);
  border-left: 3px solid var(--brand-accent-500);
  border-radius: var(--radius-xl);
}

.board-member__quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(var(--text-lg), 2.4vw, var(--text-2xl));
  font-style: italic;
  line-height: var(--leading-snug);
  color: var(--text-primary);
  white-space: pre-line;
}

.board-member__quote figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}

.board-member__quote figcaption::before {
  content: '— ';
}

.board-member__section {
  margin-top: var(--space-10);
}

.board-member__section h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--brand-secondary-700);
}

.board-member__section p {
  margin: 0 0 var(--space-4);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

.board-member__list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-member__list li {
  position: relative;
  padding-left: var(--space-6);
  line-height: var(--leading-snug);
  color: var(--text-secondary);
}

/* A small gold lotus-petal mark rather than a bullet. */
.board-member__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.6em;
  height: 0.6em;
  rotate: 45deg;
  background: var(--brand-accent-500);
  border-radius: 0 var(--radius-full) 0 var(--radius-full);
}

.board-member__back {
  margin-top: var(--space-10);
}

.board-others {
  padding-top: clamp(var(--space-8), 5vw, var(--space-12));
  border-top: 1px solid var(--border-subtle);
}

.board-others h2 {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--brand-secondary-700);
}

/* The others, under a member's page: a small portrait beside the name, not three more
   full-size cards to scroll past. */
.board-grid--small {
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.board-grid--small .board-card {
  flex-direction: row;
  align-items: center;
}

.board-grid--small .board-card__photo {
  flex: 0 0 5.5rem;
  align-self: stretch;
  aspect-ratio: auto;
  min-height: 6.5rem;
}

.board-grid--small .board-card__initials {
  font-size: var(--text-2xl);
}

.board-grid--small .board-card__text {
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
}

.board-grid--small .board-card__name {
  font-size: var(--text-xl);
}

@media (prefers-reduced-motion: reduce) {
  .board-card,
  .board-card__photo img {
    transition: none;
  }
}
