/* ============================================================================
   Ragazzi — pic & text (static ragazzi-site/mission § pt1 / pt2 / pt3).

   ONE STYLESHEET FOR ALL THREE. The static ships pic-text-1/-2/-3 as three
   separate files, 830 lines between them, and they are three generations of the
   SAME component rather than three designs. Measured before merging:

     - all 34 custom properties are byte-identical in all three files;
     - the copy is identical in all three (and is placeholder text from another
       brand, so it is content the merchant fills, not design);
     - only TWO things genuinely differ per instance — which side the image is
       on, and the image's focal point.

   Everything else that differed was generation noise: `align-items: flex-start`
   vs `stretch` on the row, `justify-content: center` present on two columns and
   missing on the third, pt1 having no wrapper around its <img> while pt2/pt3 do,
   `padding` shorthand vs longhands, and a `:hover` on pt1's button only. This
   file takes pt3's shape throughout, because its media box is the robust one: a
   relative box owning the aspect ratio with the image absolute inside it, so the
   ratio holds whatever the image's own dimensions are.

   THE ROW CAP IS A NO-OP AND IS KEPT ANYWAY. pt3 sets `max-width: 1720px` on the
   row; pt1/pt2 do not. It can never bite: `.container` caps at 1920 with a 100px
   gutter each side at that width, so the content box is already 1720 and smaller
   viewports give smaller gutters and smaller boxes. Carried because it is in the
   design's file and costs nothing; recorded so nobody hunts for what it does.

   Desktop-first, like every mission stylesheet: base is the 1024+ layer and the
   two bands below it are `max-width` overrides.
============================================================================ */

.ragazzi-pic-text {
  --color-heading:   #161616;
  --color-body:      #1a1a1a;
  --color-on-dark:   #ffffff;
  --text-h2:         clamp(35px, calc(65px * (var(--max-vw) / var(--vw-base))), 65px);
  --text-btn-shop:   clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
  --lh-h2:           1.1;
  --lh-btn-shop:     1.316;
  --section-pad-y:   clamp(53px, calc(100px * (var(--max-vw) / var(--vw-base))), 100px);
  --stack-gap-lg:    clamp(32px, calc(60px * (var(--max-vw) / var(--vw-base))), 60px);
  --stack-gap-md:    clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
  --pic-text-gap:    clamp(10px, calc(18.75px * (var(--max-vw) / var(--vw-base))), 18.75px);
  --pill-pad-y:      clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
  --pill-pad-x:      clamp(32px, calc(60px * (var(--max-vw) / var(--vw-base))), 60px);
  --radius-cta-shop: 83.56px;

  /* ADAPTATION — `--text-body`, SCOPED TO THE SECTION.

     `.page-mission` overrides the site token with a 20px desktop scale against
     the theme's 18px, and the paragraph below reads it. A Shopify theme has no
     page scope, so without this the copy renders a size the design never had.
     Same fix as ragazzi-comparison-table.css and ragazzi-faq.css; all three
     bands carried verbatim from mission-page.css, in this file's desktop-first
     order. (`--font-body` is the other page token these sections read and is
     deliberately NOT carried — mission's only differs by inserting `Arial`
     before the generic fallback, which its own comment calls inert.) */
  --text-body: clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);

  /* Image focal point, per band. Set inline by the section from two settings,
     because the design needs DIFFERENT focus on mobile and desktop and Shopify's
     native per-image focal point is a single value:
       pt1  50% 50%     -> 50% 32.76%
       pt2  50% 50%     -> 50% 50%
       pt3  50% 99.76%  -> 50% 50%
     The fallbacks here are the neutral centre, so an instance that sets nothing
     behaves like pt2. */
  --pt-focal:    50% 50%;
  --pt-focal-lg: var(--pt-focal);

  background: var(--color-bg);
  padding-block: var(--section-pad-y);
}

.ragazzi-pic-text .pic-text__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--pic-text-gap);
  width: 100%;
  max-width: 1720px;
  margin-inline: auto;
}

.ragazzi-pic-text .pic-text__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--stack-gap-md);
}

.ragazzi-pic-text .pic-text__heading {
  display: flex;
  align-items: center;
}

.ragazzi-pic-text .pic-text__title {
  font-family: var(--font-body);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--lh-h2);
  letter-spacing: 0;
  color: var(--color-heading);
  text-align: left;
}

.ragazzi-pic-text .pic-text__text {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: 0;
  color: var(--color-body);
  text-align: left;
}

.ragazzi-pic-text .pic-text__cta {
  background: var(--color-body);
  color: var(--color-on-dark);
  border-radius: var(--radius-cta-shop);
  padding-block: var(--pill-pad-y);
  padding-inline: var(--pill-pad-x);
  /* pt1 alone also set `font-size`, `line-height` and an opacity transition on
     the button itself. NOT carried, and the swap test is why: the label span
     already sets both, so on the button they change no rendered box - carrying
     them only made pt2 and pt3 disagree on computed values for nothing. The
     transition goes with them because the static ships NO hover state; Figma
     records none for any CTA on this page, so there is nothing to transition. */
}

.ragazzi-pic-text .pic-text__cta-label {
  font-family: var(--font-body);
  font-size: var(--text-btn-shop);
  font-weight: 700;
  line-height: var(--lh-btn-shop);
  letter-spacing: 0;
  color: var(--color-on-dark);
  text-align: center;
}

