/* =========================================================
   STORM — A.I. CORE (tech page)
   -----------------------------------------------------------
   Loads ON TOP of base-web-style.css + tech-dark-teal-skin.css.
   Everything else on the page is base + skin. This file holds
   only what base has no component for:

     1. the trailer iframe filling base's 16:9 box
     2. the logo's colour fix
     3. the weight block's size, matched to the old page
     4. the "UP TO 5% MORE STRIKES" lockup — the old page showed
        it as a picture of black text; it is real text now, laid
        out and sized like that picture

   Classes are prefixed aic-, not ai-: the store theme still
   carries the OLD page's rules for .ai-stat (a fixed 375/200/
   100px height and the black "more-strikes.png" as a background)
   and .ai-logo, and they landed on this page's elements.

   No tokens are redefined.
   ========================================================= */

/* ---------------------------------------------------------
   1. TRAILER
   base .spi-video-thumb gives the 16:9 box; an iframe needs
   telling to fill it.
--------------------------------------------------------- */
.aic-trailer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------
   2. LOGO
   The logo's "TECHNOLOGY" is black — it was drawn for a white
   page, and there is no white-text export on the CDN.
   invert + hue-rotate turns the black white and keeps the
   colours close (the lime top of the "A" comes out a darker
   green). Swap in a white-text file when there is one and
   delete the filter.
--------------------------------------------------------- */
.aic-logo {
  --spi-figure-w: 260px;
  filter: invert(1) hue-rotate(180deg);
}

/* base's .spi-figure.is-flush sets margin: 0 auto at (0,2,0), so
   the gap under the logo needs the same weight to apply. */
.aic-logo.is-flush {
  margin-bottom: 32px;
}

/* ---------------------------------------------------------
   3. WEIGHT BLOCK
   Sized as the old page drew it: as tall as the screen on a
   desktop (900px at 1440x900), never past the frames' own
   1030px, and 450px from 1024 down. The frames have their own
   transparent margin, so the ball itself is about two-thirds
   of this.
--------------------------------------------------------- */
.aic-spin {
  --spi-figure-w: min(1030px, 100vh);
}

@media (max-width: 1024px) {
  .aic-spin {
    --spi-figure-w: 450px;
  }
}

/* ---------------------------------------------------------
   4. STAT LOCKUP (.aic-stat)
   The old graphic, measured: one row — a small "UP TO" level
   with the top of a huge "5%", and "MORE / STRIKES" on two
   lines spanning the figure's height — at most 1147px wide
   (375px tall). From 768 down it switched to a stacked version.

   Every size is a fraction of the lockup's own width (cqw), so
   it keeps the picture's proportions at any width. line-height
   0.711 is Roboto's cap height, so each line box is the height
   of its capitals and the edges line up like the artwork's.
--------------------------------------------------------- */
.aic-stat {
  container-type: inline-size;
  width: min(100%, 1147px);
  margin: 96px auto 0;
}

/* Two classes: the theme's .std p { margin: 1em 0 } is (0,1,1)
   and would otherwise put 16px above and below the lockup. */
.aic-stat .aic-stat-text {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  margin: 0;
  font-weight: 900;
  line-height: 0.711;
  text-transform: uppercase;
}

/* The store theme styles every bare <span> (16px, weight 400,
   line-height 22px), so each part restates its own weight, size
   and line-height rather than inheriting them. */
.aic-stat-pre,
.aic-stat-num,
.aic-stat-post,
.aic-stat-post > span {
  font-weight: 900;
  line-height: 0.711;
}

.aic-stat-post > span {
  font-size: inherit;
}

/* Letter-spacing matches the artwork's tracking, measured against
   Roboto 900: "UP TO" was set 4% tighter and "5%" 12.5% tighter
   (the % tucked in close to the 5). The figure's trailing spacing
   is handed back as margin so the gap after it stays true. */
.aic-stat-pre {
  font-size: 6.9cqw;
  letter-spacing: -0.03em;
  white-space: nowrap;
  align-self: start;
}

.aic-stat-num {
  font-size: 31.2cqw;
  letter-spacing: -0.138em;
  margin-left: 1.1cqw;
  margin-right: 0.138em;
  color: var(--spi-accent);
}

.aic-stat-post {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10.6cqw;
  letter-spacing: -0.025em;
  margin-left: 2.4cqw;
}

/* The old page sat the figure 32px under the ball from 1024
   down (96px above that). */
@media (max-width: 1024px) {
  .aic-stat {
    margin-top: 32px;
  }
}

/* The stacked version: UP TO / 5% / MORE / STRIKES, left
   aligned, at the old mobile graphic's 280px width. Its "5%"
   was tracked less tightly than the desktop artwork's. */
@media (max-width: 768px) {
  .aic-stat {
    width: min(100%, 280px);
  }

  .aic-stat .aic-stat-text {
    grid-template-columns: auto;
    justify-content: start;
  }

  .aic-stat-pre,
  .aic-stat-post {
    font-size: 24.2cqw;
  }

  .aic-stat-num {
    font-size: 76.4cqw;
    letter-spacing: -0.038em;
    margin: 7cqw 0 0;
  }

  .aic-stat-post {
    gap: 10.6cqw;
    margin: 9.6cqw 0 0;
  }
}
