/* ==========================================================================
   RBT Bank — About Page (about.html)
   Requires style.css to be loaded first (design tokens).
   ========================================================================== */

/* Dark full-bleed hero — photo runs edge-to-edge as the section's own
   background (not a boxed side column), with a navy scrim so the text
   stays legible on the left and the photo stays visible throughout. */
.about-hero {
  position: relative;
  overflow: hidden;
  min-height: 40rem;
  display: grid;
  align-items: center;
  background: var(--color-navy);
  padding-block: var(--space-24) calc(var(--space-32) + var(--space-16));
}

.about-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    var(--color-navy) 0%,
    rgba(3, 4, 94, 0.9) 40%,
    rgba(3, 4, 94, 0.45) 75%,
    rgba(3, 4, 94, 0.25) 100%
  );
}

/* Same reasoning as .site-header .container / .site-footer .container:
   the shared .container class's default padding-inline (--space-6) is
   narrower than the nav's own edge padding (--space-16), which left the
   hero title/stats sitting to the left of the nav logo above it. Pin the
   left edge to --space-16 so both line up. */
.about-hero__content {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin-inline: 0;
  padding-left: var(--space-16);
}

.about-hero__title {
  color: var(--color-text-inverse);
  font-size: var(--font-size-4xl);
}

.about-hero__rule {
  display: block;
  width: 56px;
  height: 3px;
  margin-block: var(--space-3) var(--space-6);
  background: var(--color-gold);
  border-radius: var(--radius-full);
}

.about-hero__body {
  color: var(--color-text-inverse-muted);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
}

.about-hero__body strong {
  color: var(--color-text-inverse);
}

/* Sits directly on the dark hero with no card background, stretched to
   match the text column's width (not shrink-to-fit) so each stat gets
   more room and the labels don't crowd the dividers. */
.about-hero__stats {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
}

.about-hero__stat {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: var(--space-3);
  padding-inline: var(--space-4);
  min-width: 0;
}

.about-hero__stat:first-child {
  padding-inline-start: 0;
}

.about-hero__stat:last-child {
  padding-inline-end: 0;
}

.about-hero__stat > div {
  min-width: 0;
}

.about-hero__stat-label,
.about-hero__stat-caption {
  overflow-wrap: break-word;
}

.about-hero__stat:not(:last-child) {
  border-right: 1px solid var(--color-border-inverse);
}

.about-hero__stat svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: var(--space-1);
  color: var(--color-blue);
}

.about-hero__stat-value {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-inverse);
  line-height: 1;
}

.about-hero__stat-label {
  color: var(--color-text-inverse-muted);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

.about-hero__stat-caption {
  color: var(--color-text-inverse-muted);
  font-size: var(--font-size-2xs);
  margin-top: var(--space-1);
  line-height: 1.3;
}

/* ==========================================================================
   About Page — Our History timeline, Mission & Vision, Core Values, Board
   ========================================================================== */

.about-history {
  background: var(--color-white);
  padding-block: var(--space-16);
}

.about-history__timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* The vertical spine — hidden on the single-column mobile layout via
   responsive.css, where alternating sides no longer make sense. */
.about-history__timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
  transform: translateX(-50%);
}

.about-history__item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.about-history__item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--space-8);
  width: 14px;
  height: 14px;
  background: var(--color-blue);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--color-blue);
  z-index: 1;
}

.about-history__item--left .about-history__card {
  grid-column: 1;
}

.about-history__item--right .about-history__card {
  grid-column: 2;
}

.about-history__item--center {
  grid-template-columns: 1fr;
  justify-items: center;
}

.about-history__item--center::before {
  display: none;
}

/* Title runs full-width across the top of the card; the image and copy
   sit in a row underneath it — matches the source design's layout
   (not image-left/text-right spanning the card's full height). */
.about-history__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  max-width: 34rem;
}

.about-history__card--wide {
  max-width: 46rem;
}

.about-history__card-body {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

/* Source photos are landscape (~3:2) — a wider, shorter thumb shows the
   full frame instead of cropping the sides off a square. */
.about-history__thumb {
  flex-shrink: 0;
  width: 110px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-section-tint);
}

/* This source photo is landscape and needs the full frame visible —
   contain (not cover) so nothing at the edges gets cropped off. */
.about-history__thumb--contain {
  width: 168px;
  aspect-ratio: 3 / 2;
}

.about-history__thumb--contain img {
  object-fit: contain;
}

.about-history__card--wide .about-history__thumb {
  width: 220px;
  aspect-ratio: 3 / 2;
}

.about-history__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-history__card h3 {
  font-size: var(--font-size-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 0;
}

.about-history__card h3 span {
  display: inline;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-blue);
  text-transform: none;
  letter-spacing: normal;
  margin-left: var(--space-2);
}

.about-history__card p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.about-mission {
  background: var(--color-white);
  padding-block: var(--space-16);
}

/* Solid navy rounded card holding both columns — matches the source
   design exactly (not text laid over a section background). */
.about-mission__card {
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-12);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-12);
}

