/* ─────────────────────────────────────────────────────────────────────────
   Section: Resources Hero — Figma 2225:891 ("Resources Overview Improved"
   2225:885, 1440 canvas) and 2353:4031 (Mobile Resources Overview
   2353:4030, 360 canvas).

   CANVAS NOTE: 1440, not the 1920 the homepage sections were measured off.
   Every fluid value here is px / 1440 * 100 = vw.

   This hero has the SAME geometry as the Solutions hero (px 150, py 100,
   a 491-tall centring container, header gap 10 with padding-right 100) and
   differs only in copy and in carrying a CTA. Kept as its own file rather
   than shared because the decorative layer differs — see below — and a
   shared partial would have to branch on page anyway.

   THE BLOBS ARE VISIBLE HERE, unlike on Solutions. Same Elements group
   name, different z-order: on Solutions it sits behind an opaque Hero
   frame and never shows, here it renders in front of the page background.
   The export is also a different shape — 2324x869 with three shapes, where
   Solutions' is 2324x1130 with four. Do not assume the two pages share it.

   Fluid model is the page standard: clamp(min, <intercept> + <slope>vw,
   max) between the 360 and 1440 anchors, so nothing steps at a breakpoint.

   EXTRA-LARGE SCREENS — the centred-canvas offset. Past 1440 every size
   here caps, which is correct: the design stops growing at its canvas.
   But a capped size still has to be POSITIONED, and anchoring it to the
   viewport edge leaves the whole composition jammed against the left of a
   wide monitor while centred sections float in the middle. Anything
   measured from the frame's left edge therefore adds
   max(0px, 50% - 45rem) — the gutter that centres a 1440 canvas. It is 0
   at and below 1440, so the sub-1440 behaviour is untouched.

   ───────────────────────────────────────────────────────────────────── */

.section-resources-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-white, #fff);
  padding-inline: clamp(1.25rem, -1.45833rem + 12.037vw, 9.375rem); /* 20 -> 150 */
  padding-top: clamp(1.25rem, -0.41667rem + 7.4074vw, 6.25rem); /* 20 -> 100 */
  padding-bottom: clamp(5.625rem, 5.41667rem + 0.9259vw, 6.25rem); /* 90 -> 100 */
}

/* ── Copy ─────────────────────────────────────────────────────────────── */

.section-resources-hero__texts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Figma's container is 1140 of the 1440 frame. Without this cap the
     column grows with the viewport, and past ~1700 the headline stops
     wrapping and collapses onto one line instead of Figma's two. */
  max-width: min(71.25rem, 100%);
  margin-inline: auto;
  gap: clamp(0.625rem, 1.79167rem - 1.2963vw, 1.5rem); /* 24 -> 10 */
  width: 100%;
  text-align: center;
}

