/* ==========================================================================
   Wood manufacturing demo — ARZ / أَرز
   Crafted and natural: walnut brown, cedar orange and paper white; CSS
   wood-grain swatches; Young Serif + Instrument Sans (English), Mirza +
   Beiruti (Arabic); a growth-rings intro and a slatted hero slider. Every rule is under .wd-body, every class starts with wd-.
   Layout answers to the demo's width (container "demo").

   1. Fonts   2. Tokens & base   3. Buttons   4. Header   5. Hero slider
   6. Species & compare   7. Products   8. Cut list   9. Process & band
   10. About & order   11. Footer & toast   12. Motion   13. Narrower widths
   ========================================================================== */

/* 1. Fonts (SIL Open Font License): Young Serif + Instrument Sans in English,
   Mirza + Beiruti in Arabic (400–600 only). --------------------------------- */
@font-face {
	font-family: "WD Young";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/youngserif-400-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "WD Instrument";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/instrumentsans-400-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "WD Mirza";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/mirza-600-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "WD Beiruti";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("../fonts/beiruti-400-600-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* 2. Tokens & base ----------------------------------------------------------- */
.wd-body {
	--wd-forest: #2a1f18;
	--wd-forest-2: #3a2b21;
	--wd-forest-3: #4e3a2c;
	--wd-paper: #f4eee4;
	--wd-paper-2: #e9dfcf;
	--wd-wood: #b07a48;
	--wd-amber: #e07a4f;
	--wd-amber-2: #c4613a;
	--wd-ink: #1f1a15;
	--wd-muted: #74695c;
	--wd-line: rgb(31 26 21 / 0.12);
	--wd-serif: "WD Young", Georgia, serif;
	--wd-sans: "WD Instrument", "Segoe UI", Arial, sans-serif;
	--wd-enter: 1.6s;
	--wd-start: left;
	--wd-ease: cubic-bezier(0.25, 0.85, 0.3, 1);
	--wd-dir: 1;

	margin: 0;
	font-family: var(--wd-sans);
	font-size: 16px;
	line-height: 1.65;
	color: var(--wd-ink);
	background: var(--wd-paper);
	-webkit-font-smoothing: antialiased;
	font-synthesis-weight: none;
}

[dir="rtl"] .wd-body {
	--wd-dir: -1;
	--wd-start: right;
}

[lang="ar"] .wd-body {
	--wd-serif: "WD Mirza", "WD Young", Georgia, serif;
	--wd-sans: "WD Beiruti", "WD Instrument", Tahoma, sans-serif;

	font-size: 17px;
	line-height: 1.8;
}

[lang="ar"] .wd-body * {
	letter-spacing: 0 !important;
	text-transform: none !important;
}

:where(.wd-body) *,
:where(.wd-body) *::before,
:where(.wd-body) *::after {
	box-sizing: border-box;
}

:where(.wd-body) h1,
:where(.wd-body) h2,
:where(.wd-body) h3,
:where(.wd-body) p,
:where(.wd-body) ul,
:where(.wd-body) ol,
:where(.wd-body) dl,
:where(.wd-body) dd,
:where(.wd-body) figure {
	margin: 0;
	padding: 0;
}

:where(.wd-body) ul,
:where(.wd-body) ol {
	list-style: none;
}

:where(.wd-body) a {
	color: inherit;
	text-decoration: none;
}

:where(.wd-body) button,
:where(.wd-body) input,
:where(.wd-body) select {
	font: inherit;
	color: inherit;
}

:where(.wd-body) button {
	cursor: pointer;
}

.wd-body img {
	display: block;
	max-width: 100%;
	height: auto;
}

.wd-body :focus-visible {
	outline: 2px solid var(--wd-amber);
	outline-offset: 3px;
}

[dir="rtl"] .wd-icon--arrow {
	scale: -1 1;
}

.wd-wrap {
	width: min(100%, 1240px);
	margin-inline: auto;
	padding-inline: clamp(18px, 3cqi, 32px);
}

.wd-icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

.wd-kicker {
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wd-wood);
}

.wd-body h1,
.wd-body h2,
.wd-body h3 {
	font-family: var(--wd-serif);
	font-weight: 700;
	line-height: 1.08;
	color: var(--wd-forest);
}

[lang="ar"] .wd-body :is(h1, h2, h3) {
	line-height: 1.45;
}

.wd-body h1 em,
.wd-body h2 em {
	font-style: normal;
	font-weight: 500;
	color: var(--wd-wood);
}

.wd-body h2 {
	font-size: clamp(2rem, 1.2rem + 2.6cqi, 3.4rem);
}

/* Wood grain, drawn in CSS from two tones. */
.wd-grain {
	background:
		radial-gradient(ellipse 22% 9% at 68% 58%, rgb(0 0 0 / 0.22), transparent 70%),
		linear-gradient(180deg, rgb(255 255 255 / 0.1), transparent 45%, rgb(0 0 0 / 0.1)),
		repeating-radial-gradient(ellipse 420% 120% at 40% -70%, var(--wd-a) 0 7px, var(--wd-b) 8px 9px, var(--wd-a) 10px 15px, var(--wd-b) 16px 16.5px, var(--wd-a) 17px 24px);
}

/* 3. Buttons ------------------------------------------------------------------ */
.wd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 26px;
	font-weight: 600;
	border: 0;
	border-radius: 8px;
	transition: background-color 0.25s, transform 0.25s var(--wd-ease), box-shadow 0.25s;
}

