/*
 * Footer CTA and Home Hero Card — shared badge chassis and icon styles, plus
 * footer button icons, hover/active/focus states.
 * Icons are Phosphor SVGs embedded as CSS mask-image data URIs so they
 * inherit currentColor and can be swapped per block style variation. Both
 * badge classes share these rules (rather than duplicating the SVGs) so a
 * new badge icon only needs registering once — see register_block_styles()
 * in functions.php.
 *
 * Step 6 moved the badge's own chassis here too, from hero-card.css. The
 * icon rules were already shared across both classes in this file, so this
 * is where the one definition belongs — keeping the chassis in hero-card.css
 * would have meant either duplicating it for .idia-cta-badge or having the
 * two halves of one component live in two files. The icon CHOICE stays
 * per-instance (each badge keeps its own is-style-badge-icon-* class).
 */

.idia-cta-badge,
.idia-hero-card__badge {
	position: relative;
}

/* ---- Shared badge chassis ----
   Matches the reference's .tag-block > .tag-wrapper: a solid light chip with
   near-black mono text. These are also exactly AGENTS.md §9.3's eyebrow-label
   rules (mono family, uppercase, weight 500, size preset `s`), so the
   reference and the house spec agree.

   No border: the reference has none, and both blocks' border-width attributes
   were removed from the markup rather than being zeroed here, so nothing is
   left to override. */
.idia-cta-badge,
.idia-hero-card__badge {
	width: fit-content;
	background-color: var(--wp--preset--color--tertiary);
	color: var(--wp--preset--color--main);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--s);
	font-weight: var(--wp--custom--font-weight--medium);
	text-transform: uppercase;
	/* Explicit reset, not a leftover. theme.json sets a NEGATIVE body
	   letter-spacing (--wp--custom--letter-spacing--body, -0.033em — measured
	   -0.528px at 16px) on the element defaults, and it inherits into this
	   chip. Tracking that tightens uppercase mono text is wrong at any size;
	   the reference computes `normal` here. Removing this line does not restore
	   a neutral default — it reinstates the negative value. */
	letter-spacing: normal;
	line-height: 1.5;
	/* No `gap` here on purpose. Core emits
	   `:root :where(.is-layout-flex){gap: var(--wp--custom--gap--24)}` — (0,1,0)
	   specificity, which TIES a single class, and core's inline <style> in
	   <head> is emitted after this enqueued file, so source order hands the tie
	   to core. Measured: a `gap: var(--wp--preset--spacing--8)` declaration here
	   parsed fine and still computed 24px.
	   The 8px gap is set instead by each block's own blockGap attribute
	   (var:preset|spacing|8) in the pattern, which makes WordPress emit a
	   container-scoped rule that outranks the generic default — and keeps the
	   value editable from the block's Dimensions panel. */
}

/* The paragraph inside carries the block's own font-size/weight attributes,
   which would otherwise beat the chassis's inherited values on specificity.
   Inherit instead, so one definition above governs both badges. */
.idia-cta-badge > p,
.idia-hero-card__badge > p {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

.idia-cta-badge::before,
.idia-hero-card__badge::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	flex-shrink: 0;
}

