/*
	THE RELATED PRODUCTS BAND ARRIVES (2026-11-18)
	==============================================

	Operator: "in yucca website do you see the animation at 'you might also
	be interested in' section i want the animation apply to my related
	product .. and i want you to change the title also like yucca website".

	WHAT THEIR SECTION DOES, read off its live page rather than watched --
	the pane runs almost no animation frames, so every element on it sits at
	the FROM state its timeline set at init, which is the one thing worth
	having:

	  the heading   SplitText by WORD. Each word is an inline-block inside a
	                `.line` that is `overflow: hidden`, parked at
	                `transform: translate(0%, 110%)` and rising to 0.
	  the cards     each `.s-product` sits at
	                `matrix(0.99863, -0.052336, 0.052336, 0.99863, 80, 30)`
	                -- that is `translate(80px, 30px) rotate(-3deg)`, since
	                cos 3deg = .99863 and sin 3deg = .052336 -- and animates
	                to none. OPACITY IS 1 AT REST, so they slide in without
	                fading. Checked; not an oversight.

	NO GSAP HERE, which is the house style for the three pdp-* components
	and removes a load-order question: gsap, ScrollTrigger and SplitText are
	all on the product page, but this pair is enqueued with `array('jquery')`
	and nothing guarantees it runs after them. An IntersectionObserver and
	two keyframe animations do the same job, the way `.sfdw`, `.sfcg` and
	`.sfbw` already do on the home page.

	EVERYTHING IS ARMED BY `.sf-rel`, WHICH ONLY THE SCRIPT ADDS. With JS
	off, or under `prefers-reduced-motion`, the class is never added and
	this whole file is inert -- so the band cannot end up stuck invisible,
	which is the failure CLAUDE.md records twice against gated entrances.

	-----------------------------------------------------------------
	KEYFRAMES, NOT TRANSITIONS, AND THIS IS THE FINDING OF THE EXERCISE
	-----------------------------------------------------------------

	It was built with transitions first: park the card at the start state
	with `transition: none`, then let `.is-in` change the transform and the
	transition together. The spec says the transition properties come from
	the AFTER-change style, so that should start a .9s move.

	IT DOES NOT, in the operator's own Chrome. Measured by re-arming the
	band on screen and sampling every 110ms: both cards read exactly
	`80,30` for the full 1.5s the move was supposed to take, with `.is-in`
	on the band the whole time, and they only jumped home at ~2.1s -- which
	was the BASE .35s hover transition running after `.is-settled` removed
	the armed rule. The animation never started. A transition whose
	`transition-property` goes from `none` to `transform` in the same style
	change is not reliable; it wants the arming and the playing in two
	separate style flushes, which is a thing a stylesheet cannot express.

	An animation has no such rule -- applying it IS starting it. `both` fill
	holds the from-state through the stagger delay and the to-state after,
	so the element never needs a second declaration to sit still at either
	end.

	THE SYMPTOM TO RECOGNISE: an element parked at its start state with the
	play class correctly applied and the rule correctly winning. It looks
	exactly like a specificity problem and is not one. Sample the computed
	transform over a second or two before believing either diagnosis.
*/

/*
	THE WORD TOKENS ARE ON THE HEADING AS WELL AS THE BAND, AND LEAVING THEM
	OFF IT MADE THE REVIEWS HEADING VANISH COMPLETELY (2026-11-18).

	These were on `.sf-rel` alone. The related heading is INSIDE that band so
	it inherited them; the reviews heading is in `.sf-rv`, nowhere near it, so
	`var(--sf-rel-dur)` resolved to nothing there.

	AN UNRESOLVED var() DOES NOT FALL BACK TO THE PREVIOUS RULE. The
	declaration is INVALID AT COMPUTED-VALUE TIME, which per spec makes the
	property `unset` -- so `animation` became `none`, and because that rule is
	the last one to match, it took the SHEEN down with it. The words were left
	parked at `translateY(110%)` inside their masks with no animation to lift
	them: a heading that is present, split, classed `is-in`, and paints
	absolutely nothing.

	Measured: the reviews word computed `animation-name: none` while the
	related word computed `sf-rel-word`, from the same rule, with
	`el.matches()` true for both.

	THE CARD TOKENS STAY ON THE BAND, because only a band has cards. Anything
	a HEADING reads has to be declared where a heading can see it -- that is
	the rule to keep if either set grows.
*/
.sf-rel,
.sf-rel__h{
	--sf-rel-dur: .9s;
	--sf-rel-ease: cubic-bezier(.22, 1, .36, 1);
	--sf-rel-word-step: 60ms;
}

