/* ==========================================================================
   Breakwater Wealth Partners — Home page
   Built from Figma file "BW Site V1" (node 222:2)
   ========================================================================== */

/* ---- Fonts --------------------------------------------------------------
   Lastik (display) and Acumin Pro (body) are the fonts used in the Figma
   file. Font files were not available to export from Figma, so:
   1. @font-face below points at /assets/fonts/ — drop the real files there
      (see assets/fonts/README.txt) and they'll be picked up automatically.
   2. Until then, the browser falls through to the fallback stacks, which
      were chosen to be a close visual match (Playfair Display for the
      serif display headlines, Source Sans 3 for body copy).
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@400;600;700&display=swap');

@font-face {
  font-family: 'Lastik';
  src: url('../fonts/Lastik-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Acumin Pro';
  src: url('../fonts/AcuminPro-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Acumin Pro';
  src: url('../fonts/AcuminPro-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Colors */
  --navy-900: #052348;
  --teal-900: #084c61;
  --teal-line: #114c62;
  --teal-400: #75abbc;
  --teal-300: #78aabc;
  --sky-100: #dcf7ff;
  --white: #ffffff;

  /* Typography */
  --font-display: 'Lastik', 'Playfair Display', Georgia, serif;
  --font-body: 'Acumin Pro', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container-max: 93.5rem; /* 1496px content width */
  --container-pad: clamp(1.25rem, 4vw, 3.25rem);
  --radius-pill: 40px;
  --radius-card: 10px;
  --radius-img: 9px;

  --section-pad-y: clamp(3rem, 6vw, 7.5rem);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }

body {
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---- Reusable components --------------------------------------------------*/

.eyebrow-pill {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 1rem 0.3125rem;
  border-radius: var(--radius-pill);
  background: var(--teal-900);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--teal-900);
  transition: gap 0.2s ease, opacity 0.2s ease;
}
.text-link svg { flex-shrink: 0; transition: transform 0.2s ease; }
.text-link:hover { gap: 0.75rem; }
.text-link:hover svg { transform: translateX(2px); }
.text-link--on-dark { color: var(--white); }

.section-eyebrow-heading {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy-900);
  line-height: 1.14;
}
.section-eyebrow-heading--on-dark { color: var(--white); }
.section-eyebrow-heading--lg { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.section-eyebrow-heading--md { font-size: clamp(2rem, 3.4vw, 3rem); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.8125rem 1.25rem 0.6875rem;
  border-radius: var(--radius-pill);
  background: var(--teal-900);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: var(--navy-900); }
.btn:active { transform: scale(0.98); }

.site-header.is-open .btn {
  background: var(--white);
  color: var(--teal-900);
}
.site-header.is-open .btn:hover { background: var(--teal-400); }

/* ==========================================================================
   Header / Nav (sits over the hero)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding-block: clamp(1.25rem, 3vw, 3.375rem);
  background: transparent;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, padding-block 0.25s ease;
}

.site-header--scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(5, 35, 72, 0.08);
  padding-block: 0.75rem;
}

.site-header--scrolled .site-logo { width: clamp(7rem, 10vw, 11rem); }

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: block;
  width: clamp(9.5rem, 14vw, 17.4375rem);
  flex-shrink: 0;
  transition: width 0.25s ease;
}
.site-logo img { width: 100%; height: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 4.375rem);
}

.site-nav__link {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  white-space: nowrap;
}
.site-nav__link:hover { opacity: 0.8; }

.site-nav__link--active { color: var(--teal-400); }

.site-header--scrolled:not(.is-open) .site-nav__link { color: var(--teal-900); }
.site-header--scrolled:not(.is-open) .site-nav__link--active { color: var(--teal-400); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 30;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.site-header--scrolled:not(.is-open) .nav-toggle span { background: var(--teal-900); }

/* Services/About page heroes are a plain teal background (not a photo), so
   the normal teal-on-teal button has no contrast until the header scrolls
   to its white background — invert it for that initial state only. */
.page-services .site-header:not(.site-header--scrolled) .btn,
.page-about .site-header:not(.site-header--scrolled) .btn,
.page-resources .site-header:not(.site-header--scrolled) .btn,
.page-contact .site-header:not(.site-header--scrolled) .btn {
  background: var(--white);
  color: var(--teal-900);
}
.page-services .site-header:not(.site-header--scrolled) .btn:hover,
.page-about .site-header:not(.site-header--scrolled) .btn:hover,
.page-resources .site-header:not(.site-header--scrolled) .btn:hover,
.page-contact .site-header:not(.site-header--scrolled) .btn:hover {
  background: var(--sky-100);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 56.25rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-900);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 35, 72, 0.05) 0%, rgba(5, 35, 72, 0.35) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(6rem, 14vw, 9.5rem) clamp(3rem, 8vw, 6.25rem);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.625rem);
  max-width: 41.375rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 5.75rem);
  line-height: 1.02;
  color: var(--white);
  display: flex;
  flex-direction: column;
}

