/* ===========================
   Root page (root.html) styles
   Section 1: Kinetic hero grid
   =========================== */

.hero-kinetic {
	position: relative;
}
.eyebrow {
	color: var(--mint-600);
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	font-size: 12px;
	margin: 0 0 8px;
}
.hero-title {
	font-size: clamp(28px, 4.4vw, 48px);
	line-height: 1.08;
	margin: 0 0 14px;
}
.hero-title .accent {
	color: var(--mint-500);
}
.hero-lede {
	font-family: 'Merriweather', serif;
	color: var(--ink-600);
	margin: 0 0 10px;
}
.hero-text {
	color: var(--ink-600);
	margin: 0 0 18px;
}
.cta-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 14px 0 18px;
}
.hero-bullets {
	display: grid;
	gap: 6px;
	color: var(--ink-400);
	font-size: 14px;
}

/* Hero layout */
.hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: clamp(18px, 3.6vw, 36px);
	align-items: center;
}

/* Kinetic mosaic */
.hero-mosaic {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, minmax(120px, 1fr));
	gap: 14px;
	justify-items: center;
}
.tile {
	width: 100%;
	max-width: 350px;
	padding: 10px;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transform: translateZ(0);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px rgba(23, 35, 42, 0.12);
}

/* gentle floating (JS enhances with pointer parallax) */
[data-float] {
	animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-6px);
	}
}

/* scroll hint */
.scroll-hint {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 18px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	opacity: 0.7;
	font-size: 12px;
	color: var(--ink-400);
}
.scroll-hint .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--mint-500);
	display: inline-block;
	animation: blink 1.6s infinite ease-in-out;
}
.scroll-hint .dot:nth-child(2) {
	animation-delay: 0.2s;
}
.scroll-hint .dot:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes blink {
	0%,
	80%,
	100% {
		opacity: 0.2;
	}
	40% {
		opacity: 1;
	}
}
.scroll-hint .hint-text {
	letter-spacing: 0.6px;
}

/* responsive */
@media (max-width: 1100px) {
	.hero-grid {
		grid-template-columns: 1fr;
	}
	.hero-mosaic {
		order: -1;
		margin-bottom: 10px;
	}
}
@media (max-width: 760px) {
	.hero-mosaic {
		grid-template-columns: repeat(2, minmax(120px, 1fr));
	}
}
@media (max-width: 420px) {
	.hero-mosaic {
		grid-template-columns: 1fr;
	}
	.cta-row {
		gap: 8px;
	}
}
/* ===================================
   Section 2 — Gridline Lab
   =================================== */
.sec-title {
	margin: 6px 0 10px;
}
.sec-lede,
.gsl-head .sec-lede {
	color: var(--ink-600);
}

.gs-lab .gsl-inner {
	display: grid;
	gap: clamp(18px, 3.6vw, 28px);
}
.gsl-head .gsl-bullets {
	display: grid;
	gap: 6px;
	color: var(--ink-400);
	font-size: 14px;
}

/* "Линейка" */
.gsl-meter {
	position: relative;
	height: 18px;
	margin: 12px 0 10px;
	border-radius: 999px;
	overflow: hidden;
	background: #f1fffb;
	border: 1px solid rgba(15, 27, 32, 0.06);
}
.measure-ruler {
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(
		to right,
		rgba(11, 180, 138, 0.15) 0 1px,
		transparent 1px 10px
	);
}
.measure-indicator {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
	transition: width 1.2s ease;
}
.gsl-head.reveal.is-visible .measure-indicator {
	width: 78%;
}

/* Горизонтальная лента */
.gsl-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(240px, 320px);
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 4px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}
.gsl-item {
	scroll-snap-align: start;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 10px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gsl-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
}
.gsl-item figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.gsl-hint {
	color: var(--ink-400);
	font-size: 12px;
	margin: 6px 2px 0;
}

/* Адаптив секции 2 */
@media (max-width: 560px) {
	.gsl-rail {
		grid-auto-columns: minmax(220px, 280px);
	}
}

/* ===================================
   Section 3 — Spine Parade
   =================================== */
