/* ─────────────────────────────────────────────────────────────────────────
   Section: Resources — Access Insight. Figma 2225:898 (Resources Overview
   Improved 2225:885, 1440 canvas).

   THE PANEL IS NOT A CENTRED CARD. This is the main correction against the
   previous build, which rendered a 1300-wide card centred in the viewport
   with all four corners rounded. In Figma the cream Container is 1134x744
   positioned so it spans x=-166 to x=968 on the 1440 frame: it BLEEDS OFF
   THE LEFT EDGE by 166 and stops well short of the right, leaving roughly
   a third of the row as white page. Only its right corners are ever
   visible. Centring it loses the asymmetry the whole section is built on.

   Everything inside is absolutely placed in Figma, and the Rock Salt
   "Resources" deliberately OVERLAPS the second heading line — it is not a
   word in the flow. Reproduced as a stage: the panel carries an
   aspect-ratio and its children sit at percentage offsets, so the
   composition scales as one piece and cannot come apart. "Resources" is a
   sibling of the Container in Figma (offset from the frame, not the
   panel); its offset is rebased onto the panel here by adding the panel's
   166 overhang.

   Below 48rem the panel becomes a normal full-bleed block with flowed
   content — at phone width there is no room for a 166 overhang plus a
   third of empty page, and absolute overlap would collide.

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

   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-access-insight {
  position: relative;
  background: var(--color-white, #fff);
  overflow: hidden;
}

/* The panel runs flush to the left edge at EVERY size — on mobile it fills
   the width with only its right corners rounded, which is the same
   left-bleeding treatment the desktop frame uses, just without room for
   the 166 overhang. Rounding all four corners reads as a centred card and
   loses that. */
.section-resources-access-insight__panel {
  position: relative;
  background: var(--color-cream, #f6f8ed);
  border-start-end-radius: var(--radius-card);
  border-end-end-radius: var(--radius-card);
  padding-inline: clamp(1.25rem, 0.83333rem + 1.8519vw, 3.125rem); /* 20 -> 50 */
  padding-block: clamp(2.5rem, 1.66667rem + 3.7037vw, 6.25rem); /* 40 -> 100 */
}

.section-resources-access-insight__heading {
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.875rem, 1.25rem + 2.7778vw, 3.75rem); /* 30 -> 60 */
  line-height: clamp(2.0625rem, 1.5625rem + 2.2222vw, 3.5625rem); /* 33 -> 57 */
  letter-spacing: -0.024em;
  color: var(--color-navy, #001f3e);
}

/* Below 48rem this reads as a normal accent word in the flow. Above it,
   Figma lifts it out and overlaps it onto the heading — see the desktop
   block. */
.section-resources-access-insight__accent {
  font-family: var(--font-accent, "Rock Salt", cursive);
  font-weight: 400;
  font-size: clamp(1.875rem, 1.14583rem + 3.2407vw, 4.0625rem); /* 30 -> 65 */
  line-height: 1;
  letter-spacing: -0.019em;
  color: var(--color-green, #00804d);
}

.section-resources-access-insight__body {
  margin-top: clamp(1.5rem, 1.05556rem + 1.9753vw, 3.125rem); /* 24 -> 50 */
  font-family: var(--font-primary, "Inter", sans-serif);
  font-weight: 600;
  font-size: clamp(1.375rem, 1.20833rem + 0.7407vw, 1.875rem); /* 22 -> 30 */
  line-height: clamp(1.5625rem, 1.39583rem + 0.7407vw, 2.0625rem); /* 25 -> 33 */
  letter-spacing: -0.016em;
  color: var(--color-navy-dark, #001428);
}

.section-resources-access-insight__cta-wrap {
  display: flex;
  padding-top: clamp(1.5rem, 0.66667rem + 3.7037vw, 3.75rem); /* 24 -> 60 */
}

/* Sized by padding, as in Figma — no fixed width or height. */
.section-resources-access-insight__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 */
  /* Figma's "Mobile CTA Fill" is an 8 radius button; the 50 pill is the
     desktop component. Stepped, not interpolated. */
  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-access-insight__cta:hover {
  opacity: 0.9;
}

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

/* ── Tablet and up — the offset panel with absolute content ───────────── */

@media (width >= 48rem) {
  .section-resources-access-insight {
    min-height: min(45rem, 50vw); /* 720 — the Access Insight frame */
  }

  /* 1134x744 anchored so its right edge lands at 968 of 1440 (67.22%) and
     its left runs 166 off-screen. Expressed as left + width in vw so both
     ends stay put together; capping only one would let the panel stretch
     or drift as the window widens. */
  .section-resources-access-insight__panel {
    position: absolute;
    /* -166 from the CANVAS left edge, not the viewport's. Past 1440 the
       centring gutter carries the panel inward with the rest of the page;
       below it the gutter is 0 and this reduces to the plain -166 offset.
       max(), not min(), on the negative — min() of two negatives returns
       the more negative one and would pin it at full magnitude. */
    left: calc(max(0px, 50% - 45rem) - min(10.375rem, 11.5278vw)); /* -166 */
    top: 0;
    width: min(70.875rem, 78.75vw); /* 1134 */
    aspect-ratio: 1134 / 744;
    padding: 0;
    border-radius: var(--radius-card); /* all four — the left pair sits off-screen */
  }

  .section-resources-access-insight__heading,
  .section-resources-access-insight__body,
  .section-resources-access-insight__cta-wrap,
  .section-resources-access-insight__accent {
    position: absolute;
    margin: 0;
  }

  .section-resources-access-insight__heading {
    left: 28.131%; /* 319 of 1134 */
    top: 19.489%; /* 145 of 744 */
    width: 58.377%; /* 662 */
  }

  /* Lifted out of the flow and overlapped onto the heading's second line.
     Its Figma offset (403, 183) is measured from the 968 frame, so the
     panel's 166 overhang is added to rebase it: 403 + 166 = 569. */
  .section-resources-access-insight__accent {
    left: 50.176%; /* 569 of 1134 */
    top: 24.597%; /* 183 of 744 */
    line-height: min(6.25rem, 6.9444vw); /* 100 */
    white-space: nowrap;
  }

  .section-resources-access-insight__body {
    left: 28.131%; /* 319 */
    top: 42.07%; /* 313 */
    width: 63.933%; /* 725 */
    margin-top: 0;
  }

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

  .section-resources-access-insight__cta-wrap {
    left: 28.131%; /* 319 */
    top: 56.317%; /* 419 */
    padding-top: 0;
    padding-block: min(3.75rem, 4.1667vw); /* 60 */
  }
}