.wd-btn:hover {
	transform: translateY(-2px);
}

.wd-btn .wd-icon {
	transition: translate 0.3s var(--wd-ease);
}

.wd-btn:hover .wd-icon--arrow {
	translate: calc(4px * var(--wd-dir)) 0;
}

.wd-btn--amber {
	color: var(--wd-ink);
	background: var(--wd-amber);
	box-shadow: 0 4px 0 var(--wd-amber-2);
}

.wd-btn--amber:hover {
	background: #edb352;
}

.wd-btn--paper {
	color: var(--wd-forest);
	background: var(--wd-paper);
}

.wd-btn--green {
	color: var(--wd-paper);
	background: var(--wd-forest);
}

.wd-btn--green:hover {
	background: var(--wd-forest-3);
}

.wd-btn--block {
	width: 100%;
}

.wd-btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
}

.wd-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 0;
	font-weight: 600;
	color: var(--wd-forest);
	background: none;
	border: 0;
}

.wd-link .wd-icon {
	width: 17px;
	height: 17px;
}

.wd-iconbtn {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: var(--wd-muted);
	background: none;
	border: 1px solid var(--wd-line);
	border-radius: 8px;
}

.wd-iconbtn .wd-icon {
	width: 17px;
	height: 17px;
}

/* 4. Header -------------------------------------------------------------------- */
.wd-header {
	position: sticky;
	top: 0;
	z-index: 40;
	color: var(--wd-paper);
	background: rgb(42 31 24 / 0.95);
	backdrop-filter: blur(10px);
}

.wd-header__in {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 76px;
}

.wd-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.wd-logo__mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	color: var(--wd-forest);
	background: var(--wd-amber);
	border-radius: 50% 50% 50% 8px;
}

.wd-logo__mark .wd-icon {
	width: 24px;
	height: 24px;
	fill: rgb(42 31 24 / 0.2);
}

.wd-logo b {
	display: block;
	font-family: var(--wd-serif);
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.08em;
}

.wd-logo small {
	display: block;
	font-size: 0.74rem;
	opacity: 0.7;
}

.wd-nav {
	display: flex;
	gap: 26px;
	margin-inline-start: auto;
	font-size: 0.94rem;
	font-weight: 500;
}

.wd-nav a {
	opacity: 0.8;
	transition: opacity 0.2s, color 0.2s;
}

.wd-nav a:hover {
	color: var(--wd-amber);
	opacity: 1;
}

.wd-tools {
	display: flex;
	align-items: center;
	gap: 10px;
}

.wd-lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	font-size: 0.88rem;
	font-weight: 600;
	border: 1px solid rgb(244 238 228 / 0.3);
	border-radius: 8px;
}

.wd-lang:hover {
	border-color: var(--wd-amber);
}

.wd-lang .wd-icon {
	width: 17px;
	height: 17px;
}

.wd-header__cta {
	min-height: 44px;
	padding: 0 18px;
}

.wd-burger {
	display: none;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--wd-paper);
	background: none;
	border: 1px solid rgb(244 238 228 / 0.3);
	border-radius: 8px;
}

.wd-burger .wd-icon:last-child,
.wd-burger[aria-expanded="true"] .wd-icon:first-child {
	display: none;
}

.wd-burger[aria-expanded="true"] .wd-icon:last-child {
	display: block;
}

/* 5. Hero slider -------------------------------------------------------------------- */
/* Three slides: the craft, the workshop, the design. The words sit on walnut on
   the start side; each new photo opens on the end side through five wooden
   slats, and the words rise from masks. The facts and controls run along the
   foot. Without JavaScript only the first slide shows. */
@property --wd-slat {
	syntax: "<percentage>";
	inherits: false;
	initial-value: 20%;
}

.wd-hero {
	position: relative;
	isolation: isolate;
	color: var(--wd-paper);
	background:
		repeating-linear-gradient(92deg, rgb(255 255 255 / 0.018) 0 2px, transparent 2px 9px),
		radial-gradient(60% 80% at 0% 0%, rgb(224 122 79 / 0.14), transparent 70%),
		var(--wd-forest);
	overflow: hidden;
}

.wd-hero__stage {
	display: grid;
	min-height: clamp(540px, 72vh, 780px);
}

/* Only the first slide waits for the intro. */
.wd-slide:not(:first-child),
.wd-hero.is-started {
	--wd-enter: 0s;
}

.wd-slide {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	visibility: hidden;
}

.wd-slide.is-active {
	z-index: 1;
	visibility: visible;
}

