/* ─────────────────────────────────────────────────────────────────────────
   Section: The Old Model — real CSS for every value that must scale FLUIDLY
   between 1024px and 1920px+ (not just render correctly at one fixed
   viewport), plus the absolute-positioned decoratives (circle, underline,
   arrow).

   Why this lives in CSS and not Tailwind arbitrary classes: this project's
   Tailwind v4 build does not emit CSS for an arbitrary value containing a
   comma inside min()/clamp() — e.g. `lg:pt-[min(9.375rem,7.8125vw)]`
   compiles to NOTHING in main.css (verified against the built stylesheet).
   Plain CSS min()/clamp() in a real stylesheet has no such restriction, so
   all fluid sizing for this section is implemented here instead.

   The min(rem, vw) pattern: each value is measured off the 1920px-wide
   Figma desktop canvas (fileKey nJoU040QHzVaE5H2P0q1YI, node 1586:286) as
   both a fixed rem and the equivalent vw percentage (px / 1920 * 100). Below
   1920px viewport width the vw term wins and the value scales down
   proportionally with the viewport; at/above 1920px the rem term wins and
   it holds at its native design size. This keeps every desktop width
   (1024–1920px+) proportionally identical to Figma, not just exactly 1440
   or exactly 1920.
   ───────────────────────────────────────────────────────────────────────── */

.section-old-model__container {
  position: relative;
}

@media (width >= 64rem) {
  .section-old-model {
    padding-inline: min(18.75rem, 15.625vw);
    padding-block: min(9.375rem, 7.8125vw);
  }

  .section-old-model__container {
    max-width: 82.5rem;
    gap: min(6.25rem, 5.2083vw);
  }

  .section-old-model__col1 {
    width: min(33.9375rem, 28.28125vw);
    flex: none;
    gap: min(3.125rem, 2.6042vw);
  }

  .section-old-model__col2 {
    flex: 1 1 0%;
    min-width: 0;
    padding-top: min(9.375rem, 7.8125vw);
    gap: min(3.125rem, 2.6042vw);
  }

  .section-old-model__image {
    height: min(37.5rem, 31.25vw);
    aspect-ratio: auto;
  }

  .section-old-model__heading {
    width: 100%;
    font-size: min(3.75rem, 3.125vw);
    line-height: min(3.5625rem, 2.96875vw);
  }

  .section-old-model__old {
    font-size: min(4.0625rem, 3.3854vw);
    line-height: 1;
  }

  .section-old-model__ribbon {
    font-size: min(1.875rem, 1.5625vw);
    line-height: min(2.0625rem, 1.71875vw);
  }

  .section-old-model__body {
    font-size: min(1.375rem, 1.1458vw);
    line-height: min(1.875rem, 1.5625vw);
  }

  .section-old-model__callout {
    font-size: min(2.375rem, 1.9792vw);
    line-height: min(2.8125rem, 2.34375vw);
  }
}

/* White scratch underline under "should work." — shown at every width,
   positioned relative to the .section-old-model__underline-anchor span.
   Mobile (Figma 5/15, node 2353:5146, inside Col2 2353:5145, 30px callout):
   84.843x15px, rotate -3.62deg skewX -2.04deg; centre 143.54px (4.7847em)
   from the start of "should" and 24.18px below the top of its line. The span
   box is Rock Salt's content area (71px at 30px, starting 18px above the
   line box), so the centre is 42.18px (1.406em) below the span top. */
.section-old-model__underline {
  position: absolute;
  top: 1.406em;
  left: 4.7847em;
  width: 2.8281em;
  height: 0.5em;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-3.62deg) skewX(-2.04deg);
}

/* Decoratives — render absolute at lg only */
@media (width >= 64rem) {
  .section-old-model__decorative {
    position: absolute;
    pointer-events: none;
  }

  .section-old-model__circle {
    /* Around the word "profit" in line 2 of the heading, relative to the
       heading element. Figma: top 36px, left 255px, 218x99px, -5.07deg. */
    top: min(2.25rem, 1.875vw);
    left: min(15.9375rem, 13.28125vw);
    width: min(13.625rem, 11.3542vw);
    height: min(6.1875rem, 5.15625vw);
    transform: rotate(-5.07deg);
  }

  .section-old-model__underline {
    /* Under "should work." in the Rock Salt callout (Figma 5/15, node
       2225:4066): 277.408x15px, rotate -3.62deg skewX -2.04deg. Positioned
       relative to the "should work." anchor span, in em of the callout's
       38px design font-size, so it scales with the fluid type:
       277.408/38 = 7.3002em, 15/38 = 0.3947em. The anchor is a plain
       inline span, so its box is Rock Salt's tall content area (89px at
       38px, starting 22px above the line box). Figma puts the underline
       centre 72.31px (1.9029em) below that and 1.82px (0.048em) right of
       the span centre. Font metrics scale with em, so this holds at every
       width. */
    top: 1.9029em;
    left: calc(50% + 0.048em);
    width: 7.3002em;
    height: 0.3947em;
  }

  .section-old-model__arrow {
    /* Relative to the container (Col1 + gap + Col2). The SVG file itself
       (static/images/old-model/arrow.svg) is Figma's own rendered export of
       this shape with rotation already baked in — no transform needed.
       Figma: left 1052px, top 249px, 107.34x125.439px. */
    top: min(15.5625rem, 12.9688vw);
    left: min(65.75rem, 54.7917vw);
    width: min(6.70875rem, 5.59063vw);
    height: min(7.83994rem, 6.53328vw);
  }
}
