/* Trainer and benefits panels. */
:is(.trainer-cover, .goals-section) {
  --panel-paper: #fffaf4;
  --panel-muted: #ede3d9;
  --panel-ink: #202523;
  --panel-rule: rgb(255 250 244 / 36%);
  --panel-surface: rgb(22 27 25 / 93%);
  --panel-focus: #ffdc8e;
  color: var(--panel-paper);
  color-scheme: dark;
}

.trainer-cover {
  --trainer-top: clamp(1.75rem, 4.2vw, 4rem);
  --trainer-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-block: var(--trainer-top) var(--trainer-bottom);
  background: linear-gradient(to bottom,
    var(--panel-night), #37332e 35%, #51483f 55%, #867766 77%, var(--panel-sand));
}

.trainer-cover .hero {
  width: min(calc(100% - 2 * var(--u)), 82rem);
  min-height: calc(92svh - var(--trainer-top) - var(--trainer-bottom));
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  padding: 0;
}

.trainer-cover .location {
  color: var(--panel-muted);
}

.trainer-cover #trainer-heading,
.goals-section #goals-heading {
  font-size: clamp(3rem, 5.8vw, 6.1rem);
  font-weight: 650;
  line-height: .95;
  letter-spacing: -.07em;
  text-wrap: balance;
}

.trainer-cover #trainer-heading {
  margin: .7rem 0 1rem;
}

.trainer-cover .lead {
  max-width: 35ch;
  color: var(--panel-muted);
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.42;
}

.trainer-cover .coach-bio {
  border: 1px solid var(--panel-rule);
  background: var(--panel-surface);
  color: var(--panel-paper);
}

.trainer-cover .bio-content {
  border-color: var(--panel-rule);
}

.trainer-cover .bio-content dd {
  color: var(--panel-muted);
}

.trainer-cover .bio-content a:hover {
  color: var(--panel-focus);
}

.goals-section {
  --panel-muted: #39342e;
  --panel-rule: rgb(48 43 35 / 35%);
  --panel-focus: #284e44;
  --goals-fade: clamp(7rem, 11vw, 9.25rem);
  color-scheme: light;
  color: var(--panel-ink);
  background: linear-gradient(to bottom,
    var(--panel-sand), #eee5d7 50%, #bcae9c calc(100% - var(--goals-fade)),
    #726859 calc(100% - 4rem), #393933 calc(100% - 1.25rem), var(--panel-night));
  row-gap: clamp(2rem, 4vw, 3.5rem);
  min-height: 0;
  padding-top: clamp(2.75rem, 6.5vw, 6.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.goals-section .section-inner {
  width: min(100%, 82rem);
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
}

.goals-section #goals-heading {
  max-width: 11ch;
}

.goals-section .goals-list {
  gap: clamp(1rem, 2.3vw, 2.1rem) clamp(1.2rem, 2.8vw, 2.6rem);
}

.goals-section .goals-list details {
  min-width: 0;
  border-color: var(--panel-rule);
  padding-top: clamp(.85rem, 1.75vw, 1.35rem);
}

.goals-list summary {
  display: block;
  list-style: none;
  cursor: pointer;
  border-radius: .35rem;
}
.goals-list summary::-webkit-details-marker { display: none; }

.goals-section .goals-list h3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  font-size: clamp(1.4rem, 2.1vw, 2.3rem);
  font-weight: 650;
  text-wrap: pretty;
}

.goals-section .goals-list p {
  margin-bottom: 0;
  color: var(--panel-muted);
  font-size: clamp(1.1875rem, 1.65vw, 1.5rem);
  line-height: 1.5;
}

.goals-section > .coach-contact {
  justify-self: center;
  width: min(100%, 13.75rem);
  scroll-margin-top: 30svh;
}
:is(.trainer-cover, .goals-section) :focus-visible {
  outline-color: var(--panel-focus);
}

@media (max-width: 52rem) {
  .trainer-cover .hero,
  .goals-section .section-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .trainer-cover .hero {
    min-height: 0;
  }

  .trainer-cover #trainer-heading,
  .goals-section #goals-heading {
    max-width: none;
    font-size: clamp(2.45rem, 8.6vw, 4.6rem);
    text-wrap: pretty;
  }
}

.icon-definitions { position: absolute; pointer-events: none; }
.disclosure-arrow {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  position: relative;
  width: 3.1rem;
  height: 3.1rem;
  flex: none;
  padding: 0;
  border: 1px solid rgb(255 250 244 / 60%);
  border-radius: 50%;
  background: rgb(25 36 36 / 87%);
  color: var(--panel-paper);
}
.trainer-cover .bio-toggle[hidden] { display: none; }
.disclosure-arrow svg { width: 1.25rem; height: 1.25rem; }
.goals-list details[open] .disclosure-arrow svg { transform: rotate(180deg); }
.goals-list summary:hover .disclosure-arrow { background: #304343; }
@media (max-width: 30rem) {
  .disclosure-arrow { width: 2.85rem; height: 2.85rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .disclosure-arrow svg { transition: transform .22s ease; }
  .goals-list details:not([open]) .disclosure-arrow::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid currentColor;
    border-radius: inherit;
    pointer-events: none;
    animation: bio-pulse 3.2s ease-in-out infinite;
  }
  @keyframes bio-pulse {
    0%, 75%, 100% { transform: scale(1); opacity: 0; }
    35% { transform: scale(1.025); opacity: .23; }
    65% { transform: scale(1.14); opacity: 0; }
  }
}