/* ============================================================================
   TWO SHARED COMPONENT RULES, CARRIED IN.

   `mission-components.css` defines a `.cta` pill floor and a `.media` rule, both
   scoped `:where(.page-mission)`. A Shopify theme has no page scope, so both are
   simply LOST — and neither is cosmetic:

   The CTA loses `display: inline-flex` and its centring, which is what makes the
   pill a pill. Measured before this was carried: the whole section came out
   2.4px shorter at 375 and the button computed `display: block`.

   The `.media` rule carries `aspect-ratio: inherit`, and the static's own
   comment explains why it exists: when the wrapper's width is INDEFINITE (the
   stacked mobile layout), the image sizes itself from the bitmap's own ratio and
   the wrapper's declared ratio is lost — measured there as 335x416 instead of
   335x358. Desktop never shows it, "which is exactly why a desktop-only check
   passes it". Carried verbatim rather than rediscovered.

   Both are scoped to this section's root instead of a page, so they travel with
   it. The section's own markup puts `.cta` and `.media` on the two nodes, as the
   static does.
============================================================================ */
.ragazzi-pic-text .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
}

.ragazzi-pic-text .media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: inherit;
}

/* The media box owns the ratio and the image fills it absolutely — pt3's shape,
   taken for all three. pt1 let its <img> carry `aspect-ratio` directly, which
   works only while the image's own proportions are ignored; a merchant uploading
   a different crop would change the row height. */
.ragazzi-pic-text .pic-text__media {
  position: relative;
  width: 100%;
  aspect-ratio: 838.41 / 895.23;
}

.ragazzi-pic-text .pic-text__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pt-focal);
}

/* ============================================================================
   768+ — the row becomes two columns.
============================================================================ */
@media (min-width: 768px) {
  .ragazzi-pic-text .pic-text__row {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
  }

  /* THE ONLY LAYOUT AXIS THE DESIGN VARIES. Source order is text then media, so
     the default puts the image on the RIGHT (pt1 and pt3); the modifier reverses
     the row and puts it on the left (pt2). Below 768 both stack text-over-image,
     so the modifier deliberately does nothing there — reversing the stack would
     invent a mobile layout the design does not draw. */
  .ragazzi-pic-text .pic-text__row--image-left {
    flex-direction: row-reverse;
  }

  .ragazzi-pic-text .pic-text__col {
    flex: 0 0 49.892%;
    justify-content: center;
    gap: var(--stack-gap-lg);
    padding-inline: var(--stack-gap-lg);
  }

  .ragazzi-pic-text .pic-text__media {
    flex: 0 0 48.745%;
    /* NOT stretched. The row is `align-items: stretch`, which would make the
       media box as tall as the text column and silently override its
       aspect-ratio — `object-fit: cover` would then crop more than the design
       does. pt1's image opted out with `align-self: flex-start`; pt2 and pt3
       do not, so at 768 - the one band where the two columns are closest - their
       images render 3.58px TALLER than the ratio, stretched by the text column.

       THIS IS A DELIBERATE 3.58px DEVIATION FROM pt2 AND pt3, and the only
       measured difference left between this section and the three originals.
       Taken on purpose: with stretch, the design's 838.41/895.23 ratio holds
       only while the copy happens to be short enough, and `object-fit: cover`
       silently crops more as soon as a merchant writes a longer paragraph. pt1
       is the instance that got it right. Making it explicit took pt1 from a
       3.6px mismatch to an exact match at every width. */
    align-self: flex-start;
  }

  .ragazzi-pic-text .pic-text__img {
    object-position: var(--pt-focal-lg);
  }
}

/* ============================================================================
   PSEUDO-TABLET 768-1023 — the shape is already the desktop two-column one; only
   the scale interpolates.
============================================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .ragazzi-pic-text {
    --text-h2:         clamp(32px, calc(32px + (var(--max-vw) - 768px) * 0.025), 65px);
    --text-btn-shop:   clamp(14px, calc(14px + (var(--max-vw) - 768px) * 0.025), 20px);
    --lh-btn-shop:     1.316;
    --section-pad-y:   clamp(40px, calc(40px + (var(--max-vw) - 768px) * 0.025), 100px);
    --stack-gap-lg:    clamp(32px, calc(32px + (var(--max-vw) - 768px) * 0.025), 60px);
    --stack-gap-md:    clamp(20px, calc(20px + (var(--max-vw) - 768px) * 0.025), 20px);
    --pic-text-gap:    clamp(18.75px, calc(18.75px + (var(--max-vw) - 768px) * 0.025), 18.75px);
    --pill-pad-y:      clamp(15px, calc(15px + (var(--max-vw) - 768px) * 0.025), 20px);
    --pill-pad-x:      clamp(40px, calc(40px + (var(--max-vw) - 768px) * 0.025), 60px);
    --radius-cta-shop: 83.56px;
    --text-body:       clamp(16px, calc(16px + (var(--max-vw) - 768px) * 0.025), 20px);
  }
}

/* ============================================================================
   MOBILE 0-767 — stacked.
============================================================================ */
@media (max-width: 767px) {
  .ragazzi-pic-text {
    --text-h2:         clamp(27px, calc(32px + (var(--max-vw) - 375px) * 0.015), 65px);
    --text-btn-shop:   clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 29px);
    --lh-btn-shop:     1.2;
    --section-pad-y:   clamp(34px, calc(40px + (var(--max-vw) - 375px) * 0.015), 82px);
    --stack-gap-lg:    clamp(17px, calc(20px + (var(--max-vw) - 375px) * 0.015), 41px);
    --stack-gap-md:    clamp(17px, calc(20px + (var(--max-vw) - 375px) * 0.015), 41px);
    --pic-text-gap:    clamp(16px, calc(18.75px + (var(--max-vw) - 375px) * 0.015), 38px);
    --pill-pad-y:      clamp(13px, calc(15px + (var(--max-vw) - 375px) * 0.015), 31px);
    --pill-pad-x:      clamp(34px, calc(40px + (var(--max-vw) - 375px) * 0.015), 82px);
    --radius-cta-shop: 60px;
    --text-body:       clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 33px);
  }
}
