/* ============================================================================
   ragazzi-text-1.css — CARRIED from
   ragazzi-site/community/css/sections/text-1.css.

   A RESTYLE OF DAWN'S `rich-text`, not a custom section. The design is one
   editable paragraph; `rich-text` already IS a rich-text paragraph with an RTE,
   a colour scheme and padding controls, so the port is this stylesheet plus a
   layout switch — no second section to maintain (playbook §10.1/§10.2).
   The switch is a SELECT and not a checkbox on purpose: the mission page ships
   a second, different text layout (`text-2`), so this section will host more
   than one design and a boolean could not say which.

   RENAMED, 1:1:  .text-1  ->  .ragazzi-text-1   (children unchanged)

   ONE DELIBERATE DEVIATION from the static, marked `PORT:` below:
   `--text-body` (20px on both layers, against the site-wide 14 -> 18) comes
   from the static's css/community-page.css, where it sits on
   `body.page-community`. It is scoped to the SECTION root here instead. The
   static's own comment argues it is a document default — true of a static page,
   but in a theme <body> is shared with the header, the footer and every stock
   section, none of which are part of this design, and this theme emits no
   template class on <body> to hang it off. Scoped to the section it travels
   with the section, which is what the static's OTHER token comments ask for.
   All three bands are carried verbatim, in the static's band order.
============================================================================ */

/* ---------------------------------------------------------------------------
   SECTION TOKENS — moved out of the page's tokens.css on 2026-08-13.

   These values are used by THIS block and nothing else, so they belong here,
   not in a site-wide :root. That is not tidiness: in Shopify a section can be
   dropped onto any template from the theme editor, so a section that reads a
   token from a page-level scope breaks the moment it is moved. Scoped to the
   block's own class, it travels with it.

   All three bands are carried verbatim from the page's old tokens.css —
   desktop at the top, then the mobile and pseudo-tablet overrides — so the
   cascade is unchanged. Verified by computed-style diff at 375/768/1024/1440/1920.
--------------------------------------------------------------------------- */

.ragazzi-text-1 {
  --section-pad-y: clamp(53px, calc(100px * (var(--max-vw) / var(--vw-base))), 100px);
  --ls-text1-desktop: 0.025em;
  /* PORT: see the header — this token is the static's body-level one. */
  --text-body: clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
}

@media (max-width: 767px) {
  .ragazzi-text-1 {
    --section-pad-y: clamp(34px, calc(40px + (var(--max-vw) - 375px) * 0.015), 82px);
    --ls-text1-desktop: 0em;
    --text-body: clamp(17px, calc(20px + (var(--max-vw) - 375px) * 0.015), 41px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ragazzi-text-1 {
    --section-pad-y: clamp(40px, calc(40px + (var(--max-vw) - 768px) * 0.025), 100px);
    --ls-text1-desktop: 0em;
    --text-body: clamp(20px, calc(20px + (var(--max-vw) - 768px) * 0.025), 20px);
  }
}

/* ---- MOBILE BASE (0-767) ---------------------------------
   Figma 3100:21251: padding 40/20/40/20, vertical, one child.
   The paragraph is width:FILL -> 335 of the 375 content box, no cap. */
.ragazzi-text-1 {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.text-1__copy {
  font-family: var(--font-body);
  font-size: var(--text-body);          /* Onest 400 / 20px both layers */
  font-weight: 400;
  line-height: var(--lh-body);          /* 120% -> 24px at 20px */
  /* D-text1-6: the +2.5% tracking is DESKTOP-ONLY. The token already
     encodes that per band (0 in the mobile and pseudo-tablet blocks of
     tokens.css, 0.025em at :root = the desktop band), so this single
     declaration is correct on all three layers — do NOT hoist a literal
     0.025em out of the desktop media query, and do NOT normalise it away:
     gate-dom-diff.mjs compares NO letterSpacing, so there is no
     mechanical net under this value. */
  letter-spacing: var(--ls-text1-desktop);
  color: var(--color-text);
  text-align: left;
  /* D-text1-8: Figma emits [word-break:break-word] on BOTH text nodes.
     The modern spelling of that behaviour — never word-break:break-all. */
  overflow-wrap: break-word;
}

/* ---- PSEUDO-TABLET (768-1023) -----------------------------
   has-tablet-layer: false — this band is interpolated, not designed.
   D-text1-3: NO width cap below 1024; the paragraph keeps the mobile
   geometry and fills the content box. The section padding and the type
   are already interpolated by the tokens, so this band needs no rule of
   its own. Recorded explicitly so a later stage does not read the
   absence as an omission. */

/* ---- DESKTOP (1024+) --------------------------------------
   Figma 3100:20972: padding 100 all round; the copy is a FIXED 447px
   left column pinned at the content edge (x=100), with 1273px of
   deliberate empty space to its right. Not centred, not full width. */
@media (min-width: 1024px) {
  .text-1__copy {
    /* D-text1-2 (MUST-APPLY): the 447 cap SCALES in lockstep with the
       font (which is 20px * max-vw/1920 on this band). A fixed 447 while
       the type shrinks changes characters-per-line and re-wraps the
       paragraph to a different line count — i.e. a different section
       height. D-min = round(447 * 1024/1920) = 238; D-max = 447 = D-base,
       which is CORRECT here (--vw-base == --max-vw == 1920, the PINNED
       identity in brief-page.md §4.1), not fluid-formulas mistake #1. */
    max-width: clamp(238px, calc(447px * (var(--max-vw) / var(--vw-base))), 447px);
  }
}

/* ============================================================================
   ADAPTATION — Dawn reconciliation. Everything above this line is the carried
   static; everything below exists only because Dawn is underneath.

   IT IS EMPTY, AND THAT IS THE RESULT, NOT AN OVERSIGHT.

   Dawn's rich-text nests the copy five boxes deep:
     .isolate.page-width > .rich-text.content-container > .rich-text__wrapper
     > .rich-text__blocks > .rich-text__text.rte > p
   Three of those are purely presentational and each one would have cost a
   counter-rule (playbook §8.3 — ask whether you still need the WRAPPER before
   you write a rule against it):
     - `page-width` caps at 1200px, and its widest rule is (0,5,1); the design
       caps at 1920 through `.container`. Removed in markup, never fought.
     - `content-container` paints the theme's text-box border and shadow, which
       this design has none of.
     - `.rich-text__wrapper` is `width: calc(100% - 8rem / …); margin: auto` at
       (0,3,0) — it would inset the paragraph 40px from the 100px gutter the
       design measures, and centre what the design pins left.
   The `intro` branch of sections/rich-text.liquid does not emit them, so
   nothing here has to undo them.

   What IS kept, deliberately:
     - `.rich-text__blocks` — Dawn's block container and the alignment class.
       Its `max-width: 50rem / 78rem` is INERT under this design at every
       viewport: the paragraph's own cap is 238px at 1024 and 447px at 1920,
       both far inside it, and a left-aligned box is not moved by a cap it never
       reaches. Measured, not assumed; do not add a rule for it.
     - `.rte` — its `> *:first-child { margin-top: 0 }` pair is what keeps the
       merchant's <p> flush, and `.ragazzi-section *` zeroes the rest.
     - Dawn's `.section-{id}-padding`, but ONE BOX IN — on `.rich-text__blocks`,
       not on the section root. Dawn emits it from an inline style block, so on
       the root it would tie with the carried `--section-pad-y` at (0,1,0) and
       win on source order, zeroing the design's vertical rhythm from a slider
       nobody touched. Moved in, the two paddings add; the template seeds the
       sliders at 0, so the shipped page is exactly the static.
============================================================================ */
