/* ============================================================================
   PORT - carried from ragazzi-site/pdp-gels/css/sections/faq.css by script,
   then edited only where this list says.

   1. NAMESPACED. The static file was never namespaced: it styled the BARE class
      `.faq` and bare `.faq__*` parts. `assets/` is flat and one theme.liquid
      serves every template, so all 30 selectors now begin with `.ragazzi-faq` -
      the root rewritten in place, the BEM parts gaining it as an ancestor
      (+1 class). Checked for flips against the accordion template: `.faq__q` vs
      `.accordion-question`, and `.faq__q .accordion-icon` vs
      `.accordion-question .accordion-icon`, were TIES that faq won on source
      order and now win on specificity. Same outcome, no rule changes sides.
      107 declarations in, 107 out, none lost and none gained.

   2. `.faq__placeholder` -> `.faq__answer-body`, and `--text-body` scoped to the
      section. Both marked ADAPTATION where they sit.

   The bare `.faq` this file used to carry was itself a live hazard: the PRISTINE
   accordion template styles `.faq` too (margin-top 60, plus a flex layout above
   1440), which the static had to neutralise page-side. That template half is not
   shipped any more - `ragazzi-accordion.css` is the thinned copy, byte-identical
   to the static's - so there is nothing left to collide with, and the namespace
   means there never can be again.
============================================================================ */

/* ============================================================================
   faq.css — SECTION 6 · Figma desktop `3100:1909` / mobile `3100:3279`
   Owner: BUILD-SECTION `faq`. Scope: ONLY `.faq*` rules + scoped overrides of
   template classes that index.html already links. This file writes NO global
   selector, no `:root`, no token, and touches no other section.

   MOBILE-FIRST. Base = 375. Pseudo-tablet band 768-1023 (has-tablet-layer:
   false, so it is MANDATORY — without it the desktop formula fires at 768).
   Desktop layer at 1024. Breakpoints are 768 / 1024 only.

   Fluid formulas (pipeline/components/fluid-formulas.md, brief-page.md §7):
     base    (0-767)   clamp(M-min, calc(M-base + (--max-vw - 375px) * 0.015), M-max)
     tablet  (768-1023)clamp(M-base, calc(M-base + (--max-vw - 768px) * 0.025), D-base)
     desktop (1024+)   clamp(D-min, calc(D-base * (--max-vw / --vw-base)), D-max)
   `--vw-base` == `--max-vw` == 1920 on this page, so every desktop max EQUALS
   its base. Correct here, not fluid-formulas "Common mistake #1".

   FD-92 NOTE — do NOT re-fix it here. `css/templates/accordion.css` styles the
   BARE class `.faq`, which is this section's root class AND a GATE_DOM selector
   contract, so linking the template alone imposed `margin-top: 60px` (160px +
   `display:flex; gap:38px` above 1440). PAGE-SCAFFOLD already neutralised it in
   `css/components.css`. This file therefore never sets `margin` on `.faq` — if
   an unexplained top margin ever reappears, the neutraliser was removed.

   FD-88 NOTE — every line-height used here is a REAL measured percentage from
   the cache (`110%` on the h2 and the desktop question, `120%` on the mobile
   question), never an exporter `"100%"`. Nothing needed a live re-measure.
============================================================================ */

/* ---------------------------------------------------------------------------
   SECTION TOKENS — moved out of the page's tokens.css.

   Read by THIS block and nothing else on the site, so they belong here rather
   than in a site-wide :root. 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.

   EVERY band is carried verbatim from the old tokens.css, in that file's own
   order — so the cascade is unchanged whether the page was written
   desktop-first (base + max-width overrides) or mobile-first (base +
   min-width overrides). Verified by computed-style diff at
   375/768/1024/1440/1920.
--------------------------------------------------------------------------- */

.ragazzi-faq {
  --color-ink: #000000;
  --text-h4:   clamp(14px, calc(16px + (var(--max-vw) - 375px) * 0.015), 33px);
}