.idia-cta-badge.is-style-badge-icon-sparkle::before,
.idia-hero-card__badge.is-style-badge-icon-sparkle::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M197.58%2C129.06%2C146%2C110l-19-51.62a15.92%2C15.92%2C0%2C0%2C0-29.88%2C0L78%2C110l-51.62%2C19a15.92%2C15.92%2C0%2C0%2C0%2C0%2C29.88L78%2C178l19%2C51.62a15.92%2C15.92%2C0%2C0%2C0%2C29.88%2C0L146%2C178l51.62-19a15.92%2C15.92%2C0%2C0%2C0%2C0-29.88ZM137%2C164.22a8%2C8%2C0%2C0%2C0-4.74%2C4.74L112%2C223.85%2C91.78%2C169A8%2C8%2C0%2C0%2C0%2C87%2C164.22L32.15%2C144%2C87%2C123.78A8%2C8%2C0%2C0%2C0%2C91.78%2C119L112%2C64.15%2C132.22%2C119a8%2C8%2C0%2C0%2C0%2C4.74%2C4.74L191.85%2C144ZM144%2C40a8%2C8%2C0%2C0%2C1%2C8-8h16V16a8%2C8%2C0%2C0%2C1%2C16%2C0V32h16a8%2C8%2C0%2C0%2C1%2C0%2C16H184V64a8%2C8%2C0%2C0%2C1-16%2C0V48H152A8%2C8%2C0%2C0%2C1%2C144%2C40ZM248%2C88a8%2C8%2C0%2C0%2C1-8%2C8h-8v8a8%2C8%2C0%2C0%2C1-16%2C0V96h-8a8%2C8%2C0%2C0%2C1%2C0-16h8V72a8%2C8%2C0%2C0%2C1%2C16%2C0v8h8A8%2C8%2C0%2C0%2C1%2C248%2C88Z%22%2F%3E%3C%2Fsvg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M197.58%2C129.06%2C146%2C110l-19-51.62a15.92%2C15.92%2C0%2C0%2C0-29.88%2C0L78%2C110l-51.62%2C19a15.92%2C15.92%2C0%2C0%2C0%2C0%2C29.88L78%2C178l19%2C51.62a15.92%2C15.92%2C0%2C0%2C0%2C29.88%2C0L146%2C178l51.62-19a15.92%2C15.92%2C0%2C0%2C0%2C0-29.88ZM137%2C164.22a8%2C8%2C0%2C0%2C0-4.74%2C4.74L112%2C223.85%2C91.78%2C169A8%2C8%2C0%2C0%2C0%2C87%2C164.22L32.15%2C144%2C87%2C123.78A8%2C8%2C0%2C0%2C0%2C91.78%2C119L112%2C64.15%2C132.22%2C119a8%2C8%2C0%2C0%2C0%2C4.74%2C4.74L191.85%2C144ZM144%2C40a8%2C8%2C0%2C0%2C1%2C8-8h16V16a8%2C8%2C0%2C0%2C1%2C16%2C0V32h16a8%2C8%2C0%2C0%2C1%2C0%2C16H184V64a8%2C8%2C0%2C0%2C1-16%2C0V48H152A8%2C8%2C0%2C0%2C1%2C144%2C40ZM248%2C88a8%2C8%2C0%2C0%2C1-8%2C8h-8v8a8%2C8%2C0%2C0%2C1-16%2C0V96h-8a8%2C8%2C0%2C0%2C1%2C0-16h8V72a8%2C8%2C0%2C0%2C1%2C16%2C0v8h8A8%2C8%2C0%2C0%2C1%2C248%2C88Z%22%2F%3E%3C%2Fsvg%3E");
}

.idia-cta-badge.is-style-badge-icon-arrow-right::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M221.66%2C133.66l-72%2C72a8%2C8%2C0%2C0%2C1-11.32-11.32L196.69%2C136H40a8%2C8%2C0%2C0%2C1%2C0-16H196.69L138.34%2C61.66a8%2C8%2C0%2C0%2C1%2C11.32-11.32l72%2C72A8%2C8%2C0%2C0%2C1%2C221.66%2C133.66Z%22%2F%3E%3C%2Fsvg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M221.66%2C133.66l-72%2C72a8%2C8%2C0%2C0%2C1-11.32-11.32L196.69%2C136H40a8%2C8%2C0%2C0%2C1%2C0-16H196.69L138.34%2C61.66a8%2C8%2C0%2C0%2C1%2C11.32-11.32l72%2C72A8%2C8%2C0%2C0%2C1%2C221.66%2C133.66Z%22%2F%3E%3C%2Fsvg%3E");
}