.sp-head .sec-lede {
	color: var(--ink-600);
}
.sp-stack {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.sp-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
	transform-origin: center bottom;
}
.sp-card:hover,
.sp-card:focus-visible {
	transform: rotateY(-8deg) translateY(-6px);
	box-shadow: 0 18px 38px rgba(23, 35, 42, 0.14);
	filter: saturate(1.05);
	outline: none;
}
.sp-card figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.sp-note {
	color: var(--ink-400);
	font-size: 12px;
	margin-top: 8px;
}

/* Адаптив секции 3 */
@media (max-width: 860px) {
	.sp-stack {
		grid-template-columns: 1fr;
	}
}

/* ===================================
   Section 4 — Color Dock
   =================================== */
.cd-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 14px;
	align-items: start;
}
.cd-item {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.cd-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
	filter: contrast(1.02);
}

.cd-swatches {
	height: 100%;
	min-height: 220px;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	background: #fff;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-content: center;
	justify-items: center;
	gap: 8px;
	padding: 12px;
}
.cd-swatches .sw {
	width: 82px;
	height: 18px;
	border-radius: 999px;
	animation: glow 2.8s ease-in-out infinite;
}
.cd-swatches .sw:nth-child(1) {
	background: #d4fde8;
	animation-delay: 0s;
}
.cd-swatches .sw:nth-child(2) {
	background: #e6f9ff;
	animation-delay: 0.1s;
}
.cd-swatches .sw:nth-child(3) {
	background: #fff3e2;
	animation-delay: 0.2s;
}
.cd-swatches .sw:nth-child(4) {
	background: #f2e8ff;
	animation-delay: 0.3s;
}
.cd-swatches .sw:nth-child(5) {
	background: #e9ffe9;
	animation-delay: 0.4s;
}
.cd-swatches .sw:nth-child(6) {
	background: #ffe9f0;
	animation-delay: 0.5s;
}
.cd-swatches .sw:nth-child(7) {
	background: #e2f7ff;
	animation-delay: 0.6s;
}
.cd-swatches .sw:nth-child(8) {
	background: #fff6e6;
	animation-delay: 0.7s;
}
.cd-swatches .sw:nth-child(9) {
	background: #e8fff6;
	animation-delay: 0.8s;
}

@keyframes glow {
	0%,
	100% {
		box-shadow: none;
		transform: translateY(0);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(24, 201, 161, 0.08);
		transform: translateY(-2px);
	}
}

/* Адаптив секции 4 */
@media (max-width: 980px) {
	.cd-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 620px) {
	.cd-grid {
		grid-template-columns: 1fr;
	}
}
.cd-swatches {
	will-change: transform;
	backface-visibility: hidden;
	transform: translateZ(0);
}

.cd-swatches .sw {
	position: relative;
	width: 82px;
	height: 18px;
	border-radius: 999px;
	will-change: transform, opacity;
	animation: float-sw 2.8s ease-in-out infinite;
	backface-visibility: hidden;
	transform: translateZ(0);
}

/* Пульсирующее «кольцо» через бордер — никаких box-shadow */
.cd-swatches .sw::after {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: inherit;
	border: 6px solid rgba(24, 201, 161, 0.08);
	opacity: 0;
	transform: scale(0.96);
	animation: ring 2.8s ease-in-out infinite;
	pointer-events: none;
}

/* Сдвигаем фазы, как было */
.cd-swatches .sw:nth-child(1) {
	animation-delay: 0s;
}
.cd-swatches .sw:nth-child(2) {
	animation-delay: 0.1s;
}
.cd-swatches .sw:nth-child(3) {
	animation-delay: 0.2s;
}
.cd-swatches .sw:nth-child(4) {
	animation-delay: 0.3s;
}
.cd-swatches .sw:nth-child(5) {
	animation-delay: 0.4s;
}
.cd-swatches .sw:nth-child(6) {
	animation-delay: 0.5s;
}
.cd-swatches .sw:nth-child(7) {
	animation-delay: 0.6s;
}
.cd-swatches .sw:nth-child(8) {
	animation-delay: 0.7s;
}
.cd-swatches .sw:nth-child(9) {
	animation-delay: 0.8s;
}