@media (max-width: 733px) {
  /* Below this width the headline's own clamp is pinned at its 2.75rem
     floor, which is too large for "to " + the longest cycling term
     (e.g. "Retirement Planning") to fit on one line without wrapping
     mid-term. Scale down with viewport width instead so the term always
     stays intact. At 733px this matches the unclamped value exactly, so
     there's no visible jump at the breakpoint. */
  .hero__headline {
    font-size: clamp(1.65rem, 9vw, 2.75rem);
  }
}
.hero__headline-static {
  display: block;
}

.hero__headline-line2 {
  display: block;
}

.hero__headline-cycle {
  display: inline;
  white-space: nowrap;
  transform-origin: left center;
  color: var(--teal-400);
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}
.hero__headline-cycle.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero__headline-cycle.is-final {
  transition-duration: 0.45s;
}
.hero__headline-cycle.is-final.is-visible {
  /* Scale rather than change font-size — a font-size change recomputes the
     line's baseline/ascent (shifting "to" and the whole line vertically
     even with a fixed-height container); a transform is purely visual and
     never touches layout. */
  transform: translateY(0) scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .hero__headline-cycle {
    transition: none;
  }
}

.hero__subtext {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--white);
  max-width: 33rem;
}

/* ==========================================================================
   Stats band (Block 1)
   ========================================================================== */

.stats {
  position: relative;
  background: var(--teal-900);
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5.875rem);
}

.stats__pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 51%;
  pointer-events: none;
}

.stats__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 8.125rem);
}
@media (min-width: 1025px) {
  .stats__row { align-items: flex-start; }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Text-only stat: same height as the big numbers so it centers against them */
.stat__value--text {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(3rem, 7vw, 7rem);
  max-width: 14ch;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  line-height: 1.1;
}

.stat__label {
  font-size: 1.25rem;
  color: var(--teal-400);
}
.stat__sub {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--teal-400);
  opacity: 0.85;
}

.stat__divider {
  width: 3px;
  align-self: stretch;
  background: var(--teal-400);
  min-height: 6rem;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 5.875rem);
  align-items: center;
}

.services__intro {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.services__intro p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 30rem;
}

.services__card {
  background: #f8f8f8;
  border-radius: var(--radius-card);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.accordion-item {
  border-bottom: 1px solid var(--teal-400);
}
.accordion-item:last-child { border-bottom: 0; }

.accordion-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  text-align: left;
}
.accordion-item:first-child .accordion-item__trigger { padding-top: 0; }

.accordion-item__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--navy-900);
}

.accordion-item__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-900);
}
.accordion-item__icon-vbar {
  transform-origin: 8px 8px;
  transition: transform 0.25s ease;
}
.accordion-item.is-open .accordion-item__icon-vbar { transform: scaleY(0); }

.accordion-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.accordion-item.is-open .accordion-item__panel {
  grid-template-rows: 1fr;
}

.accordion-item__panel-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 30rem;
}
.accordion-item__panel-inner p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
}
.accordion-item.is-open .accordion-item__panel-inner { padding-bottom: 1.5rem; }

/* ==========================================================================
   Photo band (Block 3)
   ========================================================================== */

.photo-band {
  height: clamp(10rem, 24vw, 22.6875rem);
  overflow: hidden;
}
.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Who We Are / About
   ========================================================================== */

.about {
  position: relative;
  padding-block: var(--section-pad-y);
  background: var(--white);
  overflow: hidden;
}

.about__pattern {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
.about__pattern--radial {
  top: -18%;
  right: -12%;
  width: 55%;
  max-width: 45rem;
}
.about__pattern--bottom-left {
  bottom: 0;
  left: -6%;
  width: 50%;
  max-width: 40rem;
}
.about__pattern--waves {
  bottom: -8%;
  left: -22%;
  width: 55%;
  max-width: 45rem;
}

.about__intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6.125rem);
  align-items: center;
  margin-bottom: clamp(4.5rem, 11vw, 12rem);
}

