/**
 * td/feature-strip + td/feature
 *
 * Box padding is the page gutter, so the first column lines up with the
 * content edge of every other section. From 1200px the four columns span the
 * page frame (--td-frame); the top rule spans the full width.
 */

.td-feature-strip {
	padding-bottom: 60px;
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--stone);
}

.td-feature-strip__list {
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: td-feature;
}

.td-feature {
	display: flex;
	align-items: flex-start;
	padding: 8px var(--td-gutter);
	border: 1px solid var(--td-rule);
	counter-increment: td-feature;
}

.td-feature::before {
	content: counter(td-feature, decimal-leading-zero);
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 32px;
	font-size: 12px;
	font-weight: 500;
	line-height: 13px;
	letter-spacing: 0.15em;
	color: var(--wp--preset--color--bronze);
}

.td-feature__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.td-feature__title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 22px;
	line-height: 30px;
	color: var(--wp--preset--color--ivory);
}

.td-feature__description {
	font-size: 12px;
	line-height: 20px;
}

/* Optional link: the anchor on the title stretches over the whole item. */
.td-feature.has-link {
	position: relative;
}

.td-feature__link {
	color: inherit;
	text-decoration: none;
}

.td-feature__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.td-feature__link--icon {
	position: absolute;
	inset: 0;
}

.td-feature__link:focus-visible {
	outline: none;
}

.td-feature__link:focus-visible::after {
	outline: 2px solid var(--wp--preset--color--ivory);
	outline-offset: -4px;
}

@media (hover: hover) {

	.td-feature__link:hover {
		color: inherit;
		text-decoration: underline;
		text-underline-offset: 4px;
	}
}

@media (min-width: 600px) and (max-width: 1199px) {

	.td-feature-strip__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1200px) {

	.td-feature-strip {
		padding-bottom: 0;
		border-top: 1px solid var(--td-rule);
	}

	.td-feature-strip__list {
		grid-auto-columns: 1fr;
		grid-auto-flow: column;
		max-width: var(--td-frame);
		margin-inline: auto;
	}

	/* Only the left padding has to line up with the page edge; a smaller right
	   padding leaves room for descriptions like "Whole-home transformations"
	   to stay on one line (other styles set their own padding). */
	.td-feature {
		padding-block: 16px;
		padding-right: 24px;
		border-width: 0 1px 0 0;
	}

	.td-feature:last-child {
		border-right-width: 0;
	}

	.td-feature__title {
		font-size: 24px;
	}

	.td-feature__description {
		font-size: 14px;
		line-height: 22px;
	}
}

/* Optional centred intro */

.td-feature-strip__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-bottom: 24px;
	text-align: center;
}

.td-feature-strip__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 400;
	line-height: 22px;
	color: var(--wp--preset--color--ivory);
}

.td-feature-strip__text {
	max-width: 652px;
}

/* Spacious style: larger boxes on the content width */

.td-feature-strip.is-style-spacious {
	padding-bottom: 0;
}

/* Badges style: icon + label, no numbers; scrolls sideways until 1200px */

.td-feature-strip.is-style-badges {
	padding-block: var(--td-section-space);
}

.is-style-badges .td-feature-strip__list {
	display: flex;
	padding-inline: var(--td-gutter);
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-padding-inline: var(--td-gutter);
	scrollbar-width: none;
}

.is-style-badges .td-feature-strip__list::-webkit-scrollbar {
	display: none;
}

/* The row only scrolls sideways. overflow-x alone makes overflow-y auto too,
   so the row could also be dragged up and down; the entrance animation
   (data-td-reveal) slid badges up 12–16px as they were swiped into view, which
   also created that vertical overflow. They are simply shown while the row
   scrolls (below 1200px); from 1200px the row fits and keeps the animation. */
@media (max-width: 1199px) {

	.is-style-badges .td-feature-strip__list {
		overflow-y: hidden;
	}

	.is-style-badges .td-feature[data-td-reveal]:not(.is-revealed) {
		opacity: 1;
		transform: none;
	}
}

.is-style-badges .td-feature-strip__list:focus-visible {
	outline-offset: -2px;
}

/* Every badge has the design's hairline frame (1px, --td-rule); neighbours
   share one line. Logo area on top, so all logos sit on one line whatever
   the label length. */
.is-style-badges .td-feature {
	flex: 1 0 166px;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 4px;
	padding: 4px;
	border-width: 1px;
	scroll-snap-align: start;
	text-align: center;
}