@media (min-width: 768px) {
  .ragazzi-faq {
    --text-h4: clamp(16px, calc(16px + (var(--max-vw) - 768px) * 0.025), 25px);
  }
}

@media (min-width: 1024px) {
  .ragazzi-faq {
    --text-h4: clamp(13px, calc(25px * (var(--max-vw) / var(--vw-base))), 25px);
  }
}

/* --------------------------------------------------------------------------
   Section shell — Pattern B-edge on BOTH layers.
   Figma: desktop `3100:1909` padding `[100,0,100,0]` (full-bleed section, the
   inner `Container` 3100:1910 carries `[0,100,0,100]`); mobile `3100:3279`
   padding `[40,20,40,20]` with no inner wrapper at all.

   WHERE THE GUTTER LIVES — per LAYER, not averaged. brief §1b proposed moving
   the mobile gutter inward onto `.faq__inner` at both layers "because nothing
   renders differently". True visually, but it makes the built `.faq` node carry
   `padding-inline: 0` where Figma's mobile node carries 20 — a 20px per-side
   deviation on a node the selector contract grades. Reproducing each layer's
   own node instead costs one media-query line and nothing else:
     mobile / pseudo-tablet : gutter on `.faq` (supplied by `.container`)
     desktop (>=1024)       : gutter on `.faq__inner`, `.faq` padding-inline 0
   `.faq` therefore carries plain `.container` (NOT `.container--bleed`, which
   would zero the mobile gutter) plus `max-width: none` below, so the white
   background still reaches the viewport edges (Pattern B-edge) while the
   CONTENT is capped and centred by `.faq__inner`.
   NEVER a `padding` shorthand on a `.container` — it would wipe the gutter.
   Only `padding-top` / `padding-bottom` / `padding-inline` longhands are used.
-------------------------------------------------------------------------- */
.ragazzi-faq {
  /* Pattern B-edge: the section background spans the viewport; `.container`'s
     1920 cap belongs to the CONTENT, and is applied to `.faq__inner` instead. */
  max-width: none;
  /* mobile 40 (min 34 / max 82) -> desktop 100 (min 53). `--section-py` is the
     page default and this section is one of the four that use it verbatim. */
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  /* `fill: #ffffffff` on both section frames. Same as the page background;
     stated because Figma states it. */
  background-color: var(--color-white);

  /* Section-scoped fluid values. Declared on the root so the mobile band is the
     base and each @media below re-declares only what changes. */

  /* row padding-block — Figma mobile `List` [10,0,10,0] / desktop
     `List Item` [20,0,20,0] */
  --faq-row-pad: clamp(9px, calc(10px + (var(--max-vw) - 375px) * 0.015), 20px);
  /* icon BOX — mobile `Container` 22.5 / desktop 30.476 */
  --faq-icon-box: clamp(19px, calc(22.5px + (var(--max-vw) - 375px) * 0.015), 46px);
  /* `+` GLYPH inside the box — mobile 8.442 / desktop 11.435 */
  --faq-glyph: clamp(7px, calc(8.442px + (var(--max-vw) - 375px) * 0.015), 17px);
  /* question -> answer gap. Desktop `List Item` gap 10 (3100:1915). Mobile has
     no `List Item` level at all, so there is no mobile counterpart:
     [UNMEASURED — no Figma counterpart], 10px used on both layers per D-FAQ-6.
     Do not "correct" the mobile value against the cache; it is not in there. */
  --faq-answer-gap: clamp(9px, calc(10px + (var(--max-vw) - 375px) * 0.015), 20px);
  /* row hairline — NOT fluid (D-FAQ-9). The per-side `strokeWidths.bottom` is
     authoritative: 0.5 mobile / 1.0 desktop, `INSIDE`, `#000000`. The scalar
     `strokeWidth` in the cache (0.9375 / 1.2698) is a frame-scale artefact and
     is deliberately ignored. */
  --faq-rule: 0.5px;
}

