/*
 * Sounds Amazing - Support page, brought in line with Figma "support" 336:1550.
 *
 * Loads after the theme's support.css (same selectors, later in the cascade,
 * most of them one class stronger). Every size that changes interpolates from
 * the page's existing 1024px value to the 1920px design value with the same
 * clamp() curve the theme uses: (100vw - 1024px) / 896 runs 0 -> 1.
 *
 * 1920px targets (page y in the Figma frame):
 *   hero 199-712, crumbs 712-763, sidebar card 923-1317 (380 x 394),
 *   commitment card 924-1342, Orders 1465, Shipping rule 1936,
 *   Returns rule 2419, FAQ rule 2978, trust strip 3734, footer 4026.
 */

/* ------------------------------------------------------------- page */

/* The design's page colour is #faf2ec, a touch lighter than the shop cream. */
.sa-support-page {
	background: #faf2ec;
	/* the side waveform bleeds off the left edge; clip (not hidden) keeps the sticky card working */
	overflow-x: clip;
}

.sa-support-page .sa-support__title {
	line-height: 1.1667;
}

/* ------------------------------------------------------------- hero */

/* Dark on the left, purple on the right (the shop band runs the other way). */
.sa-support-hero {
	background: linear-gradient(90deg, var(--purple-ink) 0%, var(--purple-deep) 100%);
	/* the text column sits on the 88px gutter itself, not 88px inside it */
	padding-inline: var(--gutter);
}

.sa-support-hero .sa-shop-hero__inner {
	padding-inline: 0;
}

/* "image 5": the waveform fills the whole band, drawn 84.59% wide from 25.26% in. */
.sa-support-hero .sa-shop-hero__art {
	right: auto;
	left: 0;
	width: 100%;
	height: auto;
	aspect-ratio: 1920 / 701;
	overflow: hidden;
	background: none;
}

.sa-support-hero .sa-shop-hero__art::before {
	content: "";
	position: absolute;
	top: 0;
	left: 25.26%;
	width: 84.59%;
	height: 100%;
	background: url(img/support-wave.webp) center / 100% 100% no-repeat;
}

/* ------------------------------------------------------------ layout */

/* The theme's max-width counted the gutters, so the 1744px content box shrank to 1568px at 1920. */
.sa-support-page .sa-support {
	max-width: calc(var(--content) + 2 * var(--gutter));
	position: relative;
	z-index: 0;
}

/* --------------------------------------------------- commitment card */

.sa-support-card__warranty {
	margin-top: 32px;
}

.sa-support-card__sub {
	margin: 12px 0 0;
	font: 400 clamp(18px, 4.2vw, 22px) / 1.1818 var(--serif);
	color: var(--ink);
}

.sa-support-card .sa-support-card__sub + .sa-support-card__text {
	margin-top: 12px;
}

/* the design sets both paragraphs in a 1220px box, which decides where the lines break */
.sa-support-page .sa-support-card__text {
	max-width: 1220px;
}

/* ------------------------------------------------------ lists, FAQ */

/* whole-pixel rows: 22px bullets (38px pitch), 25px sub-heading, as drawn */
.sa-support-page .sa-support__list li {
	line-height: 22px;
}

.sa-support-page .sa-support-sub__title {
	line-height: 25px;
}

.sa-support-page .sa-support__list--small {
	margin-top: 12px;
}

.sa-support-page .sa-support__list--small li {
	line-height: 20px;
}

.sa-support-page .sa-faq__q {
	line-height: 22px;
}

/* open item: question 22px, 12px, answer 2 x 20px (122px in the design) */
.sa-support-page .sa-faq__item.is-open .sa-faq__q {
	padding-bottom: 8px;
}

/* ============================================================== laptop and up */

