/**
 * Base Styles
 *
 * Element defaults, legacy utility classes, and small global components that
 * theme.json can't express. Loaded on the front end (StyleManager) and in the
 * editor (FontLoader's add_editor_style) for parity.
 */

::selection {
  background-color: rgba(142, 205, 222, 0.3);
}

html {
  font-size: 100%;
}

/* Keeps focused and anchored elements clear of the sticky header. The
 * header's own controls are left out: they are never behind it, and an
 * offset on them would scroll the page each time one takes focus. */
:where(.wp-site-blocks > :not(header) *) {
  scroll-margin-block-start: var(--alumni-sticky-header-offset, 0);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  display: flex;
  flex-direction: column;
  /* The admin bar sets its height custom property when present; without
     it the fallback keeps the full-viewport minimum. */
  min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
  overflow-x: clip;
  width: 100%;
  margin: 0;
  color: #000;
}

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.wp-site-blocks > main {
  flex-grow: 1;
}

img {
  display: block;
}

embed,
object,
img {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

a,
button,
input {
  transition:
    color 0.3s,
    background 0.3s;
}

ol {
  margin: 0 0 1.5em 0;
  list-style: decimal;
}

ul {
  list-style: disc;
}

li > ul,
li > ol {
  margin-bottom: 0;
  margin-left: 1.5em;
}

dt {
  font-weight: bold;
}

dd {
  margin: 0 1.5em 1.5em;
}

/* Screen reader utilities */
.screen-reader-text,
.sr-only {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}

.screen-reader-text:focus,
.sr-only:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
}

/* In the editor, a selected sr-only block reveals itself with a badge
   so editors understand the element is intentionally invisible rather
   than broken or deletable. The is-selected state only exists on the
   editor canvas, so these rules are inert on the frontend; base.css is
   already in the add_editor_style list. */
/* .is-selected is Gutenberg core's own block-selection state class,
 * applied to any selected block's wrapper. */