.wd-slide.is-leaving {
	z-index: 0;
	visibility: visible;
	transition: visibility 0s 1.1s;
}

.wd-slide__media {
	position: relative;
	grid-column: 2;
	grid-row: 1;
	overflow: hidden;
	-webkit-mask-image: repeating-linear-gradient(90deg, #000 0 var(--wd-slat), transparent var(--wd-slat) 20%);
	mask-image: repeating-linear-gradient(90deg, #000 0 var(--wd-slat), transparent var(--wd-slat) 20%);
}

[dir="rtl"] .wd-slide__media {
	-webkit-mask-image: repeating-linear-gradient(270deg, #000 0 var(--wd-slat), transparent var(--wd-slat) 20%);
	mask-image: repeating-linear-gradient(270deg, #000 0 var(--wd-slat), transparent var(--wd-slat) 20%);
}

.wd-slide.is-active .wd-slide__media {
	animation: wd-slats 1.1s cubic-bezier(0.65, 0, 0.3, 1) var(--wd-enter) both;
}

@keyframes wd-slats {
	from {
		--wd-slat: 0%;
	}

	to {
		--wd-slat: 20%;
	}
}

.wd-slide__media .wd-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.12);
	transition: transform 6.5s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.wd-slide.is-active .wd-slide__media .wd-photo {
	transform: scale(1.02);
}

.wd-slide__text {
	grid-column: 1;
	grid-row: 1;
	align-self: center;
	padding-block: 56px 36px;
	padding-inline: max(18px, (100cqi - 1260px) / 2 + 32px) clamp(28px, 4cqi, 64px);
}

.wd-slide.is-leaving .wd-slide__text {
	opacity: 0;
	transition: opacity 0.3s;
}

.wd-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--wd-amber);
	background: rgb(224 122 79 / 0.12);
	border: 1px solid rgb(224 122 79 / 0.35);
	border-radius: 999px;
}

.wd-tag .wd-icon {
	width: 17px;
	height: 17px;
}

.wd-hero .wd-slide__title {
	margin-block: 22px 20px;
	font-size: clamp(2.4rem, 1.1rem + 3.4cqi, 4.5rem);
	font-weight: 400;
	line-height: 1.02;
	color: var(--wd-paper);
}

.wd-hero .wd-slide__title em {
	font-style: normal;
	color: var(--wd-amber);
}

[lang="ar"] .wd-hero .wd-slide__title {
	font-size: clamp(2.6rem, 1.3rem + 4.4cqi, 5.2rem);
	line-height: 1.35;
}

.wd-mask {
	display: block;
	overflow: hidden;
	padding-block: 0.04em 0.12em;
}

.wd-mask > * {
	display: inline-block;
}

.wd-lead {
	max-width: 34em;
	font-size: 1.06rem;
	color: rgb(244 238 228 / 0.8);
}

.wd-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.wd-slide.is-active .wd-tag,
.wd-slide.is-active .wd-lead,
.wd-slide.is-active .wd-hero__actions {
	animation: wd-rise 0.9s var(--wd-ease) both;
}

.wd-slide.is-active .wd-mask > * {
	animation: wd-line 1s var(--wd-ease) both;
}

.wd-slide.is-active .wd-tag {
	animation-delay: calc(var(--wd-enter) + 0.25s);
}

.wd-slide.is-active .wd-mask:nth-child(1) > * {
	animation-delay: calc(var(--wd-enter) + 0.35s);
}

.wd-slide.is-active .wd-mask:nth-child(2) > * {
	animation-delay: calc(var(--wd-enter) + 0.48s);
}

.wd-slide.is-active .wd-lead {
	animation-delay: calc(var(--wd-enter) + 0.62s);
}

.wd-slide.is-active .wd-hero__actions {
	animation-delay: calc(var(--wd-enter) + 0.74s);
}

@keyframes wd-line {
	from {
		transform: translateY(105%);
	}
}

@keyframes wd-rise {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

/* The foot: facts on the start side, the counter, tabs and arrows on the end. */
.wd-hero__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 40px;
	padding-block: 22px;
	padding-inline: max(18px, (100cqi - 1260px) / 2 + 32px);
	border-top: 1px solid rgb(244 238 228 / 0.12);
	animation: wd-rise 0.9s var(--wd-ease) calc(var(--wd-enter) + 0.9s) both;
}

.wd-hero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 36px;
}