.section-resources-hero__eyebrow {
  font-family: var(--font-accent, "Rock Salt", cursive);
  font-weight: 400;
  font-size: clamp(1.875rem, 1.70833rem + 0.7407vw, 2.375rem); /* 30 -> 38 */
  line-height: clamp(2.1875rem, 1.97917rem + 0.9259vw, 2.8125rem); /* 35 -> 45 */
  letter-spacing: -0.016em;
  color: var(--color-green, #00804d);
}

.section-resources-hero__headline {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 1.875rem + 2.7778vw, 4.375rem); /* 40 -> 70 */
  line-height: clamp(2.8125rem, 2.29167rem + 2.3148vw, 4.375rem); /* 45 -> 70 */
  letter-spacing: -0.016em;
  color: var(--color-navy-dark, #001428);
}

/* Figma wraps the CTA in a block with 60 of vertical padding rather than
   using the parent's gap, so the button sits further from the headline
   than the 10 gap above it would suggest. */
.section-resources-hero__cta-wrap {
  display: flex;
  justify-content: center;
  padding-block: clamp(1.25rem, 0.13889rem + 4.9383vw, 3.75rem); /* 20 -> 60 */
}

/* No fixed width or height in Figma — the pill is sized by its padding,
   which lands at 316x70 for this label. The old build forced min-width 400
   and height 70, making it visibly wider than the design. */
.section-resources-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: clamp(1rem, 0.72222rem + 1.2346vw, 2.625rem); /* 16 -> 42 */
  padding-block: clamp(0.75rem, 0.66667rem + 0.3704vw, 1.25rem); /* 12 -> 20 */
  /* Mobile uses Figma's "Mobile CTA Fill" — an 8 radius button, not the 50
     pill the desktop frame uses. Stepped rather than interpolated: a
     half-rounded in-between radius reads as neither. */
  border-radius: 0.5rem;
  background: var(--color-yellow, #dbe64c);
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1rem, 0.91667rem + 0.3704vw, 1.375rem); /* 16 -> 22 */
  line-height: clamp(1.375rem, 1.29167rem + 0.3704vw, 1.875rem); /* 22 -> 30 */
  letter-spacing: -0.016em;
  color: var(--color-navy, #001f3e);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.section-resources-hero__cta:hover {
  opacity: 0.9;
}

.section-resources-hero__cta:focus-visible {
  outline: 3px solid var(--color-yellow, #dbe64c);
  outline-offset: 3px;
}

/* ── Decorative blobs ─────────────────────────────────────────────────── */

/* CLIPPED TO THE CANVAS, not just centred on it. The blob group is 2324
   wide against a 1440 frame — 1.61x — so at 1440 only its middle third is
   on screen and the rest bleeds off both edges. Capping the group's width
   and centring it is not enough: on a 2355 viewport the whole 2324 group
   then fits, and shapes meant to be half off-frame appear in full, which
   reads as the hero breaking. This box is FULL-BLEED, never a centred 1440
   canvas: capping it at min(90rem, 100%) and centring left 240px of white
   gutter down each side at a 1920 viewport, because the layer stopped at
   the canvas edge while the white section behind it carried on. A
   background layer must always span the viewport; only the artwork inside
   it is positioned. The group is sized in % of this layer, so at 1440 it
   still resolves to Figma's -561 / 2324 exactly — nothing changes at or
   below 1440. */
.section-resources-hero__elements {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* Class-only selector on purpose. Written as `… img` it would score
   (0,1,1) and beat every (0,1,0) `display: none` below, so none of the
   breakpoint swaps would take effect. */
.section-resources-hero__elements > * {
  position: absolute;
  display: block;
  max-width: none;
}

.section-resources-hero__elements-desktop {
  display: none;
}

/* Mobile arrangement — three shapes from the 360 frame, placed by their
   CENTRE because two are rotated. Widths are % of the section width;
   vertical offsets are % of the section HEIGHT, because this section's
   height is content-driven and would not track a vw offset.

   Figma y values are measured from the top of Frame 242, which includes
   the logo/hamburger row, so each has that 76px header block subtracted
   before being taken as a % of the ~497 mobile section. */
/* Figma's METADATA x/y for a rotated shape is its axis-aligned BOUNDING
   BOX, not the CSS offset. Rectangle 53 reports x=31 but its actual offset
   is -217 — it is a tall shape turned 90deg, so the box and the offset
   disagree by most of its length. Reading the box put this blob at 43%,
   squarely on top of the eyebrow. Take offsets from get_design_context,
   never from the metadata dump, for anything rotated. */
.section-resources-hero__blob-navy {
  left: -25.897%; /* Figma centre x -93.2, from the -217 offset */
  top: 17.3%; /* Figma centre y 86 after the header offset */
  width: 26.111%;
  aspect-ratio: 94 / 247.533;
  transform: translate(-50%, -50%) rotate(90deg);
}

.section-resources-hero__blob-circle {
  left: 24.17%;
  top: 104.5%; /* Figma centre y 595.5; bleeds below and is clipped */
  width: 49.722%;
  aspect-ratio: 179 / 177.807;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.section-resources-hero__blob-quarter {
  left: 106.4%;
  top: 52.4%;
  width: 38.333%;
  aspect-ratio: 111.833 / 111;
  transform: translate(-50%, -50%);
}

/* ── Tablet and up ────────────────────────────────────────────────────── */

@media (width >= 48rem) {
  .section-resources-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(46.875rem, 52.0833vw); /* 750 — the Hero frame's height */
  }

  .section-resources-hero__texts {
    padding-right: min(6.25rem, 6.9444vw); /* 100 — centres on 1040 of 1140 */
  }

  .section-resources-hero__cta {
    border-radius: var(--radius-button); /* the 50 pill, from 48rem up */
  }

  .section-resources-hero__blob-navy,
  .section-resources-hero__blob-circle,
  .section-resources-hero__blob-quarter {
    display: none;
  }

  /* All four values cap at the same 1440 anchor. Leaving `width` uncapped
     while `top` and min-height are capped lets the group keep growing past
     1440 while its container does not, so the shapes slide out of the clip
     at different rates and the composition changes as the window widens.
     Above 1440 it anchors to the page CENTRE, not the left edge, so it
     holds position relative to the headline on a wide monitor. */
  .section-resources-hero__elements-desktop {
    display: block;
    left: -38.958%; /* -561 of the 1440 canvas box */
    top: min(8.5rem, 9.4444vw); /* 136 = Elements y 238 − hero y 102 */
    width: 161.389%; /* 2324 of the 1440 canvas box */
    aspect-ratio: 2324 / 869;
  }
}

/* ── Desktop ──────────────────────────────────────────────────────────── */

@media (width >= 64rem) {
  .section-resources-hero__headline {
    letter-spacing: -0.024em;
  }
}