.idia-cta-badge.is-style-badge-icon-rocket::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M223.85%2C47.12a16%2C16%2C0%2C0%2C0-15-15c-12.58-.75-44.73.4-71.41%2C27.07L132.69%2C64H74.36A15.91%2C15.91%2C0%2C0%2C0%2C63%2C68.68L28.7%2C103a16%2C16%2C0%2C0%2C0%2C9.07%2C27.16l38.47%2C5.37%2C44.21%2C44.21%2C5.37%2C38.49a15.94%2C15.94%2C0%2C0%2C0%2C10.78%2C12.92%2C16.11%2C16.11%2C0%2C0%2C0%2C5.1.83A15.91%2C15.91%2C0%2C0%2C0%2C153%2C227.3L187.32%2C193A15.91%2C15.91%2C0%2C0%2C0%2C192%2C181.64V123.31l4.77-4.77C223.45%2C91.86%2C224.6%2C59.71%2C223.85%2C47.12ZM74.36%2C80h42.33L77.16%2C119.52%2C40%2C114.34Zm74.41-9.45a76.65%2C76.65%2C0%2C0%2C1%2C59.11-22.47%2C76.46%2C76.46%2C0%2C0%2C1-22.42%2C59.16L128%2C164.68%2C91.32%2C128ZM176%2C181.64%2C141.67%2C216l-5.19-37.17L176%2C139.31Zm-74.16%2C9.5C97.34%2C201%2C82.29%2C224%2C40%2C224a8%2C8%2C0%2C0%2C1-8-8c0-42.29%2C23-57.34%2C32.86-61.85a8%2C8%2C0%2C0%2C1%2C6.64%2C14.56c-6.43%2C2.93-20.62%2C12.36-23.12%2C38.91%2C26.55-2.5%2C36-16.69%2C38.91-23.12a8%2C8%2C0%2C1%2C1%2C14.56%2C6.64Z%22%2F%3E%3C%2Fsvg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M223.85%2C47.12a16%2C16%2C0%2C0%2C0-15-15c-12.58-.75-44.73.4-71.41%2C27.07L132.69%2C64H74.36A15.91%2C15.91%2C0%2C0%2C0%2C63%2C68.68L28.7%2C103a16%2C16%2C0%2C0%2C0%2C9.07%2C27.16l38.47%2C5.37%2C44.21%2C44.21%2C5.37%2C38.49a15.94%2C15.94%2C0%2C0%2C0%2C10.78%2C12.92%2C16.11%2C16.11%2C0%2C0%2C0%2C5.1.83A15.91%2C15.91%2C0%2C0%2C0%2C153%2C227.3L187.32%2C193A15.91%2C15.91%2C0%2C0%2C0%2C192%2C181.64V123.31l4.77-4.77C223.45%2C91.86%2C224.6%2C59.71%2C223.85%2C47.12ZM74.36%2C80h42.33L77.16%2C119.52%2C40%2C114.34Zm74.41-9.45a76.65%2C76.65%2C0%2C0%2C1%2C59.11-22.47%2C76.46%2C76.46%2C0%2C0%2C1-22.42%2C59.16L128%2C164.68%2C91.32%2C128ZM176%2C181.64%2C141.67%2C216l-5.19-37.17L176%2C139.31Zm-74.16%2C9.5C97.34%2C201%2C82.29%2C224%2C40%2C224a8%2C8%2C0%2C0%2C1-8-8c0-42.29%2C23-57.34%2C32.86-61.85a8%2C8%2C0%2C0%2C1%2C6.64%2C14.56c-6.43%2C2.93-20.62%2C12.36-23.12%2C38.91%2C26.55-2.5%2C36-16.69%2C38.91-23.12a8%2C8%2C0%2C1%2C1%2C14.56%2C6.64Z%22%2F%3E%3C%2Fsvg%3E");
}

