/* =============================================================================
   Ecoleas · Size guide and Our Fabrics pages.
   ============================================================================= */

/* Our fabrics: close-up photographs on full-width bands, with no gaps -------- */

.ec-cloth { color: var(--ec-ink); font-family: var(--ec-font-text); }

.ec-cloth__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 24px;
	padding: 14px var(--ec-gutter);
}

.ec-cloth__head h1 {
	margin: 0;
	font: 300 clamp(40px, 7vw, 92px) / 1 var(--ec-font-display);
	letter-spacing: -.045em;
}

.ec-cloth__head p { margin: 0; color: var(--ec-ink-muted); font-size: 14px; }

.ec-cloth__band { display: grid; grid-template-columns: 1fr 1fr; }

.ec-cloth__band:nth-of-type(even) .ec-cloth__photo { order: 2; }

.ec-cloth__band--ivory { background: var(--ec-ivory); }
.ec-cloth__band--wine { background: #6d1518; color: var(--ec-cream); }
.ec-cloth__band--ink { background: #14162a; color: var(--ec-cream); }

.ec-cloth__photo { position: relative; min-height: min(46vw, 560px); overflow: hidden; }

.ec-cloth__photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.ec-cloth__band:hover .ec-cloth__photo img { transform: scale(1.04); }

.ec-cloth__text {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: clamp(20px, 3vw, 44px) clamp(20px, 4vw, 56px);
}

.ec-cloth__no { margin-bottom: auto; font-size: 13px; opacity: .65; }

.ec-cloth__text h2 {
	margin: 12px 0 10px;
	color: inherit;
	font: 300 clamp(40px, 6vw, 84px) / .98 var(--ec-font-display);
	letter-spacing: -.045em;
}

.ec-cloth__text p { max-width: 46ch; margin: 0; color: inherit; font-size: 15px; line-height: 1.5; }

.ec-cloth__text dl { max-width: 46ch; margin: 14px 0; font-size: 13px; line-height: 1.4; }

.ec-cloth__text dl div {
	display: grid;
	grid-template-columns: 64px 1fr;
	padding: 7px 0;
	border-top: 1px solid currentColor;
	border-color: color-mix(in srgb, currentColor 22%, transparent);
}

.ec-cloth__text dt { opacity: .65; }
.ec-cloth__text dd { margin: 0; }

.ec-cloth__text a { align-self: flex-start; color: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 720px) {
	.ec-cloth__band { grid-template-columns: 1fr; }
	.ec-cloth__band:nth-of-type(even) .ec-cloth__photo { order: 0; }
	.ec-cloth__photo { min-height: 86vw; }
	.ec-cloth__no { margin-bottom: 0; }
}

/* Size guide: garments, then a drawing beside the numbers -------------------- */

.ec-fit {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
	color: var(--ec-ink);
	font-family: var(--ec-font-text);
}

.ec-fit__rail {
	display: flex;
	flex-direction: column;
	padding: 14px clamp(16px, 2vw, 28px) 14px var(--ec-gutter);
}

.ec-fit__rail h1 {
	margin: 0 0 8px;
	font: 300 clamp(36px, 4vw, 56px) / 1 var(--ec-font-display);
	letter-spacing: -.04em;
}

.ec-fit__rail p { margin: 0 0 14px; color: var(--ec-ink-muted); font-size: 13px; line-height: 1.45; }

.ec-fit__garments { display: flex; flex-direction: column; align-items: flex-start; }

.ec-fit__garments button {
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	color: #a79b90;
	background: none;
	font: 300 clamp(18px, 1.7vw, 23px) / 1.2 var(--ec-font-display);
	letter-spacing: -.02em;
	text-align: left;
	cursor: pointer;
	transition: color .2s;
}

.ec-fit__garments button:hover,
.ec-fit__garments button[aria-selected="true"] { color: var(--ec-ink); }

.ec-fit__ask { margin-top: 14px; color: var(--ec-ink); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

.ec-fit__panel { display: contents; }
.ec-fit__panel[hidden] { display: none; }

.ec-fit__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	padding: 16px;
	background: var(--ec-ivory);
}

.ec-fit__figure .ec-shirt { display: block; width: 100%; max-width: 420px; max-height: 480px; margin: 0; }

.ec-fit__figure figcaption { min-height: 38px; max-width: 40ch; color: var(--ec-ink-muted); font-size: 13px; line-height: 1.45; text-align: center; }

.ec-fit__panel.has-measure .ec-shirt__m { opacity: .1; }
.ec-fit__panel.has-measure .ec-shirt__m.is-active { opacity: 1; stroke-width: 2.2; }

.ec-fit__numbers { padding: 14px var(--ec-gutter) 14px clamp(16px, 2.4vw, 36px); }

.ec-fit__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }

.ec-fit__sizes,
.ec-fit__units { display: flex; gap: 4px; }

.ec-fit__sizes button,
.ec-fit__units button {
	min-width: 42px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--ec-rule-warm);
	border-radius: 999px !important;
	color: var(--ec-ink);
	background: none;
	font: 400 13px / 1 var(--ec-font-text);
	cursor: pointer;
}

.ec-fit__sizes button[aria-pressed="true"],
.ec-fit__units button[aria-pressed="true"] { border-color: var(--ec-ink); color: #fff; background: var(--ec-ink); }

.ec-fit__list { margin: 0; padding: 0; list-style: none; }
.ec-fit__list[hidden] { display: none; }

.ec-fit__list button {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	width: 100%;
	padding: 11px 0;
	border: 0;
	border-bottom: 1px solid var(--ec-rule-faint);
	border-radius: 0;
	color: var(--ec-ink);
	background: none;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
}

.ec-fit__list button > span { font-size: 14px; }

.ec-fit__list strong {
	font: 300 clamp(26px, 2.8vw, 38px) / 1 var(--ec-font-display);
	letter-spacing: -.03em;
}

.ec-fit__list button.is-active,
.ec-fit__list button.is-active strong { color: #b5563a; }

.ec-fit__cm { display: none; }
[data-unit="cm"] .ec-fit__in { display: none; }
[data-unit="cm"] .ec-fit__cm { display: inline; }

@media (max-width: 960px) {
	.ec-fit { grid-template-columns: minmax(0, 1fr); }
	.ec-fit__rail { min-width: 0; padding-right: var(--ec-gutter); }
	.ec-fit__rail p { margin-bottom: 10px; }
	.ec-fit__garments { flex-direction: row; gap: 14px; overflow-x: auto; }
	.ec-fit__garments button { flex: none; font-size: 18px; }
	.ec-fit__ask { order: 3; }
	.ec-fit__figure .ec-shirt { max-height: 300px; }
	.ec-fit__numbers { padding-left: var(--ec-gutter); }
}
