/* ===================================================
   PAIA Manual — page-specific styles
   =================================================== */

/* ===== Hero ===== */
.paia-hero {
  background: #f2f2f2;
  min-height: 541px;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.paia-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.paia-hero__eyebrow {
  font-size: 20px;
  font-weight: 600;
  color: #8087b0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.paia-hero__title {
  font-family: var(--font-impact);
  font-size: 75px;
  font-weight: 900;
  color: #0f1e6d;
  text-transform: uppercase;
  line-height: 1.1;
  max-width: 550px;
  margin: 0;
}
.paia-hero__subtitle {
  font-size: 20px;
  font-weight: 500;
  color: #0f1e6d;
  max-width: 652px;
  line-height: 1.5;
}

/* ===== Content section ===== */
.paia-content {
  background: #fff;
  padding: 112px 0;
}
.paia-content__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* Text block */
.paia-content__text {
  text-align: center;
  max-width: 720px;
  width: 100%;
}
.paia-content__heading {
  font-family: var(--font-brand);
  font-size: 48px;
  font-weight: 700;
  color: #0f1e6d;
  margin: 0 0 28px;
}
.paia-content__body {
  font-size: 18px;
  line-height: 1.7;
  color: #0f1e6d;
}
.paia-content__body p {
  margin: 0 0 16px;
}
.paia-content__body p:last-child {
  margin-bottom: 0;
}

/* Download button */
.paia-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0f1e6d;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 40px;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  /* never let a flex/grid parent's stretch behaviour widen the button */
  width: fit-content;
}
.paia-dl-btn:hover {
  opacity: 0.82;
  color: #fff;
  text-decoration: none;
}
.paia-dl-btn .material-symbols-rounded {
  font-size: 20px;
}

/* ===== CTA Banner =====
   Background knobs (--cta-bg-zoom/x/y) were NOT hand-guessed: rendered with
   Pillow (scratch script, same math as CSS background-size/position) against
   the real subject/text geometry and visually checked before landing here.
   Desktop anchors the laptop's screen-tip (source px ~1500,430) at ~60%
   across / ~52% down — the same relative spot it sits at in Figma's own
   crop — leaving the text column (starts ~42% across) clear. If it ever
   needs nudging again, re-render with Pillow first and inspect the PNG;
   don't hand-guess a new zoom/position pair from the live screenshot alone.

   NOTE: this box sits INSIDE `.wrap` (confirmed via live DOM inspection —
   don't trust indentation-only HTML reading here), so it's a normal capped-
   content section: fluid up to 1408px, then frozen. It does NOT need the
   full-bleed wide-screen treatment used on cap-hero/hp-hero. A calc(vw...)
   fix was tried and briefly shipped here, then reverted — it broke worse
   than the original past ~1680px because vw keeps growing while the capped
   box doesn't, sliding the subject off the edge. Percentage-based zoom/
   position (below) is correct for a capped box: it re-solves proportionally
   against the box's own width at every width, and the box stops changing
   past 1408 anyway. */
