/*
 * ps-exec-style.css
 * Page-specific styles for City Executives and Officials (exec-team/index.html),
 * built on the new cp-*-root.dwt template. Replaces the old Executive Team
 * and City Officials (city_hall/city-officials.html) pages.
 *
 *   main-style.css   ->  site layout (section, subnav, eyebrow/title)
 *   grid-styles.css  ->  layout: .grid, .grid--center-x
 *   card-styles.css  ->  boxes: .card, .card__body, .card__title ...
 *   THIS FILE        ->  page-specific design.  Every class below is `ps-`.
 *
 * Contents:
 *   1. Page tokens (:root)        5. Bio dialogs
 *   2. Sub-nav tokens             6. Org chart band + buttons
 *   3. Photo hero                 7. Accessibility
 *   4. People cards
 */

/* ==========================================================================
   1. PAGE TOKENS  — City brand blue with gold accent
   --------------------------------------------------------------------------
   Text-bearing colors pass WCAG AA (4.5:1) on white.
   ========================================================================== */
:root {
  --ps-blue:     var(--brand-blue, #2e5a93);
  --ps-blue-dk:  #0e3a8c;
  --ps-gold:     var(--vims-accent, #f5a800);   /* decoration only on white */
  --ps-surface:  #f1f1f2;
  --ps-text:     var(--neutral-gray-dark, #4d515f);
  --ps-radius:   10px;

  --font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
  --font-body:    'Source Sans 3', 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   2. SUB-NAV TOKENS  (main-style.css .subnav reads these)
   ========================================================================== */
:root {
  --alert-text-muted: #4d515f;
  --alert-blue:       var(--ps-blue);
  --alert-red:        var(--ps-blue-dk);
  --alert-amber:      var(--ps-gold);
  --alert-transition: 0.2s ease;
}

/* In-page jump targets sit below the sticky sub-nav */
[id] { scroll-margin-top: 90px; }

.ps-intro { max-width: 840px; margin-bottom: 2.6rem; font-family: var(--font-body); font-size: 1.7rem; line-height: 1.65; color: var(--ps-text); }
.ps-intro a { text-decoration: underline; }

/* ==========================================================================
   3. PHOTO HERO  — title is live text over the blue City Hall photo
   ========================================================================== */
.ps-photo-hero {
  position: relative;
  display: block;
  padding: clamp(3rem, 5vw, 5.5rem) 0 clamp(3rem, 4.5vw, 4.5rem);
  background: var(--ps-blue-dk) url('../../departments/images/CityHall_Banner.jpg') center 40% / cover no-repeat;
  border-top: 3px solid var(--ps-gold);
  text-align: center;
}
/* Gradient scrim keeps white text above 4.5:1 on any part of the photo */
.ps-photo-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,28,70,0.55) 0%, rgba(8,28,70,0.82) 100%);
}
.ps-photo-hero .container { position: relative; }

.ps-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ps-gold);
  margin-bottom: 1.2rem;
}
.ps-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.8rem);
  font-weight: 700; line-height: 1.1;
  color: #fff; text-transform: uppercase;
  margin: 0 0 2rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.ps-hero-title span { display: block; color: #8fd3ff; }
.ps-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2vw, 2.1rem);
  font-weight: 500; line-height: 1.5;
  color: #fff;
  max-width: 900px;
  margin: 0 auto;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ==========================================================================
   4. PEOPLE CARDS  — portrait + name + role, in a centered grid
   --------------------------------------------------------------------------
   Capped track width so every card is the same size in every section and
   six fit across at desktop. auto-fit drops empty tracks, so
   .grid--center-x can center a short row (e.g. the two public safety chiefs).
   ========================================================================== */
.ps-people { grid-template-columns: repeat(auto-fit, minmax(170px, 190px)); gap: 2rem; }
@media (max-width: 480px) {
  .ps-people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
}

.ps-person {
  --card-accent: var(--ps-blue-dk);
  --card-pad: 1.2rem 0.6rem 0.8rem;
  gap: 0;
  min-width: 0;
  text-align: center;
}
.ps-person .card__img {
  height: auto;
  aspect-ratio: 4 / 5;
  object-position: top center;
  border-radius: calc(var(--ps-radius) - 4px);
  background: var(--ps-surface);
}
.ps-person .card__body { display: flex; flex-direction: column; align-items: center; }
.ps-person .card__eyebrow {
  order: 2;                 /* name reads first visually, role underneath */
  font-family: var(--font-body);
  font-size: 1.25rem; line-height: 1.35;
  color: var(--ps-text);
  margin: 0 0 1rem;
}
.ps-person .card__title {
  order: 1;
  font-family: var(--font-display);
  font-size: 1.8rem; line-height: 1.2;
  margin: 0 0 0.4rem;
}
.ps-person .card__body > :nth-child(n+3) { order: 3; }