.about-mission__col h3 {
  color: var(--color-text-inverse);
  font-size: var(--font-size-xl);
  text-align: center;
  margin-bottom: var(--space-5);
}

.about-mission__col-body {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.about-mission__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: var(--color-text-inverse);
}

/* Force both icons to the exact same rendered size regardless of each
   glyph's own ink bounding box within its viewBox. */
.about-mission__icon svg {
  width: 100%;
  height: 100%;
}

.about-mission__col p {
  color: var(--color-text-inverse-muted);
}

.about-mission__divider {
  width: 1px;
  background: var(--color-border-inverse);
}

/* Matches the source design: the eyebrow/heading/subtext sit on the
   plain white section background (no dark band), and each value is its
   own card with the icon on the trailing edge. */
.about-values {
  background: var(--color-white);
  padding-block: var(--space-16);
}

.about-values__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6) var(--space-6);
  padding-bottom: var(--space-12);
}

.about-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.about-value__icon {
  order: 2;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-inverse);
}

.about-value__icon svg {
  width: 32px;
  height: 32px;
}

.about-value h3 {
  font-size: var(--font-size-base);
  color: var(--color-navy);
  margin-bottom: var(--space-1);
}

.about-value p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.about-board {
  /* Very soft wash rather than flat white, so the section reads as its own
     chapter and the white cards have something to lift off. */
  background:
    radial-gradient(48rem 24rem at 50% 0%, rgba(0, 180, 216, 0.07) 0%, transparent 70%),
    linear-gradient(180deg, var(--color-white) 0%, var(--color-section-tint) 100%);
  padding-block: var(--space-16) var(--space-20);
}

.about-board .section-heading h2 {
  font-size: var(--font-size-4xl);
}

.about-board__chair {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
}

.about-board__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* Horizontal card — rounded-square photo left, name/title right — matches
   the source design, not a centered stacked-avatar card. */
.about-board__card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  background: var(--color-white);
  /* Inset ring instead of a 1px border: it defines the edge without the
     wireframe look, and leaves the real border free for the accent below. */
  border: 0;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--ring), var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--duration-base) var(--ease-out);
}

/* Accent spine down the leading edge, drawn in on hover.
   ::after, NOT ::before — the pointer-tracked spotlight in animations.css
   already owns ::before on every card carrying [data-spotlight]. */
.about-board__card::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-blue) 0%, var(--color-gold) 100%);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform var(--duration-slow) var(--ease-emphasized);
}

.about-board__card:hover::after {
  transform: scaleY(1);
}

/* ── Chairman ────────────────────────────────────────────────────────────
   The board's anchor, so it gets the dark treatment rather than just more
   width — hierarchy you can read at a glance instead of by comparing
   card sizes. */
.about-board__card--chair {
  max-width: 30rem;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue-700) 100%);
  box-shadow: var(--shadow-lg);
}

/* Doubled class (0,2,1) on purpose: the generic `.about-board__card h3`
   and `p` rules further down carry the same single-class specificity and
   would otherwise win on source order, leaving navy text on the navy card. */
.about-board__card.about-board__card--chair h3 {
  color: var(--color-text-inverse);
}

/* The role is a plain <p> in the markup — no extra class needed.
   tint-light, not the cyan accent: the card is a gradient, and cyan only
   manages 3.26:1 against its lighter end — below AA. tint-light holds
   5.4:1 there and more against the navy end. */
.about-board__card.about-board__card--chair p {
  color: var(--color-tint-light);
}

.about-board__card--chair::after {
  background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-tint-light) 100%);
}

/* ── Portrait ────────────────────────────────────────────────────────── */

.about-board__avatar {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  border-radius: var(--radius-md);
  object-fit: cover;
  object-position: top center;
  background: var(--color-section-tint);
  /* Double ring: a white gap, then a soft brand halo — the portrait reads
     as framed rather than pasted onto the card. */
  box-shadow:
    0 0 0 3px var(--color-white),
    0 0 0 4px rgba(0, 119, 182, 0.18),
    var(--shadow-sm);
  transition:
    transform var(--duration-slow) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.about-board__card:hover .about-board__avatar {
  transform: scale(1.04);
  box-shadow:
    0 0 0 3px var(--color-white),
    0 0 0 4px var(--color-gold),
    var(--shadow-md);
}

.about-board__card--chair .about-board__avatar {
  width: 124px;
  height: 124px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.16),
    0 0 0 4px rgba(0, 180, 216, 0.55),
    var(--shadow-md);
}

.about-board__card--chair:hover .about-board__avatar {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.24),
    0 0 0 4px var(--color-gold),
    var(--shadow-lg);
}

/* ── Name + role ─────────────────────────────────────────────────────── */

.about-board__card h3 {
  font-size: var(--font-size-lg);
  color: var(--color-navy);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

/* Role set as a small tracked eyebrow rather than muted body text — it
   stops reading as a second sentence and starts reading as a title.
   gold-600 (#007a94), not the lighter cyan, to hold AA contrast on white. */
.about-board__card p {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-gold-600);
}