.about__media {
  position: relative;
}
.about__media img {
  border-radius: var(--radius-img);
}
.about__media-primary-wrap {
  position: relative;
  width: 60%;
}
.about__media-primary {
  width: 100%;
  aspect-ratio: 552.8 / 691;
  object-fit: cover;
}
.about__media-secondary {
  position: absolute;
  left: 69.1%;
  top: 53.4%;
  width: 54.3%;
  aspect-ratio: 300 / 400;
  object-fit: cover;
  box-shadow: 0 1.5rem 3rem rgba(5, 35, 72, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .about__media-primary,
  .about__media-secondary {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .about__media-secondary { transition-delay: 0.15s; }

  .about__media.is-visible .about__media-primary,
  .about__media.is-visible .about__media-secondary {
    opacity: 1;
    transform: translateY(0);
  }
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.about__copy p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 36rem;
}

.team-section {
  position: relative;
  z-index: 1;
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.team-section__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.team-section__intro .eyebrow-pill {
  align-self: center;
}
.team-section__intro p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
}

.advisors-section .team-section__intro { max-width: 70rem; }
.advisors-section .team-section__intro p { max-width: 46rem; }

.text-accent {
  color: var(--teal-400);
}

/* ---- Team card grid (About page — every member, always expandable) ------ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

/* ---- Team card (shared by grid and carousel) ----------------------------- */

.team-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1 / 1;
}

.team-card__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Resting state: a rounded rectangle inset 1rem (16px) from the bottom/left/
   right edges, sized to just the name/role bar. Clicking the trigger (adds
   .is-open) expands it to inset:0 (flush with the card's own edges) — the
   card itself never changes size, only this rectangle grows to fill it. */
.team-card__overlay {
  position: absolute;
  z-index: 1;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  top: calc(100% - 7rem);
  border-radius: 6px;
  background: rgba(8, 76, 97, 0.92);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: top 0.35s ease, left 0.35s ease, right 0.35s ease, bottom 0.35s ease;
}
.team-card.is-open .team-card__overlay {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.team-card__trigger {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.25rem 1rem;
  text-align: left;
}

.team-card__thumb {
  width: 0;
  height: 0;
  border-radius: 6px;
  object-fit: cover;
  opacity: 0;
  flex-shrink: 0;
  transition: width 0.35s ease, height 0.35s ease, opacity 0.2s ease;
}
.team-card.is-open .team-card__thumb {
  width: 3.5rem;
  height: 3.5rem;
  opacity: 1;
}

.team-card__trigger-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.team-card__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--white);
}

.team-card__role {
  display: block;
  font-size: 1rem;
  color: var(--teal-400);
}

.team-card__chevron {
  flex-shrink: 0;
  display: flex;
  color: var(--white);
}

.team-card__chevron-vbar {
  transform-origin: 8px 8px;
  transition: transform 0.25s ease;
}
.team-card.is-open .team-card__chevron-vbar {
  transform: scaleY(0);
}

/* Revealed content — fades in quickly, slightly after the rectangle starts
   expanding. Only the bio scrolls internally if it's too long for the card;
   the contacts stay pinned at the bottom, always visible. */
.team-card__details {
  flex: 1;
  min-height: 0;
  padding: 0 1.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.team-card.is-open .team-card__details {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s ease 0.15s;
}

.team-card__bio-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.team-card__bio {
  font-size: 1rem;
  line-height: 1.3;
  color: var(--white);
}

.team-card__contacts {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-card__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  transition: opacity 0.2s ease;
}
.team-card__contact:hover {
  opacity: 0.72;
}
.team-card__contact svg {
  flex-shrink: 0;
}

/* ---- Team carousel (Homepage — condensed, scrollable teaser) ------------- */

.team-carousel__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.team-carousel__track::-webkit-scrollbar {
  display: none;
}
.team-carousel__track .team-card {
  flex: 1 0 calc((100% - 2 * 1.5rem) / 3);
  min-width: 14rem;
  scroll-snap-align: start;
}

.team-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.team-carousel__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--teal-400);
  color: var(--teal-900);
  transition: background 0.2s ease, color 0.2s ease;
}
.team-carousel__arrow:hover {
  background: var(--teal-900);
  color: var(--white);
}
.team-carousel__arrow:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.team-carousel__counter {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--navy-900);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Testimonials — auto-scrolling marquee, pauses on user interaction
   ========================================================================== */

.testimonials {
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.testimonials__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.testimonials__intro .eyebrow-pill {
  align-self: center;
}

.testimonials__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: var(--container-pad);
  -webkit-overflow-scrolling: touch;
}
.testimonials__track::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  flex: 0 0 auto;
  width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  border-radius: var(--radius-card);
  background: #f2f2f2;
}

