/*
 * pm-faq-band — the FAQ band on the product family pages (WO-119).
 *
 * Source frame: docs/design/frames/119-faq-band.json, node 369:3198 — an ink
 * band between the CTA band and the footer: an eyebrow and a heading, then a
 * 2×2 grid of up to four FAQ accordion items, the first one open. The three
 * children of the FAQ Section wrapper abut exactly (0 + 448 = 448, 448 + 643
 * = 1091); this file adds no margin anywhere, which is what keeps the seams
 * at zero (AC 6).
 *
 * Compiled to assets/css/components/faq-band.css by src/build-tokens.mjs,
 * which substitutes the breakpoint markers (a comment holding `@bp <name>`)
 * with the pixel value from tokens/tokens.json. Never type a breakpoint
 * width here.
 *
 * Every colour is a --pm-color-* token; the heading's size, weight, leading
 * and tracking are the WO-28 typography tokens. No hex value and no literal
 * breakpoint width may appear in this file.
 *
 * The rows are the SHARED writer's markup (Poortman\Core\Widgets\Accordion
 * ::render, WO-33). Every rule below that touches a .pm-accordion class is a
 * band override scoped to .pm-faq-band and written at STRICTLY HIGHER
 * specificity than accordion.css's own rule — including its
 * `.pm-accordion__row:first-child` (0,2,0) and
 * `.pm-accordion__row--open .pm-accordion__toggle` (0,2,0), which a plain
 * `.pm-faq-band .pm-accordion__x` would only TIE with. Nothing here depends
 * on the load order between the two component files; the convention
 * registration guarantees no order (the §C15 lesson, faq.css's own rule).
 * accordion.css, accordion.js, faq.css and faq.js are NOT this ticket's
 * files and are unchanged.
 *
 * The eyebrow is NOT styled here: the widget renders it through the
 * section-header pattern's own writer (SectionHeader::render_header), so its
 * rule and label are section-header.css's — one writer, no copy. The frame's
 * eyebrow is that pattern unchanged: a 40px accent rule, 16 apart from the
 * 12px accent caption (119-faq-band.json#component.header_row.eyebrow —
 * rule_width 40, text_x 56 = 40 + 16).
 */

/*
 * The band is a full-width strip (the cta-band's full-bleed technique — the
 * scaffold body constrains content to a centred 72rem column), on the ink
 * ground the frame's footer below also carries, which is exactly why the
 * seam matters. Padding 96 all round, and 80 between the head and the grid:
 * 96 + 85 (head) + 80 = 261, the frame's grid y
 * (119-faq-band.json#component.grid.box.y). 96 is --pm-space-24, 80 is
 * --pm-space-20.
 *
 * The 643px band height is a CONSEQUENCE of the content, not a value: 96 +
 * 85 + 80 + 286 + 96 = 643. No height is set here, so two questions render a
 * shorter band than four and nothing is reserved (AC 2).
 */