.wd-hero__facts li {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.wd-hero__facts b {
	font-family: var(--wd-serif);
	font-size: 1.7rem;
	font-weight: 400;
	line-height: 1.1;
	color: var(--wd-amber);
}

[lang="ar"] .wd-hero__facts b {
	font-family: var(--wd-sans);
	font-weight: 600;
}

.wd-hero__facts span {
	font-size: 0.85rem;
	opacity: 0.78;
}

.wd-slider__ui {
	display: flex;
	align-items: center;
	gap: 20px;
}

.wd-slider__count {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-family: var(--wd-serif);
	color: rgb(244 238 228 / 0.6);
}

.wd-slider__count b {
	font-size: 1.9rem;
	font-weight: 400;
	color: var(--wd-paper);
}

.wd-slider__tabs {
	display: flex;
	gap: 6px;
}

.wd-slider__tabs button {
	position: relative;
	min-width: 96px;
	padding: 8px 2px 12px;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	text-align: start;
	color: rgb(244 238 228 / 0.6);
	background: none;
	border: 0;
	cursor: pointer;
	transition: color 0.3s;
}

.wd-slider__tabs button[aria-selected="true"],
.wd-slider__tabs button:hover {
	color: var(--wd-paper);
}

.wd-slider__tabs i {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 3px;
	background: rgb(244 238 228 / 0.16);
	border-radius: 3px;
}

.wd-slider__tabs i::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--wd-amber);
	border-radius: inherit;
	transform: scaleX(0);
	transform-origin: var(--wd-start, left);
}

.wd-slider__tabs button[aria-selected="true"] i::after {
	transform: scaleX(1);
}

.wd-hero.is-playing .wd-slider__tabs button[aria-selected="true"] i::after {
	animation: wd-fill var(--wd-slide-time, 6.5s) linear both;
}

.wd-hero.is-paused .wd-slider__tabs button[aria-selected="true"] i::after {
	animation-play-state: paused;
}

@keyframes wd-fill {
	from {
		transform: scaleX(0);
	}
}

.wd-slider__arrows {
	display: flex;
	gap: 8px;
}

.wd-slider__arrow {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: var(--wd-paper);
	background: transparent;
	border: 1px solid rgb(244 238 228 / 0.3);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.wd-slider__arrow:hover {
	color: var(--wd-ink);
	background: var(--wd-amber);
	border-color: var(--wd-amber);
}

[dir="rtl"] .wd-slider__arrow .wd-icon {
	scale: -1 1;
}

.wd-body:not(.wd-ready) .wd-slider__ui {
	visibility: hidden;
}

/* 6. Species & compare ------------------------------------------------------------ */
.wd-section {
	padding-block: clamp(70px, 8cqi, 120px);
}

.wd-section--paper {
	background: var(--wd-paper-2);
}

.wd-section--green {
	color: var(--wd-paper);
	background: var(--wd-forest);
}

.wd-section--green h2 {
	color: var(--wd-paper);
}

.wd-section--green h2 em {
	color: var(--wd-amber);
}

.wd-section--dark {
	color: var(--wd-paper);
	background: #15281e;
}

.wd-section--dark h2 {
	color: var(--wd-paper);
}

.wd-section--dark h2 em {
	color: var(--wd-amber);
}

.wd-head {
	display: grid;
	gap: 12px;
	max-width: 720px;
	margin-bottom: clamp(30px, 4cqi, 50px);
}

.wd-head p:not(.wd-kicker) {
	color: var(--wd-muted);
}

.wd-species {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(18px, 3cqi, 36px);
	align-items: stretch;
}

.wd-swatches {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.wd-swatch {
	display: grid;
	gap: 8px;
	width: 100%;
	padding: 8px;
	font-weight: 600;
	text-align: start;
	background: var(--wd-paper);
	border: 2px solid transparent;
	border-radius: 14px;
	transition: border-color 0.25s, transform 0.25s var(--wd-ease);
}

.wd-swatch .wd-grain {
	aspect-ratio: 4 / 3;
	border-radius: 9px;
	transition: transform 0.4s var(--wd-ease);
}

.wd-swatch b {
	padding-inline: 4px;
}

.wd-swatch:hover {
	transform: translateY(-3px);
}

.wd-swatch[aria-pressed="true"] {
	border-color: var(--wd-forest);
}

.wd-detail {
	display: grid;
	grid-template-columns: 0.7fr 1fr;
	overflow: hidden;
	background: var(--wd-paper);
	border-radius: 18px;
	box-shadow: 0 30px 60px -40px rgb(31 26 21 / 0.5);
}

.wd-detail__grain {
	min-height: 100%;
	transition: filter 0.4s;
}

.wd-detail__body {
	display: grid;
	align-content: center;
	gap: 14px;
	padding: clamp(20px, 3cqi, 34px);
}

.wd-detail__origin {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wd-wood);
}

.wd-detail h3 {
	font-size: 2.2rem;
}

.wd-meters {
	display: grid;
	gap: 10px;
}

.wd-meters div {
	display: grid;
	grid-template-columns: 80px 1fr;
	align-items: center;
	gap: 12px;
	font-size: 0.88rem;
}

.wd-meters dt {
	color: var(--wd-muted);
}

.wd-meters dd {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 10px;
}

.wd-meter {
	height: 8px;
	overflow: hidden;
	background: var(--wd-paper-2);
	border-radius: 99px;
}

.wd-meter i {
	display: block;
	width: 0;
	height: 100%;
	background: linear-gradient(90deg, var(--wd-wood), var(--wd-amber));
	border-radius: inherit;
	transition: width 0.7s var(--wd-ease);
}

[dir="rtl"] .wd-meter i {
	background: linear-gradient(270deg, var(--wd-wood), var(--wd-amber));
}

.wd-meters b {
	min-width: 84px;
	font-size: 0.85rem;
	text-align: end;
	font-variant-numeric: tabular-nums;
}

.wd-detail__uses {
	font-size: 0.93rem;
	color: var(--wd-muted);
}

.wd-detail__uses b {
	color: var(--wd-ink);
}

.wd-detail__price b {
	font-family: var(--wd-serif);
	font-size: 1.6rem;
	color: var(--wd-forest);
}

[lang="ar"] .wd-detail__price b {
	font-family: var(--wd-sans);
}

.wd-detail__price small {
	color: var(--wd-muted);
}

.wd-detail .wd-btn {
	justify-self: start;
}

.wd-compare {
	margin-top: 24px;
	padding: clamp(18px, 3cqi, 28px);
	background: var(--wd-paper);
	border-radius: 18px;
	animation: wd-in 0.4s var(--wd-ease);
}

.wd-compare[hidden] {
	display: none;
}

.wd-compare__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.wd-compare__head h3 {
	font-size: 1.5rem;
}

.wd-table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.wd-table th,
.wd-table td {
	padding: 12px 14px;
	text-align: start;
	border-bottom: 1px solid var(--wd-line);
}

.wd-table thead th {
	font-family: var(--wd-serif);
	font-size: 1.2rem;
	color: var(--wd-forest);
}

.wd-table tbody th {
	font-weight: 500;
	color: var(--wd-muted);
}

.wd-table td.is-best {
	font-weight: 700;
	color: var(--wd-forest);
}

.wd-table td.is-best::after {
	content: " ●";
	color: var(--wd-amber);
}

@keyframes wd-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}

