/* ==========================================================================
   pages/about.css
   Page-specific overrides only. This file must never redefine a
   component's core look (that belongs in components.css) — it may
   only add layout-specific spacing/positioning unique to this page.

   Stage 6 responsive corrections (About Us only). Every rule is scoped to
   this page's own sections so no other page is affected.
   ========================================================================== */

/* 1. Placeholder positioning defect.
   .aspect-box reserves its ratio with a ::before padding-top spacer, but
   .img-placeholder was `height:100%` of an auto-height box, so it collapsed
   to its icon height and rendered as a thin band at the bottom of an empty
   area (CTA band media). Pinning it to the box makes it fill the reserved
   ratio exactly. No image is added. */
.who-we-are__media .img-placeholder,
.cta-band__media .img-placeholder {
  position: absolute;
  inset: 0;
}

/* 2. Who We Are media: four square placeholders.
   The shared .grid--2 collapses to ONE column below 480px, which stacked
   four 270px squares (over 1,100px of empty grey) under the text on a phone.
   Keep the 2x2 arrangement at every width. */
.who-we-are__media.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

/* 3. CTA band squeeze at 768-991px.
   The shared band lays text, button and a fixed 320px media box in one row;
   in the 720-944px container that left the text column 134-172px wide
   (heading on 4+ lines) and, on this page, pushed the media past the band's
   right edge at 768-769px. In this range the text and button now share the
   left column (button under the text) with the media on the right. */
@media (min-width: 768px) and (max-width: 991px) {
  .cta-band--full .cta-band__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    grid-template-areas:
      "text media"
      "action media";
    column-gap: var(--space-6);
    row-gap: var(--space-4);
    align-items: center;
    justify-content: stretch;
  }
  .cta-band--full .cta-band__text {
    grid-area: text;
    max-width: none;
  }
  .cta-band--full .cta-band__action {
    grid-area: action;
    justify-self: start;
  }
  .cta-band--full .cta-band__media {
    grid-area: media;
    width: 100%;
    max-width: none;
  }
}

/* 4. "What Drives Us Forward": five centred value items.
   In a 2-column or 4-column grid the fifth item sat alone, left-aligned,
   under centred columns. It is now centred in its own row (2 columns), and
   from 992px the five items use a 3 + 2 arrangement with the second row
   centred. From 1200px the shared 5-column layout is unchanged. */
@media (min-width: 768px) and (max-width: 991px) {
  section[aria-labelledby="values-heading"] .grid--5 > :nth-child(5):last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - var(--grid-gap)) / 2);
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  section[aria-labelledby="values-heading"] .grid--5 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  section[aria-labelledby="values-heading"] .grid--5 > * {
    grid-column: span 2;
  }
  section[aria-labelledby="values-heading"] .grid--5 > :nth-child(4) {
    grid-column: 2 / span 2;
  }
  section[aria-labelledby="values-heading"] .grid--5 > :nth-child(5) {
    grid-column: 4 / span 2;
  }
}

/* 5. Our Vision / Our Mission photos: a 16:9 image at the top of each card, rounded to match the
   card, with the icon and text unchanged below it. */
.vision-mission__media {
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md);
}


/* ==========================================================================
   About Us hero (approved banner artwork + editable HTML).
   Scoped to .about-hero; no other page or banner is affected.
   The artwork's left half is flat navy (#06263c) with the products on stepped
   platforms at the right, so the section background uses the same navy: the
   stacked (tablet/phone) layout has no seam and the image area never flashes
   white while it loads. The picture reserves space from its width/height
   attributes (1671x941) plus aspect-ratio, so nothing shifts on load.
   ========================================================================== */
.about-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #06263c;
}
.about-hero__inner {
  order: 1;
  padding-block: var(--space-7) var(--space-5);
}
.about-hero__media {
  order: 2;
  display: block;
}
.about-hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 80% 50%; /* stacked layout: crop to the product side */
}
@media (min-width: 600px) {
  .about-hero__img {
    aspect-ratio: 16 / 10;
    object-position: right center;
  }
}
.about-hero__content {
  max-width: 40rem;
}
.about-hero__eyebrow {
  margin-bottom: var(--space-3);
}
.about-hero__title {
  margin-bottom: var(--space-4);
}
.about-hero__accent {
  color: #f5b400;
}
.about-hero__desc {
  max-width: 58ch;
  margin-bottom: var(--space-5);
}
.about-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.about-hero__stat {
  display: flex;
  flex-direction: column;
  min-width: 9.5rem;
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
}
.about-hero__stat-value {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  line-height: 1.15;
}
.about-hero__stat-label {
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: 1.3;
}
.about-hero__stat--solid {
  background-color: #f5b400;
  border-color: #f5b400;
  color: #0b2338;
}
.about-hero__stat--outline {
  background-color: rgba(6, 38, 60, 0.55);
  border-color: var(--color-teal-500);
  color: #fff;
}

/* Desktop (1200px+): text sits over the clear navy area, artwork fills the band.
   Below 1200px the clear navy area is too narrow for the paragraph, so the hero
   stays stacked (text, then artwork). */
@media (min-width: 1200px) {
  .about-hero {
    display: grid;
    min-height: clamp(540px, 40vw, 680px);
  }
  .about-hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
  }
  .about-hero__img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-position: right 62%;
  }
  /* Keeps the text on flat navy where the diagonal teal band comes closest. */
  .about-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(6, 38, 60, 0.96) 0%, rgba(6, 38, 60, 0.9) 34%, rgba(6, 38, 60, 0) 56%);
    pointer-events: none;
  }
  .about-hero__inner {
    display: flex;
    align-items: center;
    padding-block: var(--space-8);
  }
  .about-hero__content {
    width: min(100%, 36rem);
  }
}

/* Our Journey now has two entries (2019 and Today). Two cards in the shared
   3-column grid sat at the left with an empty third column, so from 768px the
   pair is laid out as two equal columns and centred. Below 768px the grid is
   already a single column. */
@media (min-width: 768px) {
  .grid.milestones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 52rem;
    margin-inline: auto;
  }
}