/* Те же задержки для «кольца» */
.cd-swatches .sw:nth-child(1)::after {
	animation-delay: 0s;
}
.cd-swatches .sw:nth-child(2)::after {
	animation-delay: 0.1s;
}
.cd-swatches .sw:nth-child(3)::after {
	animation-delay: 0.2s;
}
.cd-swatches .sw:nth-child(4)::after {
	animation-delay: 0.3s;
}
.cd-swatches .sw:nth-child(5)::after {
	animation-delay: 0.4s;
}
.cd-swatches .sw:nth-child(6)::after {
	animation-delay: 0.5s;
}
.cd-swatches .sw:nth-child(7)::after {
	animation-delay: 0.6s;
}
.cd-swatches .sw:nth-child(8)::after {
	animation-delay: 0.7s;
}
.cd-swatches .sw:nth-child(9)::after {
	animation-delay: 0.8s;
}

@keyframes float-sw {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-2px);
	}
}
@keyframes ring {
	0%,
	100% {
		opacity: 0;
		transform: scale(0.95);
	}
	50% {
		opacity: 1;
		transform: scale(1);
	}
}
/* ===========================
   Section 5 — Desk Ergonomics
   =========================== */
.ergo-inner {
	display: grid;
	gap: clamp(18px, 3.6vw, 28px);
}
.ergo-points {
	display: grid;
	gap: 6px;
	color: var(--ink-400);
	font-size: 14px;
}

.ergo-scene {
	position: relative;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 14px;
	align-items: center;
}
.ergo-track {
	position: absolute;
	left: 0;
	right: 40%;
	top: 50%;
	transform: translateY(-50%);
	height: 4px;
	background: linear-gradient(90deg, #e9fff6, #e6f9ff);
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px rgba(15, 27, 32, 0.06);
}
.ergo-track .tick {
	position: absolute;
	top: -6px;
	width: 2px;
	height: 16px;
	background: rgba(15, 27, 32, 0.08);
}
.ergo-track .tick:nth-child(1) {
	left: 6%;
}
.ergo-track .tick:nth-child(2) {
	left: 18%;
}
.ergo-track .tick:nth-child(3) {
	left: 32%;
}
.ergo-track .tick:nth-child(4) {
	left: 48%;
}
.ergo-track .tick:nth-child(5) {
	left: 66%;
}
.ergo-track .tick:nth-child(6) {
	left: 84%;
}

.ergo-car,
.ergo-side {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
}
.ergo-car {
	width: fit-content;
}
.ergo-scene.reveal.is-visible .ergo-car {
	animation: ergo-slide 4.6s ease-in-out both;
}
@keyframes ergo-slide {
	0% {
		transform: translateX(-8%);
	}
	20% {
		transform: translateX(12%);
	}
	50% {
		transform: translateX(36%);
	}
	80% {
		transform: translateX(64%);
	}
	100% {
		transform: translateX(72%);
	}
}

/* responsive */
@media (max-width: 1000px) {
	.ergo-scene {
		grid-template-columns: 1fr;
	}
	.ergo-track {
		right: 10%;
	}
}

/* ===========================
   Section 6 — Paper Weights
   =========================== */
.pw-inner {
	display: grid;
	gap: 16px;
}
.pw-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 14px;
	align-items: start;
}
.pw-fig {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
}
.pw-fig figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}