.testimonial-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--navy-900);
}

.testimonial-card__quote {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--navy-900);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
}

.testimonial-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #d9d9d9;
  color: #8a8a8a;
  flex-shrink: 0;
}

.testimonial-card__author-text {
  display: flex;
  flex-direction: column;
}

.testimonial-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--teal-900);
}

.testimonial-card__role {
  font-size: 0.8125rem;
  color: #8a8a8a;
}

/* ==========================================================================
   Resources
   ========================================================================== */

.resources {
  padding-block: var(--section-pad-y);
  background: var(--sky-100);
}

.resources__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  max-width: 57rem;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}

.resources__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.resource-card__media {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--teal-400);
  margin-bottom: 1.25rem;
}
.resource-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.resource-card__tag {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
}

.resource-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.125;
  color: var(--navy-900);
  margin-bottom: 0.625rem;
}

.resource-card__date {
  font-size: 1rem;
  color: var(--navy-900);
}

/* ==========================================================================
   Resources page — filters + article archive
   ========================================================================== */

.resource-filters {
  background: var(--white);
  position: relative;
  z-index: 5;
}
.resource-filters__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}
.resource-filters__menus {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.filter-menu { position: relative; }
.filter-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 1rem;
  color: var(--navy-900);
}
.filter-menu__chevron { transition: transform 0.2s ease; }
.filter-menu:hover .filter-menu__chevron,
.filter-menu.is-open .filter-menu__chevron,
.filter-menu:focus-within .filter-menu__chevron { transform: rotate(180deg); }

.filter-menu__panel {
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 14rem;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(8, 76, 97, 0.16);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}
/* invisible bridge so the panel doesn't close while the pointer crosses the gap */
.filter-menu__panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -0.75rem;
  height: 0.75rem;
}
.filter-menu:hover .filter-menu__panel,
.filter-menu.is-open .filter-menu__panel,
.filter-menu:focus-within .filter-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--navy-900);
  cursor: pointer;
}
.filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filter-option__box {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  border: 1.5px solid var(--teal-900);
  border-radius: 3px;
  background: var(--white) center / 0.75rem no-repeat;
  transition: background-color 0.15s ease;
}
.filter-option input:checked + .filter-option__box {
  background-color: var(--teal-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.5L5 9L9.5 3.5' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.filter-option input:focus-visible + .filter-option__box {
  outline: 2px solid var(--teal-400);
  outline-offset: 2px;
}

.resource-filters__reset {
  font-size: 1rem;
  color: #8a8a8a;
  transition: color 0.2s ease;
}
.resource-filters__reset:not(:disabled) { color: var(--teal-900); text-decoration: underline; }
.resource-filters__reset:disabled { cursor: default; }

.resource-archive {
  padding-top: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: var(--section-pad-y);
  background: var(--white);
}
.resource-archive__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5rem 1.5rem;
}
.resource-archive__empty {
  text-align: center;
  color: var(--navy-900);
  font-size: 1.125rem;
}
.resource-card[hidden] { display: none; }

@media (max-width: 1024px) {
  .resource-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .resource-archive__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .resource-filters__menus { gap: 1.5rem; }
  .filter-menu__panel { min-width: 12.5rem; }
}

/* ==========================================================================
   Article page
   ========================================================================== */

.article-head {
  padding-top: clamp(7.5rem, 12vw, 11.75rem);
  padding-bottom: clamp(2rem, 5vw, 6.5rem);
  background: var(--white);
  text-align: center;
}
.article-head .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.article-head__date {
  font-size: 1rem;
  color: #8a8a8a;
}
.article-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1.14;
  color: var(--navy-900);
  max-width: 80rem;
  text-wrap: balance;
}
.article-head .eyebrow-pill { align-self: center; }
.article-head__date { margin-top: 0.25rem; }

.article-hero { background: var(--white); }
.article-hero__img {
  width: 100%;
  aspect-ratio: 1496 / 691;
  object-fit: cover;
  border-radius: var(--radius-img);
}

.article-body {
  padding-block: clamp(2.5rem, 6vw, 5.5rem) 0;
  background: var(--white);
}
.article-body__grid {
  display: grid;
  grid-template-columns: 21.125rem minmax(0, 50rem);
  align-items: start;
}