/* 7. Products --------------------------------------------------------------------- */
.wd-products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(14px, 2cqi, 24px);
}

.wd-product {
	position: relative;
	overflow: hidden;
	aspect-ratio: 8 / 9;
	background: var(--wd-forest);
	border-radius: 18px;
}

.wd-product .wd-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1s var(--wd-ease);
}

.wd-product:hover .wd-photo {
	transform: scale(1.06);
}

.wd-product__body {
	position: absolute;
	inset-inline: 12px;
	bottom: 12px;
	display: grid;
	gap: 4px;
	padding: 18px 20px;
	background: rgb(244 238 228 / 0.94);
	border-radius: 12px;
	transform: translateY(calc(100% - 64px));
	transition: transform 0.45s var(--wd-ease);
}

.wd-product:hover .wd-product__body,
.wd-product:focus-within .wd-product__body {
	transform: none;
}

.wd-product__body span {
	position: absolute;
	inset-inline-end: 18px;
	top: 16px;
	font-family: var(--wd-serif);
	font-weight: 800;
	color: var(--wd-wood);
}

.wd-product h3 {
	font-size: 1.35rem;
	line-height: 1.4;
}

.wd-product p {
	font-size: 0.9rem;
	color: var(--wd-muted);
}

/* 8. Cut list ------------------------------------------------------------------------ */
.wd-cut {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(28px, 5cqi, 70px);
	align-items: start;
}

.wd-cut__intro {
	display: grid;
	gap: 16px;
}

.wd-cut__intro > p:not(.wd-kicker) {
	color: rgb(244 238 228 / 0.75);
}

.wd-cut__photo {
	overflow: hidden;
	border-radius: 18px;
}

.wd-cut__photo .wd-photo {
	width: 100%;
	aspect-ratio: 9 / 7;
	object-fit: cover;
}

.wd-cut__form {
	display: grid;
	gap: 16px;
	padding: clamp(20px, 3cqi, 30px);
	color: var(--wd-ink);
	background: var(--wd-paper);
	border-radius: 18px;
}

.wd-field {
	display: grid;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wd-muted);
}

.wd-field input,
.wd-field select,
.wd-part input {
	min-height: 48px;
	padding: 0 14px;
	font-weight: 500;
	color: var(--wd-ink);
	background: var(--wd-white, #fff);
	border: 1px solid var(--wd-line);
	border-radius: 10px;
	transition: border-color 0.2s;
}

.wd-field :is(input, select):focus,
.wd-part input:focus {
	border-color: var(--wd-forest-3);
	outline: none;
}

.wd-field input[aria-invalid="true"] {
	border-color: #c0392b;
}

.wd-parts__head,
.wd-part {
	display: grid;
	grid-template-columns: 1fr 1fr 0.8fr 38px;
	gap: 8px;
	align-items: center;
}

.wd-parts__head {
	margin-bottom: 6px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wd-muted);
}

.wd-parts ul {
	display: grid;
	gap: 8px;
}

.wd-part {
	animation: wd-in 0.3s var(--wd-ease);
}

.wd-part input {
	width: 100%;
	min-width: 0;
}