.pw-table {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	display: grid;
	gap: 8px;
}
.pw-row {
	display: grid;
	grid-template-columns: 1.1fr 0.4fr 1fr;
	gap: 8px;
	align-items: center;
}
.pw-headrow {
	font-weight: 700;
	color: var(--ink-900);
}
.pw-row .desc {
	grid-column: 1 / -1;
	color: var(--ink-600);
	font-size: 14px;
}
.pw-row .bar {
	height: 10px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
	position: relative;
}
/* width presets (no inline styles) */
.bar.w-90 {
	max-width: 90%;
	width: 90%;
}
.bar.w-120 {
	max-width: 100%;
	width: 100%;
} /* 120 as "full" baseline for table */
.bar.w-160 {
	max-width: 100%;
	width: 100%;
	filter: saturate(1.05);
}
.bar.w-220 {
	max-width: 100%;
	width: 100%;
	background: linear-gradient(90deg, var(--mint-400), #12b18d 65%, #0aa57f);
}

/* subtle enter animation */
.pw-table.reveal.is-visible .bar {
	animation: fill 1s ease forwards;
	transform-origin: left;
}
@keyframes fill {
	from {
		transform: scaleX(0.7);
	}
	to {
		transform: scaleX(1);
	}
}

.pw-tip {
	color: var(--ink-400);
	font-size: 12px;
}

/* responsive */
@media (max-width: 900px) {
	.pw-grid {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   Section 7 — Write Test Lab
   =========================== */
.wl-inner {
	display: grid;
	gap: 16px;
}
.wl-lanes {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 16px;
	display: grid;
	gap: 12px;
}
.wl-lanes .lane {
	position: relative;
	height: 12px;
	border-radius: 999px;
	overflow: hidden;
	background: linear-gradient(90deg, #f0fbff, #f7fff9);
}
.wl-lanes .lane .pulse {
	position: absolute;
	left: -20%;
	right: 0;
	top: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(24, 201, 161, 0.25) 35%,
		rgba(24, 201, 161, 0.45) 50%,
		rgba(24, 201, 161, 0.25) 65%,
		transparent 100%
	);
	animation: flow 3.6s ease-in-out infinite;
}
.l1 .pulse {
	animation-delay: 0s;
}
.l2 .pulse {
	animation-delay: 0.3s;
}
.l3 .pulse {
	animation-delay: 0.6s;
}
.l4 .pulse {
	animation-delay: 0.9s;
}
@keyframes flow {
	0% {
		left: -30%;
	}
	50% {
		left: 40%;
	}
	100% {
		left: 110%;
	}
}

.wl-samples {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.wl-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.wl-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
	filter: contrast(1.02);
}
.wl-card figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.wl-note {
	color: var(--ink-400);
	font-size: 12px;
}

/* responsive */
@media (max-width: 760px) {
	.wl-samples {
		grid-template-columns: 1fr;
	}
}
/* ===========================
   Section 8 — Task Flow Map
   =========================== */
.tfm-grid {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 18px;
	align-items: start;
}
.tfm-steps {
	position: relative;
	display: grid;
	gap: 12px;
	padding-left: 18px;
	list-style-type: none;
}
.tfm-steps .step {
	position: relative;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tfm-steps .step:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
}
.tfm-steps .step h3 {
	margin: 0 0 6px;
	font-size: 16px;
}
.tfm-steps .step p {
	margin: 0;
	color: var(--ink-600);
	font-size: 14px;
}
.tfm-steps .step .dot {
	position: absolute;
	left: -18px;
	top: 14px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--mint-400);
	box-shadow: 0 0 0 4px rgba(24, 201, 161, 0.12);
}
.tfm-steps::before {
	content: '';
	position: absolute;
	left: -13px;
	top: 6px;
	bottom: 6px;
	width: 2px;
	border-radius: 2px;
	background: linear-gradient(180deg, #e6f9ff, #e9fff6);
}
.tfm-steps .step.is-on .dot {
	background: var(--mint-600);
}

.tfm-side {
	display: grid;
	gap: 14px;
}
.tfm-fig {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
}
.tfm-fig figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}

/* responsive */
@media (max-width: 980px) {
	.tfm-grid {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   Section 9 — Charter (text)
   =========================== */
.charter-wrap {
	display: grid;
	gap: 16px;
}
.charter-body {
	display: grid;
	gap: 12px;
}
.charter-body h3 {
	margin: 8px 0 4px;
	font-size: 18px;
}
.charter-body p,
.charter-body ul,
.charter-body ol {
	color: var(--ink-600);
}
.charter-body ul {
	padding-left: 18px;
	list-style: disc;
}
.charter-body ol {
	padding-left: 18px;
}
.policy {
	background: linear-gradient(180deg, #f1fffb, #ffffff);
	border: 1px solid rgba(15, 27, 32, 0.08);
	border-radius: 14px;
	padding: 12px;
	color: var(--ink-600);
}
.faq {
	background: #fff;
	border-radius: 12px;
	box-shadow: var(--shadow);
	padding: 10px;
}
.faq > summary {
	cursor: pointer;
	font-weight: 700;
}
.faq > p {
	margin: 8px 0 0;
	color: var(--ink-600);
}

/* ===========================
   Section 10 — Study Kits
   =========================== */
.kits-wrap {
	display: grid;
	gap: 16px;
}
.kits-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}
.kit-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.kit-card:hover {
	transform: translateY(-4px) rotateZ(-0.2deg);
	box-shadow: 0 18px 38px rgba(23, 35, 42, 0.14);
	filter: contrast(1.02);
}
.kit-card figure figcaption {
	margin-top: 6px;
	font-weight: 700;
}
.kit-list {
	margin: 8px 0 0;
	color: var(--ink-600);
	font-size: 14px;
	display: grid;
	gap: 4px;
}
.kit-tags {
	margin-top: 10px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.kit-tags span {
	font-size: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--mint-200);
	color: var(--ink-900);
}

/* responsive */
@media (max-width: 980px) {
	.kits-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 620px) {
	.kits-grid {
		grid-template-columns: 1fr;
	}
}
/* ===========================
   Section 11 — Clip Lab
   =========================== */
.cl-wrap {
	display: grid;
	gap: 16px;
}
.cl-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(180px, 1fr));
	gap: 14px;
	align-items: start;
}
.rig {
	position: relative;
	border: 0;
	cursor: pointer;
	padding: 18px 12px;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: grid;
	place-items: center;
	min-height: 140px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rig:hover,
.rig:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
	outline: none;
}
.rig .spring {
	width: 68%;
	height: 10px;
	border-radius: 999px;
	background: repeating-linear-gradient(
		90deg,
		rgba(24, 201, 161, 0.35) 0 8px,
		rgba(24, 201, 161, 0.15) 8px 16px
	);
	transform-origin: center;
	transition: transform 0.25s ease;
}
.rig .jaw {
	position: absolute;
	left: 18px;
	right: 18px;
	height: 10px;
	border-radius: 6px;
	background: #eafdf6;
	box-shadow: inset 0 0 0 1px rgba(15, 27, 32, 0.06);
}
.rig .jaw.top {
	top: 26px;
}
.rig .jaw.bottom {
	bottom: 26px;
}
.rig:hover .jaw.top,
.rig:focus-visible .jaw.top {
	transform: translateY(8px);
}
.rig:hover .jaw.bottom,
.rig:focus-visible .jaw.bottom {
	transform: translateY(-8px);
}
.rig:hover .spring,
.rig:focus-visible .spring {
	transform: scaleY(0.7);
}

.cl-fig {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 10px;
}
.cl-fig figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.cl-tip {
	color: var(--ink-400);
	font-size: 12px;
}

/* responsive */
@media (max-width: 1020px) {
	.cl-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 640px) {
	.cl-grid {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   Section 12 — Page Layout Studio
   =========================== */
.pls-wrap {
	display: grid;
	gap: 16px;
}
.pls-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}
.pls-frame {
	position: relative;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
}
.pls-frame figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}

/* Базовая сетка (переключатель) */
.pls-frame::before {
	content: '';
	position: absolute;
	inset: 12px;
	border-radius: 10px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
	background-image: repeating-linear-gradient(
			to bottom,
			rgba(11, 180, 138, 0.12) 0 1px,
			transparent 1px 20px
		),
		repeating-linear-gradient(
			to right,
			rgba(11, 180, 138, 0.08) 0 1px,
			transparent 1px 24px
		);
}
.pls.show-grid .pls-frame::before {
	opacity: 1;
}

/* responsive */
@media (max-width: 900px) {
	.pls-grid {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   Section 13 — Care & Cleaning
   =========================== */
.care-wrap {
	display: grid;
	gap: 16px;
}
.care-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	align-items: start;
}
.care-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.care-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
	filter: contrast(1.02);
}
.care-card figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.care-tips {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	color: var(--ink-600);
	display: grid;
	gap: 6px;
}
.care-note {
	color: var(--ink-400);
	font-size: 12px;
}

/* responsive */
@media (max-width: 980px) {
	.care-grid {
		grid-template-columns: 1fr 1fr;
	}
}
@media (max-width: 620px) {
	.care-grid {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   Section 14 — Desk Moments
   =========================== */
.dm-wrap {
	display: grid;
	gap: 16px;
}
.dm-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(240px, 320px);
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}
.dm-card {
	scroll-snap-align: start;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dm-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(23, 35, 42, 0.12);
}
.dm-card figcaption {
	margin-top: 8px;
	color: var(--ink-600);
	font-size: 14px;
}
.dm-hint {
	color: var(--ink-400);
	font-size: 12px;
	text-align: left;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
	.rig .spring,
	.rig .jaw,
	.dm-card,
	.care-card {
		transition: none !important;
	}
}
/* ===========================
   Section 15 — Contact Form
   =========================== */
.contact-wrap {
	display: grid;
	gap: 16px;
}

.contact-form {
	/* нежный «лист в линейку» без картинок */
	background: linear-gradient(
				180deg,
				rgba(213, 255, 241, 0.45),
				rgba(213, 255, 241, 0)
			)
			0 0/100% 220px no-repeat,
		repeating-linear-gradient(
			to bottom,
			rgba(11, 180, 138, 0.08) 0 1px,
			transparent 1px 28px
		);
	border-top: 1px solid rgba(15, 27, 32, 0.06);
	border-bottom: 1px solid rgba(15, 27, 32, 0.06);
}

.contact-header .sec-lede {
	color: var(--ink-600);
}

.form-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 14px;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 14px;
}

.f-field {
	display: grid;
	gap: 6px;
}
.f-label {
	font-weight: 700;
	font-size: 14px;
	color: var(--ink-900);
}

.f-field input,
.f-field textarea {
	width: 100%;
	padding: 12px 12px;
	border: 1px solid rgba(15, 27, 32, 0.12);
	border-radius: 12px;
	font: inherit;
	color: var(--ink-900);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease,
		background 0.15s ease;
}
.f-field input::placeholder,
.f-field textarea::placeholder {
	color: #7e98a3;
}
.f-field input:focus,
.f-field textarea:focus {
	outline: none;
	border-color: var(--mint-500);
	box-shadow: 0 0 0 4px rgba(24, 201, 161, 0.15);
	background: #fbfffe;
}

.f-span-2 {
	grid-column: 1 / -1;
}

.form-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	color: var(--ink-600);
}
.form-checkbox input {
	width: 18px;
	height: 18px;
	accent-color: var(--mint-500);
}
.form-checkbox a {
	color: var(--mint-600);
	text-decoration: underline;
}

.f-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.f-note {
	color: var(--ink-400);
	font-size: 12px;
	margin: 0;
}

/* «animate-on-scroll» эффект — делаем совместимым с нашим reveal */
.animate-on-scroll {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* responsive */
@media (max-width: 860px) {
	.form-wrapper {
		grid-template-columns: 1fr;
	}
	.f-span-2 {
		grid-column: auto;
	}
}
/* mobile-only stack: text first, images second */
@media (max-width: 680px) {
	.hero-wrap {
		display: grid; /* ок, даже если уже grid */
		grid-template-columns: 1fr; /* одна колонка */
		gap: 14px;
	}
	.hero-copy {
		grid-column: 1;
		grid-row: 1;
	}
	.hero-grid {
		grid-column: 1;
		grid-row: 2;
		margin-top: 10px;
	}
}
/* GRIDLINE LAB: раскладка */
#gridline-lab .gl-wrap {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 14px;
}
#gridline-lab .gl-copy {
	align-self: start;
}
#gridline-lab .gl-slider {
	align-self: start;
}

