/* =========================================================
   STORM — ABOUT PAGE
   -----------------------------------------------------------
   Loads ON TOP of base-web-style.css. Nothing in here
   duplicates a base component; every block below exists
   because the About page needs something base does not have.

   Base's tokens are NOT redefined here. --spi-white is still
   white and --spi-black is still near-black; the page just
   paints its ground with the dark one. Cards are plain base
   cards and are white because that is what base makes a card.

   What is left is the page-specific structure base has no
   equivalent for: the video banner, the pinned headline
   marquee, the parallax photo grounds, the campus zoom frame,
   and the leadership grid's phone layout.
   ========================================================= */

/* ---------------------------------------------------------
   1. DARK GROUND
   The About page is black. That is all this is: base's tokens
   keep the meanings they have in base — --spi-white is white,
   --spi-black is near-black — and the page simply paints itself
   with the dark one and writes on it with the light one.

   (An earlier version of this file inverted the two, so
   "white" meant black. Everything downstream then had to be
   un-inverted again, which is where a redundant light-island
   class came from. The tokens are left alone now.)
--------------------------------------------------------- */
body {
  background: var(--spi-black);
  color: var(--spi-white);
}

/* Base's --spi-text-muted is a DARK muted, meant for copy on a light
   ground; on black it is unreadable. This is the one value the token
   set has no light-ground counterpart for. */
.spi-body {
  color: rgba(255, 255, 255, 0.68);
}

/* The leadership cards ARE base product cards — white surface, base
   border, no overrides. Their names only need base's light-ground
   text colour back: .spi-card-product-body h4 sets no colour of its
   own, so the page's white would inherit into it and write white on
   white. (The role line under it sets its own muted colour.) */
.spi-card-product {
  color: var(--spi-black);
}

/* The store template wraps CMS content in .main-container and paints
   it white, which sits between body and these sections and hides the
   dark ground. Same fix the tech skin carries, and only this page
   loads this sheet. */
.main-container,
.main-container.col1-layout {
  background: transparent !important;
}

/* ---------------------------------------------------------
   2. DISPLAY HEADLINE SIZES
   The type itself is base's .spi-display. These only set the
   three knobs it exposes, because this page's statement
   moments run larger than base's default step.
--------------------------------------------------------- */
.about-display {
  --spi-display-vw: 8vw;
  --spi-display-max: 96px;
}

/* OUR PURPOSE — the biggest moment on the page. */
.about-display.is-xl {
  --spi-display-min: 48px;
  --spi-display-vw: 14vw;
  --spi-display-max: 200px;
}

/* ---------------------------------------------------------
   3. VIDEO BANNER (.about-video-banner)
   Edge-to-edge <video> from the CDN. Base's video components
   are a thumbnail card (.spi-card-video) and a lightbox frame
   (.spi-modal-frame); neither is an inline full-bleed player,
   so this is its own thing. The aspect-ratio reserves the box
   before the poster arrives, so nothing shifts on load.
--------------------------------------------------------- */
.about-video-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  /* Reserved box shown before the poster loads. It sits on the dark
     page, so it is dark — base's --spi-gray-* are light-ground values
     and would flash white here. */
  background: #232827;
}

.about-video-banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------
   4. HEADLINE MARQUEE (.about-marquee)
   "FROM HUMBLE BEGINNINGS" pinned full-screen while the
   headline scrolls horizontally past. Nothing in base pins a
   section or runs type off the edge of the viewport.

   The text is absolutely positioned and nowrap so GSAP can
   translate it; on phones and small tablets the script does
   not run, so it falls back to a centered, wrapping headline
   in a shorter section (below).
--------------------------------------------------------- */
.about-marquee {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.about-marquee-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%);
  width: max-content;
  white-space: nowrap;
  z-index: 2;
}

.about-marquee-text .about-display {
  --spi-display-min: 96px;
  --spi-display-vw: 22vw;
  --spi-display-max: 288px;
}

/* No pin below 769px — the headline just centers and wraps. The band
   is sized off the WIDTH (never taller than it is wide, capped at 80%
   of the screen), so it grows smoothly with the headline instead of
   jumping between fixed fractions of the screen height. */
@media (max-width: 768px) {
  .about-marquee {
    height: min(80vh, 100vw);
  }

  .about-marquee-text {
    width: 80%;
    transform: translate(-50%, -50%);
    white-space: normal;
    text-align: center;
  }

  .about-marquee-text .about-display {
    --spi-display-min: 40px;
    --spi-display-vw: 11vw;
    --spi-display-max: 64px;
  }
}