.wd-sheets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wd-sheet {
	position: relative;
	width: 46px;
	height: 23px;
	overflow: hidden;
	background: var(--wd-paper-2);
	border: 1px solid var(--wd-line);
	border-radius: 3px;
	animation: wd-in 0.3s var(--wd-ease) both;
}

.wd-sheet i {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	background:
		repeating-linear-gradient(90deg, transparent 0 4px, rgb(0 0 0 / 0.08) 4px 5px),
		var(--wd-wood);
}

.wd-cut__out {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.wd-cut__out p {
	display: grid;
	padding: 14px 16px;
	color: var(--wd-paper);
	background: var(--wd-forest);
	border-radius: 12px;
}

.wd-cut__out p:last-child {
	color: var(--wd-ink);
	background: var(--wd-amber);
}

.wd-cut__out small {
	font-size: 0.78rem;
	opacity: 0.8;
}

.wd-cut__out b {
	font-family: var(--wd-serif);
	font-size: 1.4rem;
	line-height: 1.25;
	font-variant-numeric: tabular-nums;
}

[lang="ar"] .wd-cut__out b {
	font-family: var(--wd-sans);
}

.wd-cut__note {
	font-size: 0.8rem;
	color: var(--wd-muted);
}

/* 9. Process & band --------------------------------------------------------------------- */
.wd-steps {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	counter-reset: step;
}

.wd-steps li {
	position: relative;
	display: grid;
	align-content: start;
	justify-items: center;
	gap: 6px;
	padding: 0 6px;
	text-align: center;
}

.wd-steps li::before {
	content: "";
	position: absolute;
	top: 30px;
	inset-inline-start: calc(50% + 34px);
	width: calc(100% - 56px);
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--wd-wood) 0 8px, transparent 8px 14px);
}

.wd-steps li:last-child::before {
	display: none;
}

.wd-ring {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-bottom: 8px;
	font-family: var(--wd-serif);
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--wd-forest);
	background:
		radial-gradient(circle, var(--wd-paper) 52%, transparent 53%),
		repeating-radial-gradient(circle, var(--wd-wood) 0 2px, #d6b07a 3px 5px);
	border-radius: 50%;
	box-shadow: 0 10px 20px -12px rgb(31 26 21 / 0.6);
}

.wd-steps b {
	font-size: 1rem;
	color: var(--wd-forest);
}

.wd-steps small {
	font-size: 0.82rem;
	color: var(--wd-muted);
}

.wd-duo {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: clamp(14px, 2cqi, 24px);
	margin-top: clamp(36px, 5cqi, 60px);
}

.wd-duo figure:first-child {
	overflow: hidden;
	border-radius: 18px;
}

.wd-duo figure:first-child .wd-photo {
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
}

.wd-kiln {
	display: grid;
	align-content: center;
	gap: 12px;
	padding: 28px;
	color: var(--wd-paper);
	background: var(--wd-forest);
	border-radius: 18px;
}

.wd-kiln p {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.wd-kiln p .wd-icon {
	color: #7fc3ff;
}

.wd-kiln b {
	font-family: var(--wd-serif);
	font-size: 4.4rem;
	line-height: 1;
	color: var(--wd-amber);
	font-variant-numeric: tabular-nums;
}

[lang="ar"] .wd-kiln b {
	font-family: var(--wd-sans);
	font-weight: 600;
}

.wd-kiln__bar {
	height: 10px;
	overflow: hidden;
	background: rgb(244 238 228 / 0.15);
	border-radius: 99px;
}

.wd-kiln__bar i {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, #7fc3ff, var(--wd-amber));
	border-radius: inherit;
	transition: width 0.6s linear;
}

.wd-kiln small {
	opacity: 0.75;
}

.wd-band {
	position: relative;
	display: grid;
	place-items: center;
	min-height: clamp(240px, 26cqi, 360px);
	overflow: hidden;
	background: var(--wd-ink);
}

.wd-band .wd-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.6;
}

.wd-band p {
	position: relative;
	padding: 0 24px;
	font-family: var(--wd-serif);
	font-size: clamp(1.8rem, 1rem + 3cqi, 3.6rem);
	font-weight: 700;
	text-align: center;
	color: var(--wd-paper);
	text-shadow: 0 4px 24px rgb(0 0 0 / 0.6);
}

/* 10. About & order ------------------------------------------------------------- */
.wd-about {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(28px, 6cqi, 90px);
	align-items: center;
}

.wd-about__media {
	overflow: hidden;
	border-radius: 200px 200px 18px 18px;
}

.wd-about__media .wd-photo {
	width: 100%;
	aspect-ratio: 5 / 6;
	object-fit: cover;
}

.wd-about__text {
	display: grid;
	gap: 18px;
}

.wd-about__text > p:not(.wd-kicker) {
	color: var(--wd-muted);
}

.wd-checks {
	display: grid;
	gap: 10px;
}

.wd-checks li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 500;
}

.wd-checks .wd-icon {
	width: 28px;
	height: 28px;
	padding: 5px;
	color: var(--wd-paper);
	background: var(--wd-forest-3);
	border-radius: 50%;
	stroke-width: 2.6;
}