.idia-cta-badge.is-style-badge-icon-chat::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C0%2C0%2C36.18%2C176.88L24.83%2C210.93a16%2C16%2C0%2C0%2C0%2C20.24%2C20.24l34.05-11.35A104%2C104%2C0%2C1%2C0%2C128%2C24Zm0%2C192a87.87%2C87.87%2C0%2C0%2C1-44.06-11.81%2C8%2C8%2C0%2C0%2C0-6.54-.67L40%2C216%2C52.47%2C178.6a8%2C8%2C0%2C0%2C0-.66-6.54A88%2C88%2C0%2C1%2C1%2C128%2C216Z%22%2F%3E%3C%2Fsvg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20256%20256%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C0%2C0%2C36.18%2C176.88L24.83%2C210.93a16%2C16%2C0%2C0%2C0%2C20.24%2C20.24l34.05-11.35A104%2C104%2C0%2C1%2C0%2C128%2C24Zm0%2C192a87.87%2C87.87%2C0%2C0%2C1-44.06-11.81%2C8%2C8%2C0%2C0%2C0-6.54-.67L40%2C216%2C52.47%2C178.6a8%2C8%2C0%2C0%2C0-.66-6.54A88%2C88%2C0%2C1%2C1%2C128%2C216Z%22%2F%3E%3C%2Fsvg%3E");
}

/* Plus-in-a-rounded-square. Unlike the four above this one is a 20x20 Material
   glyph rather than a 256x256 Phosphor one, so its viewBox differs — mask-size:
   contain (set on the shared ::before rule) normalises both to the box, so no
   per-variant sizing is needed on that account. */
.idia-cta-badge.is-style-badge-icon-plus-square::before,
.idia-hero-card__badge.is-style-badge-icon-plus-square::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M16.25%202.5H3.75C3.41848%202.5%203.10054%202.6317%202.86612%202.86612C2.6317%203.10054%202.5%203.41848%202.5%203.75V16.25C2.5%2016.5815%202.6317%2016.8995%202.86612%2017.1339C3.10054%2017.3683%203.41848%2017.5%203.75%2017.5H16.25C16.5815%2017.5%2016.8995%2017.3683%2017.1339%2017.1339C17.3683%2016.8995%2017.5%2016.5815%2017.5%2016.25V3.75C17.5%203.41848%2017.3683%203.10054%2017.1339%202.86612C16.8995%202.6317%2016.5815%202.5%2016.25%202.5ZM13.125%2010.625H10.625V13.125C10.625%2013.2908%2010.5592%2013.4497%2010.4419%2013.5669C10.3247%2013.6842%2010.1658%2013.75%2010%2013.75C9.83424%2013.75%209.67527%2013.6842%209.55806%2013.5669C9.44085%2013.4497%209.375%2013.2908%209.375%2013.125V10.625H6.875C6.70924%2010.625%206.55027%2010.5592%206.43306%2010.4419C6.31585%2010.3247%206.25%2010.1658%206.25%2010C6.25%209.83424%206.31585%209.67527%206.43306%209.55806C6.55027%209.44085%206.70924%209.375%206.875%209.375H9.375V6.875C9.375%206.70924%209.44085%206.55027%209.55806%206.43306C9.67527%206.31585%209.83424%206.25%2010%206.25C10.1658%206.25%2010.3247%206.31585%2010.4419%206.43306C10.5592%206.55027%2010.625%206.70924%2010.625%206.875V9.375H13.125C13.2908%209.375%2013.4497%209.44085%2013.5669%209.55806C13.6842%209.67527%2013.75%209.83424%2013.75%2010C13.75%2010.1658%2013.6842%2010.3247%2013.5669%2010.4419C13.4497%2010.5592%2013.2908%2010.625%2013.125%2010.625Z%22%2F%3E%3C%2Fsvg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22%23000%22%3E%3Cpath%20d%3D%22M16.25%202.5H3.75C3.41848%202.5%203.10054%202.6317%202.86612%202.86612C2.6317%203.10054%202.5%203.41848%202.5%203.75V16.25C2.5%2016.5815%202.6317%2016.8995%202.86612%2017.1339C3.10054%2017.3683%203.41848%2017.5%203.75%2017.5H16.25C16.5815%2017.5%2016.8995%2017.3683%2017.1339%2017.1339C17.3683%2016.8995%2017.5%2016.5815%2017.5%2016.25V3.75C17.5%203.41848%2017.3683%203.10054%2017.1339%202.86612C16.8995%202.6317%2016.5815%202.5%2016.25%202.5ZM13.125%2010.625H10.625V13.125C10.625%2013.2908%2010.5592%2013.4497%2010.4419%2013.5669C10.3247%2013.6842%2010.1658%2013.75%2010%2013.75C9.83424%2013.75%209.67527%2013.6842%209.55806%2013.5669C9.44085%2013.4497%209.375%2013.2908%209.375%2013.125V10.625H6.875C6.70924%2010.625%206.55027%2010.5592%206.43306%2010.4419C6.31585%2010.3247%206.25%2010.1658%206.25%2010C6.25%209.83424%206.31585%209.67527%206.43306%209.55806C6.55027%209.44085%206.70924%209.375%206.875%209.375H9.375V6.875C9.375%206.70924%209.44085%206.55027%209.55806%206.43306C9.67527%206.31585%209.83424%206.25%2010%206.25C10.1658%206.25%2010.3247%206.31585%2010.4419%206.43306C10.5592%206.55027%2010.625%206.70924%2010.625%206.875V9.375H13.125C13.2908%209.375%2013.4497%209.44085%2013.5669%209.55806C13.6842%209.67527%2013.75%209.83424%2013.75%2010C13.75%2010.1658%2013.6842%2010.3247%2013.5669%2010.4419C13.4497%2010.5592%2013.2908%2010.625%2013.125%2010.625Z%22%2F%3E%3C%2Fsvg%3E");
}