/* stylelint-disable selector-max-class */
.editor-styles-wrapper .sr-only.is-selected,
.editor-styles-wrapper .screen-reader-text.is-selected {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  margin: 0;
  padding: 0.25rem 0.5rem;
  overflow: visible;
  position: static;
  outline: 1px dashed var(--wp--preset--color--gray-500, #888);
  outline-offset: 2px;
  opacity: 0.6;
}

.editor-styles-wrapper .sr-only.is-selected::before,
.editor-styles-wrapper .screen-reader-text.is-selected::before {
  content: "Hidden on the page. Still read to screen reader users and visible to search engines.";
  display: block;
  width: fit-content;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--wp--preset--color--gray-900, #333);
  color: var(--wp--preset--color--white, #fff);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
/* stylelint-enable selector-max-class */

/* ==========================================================================
   Legacy utility classes — used by pre-block content
   ========================================================================== */

.placeholder {
  display: none;
}

.no-pointer-events {
  pointer-events: none;
}

.center {
  text-align: center;
  justify-content: center;
}

.center img {
  display: inline-block;
}

.center.wp-block-image {
  display: inline;
}

.outline {
  padding: 1rem;
  border: 1px solid var(--wp--preset--color--gray-200);
}

.sponsor {
  padding: 1rem;
  display: block;
  margin-bottom: 1rem;
  box-shadow: 0 0.05rem 0.125rem rgba(0, 0, 0, 0.2);
}

.margin-top-0 {
  margin-top: 0;
}

.margin-top-1 {
  margin-top: 1rem;
}

.margin-top-2 {
  margin-top: 2rem;
}

.margin-bottom-0 {
  margin-bottom: 0;
}

.margin-bottom-half {
  margin-bottom: 0.5rem;
}

.margin-bottom-1 {
  margin-bottom: 1rem;
}

.margin-bottom-2 {
  margin-bottom: 2rem;
}

.hanging-indent {
  margin-left: 1.5rem;
  text-indent: -1.5rem;
}

.alert {
  padding: 1.5rem;
  background: var(--wp--preset--color--gray-50);
  border-left: 0.25rem solid var(--wp--preset--color--alert);
}

.note {
  padding: 1.5rem;
  background: var(--wp--preset--color--gray-50);
  border-left: 0.25rem solid var(--wp--preset--color--gold);
}

.panel {
  --panel-rule: var(--wp--preset--color--gray-300);

  background: var(--wp--preset--color--gray-100);
  padding: 1.5rem;
}

/* These match core's own markup inside legacy panel content (the group,
   spacer, paragraph and social-links blocks an editor saved), so they name
   core's classes; the panel itself is zero-specificity. */
/* stylelint-disable selector-max-class */

/* A panel's "Connect with …" label and its social icons form the card's
   foot: one centered row, ruled off from the description, the label set
   small beside the icons rather than as a bold line above them. */
:where(.panel) > .wp-block-group:has(> .wp-block-social-links) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
  margin-block-start: var(--wp--preset--spacing--40);
  padding-block-start: var(--wp--preset--spacing--40);
  border-block-start: 1px solid var(--panel-rule);
}

:where(.panel) > .wp-block-group:has(> .wp-block-social-links) > :where(.wp-block-spacer) {
  display: none;
}

:where(.panel) > .wp-block-group:has(> .wp-block-social-links) > :where(p) {
  margin: 0;
  font-size: var(--wp--preset--font-size--small);
}

:where(.panel) > .wp-block-group:has(> .wp-block-social-links) > :where(p) :where(strong) {
  font-weight: 700;
}

:where(.panel) > .wp-block-group:has(> .wp-block-social-links) > .wp-block-social-links {
  margin: 0;
}
/* stylelint-enable selector-max-class */

/* ==========================================================================
   Global components — background images / pseudo-element content
   ========================================================================== */

a.alumni-logo {
  text-indent: -1000rem;
  background-image: url(../images/uscaa-logo-gold-light.svg);
  background-repeat: no-repeat;
  background-size: 92%;
  background-position: 0 0;
  display: block;
  width: 15rem;
  height: 3.5rem;
}

body.header-apaa a.alumni-logo {
  background-image: url(../images/uscapaa-logo.svg);
  width: 18rem;
  height: 4.2rem;
}

body.header-baa a.alumni-logo {
  background-image: url(../images/uscbaa-logo.svg);
}

body.header-laa a.alumni-logo {
  background-image: url(../images/usclaa-logo.svg);
  width: 18rem;
  height: 4.2rem;
}

body.header-lambda a.alumni-logo {
  background-image: url(../images/usclambda-logo.svg);
  width: 18rem;
  height: 4.2rem;
}

/* Misc menu pipe separators */
@media (min-width: 40em) {
  ul.misc li {
    display: inline-block;
  }

  ul.misc li::before {
    content: "|";
    content: "|" / "";
    margin-inline: var(--wp--preset--spacing--10);
  }

  ul.misc li:first-child::before {
    display: none;
  }
}

/* Raw video iframes pasted outside embed blocks keep a responsive 16:9
   box; embed blocks carry their own aspect wrappers. */
.entry-content :not(.wp-block-embed__wrapper) > iframe[src*="youtube.com"],
.entry-content :not(.wp-block-embed__wrapper) > iframe[src*="youtube-nocookie.com"],
.entry-content :not(.wp-block-embed__wrapper) > iframe[src*="player.vimeo.com"] {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Person profile template: meta-bound paragraphs render empty when a
   person lacks the field; empty ones take no space. */
.person-band-position:empty,
.person-band-contact:empty,
.person-band-education:empty {
  display: none;
}

/* Shared contact and person icon masks; consumers set mask-image from
   these and color via background. */
:root {
  --alumni-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  --alumni-icon-email: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
  --alumni-icon-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E");
  --alumni-icon-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
  --alumni-icon-map-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  --alumni-icon-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --alumni-icon-person: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* Person contact buttons: bound links with an icon marking the
   channel; buttons whose bound values are empty take no space. */
.person-band-contacts .wp-block-button__link::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  vertical-align: -0.125em;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

/* Forced colors would repaint the icon's background as the page color,
   hiding it; paint it the system link color instead. */
@media (forced-colors: active) {
  .person-band-contacts .wp-block-button__link::before {
    forced-color-adjust: none;
    background: LinkText;
  }
}

.person-contact-phone .wp-block-button__link::before {
  mask-image: var(--alumni-icon-phone);
  -webkit-mask-image: var(--alumni-icon-phone);
}

.person-contact-email .wp-block-button__link::before {
  mask-image: var(--alumni-icon-email);
  -webkit-mask-image: var(--alumni-icon-email);
}

.person-contact-web .wp-block-button__link::before {
  mask-image: var(--alumni-icon-globe);
  -webkit-mask-image: var(--alumni-icon-globe);
}

.person-band-contacts .wp-block-button__link:empty,
.person-band-contacts .wp-block-button__link:not([href]),
.person-band-contacts .wp-block-button__link[href=""] {
  display: none;
}

/* The contact "buttons" exist only because core/button is the block
   whose link can be bound; visually they are plain iconed links.
   .wp-element-button is core's own generated class. */
/* stylelint-disable selector-max-class */
.person-band-contacts .wp-block-button__link,
.person-band-contacts .wp-block-button__link.wp-element-button {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  color: var(--wp--preset--color--cardinal, #900);
  text-align: left;
  text-decoration: none;
}
/* stylelint-enable selector-max-class */

.person-band-contacts .wp-block-button__link:hover,
.person-band-contacts .wp-block-button__link:focus {
  color: var(--wp--preset--color--cardinal-light, #c00);
  text-decoration: underline;
  background: none;
}

/* Person profile band: badge chip, and contact links legible on the
   cardinal band. */
.person-band-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--wp--preset--color--gold, #fc0);
  color: var(--wp--preset--color--black, #000);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* .person-band is the profile page's title band; .person-band-contacts
 * its nested buttons group (templates/single-people.html) — both halves
 * are load-bearing for this specific context. */
/* stylelint-disable selector-max-class */
.person-band .person-band-contacts .wp-block-button__link {
  color: var(--wp--preset--color--white, #fff);
}

.person-band .person-band-contacts .wp-block-button__link:hover,
.person-band .person-band-contacts .wp-block-button__link:focus {
  color: var(--wp--preset--color--gold, #fc0);
}
/* stylelint-enable selector-max-class */

.person-band .person-band-education {
  color: var(--wp--preset--color--gray-100, #eee);
}

/* Header cluster rhythm: the column's uniform gap covers the stack;
   the contact group and education step slightly further off the
   position line, and the title holds no margins of its own. */
.person-band h1 {
  margin: 0;
  line-height: 1.05;
}

.person-band .person-band-position {
  margin: 0;
}

.person-band .person-band-contacts {
  margin-top: var(--wp--preset--spacing--40, 1rem);
}

.person-band .person-band-education {
  margin-top: var(--wp--preset--spacing--30, 0.75rem);
}

/* Missing profile data, template-level placeholders: a silhouette
   where the photo would sit, and an empty-state line where the
   biography would flow. The blocks themselves stay show/hide. */
.person-band-photo:not(:has(img)):not(:has(.wp-block-post-featured-image))::before {
  content: "";
  display: block;
  aspect-ratio: 1;
  border-radius: 12px;
  background-color: rgb(255 255 255 / 0.14);
}

.person-band-photo:not(:has(img)):not(:has(.wp-block-post-featured-image)) {
  position: relative;
}

/* Square headshot crops anchor to the top of the frame; faces sit in
   the upper half of portrait photos. */
.person-band-photo img {
  object-position: top;
}

.person-band-photo:not(:has(img)):not(:has(.wp-block-post-featured-image))::after {
  content: "";
  position: absolute;
  inset: 15%;
  background: rgb(255 255 255 / 0.5);
  mask-image: var(--alumni-icon-person);
  -webkit-mask-image: var(--alumni-icon-person);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.person-band-badge:empty {
  display: none;
}

.single-people .person-bio-placeholder {
  position: relative;
  max-width: 32rem;
  margin: var(--wp--preset--spacing--60, 2rem) 0;
  padding: var(--wp--preset--spacing--70, 3rem) var(--wp--preset--spacing--60, 2rem)
    var(--wp--preset--spacing--60, 2rem);
  text-align: center;
  color: var(--wp--preset--color--gray-700, #666);
  background: var(--wp--preset--color--gray-50, #f4f4f4);
  border: 1px dashed var(--wp--preset--color--gray-300, #ccc);
  border-radius: 12px;
}

.single-people .person-bio-placeholder::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto var(--wp--preset--spacing--40, 1rem);
  background: var(--wp--preset--color--gray-300, #ccc);
  mask-image: var(--alumni-icon-person);
  -webkit-mask-image: var(--alumni-icon-person);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.single-people .person-bio-placeholder p {
  margin: 0 0 var(--wp--preset--spacing--20, 0.5rem);
}

/* Icon labels: rows migrated from Stackable icon-labels; the shared
   masks draw the glyph in cardinal beside the label text. */
.alumni-icon-label::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  vertical-align: -0.125em;
  background: var(--wp--preset--color--cardinal, #900);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.alumni-icon-label--clock::before {
  mask-image: var(--alumni-icon-clock);
  -webkit-mask-image: var(--alumni-icon-clock);
}

.alumni-icon-label--map-pin::before {
  mask-image: var(--alumni-icon-map-pin);
  -webkit-mask-image: var(--alumni-icon-map-pin);
}

.alumni-icon-label--chevron-down::before {
  mask-image: var(--alumni-icon-chevron-down);
  -webkit-mask-image: var(--alumni-icon-chevron-down);
}

/* Timeline items migrated from Stackable: a cardinal rail with a dot
   per item, replacing the plugin's centered line. */
.alumni-timeline-item {
  position: relative;
  padding-left: var(--wp--preset--spacing--60, 2rem);
  border-left: 3px solid var(--wp--preset--color--cardinal, #900);
  padding-bottom: var(--wp--preset--spacing--50, 1.5rem);
}

.alumni-timeline-item::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 0.35rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: var(--wp--preset--color--gold, #fc0);
  border: 3px solid var(--wp--preset--color--cardinal, #900);
}

/* Progress meters migrated from Stackable: the fill width rides the
   --alumni-progress custom property the markup carries. */
.alumni-progress {
  height: 1rem;
  border-radius: 4px;
  background: var(--wp--preset--color--gray-100, #eee);
  overflow: hidden;
}

.alumni-progress::before {
  content: "";
  display: block;
  height: 100%;
  width: var(--alumni-progress, 0%);
  border-radius: 4px;
  background: var(--wp--preset--color--gold, #fc0);
}
