/* =========================
   Welcome page — Section 1
   ========================= */

.hero {
	position: relative;
	overflow: clip;
	padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 4rem);
}
.hero-grid {
	display: grid;
	grid-template-columns: 1.3fr 0.9fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.hero-title {
	font-family: 'Prata', serif;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.15;
	font-size: clamp(1.65rem, 3.2vw, 2.75rem);
	margin: 0 0 0.6rem;
}
.hero-lead {
	font-size: clamp(1rem, 1.2vw, 1.1rem);
	color: var(--muted);
	margin: 0 0 0.6rem;
}
.hero-text {
	margin: 0 0 1rem;
}
.hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.2rem 0 1.6rem;
}

/* «Пунктирная строчка» */
.stitch-line {
	position: relative;
	margin-top: 1.2rem;
	height: 2px;
	background: repeating-linear-gradient(
		90deg,
		color-mix(in srgb, var(--accent) 95%, transparent),
		color-mix(in srgb, var(--accent) 95%, transparent) 10px,
		transparent 10px,
		transparent 18px
	);
	mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.stitch {
	position: absolute;
	inset: -8px 0 auto 0;
	height: 18px;
	width: 90px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent-2) 30%, transparent);
	filter: blur(8px);
	animation: stitch-glide 4s linear infinite;
}
@keyframes stitch-glide {
	from {
		transform: translateX(-10%);
	}
	to {
		transform: translateX(110%);
	}
}

/* Медиа-колонка */
.hero-media {
	display: grid;
	gap: 0.9rem;
	grid-template-columns: 1fr 1fr;
}
.hero-card {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius);
	padding: 0.8rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	width: 210px;
	margin: 0;
}
.hero-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	border-color: rgba(255, 255, 255, 0.14);
}
.hero-card figcaption {
	margin-top: 0.5rem;
	color: var(--muted);
	font-size: 0.95rem;
}
.hero-card img {
	max-width: 200px;
}

/* Текстильный фон через CSS (без изображений) */
.hero-weave {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.03) 0 1px,
			transparent 1px 4px
		),
		repeating-linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.02) 0 1px,
			transparent 1px 6px
		);
	opacity: 0.8;
}

/* Адаптив первой секции */
@media (max-width: 960px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}
	.hero-media {
		order: 2;
	}
}
@media (max-width: 600px) {
	.hero-card {
		padding: 0.7rem;
	}
	.hero-media {
		display: grid;
		gap: 0.9rem;
		grid-template-columns: 1fr;
	}
}
@media (max-width: 360px) {
	.hero-cta {
		gap: 0.6rem;
	}
	.hero-card figcaption {
		font-size: 0.9rem;
	}
}
/* =========================
   Section 2 — Warp & Weft Story
   ========================= */
.warp-story {
	position: relative;
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.ws-grid {
	position: relative;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.ws-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.4rem, 2.6vw, 2.2rem);
	margin: 0 0 0.5rem;
}
.ws-lead {
	color: var(--muted);
	margin-bottom: 0.5rem;
}
.ws-points {
	margin: 0.75rem 0 0;
	padding-left: 1.1rem;
	display: grid;
	gap: 0.35rem;
}
.ws-points li {
	list-style: square;
	text-wrap: pretty;
}

/* media column */
.ws-media {
	display: grid;
	gap: 0.9rem;
}
.ws-card {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: var(--radius);
	padding: 0.75rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	max-width: 290px;
}
.ws-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.14);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.ws-card figcaption {
	color: var(--muted);
	margin-top: 0.4rem;
	font-size: 0.95rem;
}

/* decorative warp lines */
.ws-warp-lines {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		90deg,
		rgba(86, 208, 181, 0.06) 0 2px,
		transparent 2px 10px
	);
	mask: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
	animation: ws-shimmer 12s linear infinite;
}
@keyframes ws-shimmer {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-40px);
	}
}