@media (min-width: 1025px) {
	.sa-support-hero {
		align-items: flex-start;
	}

	.sa-support-hero .sa-shop-hero__inner {
		padding-block: clamp(64px, calc(64px + 61 * (100vw - 1024px) / 896), 125px) 64px;
	}

	/* The title's text box starts at 85px, the wave and lead at 89px. */
	.sa-support-hero .sa-shop-hero__title {
		margin-left: -3px;
	}

	.sa-support-hero .sa-shop-hero__lead {
		margin-top: clamp(25px, calc(25px + 10 * (100vw - 1024px) / 896), 35px);
	}

	.sa-support-page .sa-support {
		padding-bottom: clamp(120px, calc(140px + 98 * (100vw - 1024px) / 896), 238px);
	}

	/* sidebar card: 380 x 394, label at 24, pills at 56 + 63n, 332 wide */
	.sa-support-page .sa-support__nav {
		background-color: #faf2ec;
		padding: 23px 23px 38px;
	}

	.sa-support-page .sa-support__nav-label {
		margin: 0 0 16px 10px;
		line-height: 16px;
	}

	/* commitment card: 39px padding (+1 border) and 48px under the last line */
	.sa-support-page .sa-support-card {
		--sa-pad: clamp(23px, calc(27px + 12 * (100vw - 1024px) / 896), 39px);
		padding: var(--sa-pad) var(--sa-pad) clamp(23px, calc(27px + 21 * (100vw - 1024px) / 896), 48px);
	}

	.sa-support-card__warranty {
		margin-top: clamp(32px, calc(32px + 17 * (100vw - 1024px) / 896), 49px);
	}

	.sa-support-card__sub {
		margin-top: clamp(12px, calc(12px + 7 * (100vw - 1024px) / 896), 19px);
		font-size: clamp(19px, calc(19px + 3 * (100vw - 1024px) / 896), 22px);
	}

	.sa-support-card .sa-support-card__sub + .sa-support-card__text {
		margin-top: clamp(12px, calc(12px + 3 * (100vw - 1024px) / 896), 15px);
	}

	/* gaps between the sections: 124 / 151 / 129 / 148 at 1920 */
	.sa-support-page .sa-support-section--first {
		margin-top: clamp(72px, calc(88px + 36 * (100vw - 1024px) / 896), 124px);
	}

	.sa-support-page #shipping {
		margin-top: clamp(64px, calc(72px + 79 * (100vw - 1024px) / 896), 151px);
	}

	.sa-support-page #returns {
		margin-top: clamp(64px, calc(72px + 57 * (100vw - 1024px) / 896), 129px);
		padding-top: clamp(48px, calc(52px + 16 * (100vw - 1024px) / 896), 68px);
	}

	.sa-support-page #faq {
		margin-top: clamp(64px, calc(72px + 76 * (100vw - 1024px) / 896), 148px);
		padding-top: clamp(48px, calc(52px + 11 * (100vw - 1024px) / 896), 63px);
	}

	.sa-support-page .sa-support__subs {
		margin-top: clamp(24px, calc(24px + 8 * (100vw - 1024px) / 896), 32px);
	}

	/* trust strip: 122px under the row, items 150px apart (the design is not space-between) */
	.sa-support-page .sa-trust {
		padding-bottom: clamp(56px, calc(60px + 62 * (100vw - 1024px) / 896), 122px);
	}

	.sa-support-page .sa-trust__list {
		justify-content: flex-start;
		column-gap: clamp(32px, calc(32px + 118 * (100vw - 1024px) / 896), 150px);
	}

	/* Faint waveform behind Returns and FAQ, left of the content column (1260 x 710, turned 90deg). */
	.sa-support-page #returns {
		position: relative;
	}

	.sa-support-page #returns::before {
		content: "";
		position: absolute;
		z-index: -1;
		top: -38px;
		left: -52px;
		width: 1260px;
		height: 710px;
		transform-origin: 0 0;
		transform: rotate(90deg);
		background: url(img/support-wave.webp) center / cover no-repeat;
		pointer-events: none;
	}
}

/* Design frame: sidebar at 89, content column 531-1831 (1300 wide), i.e. a 1742px box inside the 1920px page. */
@media (min-width: 1800px) {
	.sa-support-page .sa-support {
		padding-inline: calc(var(--gutter) + 1px);
	}
}

/* ============================================================== tablet and phone */

@media (min-width: 768px) {
	.sa-support-page .sa-faq__item.is-open .sa-faq__q {
		padding-bottom: 12px;
	}

	.sa-support-page .sa-faq__a {
		padding-bottom: 23px;
	}
}