.wd-about__small {
	overflow: hidden;
	border-radius: 14px;
}

.wd-about__small .wd-photo {
	width: 100%;
	aspect-ratio: 16 / 7;
	object-fit: cover;
}

.wd-order {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: clamp(28px, 5cqi, 80px);
	align-items: center;
}

.wd-order > div {
	display: grid;
	gap: 14px;
}

.wd-order > div > p:last-child {
	color: rgb(244 238 228 / 0.75);
}

.wd-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	padding: clamp(20px, 3cqi, 30px);
	color: var(--wd-ink);
	background: var(--wd-paper);
	border-radius: 18px;
}

.wd-form .wd-btn,
.wd-form__error,
.wd-form__ok {
	grid-column: 1 / -1;
}

.wd-form__error {
	font-size: 0.9rem;
	font-weight: 600;
	color: #c0392b;
}

.wd-form__ok {
	padding: 14px 16px;
	font-size: 0.92rem;
	background: #e1efe4;
	border-radius: 10px;
}

/* 11. Footer ---------------------------------------------------------------------- */
.wd-footer {
	padding-block: 40px 26px;
	color: rgb(244 238 228 / 0.7);
	background: #0f1d16;
}

.wd-footer__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.wd-footer .wd-logo {
	color: var(--wd-paper);
}

.wd-footer__bar {
	flex: 1 0 100%;
	padding-top: 18px;
	font-size: 0.82rem;
	border-top: 1px solid rgb(244 238 228 / 0.12);
}

.wd-toast {
	position: fixed;
	bottom: 20px;
	inset-inline-start: 50%;
	z-index: 110;
	max-width: min(92%, 420px);
	padding: 12px 20px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wd-paper);
	background: var(--wd-forest);
	border-radius: 999px;
	box-shadow: 0 20px 40px -14px rgb(0 0 0 / 0.5);
	transform: translateX(calc(-50% * var(--wd-dir)));
	animation: wd-in 0.3s var(--wd-ease);
}

.wd-toast[hidden] {
	display: none;
}

/* 12. Motion: intro, progress line, header, reveals ------------------------- */
/* The intro: growth rings spread like the end grain of a log, ARZ settles in
   the middle, then the walnut panel parts in two like a split board. Pure CSS:
   it ends even without the script. */
.wd-intro {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	pointer-events: none;
	animation: wd-hide 0s linear 2.15s both;
}

.wd-intro::before,
.wd-intro::after {
	content: "";
	position: absolute;
	inset-block: 0;
	width: 50.5%;
	background:
		repeating-linear-gradient(92deg, rgb(255 255 255 / 0.02) 0 2px, transparent 2px 9px),
		var(--wd-forest);
	animation: wd-split 0.8s cubic-bezier(0.7, 0, 0.2, 1) 1.35s both;
}

.wd-intro::before {
	left: 0;
	--wd-to: -100%;
}

.wd-intro::after {
	right: 0;
	--wd-to: 100%;
}

.wd-intro__in {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: 6px;
	color: var(--wd-paper);
	animation: wd-fade 0.3s ease-in 1.3s both;
}

.wd-intro__rings {
	position: relative;
	display: grid;
	place-items: center;
	width: 120px;
	height: 120px;
	margin-bottom: 6px;
}

.wd-intro__rings i {
	position: absolute;
	inset: 0;
	border: 2px solid rgb(224 122 79 / 0.7);
	border-radius: 48% 52% 50% 50% / 52% 48% 52% 48%;
	animation: wd-ring 1.1s var(--wd-ease) both;
}

.wd-intro__rings i:nth-child(2) {
	inset: 16px;
	border-color: rgb(244 238 228 / 0.45);
	animation-delay: 0.1s;
}

.wd-intro__rings i:nth-child(3) {
	inset: 32px;
	border-color: rgb(224 122 79 / 0.5);
	animation-delay: 0.2s;
}

.wd-intro__rings i:nth-child(4) {
	inset: 46px;
	background: var(--wd-amber);
	border: 0;
	animation-delay: 0.3s;
}

.wd-intro b {
	font-family: var(--wd-serif);
	font-size: 2.6rem;
	font-weight: 400;
	letter-spacing: 0.16em;
	animation: wd-rise 0.6s var(--wd-ease) 0.5s both;
}

[lang="ar"] .wd-intro b {
	letter-spacing: 0;
}

.wd-intro small {
	font-size: 0.8rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.7;
	animation: wd-rise 0.6s var(--wd-ease) 0.65s both;
}

@keyframes wd-ring {
	from {
		opacity: 0;
		transform: scale(0.2) rotate(-40deg);
	}
}

@keyframes wd-split {
	to {
		transform: translateX(var(--wd-to));
	}
}

@keyframes wd-fade {
	to {
		opacity: 0;
	}
}

@keyframes wd-hide {
	to {
		visibility: hidden;
	}
}