/* mobile: текст сверху, карточки ниже */
@media (max-width: 680px) {
	#gridline-lab .gl-wrap {
		grid-template-columns: 1fr;
	}
	#gridline-lab .gl-copy {
		order: 1;
	}
	#gridline-lab .gl-slider {
		order: 2;
		margin-top: 10px;
	}
}

/* горизонтальная лента с карточками */
#gridline-lab .gl-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(230px, 1fr);
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
#gridline-lab .gl-track::-webkit-scrollbar {
	display: none;
}
#gridline-lab .gl-card {
	scroll-snap-align: start;
}

#gridline-lab .gl-track.is-drag {
	cursor: grabbing;
}

/* индикатор прогресса */
#gridline-lab .gl-progress {
	height: 8px;
	border-radius: 999px;
	background: #eafdf6;
	overflow: hidden;
	position: relative;
	margin: 8px 0;
}
#gridline-lab .gl-progress .fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
	transition: width 0.18s linear;
}
.gsl-item {
	margin: 0;
}
/* --- Gridline Lab: карточки и картинки адаптивно --- */
#gridline-lab .gl-card {
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 10px;
	display: grid;
	gap: 8px;
	overflow: hidden; /* чтобы края изображения не вылезали */
}

/* медиаблок внутри карточки */
#gridline-lab .gl-card figure {
	margin: 0;
	border-radius: 12px;
	overflow: hidden; /* округление кадра */
	aspect-ratio: 4 / 3; /* стабильная высота; при желании 1/1 */
}