/* --------------------------------------------------------------------------
   Inner wrapper — Figma's desktop `Container` 3100:1910. It carries the gutter
   at >=1024 (below that the gutter is on the section, see above) and is the flex
   context that becomes the two columns at 1024.

   KNOWN TREE-SHAPE RESIDUAL (mobile): Figma's mobile layer has NO inner wrapper
   at all — `3100:3279` is itself the `flex column, gap 20` that stacks the
   heading over the list. This build needs the wrapper for the desktop two-column
   split and ships ONE DOM, so the stack lives here and the mobile section node
   computes `gap: 0` where Figma says 20. Everything RENDERS in the same place
   (measured: title y=40, list y=95.19 at 375 — Figma 40 / 95). Left as-is
   deliberately: the alternative is either `display: contents` gymnastics or a
   decorative `gap` on a single-child flex box, i.e. a value that exists only to
   satisfy a reader. Declared here so nobody "discovers" it later.
-------------------------------------------------------------------------- */
.ragazzi-faq .faq__inner {
  width: 100%;
  /* The section is full-bleed, so the CONTENT still has to stop growing at the
     1920 design width and centre above it. Without this the two desktop columns
     keep spreading past `--vw-base` — the documented above-1920 blind spot. */
  max-width: 1920px;
  margin-inline: auto;
  /* No gutter here below 1024 — Figma's mobile gutter is on the SECTION and it
     is applied there by `.container`. The desktop block moves it in. */
  padding-inline: 0;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* heading -> list, Figma mobile `gap: 20` (M-min 17 / M-max 41) */
  gap: clamp(17px, calc(20px + (var(--max-vw) - 375px) * 0.015), 41px);
}

/* --------------------------------------------------------------------------
   Heading column `3100:1911` (desktop) — a real element at every layer so the
   `.faq__title-col` contract resolves, but INERT on mobile, where Figma has no
   column wrapper and the `<h2>` is a direct child of the section.
-------------------------------------------------------------------------- */
.ragazzi-faq .faq__title-col {
  width: 100%;
}

/* `More \nQuestions?` — `3100:1912` (65/500/110%) / `3100:3280` (32/500/110%).
   No `textCase` on either layer: the string ships exactly as drawn.
   `width: fit-content` because BOTH Figma text boxes HUG their copy (341 desktop
   / 254 mobile). A block-level `<h2>` would stretch to the full column (335 on
   mobile) and report a 32% width deviation against a node whose box is the ink
   itself. Alignment is unaffected — the text is left-aligned in both cases. */
.ragazzi-faq .faq__title {
  width: fit-content;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--lh-tight); /* Figma 110% on BOTH layers — a real value */
  letter-spacing: 0em;
  color: var(--color-ink);
  text-align: left;
}

/* Desktop's hard line break after "More ", without breaking the mobile single
   line. Two inline spans keep the literal space inside `textContent`, so the
   gate's `characters` comparison normalises cleanly (a `<br>` would not). */
.ragazzi-faq .faq__title span {
  display: inline;
}

/* --------------------------------------------------------------------------
   Accordion container `3100:1913` / `3100:3281`.
   `gap` here is FORBIDDEN (accordion/ADAPT.md §3a) — Figma uses `gap: 0` plus
   padding on each row, which is the sanctioned shape. Copied literally.
-------------------------------------------------------------------------- */
.ragazzi-faq .faq__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* D-FAQ-4: the mobile list is 337.5 wide at x=20, i.e. it bleeds 2.5px past
     the 20px right gutter. That is the same 0.9375 frame-scale artefact this
     page shows in `comparison`, measured not rounded. 90vw == 337.5 at 375
     (M-min 288 at 320, M-max 690 at 767 — still inside the 727px content box).
     It cannot produce a horizontal scrollbar: 357.5 < 375 and base.css sets
     `overflow-x: clip` (never `hidden`) on html/body. */
  width: 90vw;
  max-width: 690px;
}

/* Row `List` 3100:1914 (desktop) / 3100:3282 (mobile) — the graded node.
   Height closes exactly: 10 + 22.5 + 10 + 0.5 = 43 (mobile),
   0 + [20 + 30.476 + 20] + 1 = 71.476 (desktop).

   The row padding sits on a DIFFERENT level per layer in Figma — on this node
   on mobile (`padding [10,0,10,0]`), on the `List Item` child on desktop
   (`padding [20,0,20,0]`, this node being `[0,0,0,0]`). `.faq__item-body` is
   that `List Item`, and the desktop block below moves the padding onto it. */