.pm-faq-band {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	/*
	 * AC 11 — the band's bottom edge and the footer's top edge touch
	 * exactly. The scaffold stylesheet's `article { margin-bottom:
	 * var(--pm-space-12) }` (style.css:26) COLLAPSES THROUGH <main> —
	 * main's own bottom margin computes 0 and it carries no padding and no
	 * border — so that 48px becomes the separation between the article and
	 * the footer. Measured on develop before this ticket: the CTA band
	 * ended at 2144 and the footer began at 2192 on every product family
	 * page, and /over-ons/ still does.
	 *
	 * Cancelled HERE, from the component, with the same house technique the
	 * scaffold's other two edges already use: .pm-header carries
	 * `margin-top: calc(-1 * var(--pm-space-8))` (header.css:35) and
	 * .pm-footer `margin-bottom: calc(-1 * var(--pm-space-8))`
	 * (footer.css:46), both cancelling the body's padding. The SAME TOKEN
	 * the scaffold rule uses is negated here, so if --pm-space-12 changes
	 * the cancel follows it.
	 *
	 * NOT by widening style.css:48's `body.pm-header--overlay article`.
	 * That rule is WO-93's, scoped to one variant on purpose, and hand-
	 * generalising a variant selector is MISTAKES.md §G21 — the trap that
	 * bit WO-117 two tickets ago. A negative margin on the band reaches
	 * only pages that HAVE a band, needs no body class, and disappears with
	 * the component.
	 *
	 * Revisit when the layout epic replaces the scaffold body styles — the
	 * same note footer.css carries.
	 */
	margin-bottom: calc(-1 * var(--pm-space-12));
	gap: var(--pm-space-20);
	padding: var(--pm-space-24);
	background-color: var(--pm-color-ink);
	/*
	 * The band's bottom edge, sampled from the component render
	 * (118-faq-band-homepage-369-3168.png, the homepage instance 369:3168):
	 * its LAST pixel row — and only that row — is the Terra Sienna palette
	 * entry at every one of the 1440 columns, while rows y0-y2 and y639-y641
	 * are plain ink. The Footer component (98:1228) rendered separately has
	 * ink in all of its top eight rows, so the line belongs to this band's
	 * bottom edge and not to the footer's top.
	 *
	 * It is load-bearing, not decorative: the band and the footer are BOTH
	 * --pm-color-ink, so without this line they read as one undifferentiated
	 * dark mass. That is almost certainly why the designer drew it.
	 *
	 * On the box, not inside the padding, so it runs the full 100vw bleed
	 * edge to edge — matching the render, where the row is accent at x0 and
	 * x1439 as well as under the 96px gutters. The 1px hairline is a
	 * measured value with no token (the accordion row's and the section
	 * header's rule precedent); the colour is the accent token, never a hex.
	 *
	 * Height: `box-sizing: border-box` does not absorb this, because the
	 * band's height is auto — so the border adds 1px to the border box. Zero
	 * effect on every measured value (padding, head y, grid y, column width,
	 * both gaps are all unchanged) and none on the seam either: the footer
	 * follows the border box, so it simply starts 1px lower and the border
	 * stays visible immediately above it rather than hidden beneath it.
	 * Figma drew the same stroke INSIDE its 643, which is why the frame
	 * measures 643 and this renders 1px taller than its content.
	 */
	border-bottom: 1px solid var(--pm-color-accent);
}

/*
 * The head (119-faq-band.json#component.header_row — box 1248 × 85): the
 * eyebrow block is 14 high, the title box starts at y38, so the gap is 24
 * (--pm-space-6) and 14 + 24 + 47 = 85.
 */
.pm-faq-band__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--pm-space-6);
}

/*
 * 119-faq-band.json#component.header_row.title — height 47 across the full
 * 1248 content width. The frame's H2 is the WO-28 heading: 40px
 * (--pm-font-size-h2) ExtraLight, letter-spacing -2, and the leading is the
 * font's own `normal` (--pm-leading-normal), which is what makes the box 47
 * rather than the pattern title's 40 at line-height 1. White on the ink
 * ground — --pm-color-on-accent is the White role (the cta-band's reading,
 * WO-26 AC 3), and the frame's heading samples that role's palette entry
 * (white) exactly.
 *
 * No max-width: the pattern's title is capped at 702 for measure, this one
 * spans the content width the extract measures.
 */
.pm-faq-band__title {
	margin: 0;
	font-family: var(--pm-font-family-base);
	font-size: var(--pm-font-size-h2);
	font-weight: var(--pm-font-weight-200);
	line-height: var(--pm-leading-normal);
	letter-spacing: var(--pm-tracking-h2);
	color: var(--pm-color-on-accent);
}

/*
 * The grid IS the shared accordion's one root (119-faq-band.json#component
 * .grid): two columns with an 80 column gap and an 80 row gap. At 1440 the
 * content box is 1440 − 2 × 96 = 1248, so each column is (1248 − 80) / 2 =
 * 584 — the extract's column_width, reached by arithmetic rather than typed.
 *
 * minmax(0, 1fr) rather than 1fr so a long unbroken question cannot push a
 * column past its track (MISTAKES.md §E4 — Dutch runs 20-30% longer).
 *
 * AC 2 — auto-placement creates only the rows its items need, so two items
 * render one row of two and NO empty cells exist to reserve.
 */