/* "Read bio" — a real button styled as a pill */
.ps-bio-btn {
  margin: auto 0 0.8rem;    /* sits at the card bottom */
  padding: 0.6rem 1.1rem;
  height: auto;
  white-space: nowrap;
  border: 2px solid var(--ps-blue-dk);
  border-radius: 999px;
  background: #fff;
  color: var(--ps-blue-dk);
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  line-height: 1.2; text-transform: none; letter-spacing: 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ps-bio-btn:hover { background: var(--ps-blue-dk); color: #fff; }
.ps-bio-btn:focus-visible { outline: 3px solid var(--ps-gold); outline-offset: 3px; }

.ps-person .ps-person__dept {
  font-family: var(--font-body); font-size: 1.3rem; font-weight: 600;
  text-decoration: underline;
}

/* Council cards are whole-card links */
.ps-person__more {
  margin-top: auto;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  color: var(--ps-blue-dk);
}
.ps-person__more i { font-size: 1.1rem; margin-left: 0.3rem; transition: transform 0.2s ease; }
a.ps-person:hover .ps-person__more i { transform: translateX(3px); }
a.ps-person:focus-visible { outline: 3px solid var(--ps-gold); outline-offset: 3px; }

/* ==========================================================================
   5. BIO DIALOGS  (native <dialog>, opened with showModal())
   ========================================================================== */
.ps-bio {
  width: min(1000px, 92vw);
  max-width: none;
  max-height: 88vh;
  padding: 0;
  border: none;
  border-top: 5px solid var(--ps-gold);
  border-radius: var(--ps-radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow: hidden;
}
.ps-bio::backdrop { background: rgba(8,28,70,0.7); }

.ps-bio__inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  height: min(560px, calc(88vh - 5px));
}
.ps-bio__photo {
  width: 100%; height: 100%;
  min-height: 0;
  object-fit: cover; object-position: top center;
  background: var(--ps-surface);
}
.ps-bio__content {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: 2.4rem 2.8rem 0;
}
.ps-bio__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 44px; height: 44px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: var(--ps-surface); color: var(--ps-blue-dk);
  font-size: 2rem; line-height: 1;
  cursor: pointer;
}
.ps-bio__close:hover { background: var(--ps-blue-dk); color: #fff; }
.ps-bio__close:focus-visible { outline: 3px solid var(--ps-gold); outline-offset: 2px; }

.ps-bio__role {
  margin: 0 5rem 0.4rem 0;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ps-text);
}
.ps-bio__name {
  margin: 0 5rem 1.6rem 0;
  font-family: var(--font-display); font-size: clamp(2.6rem, 3vw, 3.4rem);
  font-weight: 700; line-height: 1.15;
  color: var(--ps-blue-dk);
}
.ps-bio__text {
  overflow-y: auto;
  padding: 0 1rem 2.4rem 0;
  font-family: var(--font-body);
}
.ps-bio__text p,
.ps-bio__text li { font-size: 1.6rem; line-height: 1.65; color: #23282f; }
.ps-bio__text ul { margin: 0 0 1.6rem 2rem; list-style: disc; }

@media (max-width: 760px) {
  .ps-bio__inner { grid-template-columns: 1fr; height: auto; max-height: calc(88vh - 5px); }
  .ps-bio__photo { display: none; }
  .ps-bio__content { padding: 2rem 1.8rem 0; }
}

/* ==========================================================================
   6. ORG CHART BAND + BUTTONS
   ========================================================================== */
.ps-contact-band { text-align: center; }
.ps-contact-band p { font-family: var(--font-body); font-size: 1.8rem; color: #fff; margin-bottom: 1.6rem; }

.ps-btn,
.bk-blue a.ps-btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 1.1rem 1.8rem;
  background: var(--ps-gold); color: #0e1e46;
  border-radius: 8px;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}
.ps-btn:visited,
.bk-blue a.ps-btn:visited { color: #0e1e46; }
.ps-btn:hover,
.bk-blue a.ps-btn:hover { background: #fff; color: #0e1e46; text-decoration: none; }
.ps-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ==========================================================================
   7. ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .ps-person, .ps-person__more i, .ps-bio-btn { transition: none; }
  .ps-person:hover { transform: none; }
}