.is-style-badges .td-feature + .td-feature {
	border-left-width: 0;
}

.is-style-badges .td-feature::before {
	content: none;
}

/* Logo area: same height for every badge (50px, as designed); the logo is
   centred in it at its own proportions and never enlarged beyond its
   intrinsic size (scale-down = contain without upscaling), so a 94×28 logo
   stays 94×28 and a 50×50 icon 50×50. */
.td-feature__icon {
	width: 100%;
	height: 50px;
	object-fit: scale-down;
	object-position: center;
}

.is-style-badges .td-feature__text {
	flex: none;
	width: 100%;
}

.is-style-badges .td-feature__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	line-height: 22px;
}

@media (min-width: 1024px) {

	.td-feature-strip__intro {
		gap: 24px;
	}
}

@media (min-width: 1200px) {

	.td-feature-strip.is-style-spacious {
		border-top: 0;
	}

	.is-style-spacious .td-feature-strip__list {
		padding-inline: var(--td-gutter);
	}

	.is-style-spacious .td-feature {
		padding: 48px 56px;
	}

	.td-feature-strip.is-style-badges {
		border-top: 0;
	}

	.is-style-badges .td-feature-strip__list {
		max-width: var(--td-frame);
		margin-inline: auto;
		overflow: visible;
	}

	.is-style-badges .td-feature {
		flex: 1 1 0;
		gap: 8px;
		padding: 8px;
	}

	.is-style-badges .td-feature__title {
		font-size: 16px;
		line-height: 25px;
	}
}

/* Optional eyebrow and button (any style) */

.td-feature-strip__eyebrow {
	color: var(--wp--preset--color--champagne);
}

.td-feature-strip__actions {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

/* Steps style: sand section, large centred intro, numbered steps (number,
   bold title, text) and a centred button. Phones and tablets: steps are
   centred (one column, two from 600px); from 1024px one row of up to 218px
   columns, left-aligned text. */

.td-feature-strip.is-style-steps {
	padding-block: var(--td-section-space);
	border-top: 0;
	background-color: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--slate);
}

.is-style-steps .td-feature-strip__intro {
	gap: 16px;
	max-width: calc(878px + 2 * var(--td-gutter));
	margin-bottom: var(--td-section-gap);
}

.is-style-steps .td-feature-strip__eyebrow {
	color: var(--wp--preset--color--bronze);
}

.is-style-steps .td-feature-strip__title {
	text-wrap: balance;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 36px;
	line-height: 44px;
	color: var(--wp--preset--color--ink);
}

.is-style-steps .td-feature-strip__text {
	max-width: none;
}

.is-style-steps .td-feature-strip__list {
	display: grid;
	grid-template-columns: minmax(0, 202px);
	justify-content: center;
	gap: 32px;
	padding-inline: var(--td-gutter);
}

.is-style-steps .td-feature {
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	text-align: center;
}

.is-style-steps .td-feature::before {
	display: block;
	width: auto;
	height: auto;
}

.is-style-steps .td-feature__text {
	gap: 4px;
}

.is-style-steps .td-feature__title {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
	font-weight: 700;
	line-height: 22px;
	color: var(--wp--preset--color--ink);
}

.is-style-steps .td-feature__description {
	font-size: 14px;
	line-height: 22px;
}

.is-style-steps .td-feature-strip__actions {
	margin-top: var(--td-section-gap);
}

@media (min-width: 600px) {

	.is-style-steps .td-feature-strip__list {
		grid-template-columns: repeat(2, minmax(0, 218px));
		gap: 32px 48px;
	}
}

@media (min-width: 1024px) {

	.is-style-steps .td-feature-strip__intro {
		gap: 24px;
		margin-bottom: 80px;
	}

	.is-style-steps .td-feature-strip__title {
		font-size: 48px;
		line-height: 56px;
	}

	.is-style-steps .td-feature-strip__list {
		grid-template-columns: none;
		grid-auto-columns: minmax(0, 218px);
		grid-auto-flow: column;
	}

	.is-style-steps .td-feature {
		align-items: flex-start;
		gap: 16px;
		text-align: left;
	}

	.is-style-steps .td-feature__text {
		gap: 8px;
	}

	.is-style-steps .td-feature__title {
		font-size: 16px;
		line-height: 25px;
	}

	.is-style-steps .td-feature-strip__actions {
		margin-top: 80px;
	}
}