/* ключ! картинка подстраивается под карточку */
#gridline-lab .gl-card img {
	display: block;
	width: 100% !important; /* перекрываем глобальный max-width */
	max-width: 100% !important;
	height: 100%;
	object-fit: cover; /* заполняем кадр без искажений */
}

/* трек: колонка = ширина карточки (не больше 340px из-за ограничения на проекте) */
#gridline-lab .gl-track {
	grid-auto-columns: min(320px, 100%); /* базовая ширина карточки в треке */
}

/* планшет: карточка пошире */
@media (max-width: 1024px) {
	#gridline-lab .gl-track {
		grid-auto-columns: min(44vw, 340px);
	}
}

/* мобильные: карточка почти на всю ширину, но не больше лимита проекта */
@media (max-width: 680px) {
	#gridline-lab .gl-track {
		grid-auto-columns: min(86vw, 340px);
	}
}
/* Gridline Lab — фикс переполнения изображений */
.gsl-item {
	overflow: hidden; /* чтобы картинка не выходила за скругление */
	display: grid;
	gap: 8px;
}

.gsl-item img {
	width: 100% !important; /* вписать в карточку */
	max-width: 100% !important; /* перебить глобальное 280px */
	height: auto; /* сохраняем пропорции */
	display: block;
	border-radius: 12px; /* аккуратные углы внутри карточки */
}
.ergo-car,
.ergo-side {
	width: 280px;
}
/* --- Mobile safety for Desk Ergonomics (и любых карточек с анимацией) --- */
@media (max-width: 700px) {
	/* 1) Запрещаем трансформации, которые смещают карточку за пределы вьюпорта */
	#s5-ergonomics [data-tilt],
	#s5-ergonomics .ergo-car,
	#s5-ergonomics .ergo-car:hover,
	#s5-ergonomics .ergo-car.reveal,
	#s5-ergonomics .ergo-side,
	#s5-ergonomics .ergo-side:hover {
		transform: none !important;
		translate: 0 !important;
	}

	/* 2) Карточки и контейнер — без «выливания» тени и контента */
	#s5-ergonomics,
	#s5-ergonomics .ergo-scene,
	#s5-ergonomics .ergo-car,
	#s5-ergonomics .ergo-side {
		overflow: hidden;
	}

	/* 3) Картинка строго по ширине карточки */
	#s5-ergonomics .ergo-car img,
	#s5-ergonomics .ergo-side img {
		display: block;
		width: 100% !important;
		max-width: 100% !important;
		height: auto;
		border-radius: 12px;
	}

	/* 4) Трек меток — обычный блок, чтобы не «толкать» карточку */
	#s5-ergonomics .ergo-track {
		position: static;
		transform: none;
		left: auto;
		right: auto;
		top: auto;
		margin: 8px 0 2px;
		height: 6px;
	}
}

/* На всякий: страница не скроллится по оси X даже если какая-то анимация промахнулась */
@media (max-width: 700px) {
	html,
	body {
		overflow-x: hidden;
	}
}