.pm-faq-band .pm-accordion {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--pm-space-20);
	row-gap: var(--pm-space-20);
}

/*
 * The rows carry NO padding and NO rules in this band — the frame draws
 * neither, and the 80px row gap is the only separation. Both selectors are
 * written one class deeper than accordion.css's `.pm-accordion__row` (0,1,0)
 * AND its `.pm-accordion__row:first-child` (0,2,0), so the first row's top
 * border cannot survive on load order.
 *
 * This is what puts the first item's title at the grid's own y: the open
 * item is then title 56 + 16 + description 78 = 150, the second row 56, and
 * 150 + 80 + 56 = 286 — the extract's grid height, exactly.
 */
.pm-faq-band .pm-accordion .pm-accordion__row,
.pm-faq-band .pm-accordion .pm-accordion__row:first-child {
	padding: 0;
	border: 0;
}

/*
 * 119-faq-band.json#component.grid.item — the title box is 568 and the 16px
 * icon sits at x568, so 568 + 16 = 584 fills the column with NO gap between
 * them. accordion.css's 16px toggle gap would wrap the title 16px early, so
 * the column gap is cleared here; `justify-content: space-between` (the
 * shared rule) still pins the icon to the column's right edge.
 *
 * Both the closed and the open title are White: accordion.css carries the
 * light-ground inversion (closed accent, open ink) and ink on ink would be
 * invisible. The second selector is (0,3,0) so it beats
 * `.pm-accordion__row--open .pm-accordion__toggle` (0,2,0) outright.
 */
.pm-faq-band .pm-accordion .pm-accordion__toggle,
.pm-faq-band .pm-accordion__row--open .pm-accordion__toggle {
	column-gap: 0;
	color: var(--pm-color-on-accent);
}

/*
 * 119-faq-band.json#component.grid.item — title_height_one_line 28 and
 * title_height_two_lines 56, i.e. a 28px line box on the 24px H3
 * (--pm-font-size-h3). accordion.css sets line-height 1 for its own frames;
 * this frame's is the font's `normal`. The icon offsets confirm it: y 6 on
 * one line and 20 on two are (28 − 16) / 2 and (56 − 16) / 2, the shared
 * rule's `align-items: center` centring the 16px icon on the title box.
 */
.pm-faq-band .pm-accordion .pm-accordion__title {
	line-height: var(--pm-leading-normal);
}

/*
 * The open item's answer (119-faq-band.json#component.grid.item
 * .open_item_description — y72 = title 56 + the shared panel's own 16px
 * padding-top, width 584, height 78 = 3 × 16/1.6). Only the colour changes:
 * accordion.css's body-text is black at 64% and would vanish on ink. The
 * frame's description samples the Powder Blush palette entry exactly — the
 * surface-alt role, already used as on-ink text by contact.css:353,
 * hero.css:188 and deliver.css:133.
 */
.pm-faq-band .pm-accordion .pm-accordion__description {
	color: var(--pm-color-surface-alt);
}

/*
 * AC 8 — one column below the laptop breakpoint, two above.
 *
 * TODO(open-question): the frame gives 1440 only (119-faq-band.json#component
 * .box) and there is no mobile design — MISTAKES.md §C7. This follows the
 * house pattern the other two-column components use, unchanged and not
 * invented: products.css:91 collapses its two columns at
 * `max-width: @bp laptop` and steps the inline padding to --pm-space-6 at
 * `max-width: @bp tablet`, and models.css:121 does the same. The 80px ROW
 * gap is kept in the stack — unlike products.css, which reduced its gap
 * because an 80px COLUMN gap became a hole between stacked blocks; here 80
 * is already the frame's own row gap between items. Owner: the designer,
 * with the missing mobile design.
 */
@media (max-width: 1024px) {
	.pm-faq-band .pm-accordion {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 768px) {
	.pm-faq-band {
		padding: var(--pm-space-24) var(--pm-space-6);
	}
}