/* Currency mark for the pricing section's per-plan badge. NOTE: the actual
   rendering rule lives in assets/css/pricing.css on
   .idia-pricing__plan-badge-icon::before, not here — that is the element
   the mask paints onto (a circular swatch, a child of the badge wrapper),
   not the wrapper itself. This variant is registered in
   register_block_styles() (functions.php) alongside the eyebrow icons for
   discoverability, but the pricing plan badge does not use the
   .idia-cta-badge/.idia-hero-card__badge chassis, so it has no ::before
   rule at this selector shape. */

.idia-cta-button .wp-block-button__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--8);
	/* Radius-only, matching the house hover (AGENTS.md §11.1). The former
	   transform/background-color/box-shadow entries went with the hover rules
	   they animated (step 6). */
	transition: border-radius var(--wp--custom--transition) cubic-bezier(0.32, 0.72, 0, 1);
}

/* Trailing arrow — moved to a real .idia-btn-icon element in
   assets/css/button-roll.css (step 7), so button-roll.js can clone it for
   the hover text/icon roll; a pseudo-element cannot be cloned. Same glyph,
   same mechanism, shared by every button on the site. */

/* Removed in step 6: `transform: translateY(-1px)` on :hover and
   `transform: scale(0.98)` on :active. The house hover is a radius change and
   nothing else (AGENTS.md §11.1) — theme.json's elements.button[":hover"]
   supplies it. :focus-visible stays: that is accessibility, not decoration. */
.idia-cta-button .wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-dark);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

	/* The radius still changes on hover — a state change, not motion. Only
	   the animation between the two radii is suppressed. */
	.idia-cta-button .wp-block-button__link {
		transition: none;
	}
}

/* ---- Closing CTA reveal — starting state ----
   Reproduces the reference's own trick (see hero-card.css): the phase-1
   values are set directly in CSS so there is never a flash of the finished
   section before cta-reveal.js runs, and so the CTA still renders complete
   and correctly positioned with JS disabled. Opt-in only: scoped to
   prefers-reduced-motion: no-preference, so a reduced-motion visitor's CTA
   renders complete and settled immediately — cta-reveal.js independently
   checks the same media query and takes no action when motion is reduced,
   so the two can never disagree. */
@media (prefers-reduced-motion: no-preference) {

	.idia-cta-badge,
	.idia-cta-badge ~ .wp-block-heading,
	.idia-cta-button {
		opacity: 0;
		transform: translateY(50px);
		filter: blur(5px);
	}
}