@media (max-width: 960px) {
	.ws-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 3 — Pattern Lab
   ========================= */
.pattern-lab {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.pl-head {
	max-width: 70ch;
	margin-bottom: 1rem;
}
.pl-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.4rem;
}
.pl-lead {
	color: var(--muted);
}

.pl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.9rem, 2vw, 1.2rem);
	margin-top: 1rem;
}
.pl-card {
	position: relative;
	background: linear-gradient(180deg, var(--surface), #101214);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.pl-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.pl-step {
	position: absolute;
	top: 0.6rem;
	right: 0.8rem;
	font-weight: 800;
	opacity: 0.12;
	font-size: 2.4rem;
	line-height: 1;
	pointer-events: none;
}
.pl-fig {
	margin: 0 0 0.6rem;
}
.pl-card-title {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}
.pl-card-text {
	margin: 0;
	color: var(--muted);
}

/* “stitched” seam line at the bottom of each card */
.pl-seam {
	margin-top: 0.8rem;
	height: 2px;
	background: linear-gradient(
			90deg,
			transparent,
			rgba(255, 255, 255, 0.08),
			transparent
		),
		repeating-linear-gradient(
			90deg,
			var(--accent) 0 10px,
			transparent 10px 20px
		);
	mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
	animation: pl-dash 6s linear infinite;
}
@keyframes pl-dash {
	from {
		background-position: 0 0, 0 0;
	}
	to {
		background-position: 0 0, 100px 0;
	}
}

@media (max-width: 960px) {
	.pl-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 4 — Notions Rail
   ========================= */
.notions-rail {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.nr-head {
	max-width: 70ch;
	margin-bottom: 1rem;
}
.nr-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.4rem;
}
.nr-lead {
	color: var(--muted);
}

.nr-rail-wrap {
	position: relative;
	display: grid;
	align-items: center;
	grid-template-columns: auto 1fr auto;
	gap: 0.5rem;
}
.nr-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: max-content;
	gap: 0.9rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 0.25rem;
}
.nr-rail:focus {
	outline: 2px dashed var(--accent);
	outline-offset: 2px;
}

.nr-card {
	scroll-snap-align: center;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.75rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	max-width: 290px;
}
.nr-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.nr-card figcaption {
	color: var(--muted);
	margin-top: 0.4rem;
	font-size: 0.95rem;
}

.nr-nav {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	color: var(--ink);
	border-radius: 999px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.nr-nav:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}
.nr-prev {
	justify-self: start;
}
.nr-next {
	justify-self: end;
}

.nr-note {
	color: var(--muted);
	margin-top: 0.6rem;
	font-size: 0.95rem;
}

@media (max-width: 600px) {
	.nr-nav {
		width: 36px;
		height: 36px;
	}
}
/* =========================
   Section 5 — Selvedge Compare
   ========================= */
.selvedge-compare {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.sc-head {
	margin-bottom: 1rem;
	max-width: 72ch;
}
.sc-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.4rem;
}
.sc-lead {
	color: var(--muted);
}

.sc-tabs {
	display: inline-flex;
	gap: 0.5rem;
	margin-top: 0.6rem;
}
.sc-tab {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	color: var(--ink);
	border-radius: 999px;
	padding: 0.45rem 0.8rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.sc-tab:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow);
}
.sc-tab.is-on {
	background: var(--accent);
	color: #0b0c0d;
}

.sc-grid {
	margin-top: 1rem;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.9rem, 2vw, 1.2rem);
}
.sc-card {
	position: relative;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.sc-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.sc-fig {
	margin: 0 0 0.6rem;
}
.sc-name {
	margin: 0 0 0.3rem;
	font-size: 1.06rem;
}
.sc-text {
	margin: 0 0 0.6rem;
	color: var(--muted);
}

.sc-panels {
	display: grid;
	gap: 0.25rem;
}
.sc-panel {
	margin: 0;
	color: var(--ink);
}
[hidden] {
	display: none !important;
}

@media (max-width: 900px) {
	.sc-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 6 — Dyehouse Notes
   ========================= */
.dyehouse-notes {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.dn-head {
	margin-bottom: 0.8rem;
	max-width: 72ch;
}
.dn-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.dn-lead {
	color: var(--muted);
}

/* animated swatch line */
.dn-swatchline {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 44px;
	gap: 0.5rem;
	margin: 0.6rem 0 1rem;
	filter: saturate(120%);
}
.dn-swatch {
	--c0: #1e3a8a; /* indigo */
	--c1: #8b0000; /* madder */
	--c2: #a67c00; /* walnut */
	--c3: #c084fc; /* orchid */
	--c4: #16a34a; /* green */
	--c5: #eab308; /* marigold */
	width: 44px;
	height: 28px;
	border-radius: 6px;
	background: linear-gradient(
			180deg,
			rgba(255, 255, 255, 0.12),
			transparent 40%
		),
		var(--c);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), var(--shadow);
	animation: dn-pulse 4.2s ease-in-out infinite;
}
.dn-swatch:nth-child(1) {
	--c: var(--c0);
	animation-delay: 0s;
}
.dn-swatch:nth-child(2) {
	--c: var(--c1);
	animation-delay: 0.1s;
}
.dn-swatch:nth-child(3) {
	--c: var(--c2);
	animation-delay: 0.2s;
}
.dn-swatch:nth-child(4) {
	--c: var(--c3);
	animation-delay: 0.3s;
}
.dn-swatch:nth-child(5) {
	--c: var(--c4);
	animation-delay: 0.4s;
}
.dn-swatch:nth-child(6) {
	--c: var(--c5);
	animation-delay: 0.5s;
}

@keyframes dn-pulse {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-4px) scale(1.03);
	}
}