.paia-cta {
  --cta-bg-zoom: 205%;
  --cta-bg-x: 14%;
  --cta-bg-y: 20%;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  min-height: 286px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 46px 38px;
  background-color: #0f1e6d;
  background-image: url('../assets/brand/paia-cta-bg.webp');
  background-repeat: no-repeat;
  background-size: var(--cta-bg-zoom) auto;
  background-position: var(--cta-bg-x) var(--cta-bg-y);
}
.paia-cta__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.56fr 1fr;
  align-items: center;
  gap: 80px;
  width: 100%;
}
.paia-cta__left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.paia-cta__right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 23px;
}
.paia-cta__eyebrow {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.paia-cta__heading {
  font-family: var(--font-impact);
  font-size: 64px;
  color: #fff;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}
.paia-cta__text {
  font-size: 24px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .paia-hero__title { font-size: 52px; }
  /* Tablet (Figma iPad frame, node 11643:2534 — card 747×342, aspect ~2.184):
     text left, man right, button floats bottom-right over the photo.
     Crop re-solved via Pillow sim at the real ~630px container width: 185/10/25
     over-zoomed and pushed the subject right (face/laptop landed off the
     intended landmarks, shoes almost fully cropped off bottom). 160/22/25
     puts the laptop-tip / face back on Figma's ~46%/61% and ~62%/18%
     landmarks with the shoes fully visible. */
  .paia-cta {
    --cta-bg-zoom: 160%;
    --cta-bg-x: 22%;
    --cta-bg-y: 25%;
    padding: 20px;
    border-radius: 15px;
    /* Figma card is 747x342 = 2.184:1. A bare fixed min-height drifts that
       ratio as the viewport moves within the 641-900px band; aspect-ratio
       (with min/max clamps so very narrow/wide widths in-band don't break)
       tracks Figma's proportions at every width instead. */
    aspect-ratio: 747 / 342;
    min-height: 220px;
    max-height: 340px;
    align-items: stretch;
  }
  /* Inner stretches to the full card height so the absolutely-positioned
     button (its containing block, since __inner is position:relative) anchors
     to the CARD bottom, not the bottom of the short content block.
     align-content keeps the content itself vertically centred. */
  .paia-cta__inner { grid-template-columns: 1fr; gap: 24px; align-items: flex-start; align-content: center; }
  .paia-cta__left { gap: 12px; }
  /* Figma's tablet frame (node 11643:2534) has no eyebrow/kicker layer above
     the heading — only heading, subtext, and button. Hide the shared eyebrow
     markup at this breakpoint to match. */
  .paia-cta__eyebrow { display: none; }
  .paia-cta__heading { font-size: 48px; }
  /* Button floats bottom-right, out of flow (Figma places it over the photo,
     not inline with the subtext). Subtext stays left-aligned under the heading. */
  .paia-cta__right { flex-direction: column; align-items: flex-start; gap: 23px; }
  .paia-cta__right .pill-btn { position: absolute; right: 20px; bottom: 24px; font-weight: 800; }
  .paia-cta__text { font-size: 20px; }
}

@media (max-width: 600px) {
  .paia-hero { min-height: auto; padding: 64px 0; }
  .paia-hero__title { font-size: 40px; }
  .paia-hero__subtitle { font-size: 17px; }
  .paia-content { padding: 72px 0; }
  .paia-content__heading { font-size: 36px; }
  .paia-content__body { font-size: 16px; }
  /* Mobile (Figma frame 11643:2506 — card 344×435, aspect ~0.79): text top-left,
     man fills the right/lower photo, button floats bottom-LEFT (not right).
     High zoom is required for a wide photo to cover this tall/narrow box —
     the source asset is 4096x1277 (3.208:1); covering a 344x435 (0.79:1) box
     needs background-size >= ~406% just to reach the card's height (below
     that, blue gaps appear top/bottom — this floor is real, not a styling choice).
     ⚠️ UNVERIFIED CROP: the zoom/position below (410/35/15) was produced by a
     workflow that SELF-REPORTED "verified" but a pixel-exact composite vs the
     Figma frame showed it under-zoomed (too much empty pavement left, subject
     framing off). Structure around it (aspect-ratio, eyebrow hidden, button
     inset) IS correct. These three values are the one open item — re-solve via
     the /match-figma-element numeric gate (landmark-fraction Δ ≤2%/axis) and
     have the orchestrator Read the composite before trusting a new value. */
  .paia-cta {
    --cta-bg-zoom: 410%;
    --cta-bg-x: 35%;
    --cta-bg-y: 15%;
    padding: 25px;
    /* Figma card is 344x435 (~0.79:1); aspect-ratio keeps that proportion
       across the band instead of drifting with a bare fixed min-height. */
    aspect-ratio: 344 / 435;
    min-height: 380px;
    max-height: 460px;
    border-radius: 30px;
    align-items: stretch;
  }
  /* Content sits at the top; the button anchors to the card bottom-left. */
  .paia-cta__inner { align-content: start; }
  /* Figma's mobile frame (node 11643:2506) starts directly with the heading —
     no eyebrow/kicker line. Hide the shared eyebrow markup to match. */
  .paia-cta__eyebrow { display: none; }
  .paia-cta__heading { font-size: 36px; }
  .paia-cta__text { font-size: 18px; }
  /* Position off .paia-cta__right's own edge, not stacked on top of the
     card's 25px padding (that doubled the inset to ~50px vs Figma's ~24px
     left / ~23-39px bottom). left/bottom:0 lets the card's own padding be
     the entire inset, landing close to Figma's proportional corner-hug. */
  .paia-cta__right .pill-btn { right: auto; left: 0; bottom: 0; font-weight: 800; }
  .paia-dl-btn { white-space: normal; text-align: center; }
}
