/* ==========================================================================
   About page (about.html)
   Page head, the collective accordions, people cards, and the join panel.
   The bio pop-up itself lives in components/modal.css.
   ========================================================================== */

/* ----------------------------------------------------------- page head --- */

.page-head {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3.5rem, 11vh, 6rem));
  padding-bottom: clamp(2.2rem, 6vh, 4rem);
  border-bottom: 1px solid var(--line-soft);
}

.page-head__title {
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 0.96;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 120;
  margin-top: 0.5rem;
}

/* Ready for the About strapline, not in the markup yet */
.page-head__sub {
  max-width: 54ch;
  margin-top: 1.5rem;
  font-size: var(--step-lead);
  color: var(--ink-mid);
}

/* ------------------------------------------------ collective accordions --- */

.group {
  border-top: 1px solid var(--line);
}

.group:last-of-type { border-bottom: 1px solid var(--line); }

.group__summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0.2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.group__summary::-webkit-details-marker { display: none; }

.group__summary:hover .group__name { color: var(--ember-text); }

.group__name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 28, "WONK" 1, "opsz" 48;
  transition: color 0.25s var(--ease);
}

.group__count {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.group__chevron {
  margin-left: auto;
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--ink-mid);
  transition: transform 0.3s var(--ease);
}

.group[open] .group__chevron { transform: rotate(180deg); }

.group__panel { padding: 0.2rem 0 2.2rem; }

/* --------------------------------------------------------- people cards --- */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
}

.person {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}

@media (hover: hover) {
  .person:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -30px rgba(20, 20, 20, 0.75);
  }

  .person:hover .person__media img { transform: scale(1.045); }
  .person:hover .person__more { color: var(--ember-text); transform: translateX(3px); }
}

.person__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-3);
}

.person__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.7s var(--ease);
}

.person__skill {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 1;
  pointer-events: none;
  max-width: calc(100% - 1.4rem);
  padding: 0.32rem 0.6rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.35;
}

.person__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.95rem 1rem 1.05rem;
}

.person__name {
  font-size: 1.18rem;
  font-variation-settings: "SOFT" 24, "WONK" 1, "opsz" 30;
}

/* "Read bio" button. Hidden without JavaScript, where the bio shows inline.
   Its ::after stretches over the whole card so the card is the hit area. */
.person__trigger {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}

.js .person__trigger { display: inline-flex; }

.js .person .person__trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.person__more {
  flex: none;
  width: 17px;
  height: 17px;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

/* Focus ring moves from the button to the whole card where :has() works */
.person__trigger:focus-visible { outline: 2px solid var(--ember-text); outline-offset: 3px; }

.person:has(.person__trigger:focus-visible) {
  outline: 2px solid var(--ember-text);
  outline-offset: 3px;
}

.person:has(.person__trigger:focus-visible) .person__trigger:focus-visible { outline: none; }

/* The bio block. Hidden in the card once JavaScript can show it in the
   dialog. The .person in the middle stops this matching the copy cloned
   into the dialog. .no-dialog is set by about.js when <dialog> is missing. */
.js .person .person__detail { display: none; }

.no-dialog .person .person__detail { display: block; }
.no-dialog .person__trigger { display: none; }

.person__detail { padding: 0 1rem 1.15rem; }

.person__bio { color: var(--ink-mid); font-size: 0.95rem; }
.person__bio p + p { margin-top: 0.9em; }

.person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.3rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.person__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink-mid);
  transition: color 0.25s var(--ease);
}

.person__link:hover { color: var(--ember-text); }
.person__link svg { width: 16px; height: 16px; flex: none; }

@media (max-width: 420px) {
  .people { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ find out --- */

.join {
  padding: clamp(2rem, 5vw, 3rem);
  text-align: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.join h2 { font-size: clamp(1.55rem, 3.3vw, 2.2rem); margin-bottom: 0.85rem; }
.join p { max-width: 48ch; margin-inline: auto; color: var(--ink-mid); }
.join .btn { margin-top: 1.6rem; }