.ragazzi-faq .faq__item {
  padding-top: var(--faq-row-pad);
  padding-bottom: var(--faq-row-pad);
  /* EVERY row has a bottom rule, including the LAST one, and EVERY row has
     padding-top, including the FIRST one. The accordion template's optional
     `:first-child { padding-top: 0 }` / `:last-child { border-bottom: 0 }` are
     deliberately NOT applied — Figma draws both (brief §5). */
  border-bottom: var(--faq-rule) solid var(--color-ink);
}

/* `List Item` 3100:1915 — desktop-only in Figma, present at every layer here as
   a transparent wrapper (no mobile node grades it). Figma gives it `gap: 10`,
   which is the question->answer spacing; it is NOT applied as `gap` because a
   flex gap also applies while the panel is collapsed and would add 10px to
   every CLOSED row. It lives inside the panel as padding instead — see
   `.faq__answer-body`. */
.ragazzi-faq .faq__item-body {
  padding-top: 0;
  padding-bottom: 0;
}

/* Trigger `Container` 3100:1916 / 3100:3283 — `flex row`, `SPACE_BETWEEN`,
   `align-items: CENTER`, full row width. Its height is set by the icon box
   (30.476 desktop / 22.5 mobile), which is taller than the text line. */
.ragazzi-faq .faq__q {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

/* Question text `3100:1918` (25/500/110%/TITLE) / `3100:3285` (16/500/120%/UPPER).
   The DOM holds the RAW Figma string; the casing is done here, so `textContent`
   still equals Figma `characters` (D-FAQ-10).

   Flex sizing: `flex: 0 1 auto; min-width: 0` — it may SHRINK and wrap, it may
   not GROW. Shrink+`min-width: 0` is what the wrap strategy in brief §5 exists
   for (when the real copy lands, a long question wraps to two lines and, with
   `align-items: center`, the `+` stays vertically centred instead of being
   pushed out of the row). Grow is NOT needed for that and would inflate this
   node's measured box from Figma's hugged 274px (desktop) / 205px (mobile) to
   the full 1125px of free row width — a delta the selector contract grades.
   `white-space: nowrap` is the named anti-pattern here and is never used. */
.ragazzi-faq .faq__q-text {
  flex: 0 1 auto;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--text-h4);
  font-weight: 500;
  line-height: var(--lh-body);  /* Figma 120% on mobile — a real value */
  letter-spacing: 0em;
  text-transform: none;         /* owner: questions in sentence case, not caps */
  color: var(--color-ink);
}

/* Icon box `3100:1919` / `3100:3286`. `.accordion-icon` is a LOGIC class that
   `accordion.js` creates and owns — this is a scoped override of it, never a
   rename. Figma: a flex frame, centre/centre, fixed square, no radius. */
.ragazzi-faq .faq__q .accordion-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--faq-icon-box);
  height: var(--faq-icon-box);
  color: var(--color-ink); /* the SVG paths use `currentColor` */
}

/* The `+` / `-` glyph. Figma is 11.435 x 11.4413 (desktop) and 8.442 x 8.447
   (mobile) — a 1:1.0005 aspect, i.e. square to within 0.006px. Shipped square;
   the viewBox keeps the drawn proportion regardless. */
.ragazzi-faq .faq__q .accordion-icon > svg,

