/*
 * The Contact us page (page-templates/contact.php, parts/contact/body.php), Keith's layout 4
 * "Form in the hero" (Raphael's pick, 2026-10-28) adapted to our design (Tanzeel,
 * 2026-11-02; docs/design/why-buy-here.md likes and rejections): the grey ground of the
 * product and collection pages, every section its own white box with a hairline, square
 * corners, no colored edges or small yellow markers, Archivo condensed headings. Ink line
 * icons on Call us and Email us, yellow spot line icons below. From 64rem the hero and the
 * form box share the first row; the five facts sit in one row from 80rem with their icon,
 * title and text rows aligned (subgrid), the four policy boxes too. Every rule under
 * body.hdc-contact.
 */

@layer tokens {
	body.hdc-contact {
		--ct-line: #dce0e4;
		--ct-tint: #f5f7fa;
		--ct-spot: #ffdb5c;
		/* 5.2:1 on white. */
		--ct-mute: #5b6571;
		--ct-space: 3rem;
		--ct-pad: 1.25rem;
	}

	@media (min-width: 64rem) {
		body.hdc-contact {
			--ct-space: 4rem;
			--ct-pad: 2rem;
		}
	}
}

@layer components {
	.hdc-contact .hdc-ct {
		padding-block: 1.25rem var(--space-section);
		overflow-x: clip;
		background: var(--panel);
		color: var(--body);
	}

	/* Every section is its own white box on the grey ground. */
	.hdc-contact .hdc-ct-hero,
	.hdc-contact .hdc-ct-form,
	.hdc-contact .hdc-ct-facts,
	.hdc-contact .hdc-ct-pol,
	.hdc-contact .hdc-ct-company {
		border: 1px solid var(--ct-line);
		background: var(--white);
	}

	/* Spot icons: thin ink lines over one soft yellow dot (the product page's below the fold icon). */
	.hdc-contact .hdc-ct-spot {
		flex: none;
		width: 2.5rem;
		height: 2.5rem;
		overflow: visible;
		color: var(--ink);
		fill: none;
		stroke: currentColor;
		stroke-width: 1.5;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.hdc-contact .hdc-ct-spot .hdc-collection-spot__line * {
		vector-effect: non-scaling-stroke;
	}

	.hdc-contact .hdc-ct-spot .hdc-collection-spot__dot {
		fill: var(--ct-spot);
		stroke: none;
	}

	/* ---------------------------------------------------------------- First row */
	.hdc-contact .hdc-ct-row {
		display: grid;
		gap: 1.25rem;
	}

	.hdc-contact .hdc-ct-hero {
		min-width: 0;
		padding: 0 var(--ct-pad) var(--ct-pad);
	}

	.hdc-contact .hdc-ct-crumbs__list {
		margin: 0;
		padding: 1rem 0 0;
		list-style: none;
		color: var(--steel);
		font-size: 0.875rem;
		--link: var(--steel);
		--link-hover: var(--ink);
		--link-line: none;
		--link-hover-line: underline;
	}

	.hdc-contact .hdc-ct-crumbs__item {
		display: inline;
	}

	.hdc-contact .hdc-ct-crumbs__item + .hdc-ct-crumbs__item::before {
		content: "/";
		margin-inline: 0.5rem;
		color: var(--control);
	}

	.hdc-contact .hdc-ct-crumbs__item [aria-current] {
		color: var(--ink);
		font-weight: 600;
	}

	.hdc-contact .hdc-ct-h1 {
		margin: 1.25rem 0 1rem;
		color: var(--ink);
		font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
		font-stretch: 75%;
		font-weight: 800;
		line-height: 1.02;
		text-wrap: balance;
	}

	.hdc-contact .hdc-ct-lead {
		max-width: 42rem;
		margin: 0;
		font-size: 1.0625rem;
		line-height: 1.6;
	}

	.hdc-contact .hdc-ct-h2 {
		margin: 0 0 0.75rem;
		color: var(--ink);
		font-size: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);
		font-stretch: 75%;
		font-weight: 800;
		line-height: 1.05;
	}

	/* Call us and Email us. */
	.hdc-contact .hdc-ct-ways {
		display: grid;
		gap: 1rem;
		margin: 1.5rem 0 0;
		padding: 0;
		list-style: none;
	}

	.hdc-contact .hdc-ct-way {
		display: grid;
		align-content: start;
		gap: 0.375rem;
		min-width: 0;
		padding: 1rem 1.125rem 1.125rem;
		background: var(--ct-tint);
	}

	/* An ink line icon on a white square: the key facts at the top. */
	.hdc-contact .hdc-ct-way__icon {
		display: grid;
		place-items: center;
		width: 2.75rem;
		height: 2.75rem;
		margin-bottom: 0.375rem;
		border: 1px solid var(--ct-line);
		background: var(--white);
		color: var(--ink);
	}

	.hdc-contact .hdc-ct-way__icon .hdc-icon {
		width: 1.375rem;
		height: 1.375rem;
	}

	.hdc-contact .hdc-ct-way__label {
		margin: 0;
		color: var(--ct-mute);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.hdc-contact .hdc-ct-way__link {
		color: var(--ink);
		--link: var(--ink);
		--link-hover: var(--ink);
		--link-line: none;
		--link-hover-line: underline;
	}

	.hdc-contact .hdc-ct-way__big {
		font-size: clamp(1.625rem, 1.4rem + 1vw, 2rem);
		font-stretch: 75%;
		font-weight: 800;
		line-height: 1.1;
		font-variant-numeric: tabular-nums;
	}

	.hdc-contact .hdc-ct-way__mail {
		font-size: 1.125rem;
		font-stretch: 100%;
		font-weight: 700;
		overflow-wrap: anywhere;
	}

	.hdc-contact .hdc-ct-way__note {
		margin: 0.25rem 0 0;
		color: var(--ct-mute);
		font-size: 0.875rem;
		line-height: 1.5;
	}

	/* The form card. */
	.hdc-contact .hdc-ct-form {
		min-width: 0;
		padding: var(--ct-pad);
	}

	.hdc-contact .hdc-ct-form__note {
		margin: 0 0 0.25rem;
		color: var(--body);
	}

	.hdc-contact .hdc-ct-form__reply {
		margin: 0 0 0.5rem;
		color: var(--ct-mute);
		font-size: 0.9375rem;
	}

	.hdc-contact .hdc-ct-form .hdc-lead-form {
		margin-top: 1rem;
	}

	/* The longer extra answer takes the row, like the message. */
	.hdc-contact .hdc-ct-form .hdc-lead-form__field--route {
		grid-column: 1 / -1;
	}

	/* ---------------------------------------------------------------- Sections */
	.hdc-contact .hdc-ct-sec {
		margin-top: 1.25rem;
	}

	.hdc-contact .hdc-ct-facts {
		padding: var(--ct-pad);
	}

	.hdc-contact .hdc-ct-intro {
		max-width: 50rem;
		margin: 0;
		line-height: 1.6;
	}

	/* The five facts. */
	.hdc-contact .hdc-ct-facts__list {
		display: grid;
		gap: 1rem;
		margin: 1.5rem 0 0;
		padding: 0;
		list-style: none;
	}

	/* Icon, title and text rows line up across a row of cards, so a two line title moves every text down alike. */
	.hdc-contact .hdc-ct-fact {
		display: grid;
		grid-row: span 3;
		grid-template-rows: subgrid;
		align-content: start;
		gap: 0.625rem;
		min-width: 0;
		padding: 1.125rem 1.125rem 1.25rem;
		background: var(--ct-tint);
	}

	.hdc-contact .hdc-ct-fact__title {
		margin: 0;
		color: var(--ink);
		font-size: 1.25rem;
		font-stretch: 75%;
		font-weight: 800;
		line-height: 1.15;
	}

	.hdc-contact .hdc-ct-fact__text {
		margin: 0;
		font-size: 0.9375rem;
		line-height: 1.55;
	}

	.hdc-contact .hdc-ct-facts__model {
		margin: 1.25rem 0 0;
		color: var(--ink);
		font-weight: 600;
	}

	/* The four policy boxes. */
	/* The three short boxes share a row and its height; Returns and warranty, the long one, takes the full width under them. */
	.hdc-contact .hdc-ct-policy {
		display: grid;
		align-items: stretch;
		gap: 1.25rem;
	}

	.hdc-contact .hdc-ct-pol--returns {
		grid-column: 1 / -1;
	}

	.hdc-contact .hdc-ct-pol {
		display: grid;
		align-content: start;
		gap: 0.625rem;
		min-width: 0;
		padding: var(--ct-pad);
	}

	.hdc-contact .hdc-ct-pol__head {
		display: flex;
		align-items: center;
		gap: 0.75rem;
	}

	.hdc-contact .hdc-ct-pol__title {
		margin: 0;
		color: var(--ink);
		font-size: 1.375rem;
		font-stretch: 75%;
		font-weight: 800;
		line-height: 1.1;
	}

	.hdc-contact .hdc-ct-pol p {
		margin: 0;
		font-size: 0.9375rem;
		line-height: 1.55;
	}

	.hdc-contact .hdc-ct-pol .hdc-ct-pol__sub {
		margin-top: 0.25rem;
		color: var(--ct-mute);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.hdc-contact .hdc-ct-pol__list {
		display: grid;
		gap: 0.375rem;
		margin: 0;
		padding-inline-start: 1.125rem;
		font-size: 0.9375rem;
		line-height: 1.5;
	}

	.hdc-contact .hdc-ct-pol__list li::marker {
		color: var(--ink);
	}

	/* The company block. */
	.hdc-contact .hdc-ct-company {
		display: grid;
		gap: 1.25rem;
		padding: var(--ct-pad);
	}

	.hdc-contact .hdc-ct-company__words {
		display: grid;
		gap: 0.75rem;
		max-width: 46rem;
	}

	.hdc-contact .hdc-ct-company__words .hdc-ct-h2 {
		margin: 0;
	}

	.hdc-contact .hdc-ct-company__words p {
		margin: 0;
		line-height: 1.6;
	}

	.hdc-contact .hdc-ct-company__tab {
		display: grid;
		gap: 1rem;
		margin: 0;
	}

	.hdc-contact .hdc-ct-company__tab > div {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 0.875rem;
		align-items: start;
		padding: 1rem;
		background: var(--ct-tint);
	}

	.hdc-contact .hdc-ct-company__tab .hdc-ct-spot {
		grid-row: span 2;
	}

	.hdc-contact .hdc-ct-company__tab dt {
		color: var(--ct-mute);
		font-size: 0.75rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.hdc-contact .hdc-ct-company__tab dd {
		display: grid;
		margin: 0.25rem 0 0;
		color: var(--ink);
		font-weight: 600;
	}

	/* ---------------------------------------------------------------- Wider screens */
	@media (min-width: 40rem) {
		.hdc-contact .hdc-ct-ways,
		.hdc-contact .hdc-ct-facts__list {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
	}

	@media (min-width: 48rem) {
		.hdc-contact .hdc-ct-policy {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}

		.hdc-contact .hdc-ct-company {
			grid-template-columns: minmax(0, 1fr) auto;
			align-items: start;
			gap: 2rem;
		}

		.hdc-contact .hdc-ct-company__tab {
			min-width: 15rem;
		}
	}

	@media (min-width: 64rem) {
		.hdc-contact .hdc-ct-row--form {
			grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
			align-items: start;
		}

		.hdc-contact .hdc-ct-facts__list {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
	}

	@media (min-width: 80rem) {
		.hdc-contact .hdc-ct-facts__list {
			grid-template-columns: repeat(5, minmax(0, 1fr));
		}

		/* Returns: its own words on the left, the EK Tech terms on the right. */
		.hdc-contact .hdc-ct-pol--returns {
			grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
			column-gap: 3rem;
		}

		.hdc-contact .hdc-ct-pol--returns > .hdc-ct-pol__head {
			grid-area: 1 / 1;
		}

		.hdc-contact .hdc-ct-pol--returns > .hdc-ct-pol__standard {
			grid-area: 2 / 1;
		}

		.hdc-contact .hdc-ct-pol--returns > .hdc-ct-pol__claims {
			grid-area: 3 / 1;
		}

		.hdc-contact .hdc-ct-pol--returns > .hdc-ct-pol__sub {
			grid-area: 1 / 2;
			align-self: end;
		}

		.hdc-contact .hdc-ct-pol--returns > .hdc-ct-pol__list {
			grid-area: 2 / 2 / span 3;
		}
	}
}