.sf-rel{
	--sf-rel-card-step: 90ms;
	/* theirs, to the pixel and the degree */
	--sf-rel-card-x: 80px;
	--sf-rel-card-y: 30px;
	--sf-rel-card-rot: -3deg;
}

/* ------------------------------------------------------------------ */
/*  The heading                                                        */
/* ------------------------------------------------------------------ */
/*
	ONE `.sf-rel__line` PER VISUAL LINE, NOT ONE MASK ROUND THE WHOLE
	HEADING. A single `overflow: hidden` on the h2 clips below the LAST
	line, so a word on line one parked 110% down would drop into line two's
	space and sit there in full view. The script measures each word's
	offsetTop and groups them, which is what SplitText does and is about
	fifteen lines without it.

	THE padding/margin PAIR IS FOR DESCENDERS, NOT FOR THE CLIP. The mask is
	exactly the line box, so a 'g' or a 'y' sitting still would be shaved
	off by it. navbar.css records the same pair on its text roll and
	bike-wall.css on its masks. The heading is uppercase today and has no
	descenders at all; the pair is here so that stays safe if the case ever
	changes.
*/
/*
	THE HEADING IS THE PRODUCT CATEGORY PAGE'S TITLE, VALUE FOR VALUE
	(operator, 2026-11-18: "the title , i want you match the title with
	product category page , the font , size font and effect").

	Read off the live /product-category/brake-systems/ rather than out of
	shop-archive.css, which still ARGUES for Archivo Black in its comments --
	the face was changed under them and the note was not:

		family      --sa-title, which resolves to Inter
		weight      700
		case        uppercase
		leading     1 (line-height always equals the size)
		tracking    -.075em
		size        30 base, then 48 / 60 / 72 / 100
		            at 768 / 1024 / 1280 / 1900

	STEPS, NOT A CLAMP, because that is what the archive uses -- and the two
	have to agree at every width, not just at the ends. Measured there: 30 at
	375, 72 at 1430, 100 at 1890.

	IT REPLACES `clamp(26px, 5.2vw, 40px)` IN ARCHIVO BLACK, which
	single-product.css sets on EVERY h2 in the editorial stack -- the reviews
	heading included. This is scoped to the collection so that one is left
	alone; they are no longer the same size, which is deliberate.

	NOT SCOPED TO `.sf-rel`, so the type lands with or without JS. Only the
	sheen below needs the script, because only the script splits the words.
*/
/*
	THE REVIEWS HEADING IS THE SAME HEADING (operator, 2026-11-18: having
	picked "Reviews from riders like you.", "for the tittle size font effect
	color , i want you follow this effect 'You might also be interested in'").

	ONE RULE, TWO HEADINGS, rather than the five sizes copied into
	pdp-reviews.css. That file's own `.sf-rv__title` type was removed in the
	same pass so the two cannot disagree silently -- a (0,2,0) selector here
	would have beaten its (0,1,0) one whatever the load order, which is
	exactly the kind of win nobody sees.
*/
.sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading,
.sf-pdp__editorial .sf-rv__title{
	font-family: var(--sa-title, "Inter", system-ui, -apple-system, sans-serif);
	font-weight: 700;
	font-size: 24px;
	line-height: 1;
	letter-spacing: -.075em;
	text-transform: uppercase;
	/* the reviews heading was magenta in full before this; the lead words
	   take this and the rest are transparent under the gradient */
	color: var(--sp-text, #f2f2f4);

	/*
		NO MEASURE HERE, AND THAT IS DELIBERATE. This carried
		`max-width: min(100%, 20ch)` for an hour, probed so the sentence broke
		after "be". It had to go when the break moved to after "might"
		(operator: "YOU MIGH (white color) / ALSO BE INTERESTED IN (effect)"):
		**line two is the LONGER of the two now**, so no single cap can leave
		"You might" alone on line one AND fit "also be interested in" on line
		two. The break is structural, in pdp-related.js -- see LEAD_PLAIN.

		Nothing caps it now, so the heading simply takes the column. Measured
		unconstrained: the long line is about 68% of the sentence, which at
		48px is ~509px of a 1309px column and at 24px ~255px of a 335px one.
		It only wraps further on a very narrow screen, and `reflow()` cuts the
		extra line properly when it does.
	*/
	max-width: 100%;
}

/*
	THE LADDER IS THE ARCHIVE'S SHAPE AT ABOUT TWO THIRDS OF ITS SIZE
	(operator: "i think you need to reduce the size font title"). Theirs is
	30 / 48 / 60 / 72 / 100; this is 24 / 34 / 40 / 48 / 60.

	WHY IT CANNOT BE THEIR SIZE: the two headings are not the same length.
	"Brakes." is 7 characters under a fixed "Know your"; this is a
	31-character sentence. At their 72px ours measured 1128px against their
	413 -- nearly three times the width, and the loudest thing on the page by
	a distance. At 48px over two lines it is 661 x 96 against their 413 x 144:
	different proportions, comparable presence.

	THE FAMILY, WEIGHT, CASE, LEADING AND TRACKING ARE STILL THEIRS EXACTLY.
	Only the five sizes differ, and this is the one place to turn if it is
	re-pitched again -- the measure above is in `ch`, so it follows on its own
	and the two-line break holds.
*/
@media (min-width:  768px){ .sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading, .sf-pdp__editorial .sf-rv__title{ font-size: 34px } }
@media (min-width: 1024px){ .sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading, .sf-pdp__editorial .sf-rv__title{ font-size: 40px } }
@media (min-width: 1280px){ .sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading, .sf-pdp__editorial .sf-rv__title{ font-size: 48px } }
@media (min-width: 1900px){ .sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading, .sf-pdp__editorial .sf-rv__title{ font-size: 60px } }

/*
	A HAIRLINE CLOSES THE HEAD, which is how every other band on this site
	heads itself (operator, 2026-11-18: "for title also be interested in i
	want the border line bottom under the title , same like border line
	bottom under the title review from riders like you").

	THE REVIEWS BAND CARRIES THE SAME LINE ON ITS WRAPPER, `.sf-rv__head`
	in pdp-reviews.css, NOT on its title -- that head is a flex row that
	once held the score beside the words. This band has no wrapper, so the
	line goes on the heading itself and the three values are repeated here
	rather than shared: a token declared in one stylesheet and read from
	another resolves by load order and fails silently, and these two files
	only ever load together on a product page, which is exactly what would
	hide such a bug. `--rv-gap` is pdp-reviews.css own and is resolved to
	its literal for the same reason. CHANGE BOTH FILES OR NEITHER.

	IT IS KEYED TO THE COLLECTION, NOT TO `.sf-rel`, so the line lands with
	or without the script -- the same reason the type rule above is. And it
	MUST NOT be keyed to `.sf-rel__h`: the script puts that class on the
	reviews heading too, which already has its line on the wrapper above it,
	so the reviews band would draw two.

	THE SPACING IS THE REVIEWS BAND VALUE, NOT THE ONE THIS HEADING HAD.
	single-product.css gives every editorial h2 `margin: 0 0 clamp(22px,
	4.6vw, 40px)` at (0,2,1); this selector is (0,3,1) and wins, which is
	what puts the gap under the line at the reviews band 32px rather than
	40. The space ABOVE the line is theirs too -- see the note on it below.
*/
.sf-pdp__editorial .wp-block-woocommerce-product-collection h2.wp-block-heading{
	/*
		TWO VALUES MAKE THE REVIEWS GAP, NOT ONE (operator, 2026-11-18: "the
		interested title doesnt have margin top for the line or margin bottom
		under the title before the line ... you need to refer review title").
		Its 20px of head padding is only the HALF OF IT: `.sf-rv__title` is a
		child of that head, so its OWN bottom margin -- single-product.css
		`clamp(22px, 4.6vw, 40px)` on every editorial h2 -- sits above the line
		too, and does not collapse out because the head has padding. Shipped at
		20px alone and measured 15px from the last line box to the line against
		the reviews band 55px: 40px short, exactly that margin.
	*/
	padding-bottom: calc(clamp(22px, 4.6vw, 40px) + 20px);
	margin-bottom: clamp(20px, 2.4vw, 32px);   /* pdp-reviews.css --rv-gap */
	border-bottom: 1px solid var(--sp-line, rgba(242,242,244,.16));
}


.sf-rel__line{
	display: block;
	overflow: hidden;
	padding-block: .12em;
	margin-block: -.12em;
}

/*
	THE SHEEN IS ON THE WORD, NOT ON THE HEADING, AND THAT IS FORCED.

	The archive puts `background-clip: text` straight on its h1 and that is
	all it needs. Here every word is an inline-block that a keyframe
	animation transforms -- and a transformed element paints in its own
	layer, which Blink's `background-clip: text` on an ancestor does not
	reach. Tried first and screenshotted: the heading painted NOTHING, a
	blank strip above the cards, with every computed value correct.
	bike-ribbon.css records the same failure one layer down, per glyph.

	THE TEST IS THE PAINTED PIXELS. Every computed value reads right in the
	broken state -- `color: transparent` and `background-clip: text` on the
	h2, exactly as asked for.

	SO EACH WORD CARRIES THE GRADIENT AT THE WIDTH OF ITS WHOLE LINE and is
	shifted back by its own distance from that line's first word, so the
	fragments re-form one continuous sweep. `pdp-related.js` measures both
	and writes them as `--sf-rel-lw` on the line and `--sf-rel-cx` on each
	word.

	A GRADIENT PER WORD IS THE OBVIOUS ALTERNATIVE AND IS WRONG: six words
	would each sweep their own box at the same instant, which pulses the
	line rather than passing a light along it. That IS the fallback if the
	script never runs -- `--sf-rel-lw` defaults to 100% -- which is the
	right way round: a little wrong rather than invisible.

	THE KEYFRAME MATHS IS THE ARCHIVE'S, RESOLVED TO PIXELS. A
	`background-position` percentage is a percentage of (positioning area -
	image), so against a 2.2x image its `10%` is -0.12 of the area and `91%`
	is -1.092 of it. Those two numbers times the LINE's width, minus the
	word's own offset. CHANGE THE 220% AND YOU MUST REDO THEM.
*/
.sf-rel__w{
	display: inline-block;
	/* a word that is only whitespace collapses to nothing without this --
	   the same reason navbar.css sets it on every character of its roll */
	white-space: pre;
	transform: translateY(110%);

	color: transparent;
	background-image: linear-gradient(90deg,
		var(--sp-text, #f2f2f4)                        0%,
		var(--wp--preset--color--accent-1, #ec1e79)   48%,
		var(--sp-text, #f2f2f4)                      100%);
	background-size: calc(var(--sf-rel-lw, 100%) * 2.2) 220%;
	/* BOTH LONGHANDS. With only one, Blink paints a solid magenta band with
	   invisible type inside it -- reviews.css and category-grid.css both
	   record it. */
	-webkit-background-clip: text;
	background-clip: text;
	animation: sf-rel-sheen 5s ease infinite;
}

/*
	THE LEAD WORDS ARE PLAIN INK, NOT SWEPT, which is the archive's own
	arrangement: its `::before` reads "Know your" in solid ink above a swept
	term name. The script puts `--plain` on the first LEAD_PLAIN words, which
	are also exactly the words on line one.

	`background-image: none` IS WHAT TURNS THE SHEEN OFF, not the colour.
	`background-clip: text` with no image clips nothing, so the ordinary
	`color` paints -- which is why that longhand is left in place rather than
	being reset as well.
*/
.sf-rel__w--plain{
	color: var(--sp-text, #f2f2f4);
	background-image: none;
	animation: none;
}

/*
	TWO ANIMATIONS ON ONE ELEMENT, and the shorthand REPLACES rather than
	adds -- so the sheen has to be restated here or the word stops sweeping
	the moment it starts rising. They animate different properties
	(`transform` against `background-position`) and never meet.
*/
/*
	`.sf-rel__h` IS THE HEADING, NOT THE BAND, and that is what lets the
	reviews title use all of this. The band keeps its own `is-in` for the
	CARDS; the heading carries a second one of its own for the WORDS. Two
	switches, because there are two bands and only one of them has cards.
*/
.sf-rel__h.is-in .sf-rel__w{
	animation: sf-rel-word var(--sf-rel-dur) var(--sf-rel-ease) both,
	           sf-rel-sheen 5s ease infinite;
	animation-delay: calc(var(--sf-rel-i, 0) * var(--sf-rel-word-step)), 0s;
}

/*
	The plain words rise with the rest and only the sheen is left off. Equal
	specificity to the rule above (0,3,0), so this must stay AFTER it.
*/
.sf-rel__h.is-in .sf-rel__w--plain{
	animation: sf-rel-word var(--sf-rel-dur) var(--sf-rel-ease) both;
	animation-delay: calc(var(--sf-rel-i, 0) * var(--sf-rel-word-step));
}

@keyframes sf-rel-word{
	from { transform: translateY(110%); }
	to   { transform: none; }
}

/* the archive's own sfSheen, with its two stops resolved against the line */
@keyframes sf-rel-sheen{
	0%   { background-position: calc(-0.12  * var(--sf-rel-lw, 100%) - var(--sf-rel-cx, 0px))   0; }
	50%  { background-position: calc(-1.092 * var(--sf-rel-lw, 100%) - var(--sf-rel-cx, 0px)) 100%; }
	100% { background-position: calc(-0.12  * var(--sf-rel-lw, 100%) - var(--sf-rel-cx, 0px))   0; }
}

@media (prefers-reduced-motion: reduce){
	/* the script never arms under reduced motion, so the rise cannot run --
	   but the sheen is on the word unconditionally, so it is stopped here */
	.sf-rel__w{ animation: none; }
}

/* ------------------------------------------------------------------ */
/*  The cards                                                          */
/* ------------------------------------------------------------------ */
/*
	THE SELECTOR CARRIES `ul.wc-block-product-template >` FOR SPECIFICITY,
	not for readability. single-product.css sets this card's own
	`transition: box-shadow .35s, transform .35s` in a block whose first
	selector is
	`.sf-pdp__editorial ul.wc-block-product-template.is-flex-container > li.wc-block-product`
	-- (0,4,2). A plain `.sf-pdp__editorial .sf-rel:not(.is-settled)
	li.wc-block-product` is (0,4,1) and LOSES to it, so the `transition:
	none` below silently did nothing and the cards still animated out to the
	right first. Measured: transitionProperty read `box-shadow, transform`
	with the rule present and correct. This is (0,5,2) and wins.

	It also beats `li.wc-block-product:hover` at (0,3,1), so during the
	entrance the card is where the entrance says it is and a hover cannot
	jump it.

	`transition: none` IS STILL REQUIRED even though the move is a keyframe
	animation now. Arming is a change to an element that is ALREADY on the
	page, from `none` to the start state, and that hover transition is
	sitting right there to animate it -- the band would deal its cards OUT
	to the right over .35s before the animation ever ran.

	AND `:not(.is-settled)` IS WHAT HANDS IT ALL BACK. The script drops that
	class once the last card has landed, and with it the armed transform,
	the suppressed transition and the animation -- so the hover lift and its
	own .35s are exactly what they were. `.sfbr` settles the same way and
	for the same reason: a transform left on an element for ever is one more
	thing to go wrong later.
*/
.sf-pdp__editorial .sf-rel:not(.is-settled) ul.wc-block-product-template > li.wc-block-product{
	transform: translate(var(--sf-rel-card-x), var(--sf-rel-card-y))
	           rotate(var(--sf-rel-card-rot));
	transition: none;
}

.sf-pdp__editorial .sf-rel.is-in:not(.is-settled) ul.wc-block-product-template > li.wc-block-product{
	animation: sf-rel-card var(--sf-rel-dur) var(--sf-rel-ease) both;
	animation-delay: calc(var(--sf-rel-i, 0) * var(--sf-rel-card-step));
}

@keyframes sf-rel-card{
	from {
		transform: translate(var(--sf-rel-card-x), var(--sf-rel-card-y))
		           rotate(var(--sf-rel-card-rot));
	}
	to { transform: none; }
}

/*
	THE 80px OVERHANG HAS TO BE CLIPPED OR THE PAGE GAINS A SIDEWAYS SCROLL.
	The last card starts 80px right of its own column, and that column ends
	on the page gutter -- 60px at 1430 -- so 20px of it would be off the
	edge of the document. Measured with the clip off: 32px of horizontal
	overflow for as long as the cards were out there. scrollbar.css carries
	a site-wide `html{ overflow-x: clip }` that would swallow it, but
	leaning on another file's guard for a thing this file causes is how that
	guard ends up hiding something real.

	THE BOTTOM IS OPENED BY THE SAME AMOUNT IT CLIPS. Cards also start 30px
	LOW, so a plain `overflow: hidden` would cut their bottom edge off for
	the first part of the move -- visible, because nothing fades. The
	padding/margin pair cancels in layout and simply moves the clip down.

	Both go with `.is-settled`, so a settled card's hover lift is never
	clipped by a rule that only existed for the entrance -- and the script's
	settle timer is what guarantees the cards are home before the clip comes
	off. See the note on it in pdp-related.js.
*/
.sf-rel:not(.is-settled){
	overflow: hidden;
	padding-bottom: 48px;
	margin-bottom: -48px;
}