.ragazzi-faq .faq__glyph {
  width: var(--faq-glyph);
  height: var(--faq-glyph);
  flex: 0 0 auto;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Answer panel — the collapse mechanics.

   FD-18 (brief §11 MUST-APPLY 7): `accordion.css` declares
   `height: 0; overflow: hidden; transition: height .3s ease` ONLY on its demo
   class `.faq-answer` and has NO rule for `.accordion-answer`. A build that
   renames the CSS class (exactly what ADAPT.md instructs) therefore loses the
   collapse silently — the panel would sit open at full height forever.
   The slice asks for the counter-rule in `css/components.css`; this section is
   structurally LOCKED OUT of that file (GLOBAL-SCOPE LOCK), so it is declared
   here instead, on BOTH the logic class and the BEM class, scoped to `.faq`.
   Declaring both means a later class rename cannot drop it.

   `accordion.js` drives `height` inline (0 -> scrollHeight -> auto), so CSS
   must not fight it: no `display: none`, no `height` in any @media.
-------------------------------------------------------------------------- */
.ragazzi-faq .accordion-answer,

.ragazzi-faq .faq__answer {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

/* The 10px question->answer gap lives INSIDE the panel as padding, not as a
   `margin-top` on the panel: a margin would apply while the row is CLOSED too
   and silently add 10px to every collapsed row (71.476 -> 81.476 desktop),
   breaking the one measurement the whole section is graded on. As padding it is
   clipped by `overflow: hidden` at height 0 and appears only when open. */
.ragazzi-faq .faq__answer-body {
  padding-top: var(--faq-answer-gap);
  /* No font-size: Figma contains NO answer node on either layer, so there is
     nothing to measure. It inherits the section's body size (`--text-body`,
     scoped at the end of this file) rather than inventing a value.

     ADAPTATION - this was `.faq__placeholder`, styling a `[data-content-needed]`
     paragraph. That is a PIPELINE PLACEHOLDER, not content ("[CONTENT NEEDED:
     FAQ row 1]"), so it is not carried, and neither is the grey italic the
     shared components.css gave it. The answer is a richtext setting per row;
     this class now wraps it and keeps the one thing the rule was really for -
     the question-to-answer gap, as PADDING so a closed row stays closed. Same
     treatment the ingredients supplement-facts panel got. */
}

/* ============================================================================
   PSEUDO-TABLET 768-1023 — no Figma layer. The section STAYS in the mobile
   single-column shape (D-FAQ-5); only type and spacing interpolate. The
   two-column split starts at 1024, not 768: at 768 the desktop list width would
   compute to 462px against a 728px content box under a 26px heading — a shape
   Figma never draws.
============================================================================ */
@media (min-width: 768px) {
  .ragazzi-faq {
    --faq-row-pad: clamp(10px, calc(10px + (var(--max-vw) - 768px) * 0.025), 20px);
    --faq-icon-box: clamp(22.5px, calc(22.5px + (var(--max-vw) - 768px) * 0.025), 30.476px);
    --faq-glyph: clamp(8.442px, calc(8.442px + (var(--max-vw) - 768px) * 0.025), 11.435px);
    --faq-answer-gap: 10px; /* M-base and D-base are both 10 — flat by measurement */
  }

  /* The 2.5px mobile bleed is a 375-frame artefact and does not belong to this
     band: the list simply fills the content column. */
  .ragazzi-faq .faq__list {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================================
   DESKTOP 1024+ — two columns.
   Arithmetic that must hold at 1920:
     100 + 341 + 223.44 + 1155.556 + 100 = 1920            (space-between)
     664.444 + 1155.556 = 1820 = 1920 - 100                (list right edge)
     6 x 71.476 = 428.86                                   (list height)
     100 + 526.984 + 100 = 726.98                          (section height)
============================================================================ */
@media (min-width: 1024px) {
  .ragazzi-faq {
    --faq-row-pad: clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
    --faq-icon-box: clamp(16px, calc(30.476px * (var(--max-vw) / var(--vw-base))), 30.476px);
    --faq-glyph: clamp(6px, calc(11.435px * (var(--max-vw) / var(--vw-base))), 11.435px);
    --faq-answer-gap: clamp(5px, calc(10px * (var(--max-vw) / var(--vw-base))), 10px);
    --faq-rule: 1px; /* strokeWidths.bottom = 1.0 on desktop */
  }

  /* The gutter moves inward: Figma's desktop section is `[100,0,100,0]` and the
     inner `Container` 3100:1910 carries `[0,100,0,100]`. */
  .ragazzi-faq {
    padding-inline: 0;
  }

  .ragazzi-faq .faq__inner {
    padding-inline: var(--container-pad);
    flex-direction: row;
    /* NOT a gap. `3100:1910` is `justifyContent: SPACE_BETWEEN`; the 223.44px
       between the columns is PRODUCED by it. Hard-coding 223.44 as a gap would
       be correct at exactly 1920 and wrong at every other width. */
    justify-content: space-between;
    /* `alignItems: MIN` — natural height, NOT stretch. The list column must not
       be stretched to the heading column's 526.984px. */
    align-items: flex-start;
    gap: 0;
  }

  .ragazzi-faq .faq__title-col {
    /* Hug: 341px with this copy. Figma also caps it at 561.2698 (D-min 299). */
    width: auto;
    flex: 0 1 auto;
    max-width: clamp(299px, calc(561.2698px * (var(--max-vw) / var(--vw-base))), 561.2698px);
    /* D-FAQ-3 — the 98.12px trap. `Heading 2` 3100:1911 carries an EXPLICIT
       526.984px height while its only child is a 144px text, and THAT is what
       makes the section 726.98 tall (the list is only 428.86). Omitting it
       renders the section 628.86 — 98.12px short — and shifts every following
       section up the assembled page.
       `min-height`, never `height`: a Figma-constant height restated as a hard
       input caps content (build-pitfall #9 / FD-29). */
    min-height: clamp(281px, calc(526.984px * (var(--max-vw) / var(--vw-base))), 526.984px);
  }

  /* Desktop's hard line break: "More" / "Questions?" on two lines. */
  .ragazzi-faq .faq__title span {
    display: block;
  }

  .ragazzi-faq .faq__list {
    /* 1155.556 of the 1720px content box = 67.18349%. Expressed as a ratio, not
       a px width, so it scales with the container: at 1024 it yields 616px,
       which is exactly the slice's D-min. */
    flex: 0 0 auto;
    width: 67.18349%;
    max-width: none;
  }

  /* Row padding moves from the row onto the `List Item` level, exactly as the
     desktop tree draws it (3100:1914 padding 0 / 3100:1915 padding [20,0,20,0]). */
  .ragazzi-faq .faq__item {
    padding-top: 0;
    padding-bottom: 0;
  }

  .ragazzi-faq .faq__item-body {
    padding-top: var(--faq-row-pad);
    padding-bottom: var(--faq-row-pad);
  }

  .ragazzi-faq .faq__q-text {
    line-height: var(--lh-tight);  /* Figma 110% on desktop — a real value */
    text-transform: capitalize;    /* `textCase: TITLE` on all 6 desktop nodes */
  }
}


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

   In the static this is a PAGE token: `.page-pdp-gels` caps it at 20px on
   desktop where the site's tokens cap at 18px, and the answer text inherits it
   through <body>. A Shopify theme has no page scope - a section can be dropped
   onto any template from the editor - so without this the answers render at a
   size the design never had. Identical to the fix in
   ragazzi-comparison-table.css.

   All three bands are carried verbatim from pdp-gels-page.css and kept TOGETHER
   at the end of the file rather than folded into the section's own token blocks:
   this file has two `@media (min-width: 768px)` blocks and two at 1024, so
   scattering them would make the winning declaration a matter of which block a
   reader happens to find. Here the order is plain - equal specificity, last
   matching band wins.
============================================================================ */
.ragazzi-faq {
  --text-body: clamp(12px, calc(14px + (var(--max-vw) - 375px) * 0.015), 29px);
}

@media (min-width: 768px) {
  .ragazzi-faq {
    /* where the page scale starts to diverge from the site's: 20 against 18 */
    --text-body: clamp(14px, calc(14px + (var(--max-vw) - 768px) * 0.025), 20px);
  }
}

@media (min-width: 1024px) {
  .ragazzi-faq {
    --text-body: clamp(11px, calc(20px * (var(--max-vw) / var(--vw-base))), 20px);
  }
}