/* Reading progress, where the browser can tie an animation to scrolling. */
.wd-progress {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 60;
	height: 3px;
	background: var(--wd-amber);
	transform: scaleX(0);
	transform-origin: var(--wd-start, left);
}

@supports (animation-timeline: scroll()) {
	.wd-progress {
		animation: wd-progress linear both;
		animation-timeline: scroll(root);
	}
}

@keyframes wd-progress {
	to {
		transform: scaleX(1);
	}
}

.wd-header {
	animation: wd-down 0.8s var(--wd-ease) 1.6s both;
}

@keyframes wd-down {
	from {
		opacity: 0;
		transform: translateY(-100%);
	}
}

/* Reveals: lists one after another, photos settle from a slight zoom. */
.wd-ready [data-wd-reveal] {
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 0.9s var(--wd-ease), transform 0.9s var(--wd-ease);
	transition-delay: calc(var(--wd-i, 0) * 90ms);
}

.wd-ready [data-wd-reveal].is-in {
	opacity: 1;
	transform: none;
}

.wd-ready [data-wd-reveal] .wd-photo {
	transition: transform 1.6s var(--wd-ease);
}

.wd-ready [data-wd-reveal]:not(.is-in) .wd-photo {
	transform: scale(1.14);
}

.wd-body main {
	overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
	.wd-body *,
	.wd-body *::before,
	.wd-body *::after {
		animation: none !important;
		transition: none !important;
	}

	.wd-intro {
		display: none;
	}

	.wd-ready [data-wd-reveal] {
		opacity: 1;
		transform: none;
	}

	.wd-ready [data-wd-reveal]:not(.is-in) .wd-photo {
		transform: none;
	}
}

/* 13. Narrower widths ------------------------------------------------------------ */
@container demo (max-width: 1060px) {
	.wd-header__cta {
		display: none;
	}

	.wd-species {
		grid-template-columns: 1fr;
	}

	.wd-steps {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 28px;
	}

	.wd-steps li:nth-child(3)::before {
		display: none;
	}
}

@container demo (max-width: 900px) {
	.wd-nav {
		position: absolute;
		top: 100%;
		inset-inline: 0;
		flex-direction: column;
		gap: 0;
		padding: 8px 24px 20px;
		background: var(--wd-forest);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
	}

	.wd-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.wd-nav a {
		padding: 14px 0;
		border-bottom: 1px solid rgb(244 238 228 / 0.12);
	}

	.wd-tools {
		margin-inline-start: auto;
	}

	.wd-burger {
		display: grid;
	}

	/* The photo goes on top, the words under it. */
	.wd-slide {
		grid-template-columns: 1fr;
	}

	.wd-slide__media {
		grid-column: 1;
		aspect-ratio: 16 / 10;
	}

	.wd-slide__text {
		grid-row: 2;
		padding: 30px 18px 28px;
	}

	.wd-products {
		grid-template-columns: 1fr 1fr;
	}

	.wd-cut,
	.wd-duo,
	.wd-about,
	.wd-order {
		grid-template-columns: 1fr;
	}

	.wd-about__media {
		max-width: 460px;
	}
}

@container demo (max-width: 560px) {
	.wd-lang {
		padding: 8px 10px;
		font-size: 0;
		gap: 0;
	}

	.wd-lang .wd-icon {
		width: 20px;
		height: 20px;
	}

	.wd-logo small {
		display: none;
	}

	.wd-swatches {
		grid-template-columns: 1fr 1fr;
	}

	.wd-detail {
		grid-template-columns: 1fr;
	}

	.wd-detail__grain {
		min-height: 140px;
	}

	.wd-products,
	.wd-form,
	.wd-cut__out {
		grid-template-columns: 1fr;
	}

	.wd-steps {
		grid-template-columns: 1fr 1fr;
	}

	.wd-steps li::before {
		display: none;
	}

	.wd-product__body {
		transform: none;
	}

	.wd-slider__ui {
		width: 100%;
		justify-content: space-between;
		gap: 12px;
	}

	.wd-slider__count {
		display: none;
	}

	.wd-slider__tabs {
		flex: 1;
	}

	.wd-slider__tabs button {
		flex: 1;
		min-width: 0;
		font-size: 0.8rem;
		white-space: nowrap;
	}

	.wd-hero__facts li {
		display: grid;
		gap: 0;
	}

	.wd-hero__actions .wd-btn {
		flex: 1 1 auto;
	}
}

/* Arabic weights: 400–600 only: every bold part is 600 here, and the browser never
   fakes a heavier weight. (Generated from the rules above; keep it last.) */
[lang="ar"] .wd-body {
	font-synthesis: none;
}

:where([lang="ar"] .wd-body) :where(b, strong, h1, h2, h3, h4, h5, h6, th, optgroup) {
	font-weight: 600;
}

[lang="ar"] .wd-body :is(h1, h2, h3, .wd-logo b, .wd-table td.is-best, .wd-product__body span),
[lang="ar"] .wd-body :is(.wd-ring, .wd-band p) {
	font-weight: 600;
}