.article-meta { max-width: 8rem; }
.article-meta__author {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
}
.article-meta__avatar {
  flex-shrink: 0;
  width: 3.1875rem;
  height: 3.1875rem;
  border-radius: 50%;
  background: #d9d9d9;
}
.article-meta__author-text { display: flex; flex-direction: column; gap: 0.125rem; }
.article-meta__name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--teal-900);
  white-space: nowrap;
}
.article-meta__role { font-size: 0.75rem; color: var(--teal-400); white-space: nowrap; }
.article-meta__rule {
  width: 7.9375rem;
  border: none;
  border-top: 1px solid var(--teal-400);
  margin: 1rem 0;
}
.article-meta__read {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--navy-900);
  white-space: nowrap;
}
.article-meta__read svg { color: var(--teal-900); flex-shrink: 0; }

.article-body__content h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.2;
  color: var(--navy-900);
  margin: 2rem 0 0.5rem;
}
.article-body__content h2:first-child { margin-top: 0; }
.article-body__content p {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--navy-900);
  margin-bottom: 0.75rem;
}

.article-body__top {
  text-align: center;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.article-body__top a {
  font-size: 0.875rem;
  color: #8a8a8a;
  transition: color 0.2s ease;
}
.article-body__top a:hover { color: var(--teal-900); }

@media (max-width: 900px) {
  .article-body__grid { grid-template-columns: 1fr; gap: 2rem; }
  .article-meta { max-width: none; }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  padding-top: var(--section-pad-y);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--teal-900);
}

.contact__inner {
  max-width: 52.75rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 2.625rem);
}

.contact__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.42;
  color: var(--white);
  text-align: center;
}

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2.625rem;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.625rem);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-field__label-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.form-field__label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
}

.form-field__required {
  font-size: 0.75rem;
  color: var(--teal-400);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--white);
  padding-block: 0.375rem 0.625rem;
  color: var(--white);
  font-size: 1rem;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-bottom-color: var(--teal-400);
}
.form-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 1.5rem;
  cursor: pointer;
}
.form-field select:has(option[value=""]:checked) {
  color: rgba(255, 255, 255, 0.5);
}
.form-field select option {
  color: var(--navy-900);
}

.contact-form__submit {
  align-self: flex-start;
  background: none;
  color: var(--white);
}
.contact-form__submit svg { color: var(--white); }

.form-status {
  color: var(--teal-400);
  font-size: 0.95rem;
  min-height: 1.2em;
}

.contact__divider {
  border: none;
  border-top: 1px solid var(--teal-400);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* Contact page — form on a white background instead of the teal band */
.contact--light {
  background: var(--white);
  padding-bottom: var(--section-pad-y);
}
.contact--light .contact__heading { color: var(--navy-900); }
.contact--light .form-field__label { color: var(--teal-900); }
.contact--light .form-field input,
.contact--light .form-field textarea,
.contact--light .form-field select {
  color: var(--navy-900);
  border-bottom-color: var(--teal-900);
}
.contact--light .form-field input::placeholder,
.contact--light .form-field textarea::placeholder { color: rgba(5, 35, 72, 0.4); }
.contact--light .form-field select:has(option[value=""]:checked) { color: rgba(5, 35, 72, 0.4); }
.contact--light .form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23084c61' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.contact--light .contact-form__submit,
.contact--light .contact-form__submit svg { color: var(--teal-900); }
.contact--light .form-status { color: var(--teal-900); }

.contact-photo {
  padding-bottom: var(--section-pad-y);
  background: var(--white);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--teal-900);
  padding-top: clamp(1.5rem, 2.5vw, 2.5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 0.75fr)) minmax(0, 0.85fr);
  gap: 2rem;
  padding-bottom: clamp(1.5rem, 2.5vw, 2.5rem);
}

.footer__brand-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 2.25rem;
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer__contact address,
.footer__contact a {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--teal-400);
  line-height: 1.2;
}

.footer__col-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer__col-heading a { transition: color 0.2s ease; }
.footer__col-heading a:hover { color: var(--teal-400); }

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.footer__col--mobile-nav { display: none; }

.footer__links a {
  font-size: 0.875rem;
  color: var(--teal-400);
}
.footer__links a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid var(--teal-400);
  border-bottom: 1px solid var(--teal-400);
  padding-block: 1rem;
}

.footer__bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.footer__wordmark {
  width: 10rem;
}

.footer__copyright {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--teal-400);
}

.footer__legal {
  display: flex;
  gap: 2.25rem;
  flex-wrap: wrap;
}
.footer__legal a {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--teal-400);
}
.footer__legal a:hover { color: var(--white); }

/* ==========================================================================
   Page hero (compact banner used on interior pages, e.g. Services)
   ========================================================================== */