/* ---------------------------------------------------------
   5. PARALLAX PHOTO GROUND (.about-parallax)
   OUR PURPOSE and OUR VALUES sit on fixed-attachment photo
   backgrounds. Base sections are flat color only.

   The photo comes in through --about-bg on the section. While
   the section also carries .is-deferred the photo is held back
   (a background that resolves to none is never downloaded);
   the page script removes the class one screen before the
   section scrolls in. Both sections sit thousands of pixels
   down, so the page's first load no longer pays for them.

   `overflow: clip` is load-bearing: the values tiles animate
   in from x:-600, which would otherwise widen the document
   and give the whole page a horizontal scrollbar mid-
   animation. Clipping here contains that without affecting
   position:sticky anywhere (nothing in these sections sticks).
--------------------------------------------------------- */
.about-parallax {
  position: relative;
  overflow: clip;
  /* fallback behind the photo, on the page's own dark ground */
  background-color: var(--spi-black);
  background-image: var(--about-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.about-parallax.is-deferred {
  background-image: none;
}

/* Scrim, so white copy stays legible whatever the photo does. How much
   it needs depends on what sits on top: copy set straight onto the
   photo needs the full veil, while a section whose content is already
   on its own dark tiles only needs enough to settle the background. */
.about-parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--about-scrim, 0.45));
}

.about-parallax > * {
  position: relative;
  z-index: 1;
}

/* iOS ignores background-attachment: fixed and renders it at a
   broken scale, so touch devices get a normal scrolling background.
   Width alone missed the large iPads (1180–1366px landscape);
   `hover: none` catches every touch-first device at any width. */
@media (max-width: 1024px), (hover: none) {
  .about-parallax {
    background-attachment: scroll;
  }
}

/* ---------------------------------------------------------
   6. CAMPUS FRAME (.about-campus)
   Holds the campus photo while GSAP scales it past 1.0 on
   scroll. The frame clips the overflow; base has no
   image-zoom container.
--------------------------------------------------------- */
.about-campus {
  overflow: hidden;
}

/* `height: auto` is load-bearing, not boilerplate. The <img> carries
   width/height attributes so the box is reserved before it loads, and
   those attributes act as presentational hints for the CSS width and
   height. Setting width:100% here overrides the width hint but leaves
   the height hint standing, so the image scaled horizontally against a
   frozen 996px height and came out badly stretched. Base's global img
   rule only sets max-width/display, so nothing else clears it.
   No will-change: GSAP promotes the image to its own layer for the
   half-second it animates and releases it after, rather than holding
   a full-bleed image layer for the life of the page. */
.about-campus img {
  /* Full-bleed at every width, deliberately with no max-width: the photo
     is meant to span the screen edge to edge, so past its native 1542px
     it upscales and goes a little soft rather than sitting in a band
     with the page ground showing either side. */
  width: 100%;
  height: auto;
}

/* ---------------------------------------------------------
   7. VISION TILE (.about-vision)
   Image, heading, copy — with NO card around them. The design
   sets these straight onto the page ground, so none of base's
   card components apply; the row cell is the tile. All that is
   left is the image's own rounding and the rhythm under it.
   (height: auto for the same reason as the campus photo.)
--------------------------------------------------------- */
.about-vision-img {
  width: 100%;
  height: auto;
  border-radius: var(--spi-radius-md);
  margin-bottom: 12px;
}

.about-vision .spi-h3 {
  margin-bottom: 8px;
}

/* ---------------------------------------------------------
   8. VALUES STACK
   The tiles are base .ui-card, but they sit ON the photo
   ground rather than on the page, so they need a translucent
   dark fill instead of base's white card surface. Their text
   is the page's own light text, inherited.
--------------------------------------------------------- */
.about-value-card {
  background: rgba(0, 0, 0, 0.80);
}

/* ---------------------------------------------------------
   9. THE KFC BUCKET
   The script tips this image 45° on a loop. A rotated square
   occupies ~1.41x its own width, so a figure sized to the
   column overflows the page the moment it turns — which is
   what put a horizontal scrollbar on the old page at phone
   widths. Cap it against the viewport so the SWEPT box fits,
   rather than clipping the animation.
--------------------------------------------------------- */
.about-bucket {
  max-width: min(320px, 62vw);
}

/* ---------------------------------------------------------
   10. LEADERSHIP GRID (.about-leaders)
   Base's .spi-grid-4 drops to one column at 600px and below,
   which put each 384px headshot at up to 568px wide — larger
   than on desktop, and upscaled. Hold two up instead, as base
   already does for its 6-up product rows on phones. Two
   classes, so it outranks base's single-column rule.
--------------------------------------------------------- */
@media (max-width: 600px) {
  .spi-grid-4.about-leaders {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------
   11. MOTION
   The script adds .about-motion-ready to <html> once GSAP is
   confirmed and motion is allowed, and only then do the
   elements it fades or slides in start hidden. With no script,
   or with reduced motion, the class never arrives and they
   simply show.
--------------------------------------------------------- */
.about-motion-ready .about-reveal {
  opacity: 0;
}