.dn-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.9rem, 2vw, 1.2rem);
}
.dn-card {
	background: linear-gradient(180deg, var(--surface), #0e0f11);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dn-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.dn-fig {
	margin: 0 0 0.6rem;
}
.dn-name {
	margin: 0 0 0.35rem;
	font-size: 1.06rem;
}
.dn-text {
	margin: 0;
	color: var(--muted);
}

@media (max-width: 960px) {
	.dn-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 7 — Stitch Atlas
   ========================= */
.stitch-atlas {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.sa-head {
	margin-bottom: 0.8rem;
	max-width: 72ch;
}
.sa-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.sa-lead {
	color: var(--muted);
}

.sa-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(0.8rem, 2vw, 1.1rem);
}
.sa-tile {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.8rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.sa-tile:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.sa-tile figcaption {
	margin-top: 0.45rem;
	color: var(--muted);
	font-size: 0.95rem;
}

@media (max-width: 1100px) {
	.sa-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
@media (max-width: 800px) {
	.sa-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 480px) {
	.sa-grid {
		grid-template-columns: 1fr;
	}
}
/* =========================
   Section 8 — Tool Balance
   ========================= */
.tool-balance {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.tb-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.tb-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.tb-lead {
	color: var(--muted);
}

.tb-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(0.9rem, 2vw, 1.2rem);
}
.tb-card {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 0.8rem;
	align-items: start;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.tb-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.tb-meta .tb-name {
	margin: 0 0 0.3rem;
	font-size: 1.06rem;
}
.tb-meta .tb-note {
	margin: 0 0 0.4rem;
	color: var(--muted);
}
.tb-points {
	margin: 0.2rem 0 0;
	padding-left: 1rem;
	display: grid;
	gap: 0.25rem;
}
.tb-fig {
	margin: 0;
	justify-self: end;
}

.tb-gauge {
	position: relative;
	margin-top: 1rem;
	height: 3px;
	background: linear-gradient(
			90deg,
			transparent,
			rgba(255, 255, 255, 0.08),
			transparent
		),
		repeating-linear-gradient(
			90deg,
			var(--accent) 0 12px,
			transparent 12px 22px
		);
	mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.tb-gauge span {
	position: absolute;
	top: -6px;
	left: 0;
	width: 80px;
	height: 15px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--accent-2) 30%, transparent);
	filter: blur(8px);
	animation: tb-skim 5s linear infinite;
}
@keyframes tb-skim {
	from {
		transform: translateX(-5%);
	}
	to {
		transform: translateX(105%);
	}
}

@media (max-width: 1100px) {
	.tb-card {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 900px) {
	.tb-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 9 — Weave Journal (text-heavy)
   ========================= */
.weave-journal {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.wj-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.wj-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.wj-lead {
	color: var(--muted);
}

.wj-layout {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.wj-aside {
	position: sticky;
	top: 5.5rem;
}
.wj-fig {
	margin: 0;
}
.wj-fig figcaption {
	margin-top: 0.4rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.wj-article {
	background: linear-gradient(180deg, var(--surface), #0e0f11);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: clamp(1rem, 2.5vw, 1.3rem);
	box-shadow: var(--shadow);
}
.wj-article p {
	margin: 0 0 0.9rem;
	text-wrap: pretty;
}

@media (max-width: 980px) {
	.wj-layout {
		grid-template-columns: 1fr;
	}
	.wj-aside {
		position: static;
	}
}

/* =========================
   Section 10 — Pattern Grid (interactive lattice)
   ========================= */
.pattern-grid {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.pg-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.pg-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.pg-lead {
	color: var(--muted);
}

.pg-wrap {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.pg-lattice {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius);
	background: radial-gradient(
			1200px 400px at 20% 0%,
			rgba(255, 255, 255, 0.06),
			transparent 60%
		),
		repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.06) 0 1px,
			transparent 1px 24px
		),
		repeating-linear-gradient(
			90deg,
			rgba(255, 255, 255, 0.06) 0 1px,
			transparent 1px 24px
		),
		var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.pg-node {
	position: absolute;
	inset: auto auto 10% 10%;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	border: 1px solid rgba(255, 255, 255, 0.18);
	cursor: pointer;
	transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.pg-node:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}
/* position variants */
.pg-node[data-path='grain'] {
	left: 10%;
	bottom: 12%;
}
.pg-node[data-path='dart'] {
	left: 42%;
	bottom: 52%;
}
.pg-node[data-path='seam'] {
	left: 76%;
	bottom: 22%;
}

/* hover highlights using pseudo-elements */
.pg-lattice:hover::before,
.pg-lattice:hover::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.pg-lattice:hover::before {
	background: linear-gradient(
			90deg,
			transparent 30%,
			rgba(86, 208, 181, 0.18) 30% 31%,
			transparent 31% 70%,
			rgba(86, 208, 181, 0.18) 70% 71%,
			transparent 71%
		),
		linear-gradient(
			0deg,
			transparent 40%,
			rgba(86, 208, 181, 0.18) 40% 41%,
			transparent 41% 80%,
			rgba(86, 208, 181, 0.18) 80% 81%,
			transparent 81%
		);
	mix-blend-mode: lighten;
}
.pg-lattice:hover::after {
	background: radial-gradient(
		400px 120px at 40% 50%,
		rgba(244, 162, 97, 0.18),
		transparent 70%
	);
}

.pg-side {
	display: grid;
	gap: 0.9rem;
}
.pg-fig {
	margin: 0;
}
.pg-fig img {
	max-width: 200px;
}
.pg-fig figcaption {
	margin-top: 0.4rem;
	color: var(--muted);
	font-size: 0.95rem;
}

@media (max-width: 980px) {
	.pg-wrap {
		grid-template-columns: 1fr;
	}
}
/* —— Pattern Grid: интерактивные пути —— */
.pg-path {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
	mix-blend-mode: lighten;
}

/* Grainline — две вертикальные направляющие */
.pg-path--grain {
	background: linear-gradient(
		90deg,
		transparent 30%,
		rgba(86, 208, 181, 0.25) 30% 31%,
		transparent 31% 70%,
		rgba(86, 208, 181, 0.25) 70% 71%,
		transparent 71%
	);
}

/* Dart — V-образная вытачка */
.pg-path--dart {
	background: conic-gradient(
			from 200deg at 42% 52%,
			rgba(244, 162, 97, 0.28) 8deg,
			transparent 8deg 352deg,
			rgba(244, 162, 97, 0.28) 352deg
		),
		conic-gradient(
			from -20deg at 42% 52%,
			rgba(244, 162, 97, 0.28) 8deg,
			transparent 8deg 352deg,
			rgba(244, 162, 97, 0.28) 352deg
		);
	mask: radial-gradient(220px 160px at 42% 52%, #000 60%, transparent 61%);
}

/* Seam allowance — рамка по краю */
.pg-path--seam {
	background: linear-gradient(#56d0b5, #56d0b5) top / 100% 2px no-repeat,
		linear-gradient(#56d0b5, #56d0b5) bottom / 100% 2px no-repeat,
		linear-gradient(#56d0b5, #56d0b5) left / 2px 100% no-repeat,
		linear-gradient(#56d0b5, #56d0b5) right / 2px 100% no-repeat;
	opacity: 0;
}

/* Состояния активной подсветки */
.pg-lattice.is-grain .pg-path--grain {
	opacity: 1;
}
.pg-lattice.is-dart .pg-path--dart {
	opacity: 1;
}
.pg-lattice.is-seam .pg-path--seam {
	opacity: 1;
}

/* Визуал для активной кнопки */
.pg-node[aria-pressed='true'] {
	background: var(--accent);
	color: #0b0c0d;
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}
/* =========================
   Section 11 — Care & Press (accordion)
   ========================= */
.care-press {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.cp-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.cp-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.cp-lead {
	color: var(--muted);
}

.cp-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.cp-media {
	display: grid;
	gap: 0.9rem;
}
.cp-fig {
	margin: 0;
}
.cp-fig figcaption {
	margin-top: 0.4rem;
	color: var(--muted);
	font-size: 0.95rem;
}

/* accordion */
.cp-accord {
	display: grid;
	gap: 0.6rem;
}
.cp-item {
	appearance: none;
	text-align: left;
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: linear-gradient(180deg, var(--surface), #0e0f11);
	color: var(--ink);
	border-radius: var(--radius);
	padding: 0.8rem 1rem 0.8rem 1rem;
	cursor: pointer;
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.cp-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
	border-color: rgba(255, 255, 255, 0.18);
}
.cp-q {
	font-weight: 700;
	display: inline-block;
}
.cp-icon {
	position: absolute;
	right: 0.9rem;
	top: 0.9rem;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
}
.cp-item[aria-expanded='true'] .cp-icon {
	background: var(--accent);
	color: #0b0c0d;
}
.cp-a {
	display: none;
	margin-top: 0.5rem;
	color: var(--muted);
}
.cp-item[aria-expanded='true'] .cp-a {
	display: block;
}

@media (max-width: 980px) {
	.cp-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 12 — Workshop Shelves
   ========================= */
.workshop-shelves {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.wshelves-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.wshelves-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.wshelves-lead {
	color: var(--muted);
}

.wshelves-lanes {
	display: grid;
	gap: clamp(0.9rem, 2vw, 1.2rem);
}
.wshelves-lane {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 0.9rem;
	align-items: start;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.wshelves-lane:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 255, 255, 0.18);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.wshelves-card {
	margin: 0;
}
.wshelves-copy h3 {
	margin: 0 0 0.25rem;
	font-size: 1.06rem;
}
.wshelves-copy p {
	margin: 0;
	color: var(--muted);
}

@media (max-width: 980px) {
	.wshelves-lane {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 13 — Repair Stories (timeline)
   ========================= */
.repair-stories {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.rs-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.rs-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.rs-lead {
	color: var(--muted);
}

.rs-track {
	position: relative;
	display: grid;
	gap: 1rem;
	padding-left: 1.4rem;
}
.rs-track::before {
	content: '';
	position: absolute;
	left: 0.4rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
}
.rs-step {
	position: relative;
}
.rs-dot {
	position: absolute;
	left: -0.05rem;
	top: 0.25rem;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 4px rgba(86, 208, 181, 0.15);
}
.rs-card {
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: var(--radius);
	padding: 0.9rem;
	box-shadow: var(--shadow);
}
.rs-card h3 {
	margin: 0 0 0.25rem;
	font-size: 1.06rem;
}
.rs-card p {
	margin: 0;
	color: var(--muted);
}
.rs-fig {
	margin: 0.6rem 0 0;
}
.rs-fig figcaption {
	margin-top: 0.3rem;
	color: var(--muted);
	font-size: 0.95rem;
}
/* =========================
   Section 14 — FAQ
   ========================= */
.faq {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.faq-head {
	max-width: 72ch;
	margin-bottom: 1rem;
}
.faq-title {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.faq-lead {
	color: var(--muted);
}

.faq-grid {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}

.faq-fig {
	margin: 0;
}
.faq-fig figcaption {
	margin-top: 0.4rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.faq-accord {
	display: grid;
	gap: 0.6rem;
}
.fq-item {
	appearance: none;
	width: 100%;
	text-align: left;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: linear-gradient(180deg, var(--surface), #0e0f11);
	color: var(--ink);
	border-radius: var(--radius);
	padding: 0.9rem 1rem 0.9rem 1rem;
	cursor: pointer;
	position: relative;
	transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.fq-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
	border-color: rgba(255, 255, 255, 0.18);
}
.fq-q {
	font-weight: 700;
	display: inline-block;
}
.fq-icon {
	position: absolute;
	right: 0.9rem;
	top: 0.95rem;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
}
.fq-item[aria-expanded='true'] .fq-icon {
	background: var(--accent);
	color: #0b0c0d;
}
.fq-a {
	display: none;
	margin-top: 0.5rem;
	color: var(--muted);
}
.fq-item[aria-expanded='true'] .fq-a {
	display: block;
}

@media (max-width: 980px) {
	.faq-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Section 15 — Contact Form
   ========================= */
.contact-form {
	padding: clamp(2rem, 6vw, 4rem) 0;
}
.contact-inner {
	display: grid;
	gap: 1rem;
}
.contact-header {
	max-width: 72ch;
}
.contact-header h2 {
	font-family: 'Prata', serif;
	font-size: clamp(1.35rem, 2.4vw, 2.05rem);
	margin: 0 0 0.35rem;
}
.contact-header p {
	color: var(--muted);
}

.contact-wrap {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp(1rem, 3vw, 2rem);
	align-items: start;
}
.contact-aside {
	display: grid;
	gap: 0.9rem;
}
.contact-fig {
	margin: 0;
}
.contact-fig figcaption {
	margin-top: 0.4rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.form-wrapper {
	display: grid;
	gap: 0.8rem;
	background: var(--surface);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius);
	padding: 1rem;
	box-shadow: var(--shadow);
}
.field input,
.field textarea {
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	color: var(--ink);
	border-radius: 12px;
	padding: 0.75rem 0.9rem;
	font: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.field textarea {
	min-height: 140px;
	resize: vertical;
}
.field :is(input, textarea):focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}
.form-checkbox {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5rem;
	align-items: start;
	color: var(--muted);
}
.form-checkbox a {
	color: var(--ink);
	text-decoration: underline;
}

/* Если у сборщика нет support для composes, просто продублируем базовые btn-стили: */
.cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border-radius: 999px;
	background: var(--accent);
	color: #0b0c0d;
	text-decoration: none;
	font-weight: 700;
	border: 1px solid rgba(0, 0, 0, 0.12);
	transform: translateY(0);
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cta-button:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow);
}
.cta-button:active {
	transform: translateY(0);
}

.visually-hidden {
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

@media (max-width: 980px) {
	.contact-wrap {
		grid-template-columns: 1fr;
	}
}
/* Contact Form — round custom checkbox */
.form-checkbox {
	display: grid;
	grid-template-columns: 20px 1fr;
	gap: 0.6rem;
	align-items: start;
}

.form-checkbox input[type='checkbox'] {
	/* убираем системный вид и рисуем свой */
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	width: 20px;
	height: 20px;
	margin: 0.15rem 0 0 0;
	border-radius: 50%; /* КРУГЛЫЙ */
	border: 2px solid rgba(255, 255, 255, 0.55);
	background: color-mix(in srgb, var(--ink) 6%, transparent);
	box-shadow: inset 0 0 0 0 var(--accent);
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
		transform 0.1s ease;
}

/* точка-подтверждение внутри круга */
.form-checkbox input[type='checkbox']::after {
	content: '';
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--accent);
	transform: scale(0);
	transition: transform 0.18s ease;
}

/* hover/focus/active */
.form-checkbox input[type='checkbox']:hover {
	border-color: var(--accent);
}
.form-checkbox input[type='checkbox']:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.form-checkbox input[type='checkbox']:active {
	transform: scale(0.96);
}

/* checked */
.form-checkbox input[type='checkbox']:checked {
	border-color: var(--accent);
}
.form-checkbox input[type='checkbox']:checked::after {
	transform: scale(1);
}

/* disabled на всякий случай */
.form-checkbox input[type='checkbox']:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Текст рядом с чекбоксом */
.form-checkbox span {
	line-height: 1.4;
}
.form-checkbox a {
	color: var(--ink);
	text-decoration: underline;
}

/* Fallback: если браузер поддерживает accent-color и вы хотите нативную версию */
@supports (accent-color: auto) {
	.form-checkbox input[type='checkbox'].use-native {
		appearance: auto;
		accent-color: var(--accent);
		border-radius: 50%;
		box-shadow: none;
	}
}
/* swatch line */
.dn-swatchline {
	display: flex;
	gap: 6px;
	align-items: center;
	isolation: isolate;
}
.dn-swatch {
	--i: 0; /* будет переопределено ниже */
	inline-size: 14px;
	block-size: 14px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--accent) 20%, #0b0c0d);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35) inset;
	animation: dnPulse 2.6s calc(var(--i) * 0.12s) infinite ease-in-out;
}
@keyframes dnPulse {
	0%,
	100% {
		filter: brightness(1);
		transform: translateY(0);
	}
	50% {
		filter: brightness(1.25);
		transform: translateY(-2px);
	}
}

/* индекс для шести элементов без инлайна */
.dn-swatchline .dn-swatch:nth-child(1) {
	--i: 0;
}
.dn-swatchline .dn-swatch:nth-child(2) {
	--i: 1;
}
.dn-swatchline .dn-swatch:nth-child(3) {
	--i: 2;
}
.dn-swatchline .dn-swatch:nth-child(4) {
	--i: 3;
}
.dn-swatchline .dn-swatch:nth-child(5) {
	--i: 4;
}
.dn-swatchline .dn-swatch:nth-child(6) {
	--i: 5;
}
