/* ==========================================================================
   Salzamt – Bedienstete (team.html)
   Personnel register: three staff cards, an Organigramm tree, closing note.
   Relies on the shared design system in style.css; everything here is
   prefixed with .team-.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */

.team-roster__head {
  margin: 0 0 2.5rem;
}

.team-roster__head h1 {
  margin-bottom: 0.35em;
}

.team-roster__intro {
  max-width: 46rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Staff cards
   -------------------------------------------------------------------------- */

.team-grid {
  align-items: stretch;
}

.team-member {
  position: relative;
}

.team-member__photo {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem 0;
}

.team-member__body {
  text-align: center;
  padding-top: 1.25rem;
}

.team-member__name {
  font-size: 1.65rem;
  margin: 0;
}

.team-member__function {
  font-variant: small-caps;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--burgundy);
  line-height: 1.3;
}

.team-member__unit {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* Facts: stacked label/value rows separated by gold hairlines */

.team-facts {
  margin: 0.75rem 0 0;
  text-align: left;
  border-top: 1px solid var(--gold-2);
}

.team-facts > div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gold-2);
}

.team-facts dt {
  font-family: var(--font-type);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.1rem;
}

.team-facts dd {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
}

.team-member__motto {
  margin-top: auto;
  padding-top: 1rem;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Organigramm (nested list drawn as a tree)
   -------------------------------------------------------------------------- */

.team-org-section {
  padding-top: 0;
}

.team-org-section__title {
  margin-bottom: 1.25rem;
}

.team-org,
.team-org ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.team-org {
  --team-org-indent: 1.75rem;
  --team-org-tick: 1.25rem;
  --team-org-row: 0.3rem;
  --team-org-line-y: calc(var(--team-org-row) + 0.8em);
  max-width: 46rem;
  margin: 0 0 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--salt);
  border: 1px solid var(--gold);
  box-shadow: var(--shadow);
}

.team-org ul {
  margin: var(--team-org-row) 0 0 0.9rem;
}

.team-org li {
  position: relative;
  padding: var(--team-org-row) 0;
  line-height: 1.55;
}

.team-org ul > li {
  padding-left: var(--team-org-indent);
}

/* horizontal tick from the branch line to the label */
.team-org ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--team-org-line-y);
  width: var(--team-org-tick);
  height: 2px;
  background: var(--gold);
}

/* vertical branch line; the last item's line stops at its tick */
.team-org ul > li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
}

.team-org ul > li:last-child::after {
  bottom: auto;
  height: calc(var(--team-org-line-y) + 2px);
}

.team-org__unit {
  font-variant: small-caps;
  letter-spacing: 0.04em;
  font-size: 1.08rem;
  color: var(--ink);
}

.team-org__unit--root {
  font-family: var(--font-display);
  font-variant: normal;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
}

.team-org__who {
  font-family: var(--font-type);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--burgundy);
  white-space: nowrap;
}

.team-org__who--vacant {
  color: var(--ink-2);
}

.team-org > li > .team-org__who {
  display: block;
  white-space: normal;
  margin-top: 0.15rem;
}

/* --------------------------------------------------------------------------
   Closing note
   -------------------------------------------------------------------------- */

.team-closing {
  max-width: 40rem;
  margin-inline: auto;
}

.team-closing__note {
  font-family: var(--font-type);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .team-org {
    --team-org-indent: 1.25rem;
    --team-org-tick: 0.9rem;
    padding: 1.1rem 1rem;
  }

  .team-org ul {
    margin-left: 0.5rem;
  }

  .team-org__who {
    white-space: normal;
  }

  .team-org__unit--root {
    font-size: 1.4rem;
  }
}