.page-hero {
  position: relative;
  background: var(--teal-900);
  overflow: hidden;
  padding-block: clamp(8rem, 17vw, 13.5rem) clamp(2rem, 4vw, 3.5rem);
}

.page-hero__pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  pointer-events: none;
}

.page-hero__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.02;
  color: var(--white);
}

/* ==========================================================================
   Service block (alternating media/copy rows, used on the Services page)
   ========================================================================== */

.service-block {
  position: relative;
  padding-block: var(--section-pad-y) calc(var(--section-pad-y) + 4.5rem);
  background: var(--white);
  overflow: hidden;
}

.service-block__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6.125rem);
  align-items: center;
}

.service-block__copy {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  order: 2;
}
.service-block__copy p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 36rem;
}

.service-block .about__media { order: 1; }

.service-block--reverse .service-block__copy { order: 1; }
.service-block--reverse .about__media { order: 2; }

/* Desktop: the image pair is ~74% of its column, so on the left-image rows it
   sat far from the copy. Pull it part-way toward the copy (a full pull would
   be 25.96%, which put it flush with the text column). */
@media (min-width: 1025px) {
  .service-block:not(.service-block--reverse) .about__media-primary-wrap {
    margin-left: 12%;
  }
}

/* ==========================================================================
   About page — overview intro (centered heading/copy, full-width photo)
   ========================================================================== */

.about-overview {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 9vw, 9.25rem);
  padding-bottom: var(--section-pad-y);
  background: var(--white);
}

.about-overview__pattern {
  position: absolute;
  z-index: 0;
  top: -346px;
  right: -21%;
  width: 1047px;
  max-width: none;
  pointer-events: none;
}

.about-overview__inner {
  position: relative;
  z-index: 1;
}

.about-overview__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
  text-align: center;
  max-width: 76rem;
  margin: 0 auto clamp(3rem, 9.6vw, 9.625rem);
}

.about-overview__intro .eyebrow-pill {
  align-self: center;
}

.about-overview__intro p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.4;
  color: var(--navy-900);
}

.about-overview__media {
  width: 100%;
  aspect-ratio: 1496 / 691;
  object-fit: cover;
  border-radius: var(--radius-img);
}

@media (prefers-reduced-motion: no-preference) {
  .about-overview__media {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .about-overview__media.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   About page — Core Values icon grid
   ========================================================================== */

.core-values {
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.core-values__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.core-values__intro .eyebrow-pill { align-self: center; }

.core-values__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.core-value-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem;
  border-radius: var(--radius-card);
  background: rgba(8, 76, 97, 0.92);
}

@media (prefers-reduced-motion: no-preference) {
  .core-value-card {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .core-value-card:nth-child(2) { transition-delay: 0.15s; }
  .core-value-card:nth-child(3) { transition-delay: 0.3s; }
  .core-value-card.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.core-value-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

.core-value-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--white);
}

.core-value-card__text {
  font-size: 1rem;
  line-height: 1.2;
  color: var(--white);
}

/* ==========================================================================
   About page — Careers band (dark, image + copy)
   ========================================================================== */

.career-band {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: var(--teal-900);
}

.career-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6.125rem);
  align-items: center;
}

.career-band__media {
  width: 100%;
  aspect-ratio: 685 / 422;
  border-radius: var(--radius-img);
  background: #d9d9d9;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .career-band__media {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .career-band__media.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.career-band__copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.eyebrow-pill--on-dark {
  background: var(--white);
  color: var(--teal-900);
}

.career-band__copy p {
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--white);
  max-width: 34rem;
}

/* ==========================================================================
   About page — Schedule a Visit (white, compact image + copy)
   ========================================================================== */

.schedule-visit {
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.schedule-visit__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(2.5rem, 6vw, 6.125rem);
  align-items: center;
}

.schedule-visit__media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-img);
  background: #d9d9d9;
  object-fit: cover;
  display: block;
}

.schedule-visit__copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.schedule-visit__copy p {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 32rem;
}

@media (prefers-reduced-motion: no-preference) {
  .schedule-visit__media {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .schedule-visit__media.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   About page — location map
   ========================================================================== */

.location-map {
  padding-block: var(--section-pad-y);
  background: var(--white);
}

.location-map__frame {
  display: block;
  width: 100%;
  aspect-ratio: 1496 / 600;
  border: 0;
  border-radius: var(--radius-img);
}

/* Homepage — Raymond James branch: same block as Schedule a Visit, text left */
.schedule-visit--reverse .schedule-visit__media { aspect-ratio: 685 / 422; }
.schedule-visit__media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: clamp(1.5rem, 6vw, 4rem);
}
.schedule-visit__media--logo img {
  width: 100%;
  max-width: 28rem;
  height: auto;
  border-radius: 0;
}
@media (min-width: 1025px) {
  .schedule-visit--reverse .schedule-visit__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* About page — these sections sit on the teal background */
.schedule-visit--dark {
  padding-block: clamp(2.5rem, 5vw, 4rem);
  background: var(--teal-900);
}
.schedule-visit--dark .schedule-visit__copy p { color: var(--white); }

.location-map--dark {
  padding-block: clamp(1.25rem, 2.2vw, 2.125rem);
  background: var(--teal-900);
}
.location-map--dark .location-map__frame,
.location-map--tall .location-map__frame { aspect-ratio: 1496 / 900; min-height: 26rem; }

/* ==========================================================================
   404 page
   ========================================================================== */

.error-hero {
  position: relative;
  padding-block: clamp(6rem, 14vw, 9rem) var(--section-pad-y);
  background: var(--white);
  text-align: center;
  overflow: hidden;
}

@media (min-width: 1025px) {
  .error-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .error-hero .container {
    width: 100%;
  }
}

.error-hero__pattern {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  top: -18%;
  right: -12%;
  width: 55%;
  max-width: 45rem;
  opacity: 0.9;
}

.error-hero .container {
  position: relative;
  z-index: 1;
}

.error-hero__code {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(7rem, 26vw, 20rem);
  line-height: 0.9;
  color: var(--navy-900);
  opacity: 0.1;
  white-space: nowrap;
  pointer-events: none;
}

.error-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.14;
  color: var(--navy-900);
  margin-block: 0.5rem 1rem;
}

.error-hero__text {
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }

  .site-header.is-open .site-nav {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: var(--teal-900);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
  }
  .site-header.is-open .site-nav__link { font-size: 1.5rem; }

  .services__grid,
  .about__intro {
    grid-template-columns: 1fr;
  }

  .about__media { order: 2; }
  /* the small image overhangs the large one by ~23%, so center the pair as a group */
  .about__media-primary-wrap { width: 60%; margin-left: calc((100% - 60% * 1.234) / 2); }
  .about__copy { order: 1; }

  .service-block__grid { grid-template-columns: 1fr; }
  .service-block .about__media,
  .service-block--reverse .about__media { order: 2; }
  .service-block__copy,
  .service-block--reverse .service-block__copy { order: 1; }

  .core-values__grid,
  .career-band__grid,
  .schedule-visit__grid {
    grid-template-columns: 1fr;
  }

  .team-grid,
  .resources__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
  }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .hero { min-height: 42rem; }

  .stat__divider { display: none; }
  .stats__row { gap: 2.5rem; }

  .contact-form__row { grid-template-columns: 1fr; }

  .team-grid,
  .resources__grid {
    grid-template-columns: none;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    margin-inline: calc(var(--container-pad) * -1);
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .team-grid::-webkit-scrollbar,
  .resources__grid::-webkit-scrollbar { display: none; }

  /* Neither padding nor margin on the leading edge is honored at the
     resting scroll position (the browser auto-scrolls past it). A real
     generated-content flex item isn't, so use that as a spacer instead. */
  .team-grid::before,
  .team-grid::after,
  .resources__grid::before,
  .resources__grid::after {
    content: '';
    flex: 0 0 var(--container-pad);
    scroll-snap-align: start;
  }

  .team-card,
  .resource-card {
    flex: 0 0 auto;
    width: 80%;
    max-width: 20rem;
    scroll-snap-align: start;
  }

  /* Square cards read as cramped once expanded on mobile — match the taller
     footprint of the resource cards next to them, which gives the bio
     enough room to actually be readable instead of a sliver before it
     scrolls. The bar also gets more breathing room; the name shrinks to
     make space for that without re-clipping the bottom padding. */
  .team-card {
    aspect-ratio: 312 / 442;
  }

  /* The carousel's own min-width (14rem) is narrower than the grid's 80%
     card width at small phone sizes, so the name could wrap to two lines
     and overflow the collapsed bar. Match the grid's sizing so both
     contexts behave the same down to the narrowest widths. */
  .team-carousel__track .team-card {
    flex: 0 0 auto;
    width: 80%;
    max-width: 20rem;
    min-width: 0;
  }

  .team-card__trigger {
    padding: 1.5rem 1.5rem 1.5rem 1.25rem;
  }

  .team-card__name,
  .team-card__role {
    /* Never let name/role wrap to a second line — that grows the trigger
       taller than the bar's reserved height and clips its bottom padding.
       Truncate instead so the bar height stays fixed at any width. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .team-card__name {
    font-size: 1.25rem;
  }

  .team-card__overlay {
    top: calc(100% - 7.5rem);
  }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__grid > .footer__col:not(.footer__col--mobile-nav) { display: none; }
  .footer__col--mobile-nav { display: block; }
  .footer__col--mobile-nav .footer__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
  }

  .about__media-primary-wrap { width: 65%; margin-left: calc((100% - 65% * 1.234) / 2); }

  .accordion-item__title { font-size: 1.5rem; }
}

/* ==========================================================================
   Page transition — teal wave sweeps in on internal page navigations
   ========================================================================== */

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: var(--teal-900);
  transform: translateY(-100%);
}
.page-transition.is-animating {
  transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}
.page-transition.is-covering {
  transform: translateY(0);
}

/* Compass mark centered on the teal panel; swings left, then right, then
   settles pointing straight up before the panel sweeps away. */
.page-transition {
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-transition { --compass-size: clamp(8rem, 18vw, 12.5rem); }
.page-transition__compass,
.page-transition__count { display: none; }
.page-transition.is-intro .page-transition__compass { display: block; }
.page-transition.is-intro .page-transition__count { display: block; }
.page-transition__count {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + var(--compass-size) / 2 + 1.5rem);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  color: var(--teal-400);
}
@media (prefers-reduced-motion: reduce) {
  .page-transition.is-intro .page-transition__count { display: none; }
}
.page-transition__compass {
  width: var(--compass-size);
  height: auto;
  transform-origin: 50% 50%;
}
.page-transition.is-compass-spinning .page-transition__compass {
  animation: compass-settle 1.7s linear both;
}
@keyframes compass-settle {
  0.0% { transform: rotate(-0.0deg); }
  2.08% { transform: rotate(-3.04deg); }
  4.17% { transform: rotate(-5.64deg); }
  6.25% { transform: rotate(-7.74deg); }
  8.33% { transform: rotate(-9.29deg); }
  10.42% { transform: rotate(-10.29deg); }
  12.5% { transform: rotate(-10.77deg); }
  14.58% { transform: rotate(-10.74deg); }
  16.67% { transform: rotate(-10.27deg); }
  18.75% { transform: rotate(-9.42deg); }
  20.83% { transform: rotate(-8.27deg); }
  22.92% { transform: rotate(-6.9deg); }
  25.0% { transform: rotate(-5.38deg); }
  27.08% { transform: rotate(-3.8deg); }
  29.17% { transform: rotate(-2.23deg); }
  31.25% { transform: rotate(-0.73deg); }
  33.33% { transform: rotate(0.65deg); }
  35.42% { transform: rotate(1.85deg); }
  37.5% { transform: rotate(2.86deg); }
  39.58% { transform: rotate(3.63deg); }
  41.67% { transform: rotate(4.18deg); }
  43.75% { transform: rotate(4.49deg); }
  45.83% { transform: rotate(4.59deg); }
  47.92% { transform: rotate(4.48deg); }
  50.0% { transform: rotate(4.2deg); }
  52.08% { transform: rotate(3.78deg); }
  54.17% { transform: rotate(3.24deg); }
  56.25% { transform: rotate(2.62deg); }
  58.33% { transform: rotate(1.96deg); }
  60.42% { transform: rotate(1.29deg); }
  62.5% { transform: rotate(0.63deg); }
  64.58% { transform: rotate(0.02deg); }
  66.67% { transform: rotate(-0.53deg); }
  68.75% { transform: rotate(-1.0deg); }
  70.83% { transform: rotate(-1.38deg); }
  72.92% { transform: rotate(-1.67deg); }
  75.0% { transform: rotate(-1.85deg); }
  77.08% { transform: rotate(-1.94deg); }
  79.17% { transform: rotate(-1.94deg); }
  81.25% { transform: rotate(-1.85deg); }
  83.33% { transform: rotate(-1.7deg); }
  85.42% { transform: rotate(-1.5deg); }
  87.5% { transform: rotate(-1.25deg); }
  89.58% { transform: rotate(-0.98deg); }
  91.67% { transform: rotate(-0.69deg); }
  93.75% { transform: rotate(-0.41deg); }
  95.83% { transform: rotate(-0.14deg); }
  97.92% { transform: rotate(0.11deg); }
  100.0% { transform: rotate(0deg); }
}
