/* ==========================================================================
   KnotMesh — design system
   Dark workshop aesthetic: warm charcoal, amber accent, serif display type.
   ========================================================================== */

:root {
	--bg: #14110e;
	--bg-soft: #1a1612;
	--surface: #211c16;
	--surface-2: #282219;
	--line: #38302444;
	--line-strong: #4a3f2e66;

	--ink: #f4eee3;
	--ink-dim: #bdb09c;
	--ink-faint: #8d8170;

	--accent: #e8a33d;
	--accent-strong: #f4bc5e;
	--accent-ink: #211603;
	--accent-soft: #e8a33d1f;

	--font-display: "Fraunces", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.55);

	--container: 1140px;
}

/* ------------------------------------------------------------- reset-ish */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 16.5px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.12;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent); }

ul { padding: 0; margin: 0; list-style: none; }

.container {
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.container-narrow { max-width: 760px; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: var(--accent-ink);
	padding: 0.6rem 1rem;
	z-index: 200;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- buttons */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.78em 1.5em;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	border: 1px solid transparent;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
	background: linear-gradient(180deg, var(--accent-strong), var(--accent));
	color: var(--accent-ink);
	box-shadow: 0 10px 28px -10px rgba(232, 163, 61, 0.55);
}
.btn-primary:hover {
	color: var(--accent-ink);
	box-shadow: 0 14px 32px -10px rgba(232, 163, 61, 0.7);
}

.btn-ghost {
	border-color: var(--line-strong);
	color: var(--ink);
	background: transparent;
}
.btn-ghost:hover {
	border-color: var(--accent);
	color: var(--accent-strong);
	background: var(--accent-soft);
}

.btn-sm { padding: 0.55em 1.1em; font-size: 0.85rem; }
.btn-lg { padding: 0.95em 1.9em; font-size: 1.02rem; }

/* ---------------------------------------------------------------- header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	min-height: 72px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--ink);
}
.brand:hover { color: var(--ink); }

.brand-mark {
	width: 13px;
	height: 13px;
	border-radius: 4px;
	background: conic-gradient(from 45deg, var(--accent), #c9762a, var(--accent-strong), var(--accent));
	box-shadow: 0 0 14px rgba(232, 163, 61, 0.65);
	transform: rotate(45deg);
}

.brand-name {
	font-family: var(--font-display);
	font-size: 1.35rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.brand-name em { font-style: italic; color: var(--accent-strong); }

.main-nav { display: flex; gap: 1.5rem; }
.main-nav a {
	color: var(--ink-dim);
	font-size: 0.93rem;
	font-weight: 500;
}
.main-nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-switch {
	display: flex;
	gap: 0.35rem;
	font-size: 0.85rem;
	color: var(--ink-faint);
}
.lang-switch a { color: var(--ink-faint); font-weight: 600; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active { color: var(--accent-strong); }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0 10px;
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.nav-toggle span {
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ hero */

.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
	background:
		radial-gradient(900px 420px at 78% -10%, rgba(232, 163, 61, 0.13), transparent 65%),
		radial-gradient(700px 380px at 12% 110%, rgba(143, 181, 115, 0.07), transparent 60%),
		repeating-linear-gradient(0deg, transparent 0 47px, rgba(244, 238, 227, 0.025) 47px 48px),
		repeating-linear-gradient(90deg, transparent 0 47px, rgba(244, 238, 227, 0.025) 47px 48px);
}

.hero-inner { max-width: 800px; }

.kicker {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 1rem;
}

.hero-title {
	font-size: clamp(2.4rem, 1.4rem + 5vw, 4.4rem);
	margin-bottom: 1.1rem;
}
.hero-title em {
	font-style: italic;
	color: var(--accent-strong);
}

.hero-sub {
	font-size: clamp(1rem, 0.95rem + 0.4vw, 1.18rem);
	color: var(--ink-dim);
	max-width: 620px;
	margin-bottom: 2rem;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-bottom: 2.4rem;
}

.hero-proof {
	font-size: 0.85rem;
	color: var(--ink-faint);
	margin: -1.3rem 0 1.6rem;
}

.hero-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

/* Animated laser sweep over the hero */
.hero-laser {
	position: absolute;
	inset-inline: 0;
	top: 18%;
	height: 2px;
	background: linear-gradient(90deg, transparent 4%, rgba(232, 163, 61, 0.55) 50%, transparent 96%);
	box-shadow: 0 0 18px 2px rgba(232, 163, 61, 0.35);
	opacity: 0.5;
	pointer-events: none;
	animation: hero-scan 9s ease-in-out infinite alternate;
}
@keyframes hero-scan {
	0%   { top: 14%; opacity: 0.15; }
	50%  { opacity: 0.55; }
	100% { top: 82%; opacity: 0.15; }
}

/* Rotating word in the hero title */
.rotator {
	display: inline-grid;
	text-align: inherit;
}
.rotator-word {
	grid-area: 1 / 1;
	font-style: italic;
	color: var(--accent-strong);
	opacity: 0;
	transform: translateY(0.45em);
	transition: opacity 0.45s ease, transform 0.45s ease;
	white-space: nowrap;
}
.rotator-word.is-active { opacity: 1; transform: none; }
.rotator-word.is-leaving { opacity: 0; transform: translateY(-0.45em); }

/* --------------------------------------------------------------- marquee */

.marquee {
	overflow: hidden;
	border-block: 1px solid var(--line);
	background: var(--bg-soft);
	padding: 0.85rem 0;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
	display: flex;
	align-items: center;
	gap: 2.4rem;
	width: max-content;
	animation: marquee-scroll 30s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--ink-dim);
	white-space: nowrap;
}
.marquee-dot {
	width: 6px;
	height: 6px;
	border-radius: 2px;
	background: var(--accent);
	transform: rotate(45deg);
	box-shadow: 0 0 8px rgba(232, 163, 61, 0.6);
}
@keyframes marquee-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
.hero-badges li {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ink-dim);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 0.35em 0.95em;
	background: var(--bg-soft);
}

/* -------------------------------------------------------------- sections */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt {
	background: var(--bg-soft);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-sub { color: var(--ink-dim); font-size: 1.05rem; }

/* ----------------------------------------------------------- line cards */

.lines-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
	gap: 1.1rem;
}

.line-card {
	position: relative;
	background: linear-gradient(180deg, var(--surface), var(--bg-soft));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.7rem 1.5rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.line-card:hover {
	transform: translateY(-5px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow);
}
.line-card p { color: var(--ink-dim); font-size: 0.94rem; flex-grow: 1; }

.line-head {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-bottom: 0.7rem;
}
.line-head h3 { margin: 0; }

.line-icon {
	font-size: 1.3rem;
	color: var(--accent-strong);
	width: 46px;
	height: 46px;
	flex-shrink: 0;
	display: grid;
	place-items: center;
	background: var(--accent-soft);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
}

.badge {
	position: absolute;
	top: 1.1rem;
	right: 1.1rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-strong);
	border: 1px solid var(--line-strong);
	background: var(--accent-soft);
	border-radius: 999px;
	padding: 0.3em 0.8em;
}

.card-link { font-weight: 600; font-size: 0.92rem; }
.card-link.is-muted { color: var(--ink-faint); }

/* -------------------------------------------------------- product cards */

.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
	gap: 1.2rem;
}

.product-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover {
	transform: translateY(-5px);
	border-color: var(--line-strong);
	box-shadow: var(--shadow);
}

.product-media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	background:
		radial-gradient(closest-side, rgba(232, 163, 61, 0.12), transparent),
		var(--surface-2);
	overflow: hidden;
}
.product-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}
.product-card:hover .product-media img { transform: scale(1.045); }

.product-placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 3.2rem;
	color: var(--line-strong);
}

.product-line {
	position: absolute;
	top: 0.8rem;
	left: 0.8rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--ink);
	background: color-mix(in srgb, var(--bg) 78%, transparent);
	backdrop-filter: blur(6px);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 0.3em 0.8em;
}

.product-body {
	padding: 1.05rem 1.15rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	flex-grow: 1;
}

.product-title {
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	line-height: 1.35;
}

.product-foot {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.product-price {
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--accent-strong);
}

.shop-empty { color: var(--ink-dim); }

.shop-more {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	justify-content: center;
	margin-top: 2.6rem;
}

/* -------------------------------------------------------------- workshop */

.workshop-grid {
	display: grid;
	grid-template-columns: 1.25fr 1fr;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

.workshop-copy p { color: var(--ink-dim); }

.workshop-points { display: grid; gap: 0.85rem; }
.workshop-points li {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 1rem 1.2rem 1rem 3rem;
	font-weight: 500;
	font-size: 0.97rem;
}
.workshop-points li::before {
	content: "✓";
	position: absolute;
	left: 1.1rem;
	color: var(--accent-strong);
	font-weight: 700;
}

/* ------------------------------------------------------------------- faq */

.faq-list { display: grid; gap: 0.75rem; }

.faq-item {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0;
	overflow: hidden;
	transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--line-strong); }

.faq-item summary {
	cursor: pointer;
	list-style: none;
	padding: 1.05rem 3rem 1.05rem 1.3rem;
	font-weight: 600;
	position: relative;
	user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: "+";
	position: absolute;
	right: 1.2rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--accent-strong);
	font-size: 1.3rem;
	font-weight: 400;
	transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item p {
	margin: 0;
	padding: 0 1.3rem 1.2rem;
	color: var(--ink-dim);
	font-size: 0.96rem;
}

/* ------------------------------------------------------------- final CTA */

.cta-final {
	text-align: center;
	background:
		radial-gradient(640px 300px at 50% 120%, rgba(232, 163, 61, 0.14), transparent 70%);
}
.cta-final .hero-actions { justify-content: center; margin-bottom: 0; }
.cta-final .section-sub { max-width: 540px; margin-inline: auto; margin-bottom: 2rem; }

/* ---------------------------------------------------------------- footer */

.site-footer {
	border-top: 1px solid var(--line);
	background: var(--bg-soft);
	padding: 2.6rem 0 2rem;
}

.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 1.8rem;
}

.footer-brand .brand-name { font-size: 1.2rem; }
.footer-made { color: var(--ink-faint); font-size: 0.88rem; margin: 0.3rem 0 0; }

.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { color: var(--ink-dim); font-size: 0.92rem; font-weight: 500; }
.footer-links a:hover { color: var(--accent-strong); }

.footer-legal {
	border-top: 1px solid var(--line);
	padding-top: 1.4rem;
	color: var(--ink-faint);
	font-size: 0.8rem;
}
.footer-legal p { margin-bottom: 0.5em; }

/* -------------------------------------------------------------- machines */

.machine-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1.6rem;
}
.machine-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	padding: 0.7em 1.3em;
	font: 600 0.93rem var(--font-body);
	color: var(--ink-dim);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 999px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.machine-tab:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-2px); }
.machine-tab.is-active {
	color: var(--accent-ink);
	background: linear-gradient(180deg, var(--accent-strong), var(--accent));
	border-color: transparent;
	box-shadow: 0 10px 28px -10px rgba(232, 163, 61, 0.55);
}
.machine-tab-icon { font-size: 1.05em; }

.machine-panel {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: center;
	background: linear-gradient(180deg, var(--surface), var(--bg-soft));
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(1.4rem, 3.5vw, 2.6rem);
}
.machine-panel + .machine-panel { margin-top: 1rem; }
body.js .machine-panel { display: none; margin-top: 0; }
body.js .machine-panel.is-active { display: grid; animation: panel-in 0.4s ease; }
@keyframes panel-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

.machine-visual {
	background:
		radial-gradient(closest-side, rgba(232, 163, 61, 0.09), transparent),
		var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 1rem;
}
.machine-svg { width: 100%; height: auto; display: block; }

.machine-tag {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 0.4rem;
}
.machine-copy h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.machine-desc { color: var(--ink-dim); font-size: 0.97rem; }

.machine-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.9rem 0 1.2rem;
}
.machine-chips li {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--accent-strong);
	background: var(--accent-soft);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	padding: 0.3em 0.85em;
}

/* SVG palette */
.mk-frame { fill: var(--surface-2); stroke: var(--line-strong); }
.mk-rail  { fill: #3a3328; }
.mk-head  { fill: var(--accent); }
.mk-nozzle { fill: var(--accent-strong); }
.mk-wood  { fill: #5a4630; stroke: #6e5639; }
.mk-layer { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.mk-filament { stroke: var(--accent-strong); stroke-width: 2; stroke-linecap: round; }

/* 3D printer animation */
.printer-head {
	transform: translate(120px, 80px);
	animation: printer-move 2.2s ease-in-out infinite alternate;
}
@keyframes printer-move {
	from { transform: translate(115px, 80px); }
	to   { transform: translate(205px, 80px); }
}
.printer-gantry { animation: gantry-rise 9s linear infinite; }
@keyframes gantry-rise {
	0%   { transform: translateY(85px); }
	100% { transform: translateY(40px); }
}
.mk-layer { opacity: 0; animation: layer-pop 9s linear infinite; }
.mk-layer.l1 { animation-delay: 0.2s; }
.mk-layer.l2 { animation-delay: 1.9s; }
.mk-layer.l3 { animation-delay: 3.6s; }
.mk-layer.l4 { animation-delay: 5.3s; }
.mk-layer.l5 { animation-delay: 7s; }
@keyframes layer-pop {
	0%, 2%       { opacity: 0; transform: translateY(4px); }
	6%, 97%      { opacity: 1; transform: none; }
	98%, 100%    { opacity: 0; }
}

/* Laser cutter animation */
.laser-head {
	transform: translate(90px, 44px);
	animation: laser-move 3s ease-in-out infinite alternate;
}
@keyframes laser-move {
	from { transform: translate(80px, 44px); }
	to   { transform: translate(240px, 44px); }
}
.laser-beam {
	stroke: var(--accent-strong);
	stroke-width: 2;
	stroke-linecap: round;
	animation: beam-flicker 0.18s linear infinite alternate;
}
@keyframes beam-flicker {
	from { opacity: 0.55; }
	to   { opacity: 1; }
}
.laser-spark {
	fill: var(--accent-strong);
	filter: drop-shadow(0 0 6px var(--accent-strong));
	animation: spark-pulse 0.4s ease-in-out infinite alternate;
}
@keyframes spark-pulse {
	from { r: 3.5; opacity: 0.7; }
	to   { r: 6; opacity: 1; }
}
.laser-cut {
	fill: none;
	stroke: var(--accent);
	stroke-width: 2;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	animation: cut-draw 6s linear infinite;
}
@keyframes cut-draw {
	0%        { stroke-dashoffset: 100; }
	70%, 92%  { stroke-dashoffset: 0; opacity: 1; }
	100%      { stroke-dashoffset: 0; opacity: 0; }
}

/* Woodworking animation */
.sander {
	transform: translate(110px, 140px);
	animation: sander-move 1.5s ease-in-out infinite alternate;
}
@keyframes sander-move {
	from { transform: translate(95px, 140px); }
	to   { transform: translate(225px, 140px); }
}
.grain-line {
	fill: none;
	stroke: #7d6342;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	animation: grain-draw 5s ease-out infinite alternate;
}
.grain-line.g2 { animation-delay: 0.6s; }
@keyframes grain-draw {
	to { stroke-dashoffset: 0; }
}
.dust-p { fill: #b89a6f; opacity: 0; }
.dust-p.d1 { animation: dust-rise 1.4s ease-out infinite; transform: translate(130px, 138px); }
.dust-p.d2 { animation: dust-rise 1.7s ease-out 0.45s infinite; transform: translate(165px, 140px); }
.dust-p.d3 { animation: dust-rise 1.2s ease-out 0.8s infinite; transform: translate(200px, 137px); }
@keyframes dust-rise {
	0%   { opacity: 0; translate: 0 0; }
	25%  { opacity: 0.85; }
	100% { opacity: 0; translate: 8px -26px; }
}

/* --------------------------------------------------------------- process */

.process {
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1.1rem;
	counter-reset: step;
}

.process-track {
	position: absolute;
	top: 21px;
	left: 4%;
	right: 4%;
	height: 2px;
	background: var(--line-strong);
	border-radius: 2px;
}
.process-fill {
	display: block;
	height: 100%;
	width: var(--progress, 0%);
	background: linear-gradient(90deg, var(--accent), var(--accent-strong));
	border-radius: 2px;
	box-shadow: 0 0 10px rgba(232, 163, 61, 0.5);
	transition: width 0.6s ease, height 0.6s ease;
}

.process-step {
	position: relative;
	z-index: 1;
	cursor: pointer;
	padding: 0 0.2rem;
	transition: opacity 0.3s ease;
	opacity: 0.55;
}
.process-step.is-active, .process-step:hover { opacity: 1; }

.process-num {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-bottom: 0.9rem;
	font: 700 1.05rem var(--font-display);
	color: var(--ink-dim);
	background: var(--surface);
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.process-step.is-active .process-num {
	color: var(--accent-ink);
	background: linear-gradient(180deg, var(--accent-strong), var(--accent));
	border-color: transparent;
	box-shadow: 0 0 22px rgba(232, 163, 61, 0.55);
	transform: scale(1.12);
}

.process-step h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.process-step p { color: var(--ink-dim); font-size: 0.88rem; margin: 0; }

/* ------------------------------------------------------------ stats band */

.stats-band {
	border-block: 1px solid var(--line);
	background:
		radial-gradient(700px 200px at 50% 0%, rgba(232, 163, 61, 0.08), transparent 70%),
		var(--bg-soft);
	padding: clamp(2.2rem, 5vw, 3.4rem) 0;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	text-align: center;
}

.stat-num {
	display: block;
	font: 700 clamp(2.1rem, 1.5rem + 2.4vw, 3.1rem) var(--font-display);
	color: var(--accent-strong);
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}
.stat-label {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--ink-dim);
}

/* ------------------------------------------------------------ sticky bar */

.sticky-bar {
	position: fixed;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 150;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	max-width: min(560px, calc(100vw - 1.6rem));
	padding: 0.55rem 0.55rem 0.55rem 1.2rem;
	background: color-mix(in srgb, var(--surface) 90%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	box-shadow: var(--shadow);
	animation: sticky-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.sticky-bar[hidden] { display: none; }
@keyframes sticky-in {
	from { opacity: 0; transform: translate(-50%, 24px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.sticky-label {
	margin: 0;
	font-size: 0.83rem;
	font-weight: 500;
	color: var(--ink-dim);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.sticky-bar .btn { flex-shrink: 0; }

.sticky-close {
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--ink-faint);
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
}
.sticky-close:hover { color: var(--ink); background: var(--surface-2); }

/* --------------------------------------------------------------- generic */

.generic-entry h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.generic-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.entry-content a { text-decoration: underline; }

/* ---------------------------------------------------------------- reveal */

.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.btn:hover, .line-card:hover, .product-card:hover { transform: none; }

	.hero-laser,
	.marquee-track,
	.printer-head, .printer-gantry, .mk-layer,
	.laser-head, .laser-beam, .laser-spark, .laser-cut,
	.sander, .grain-line, .dust-p,
	.sticky-bar { animation: none; }

	.mk-layer { opacity: 1; transform: none; }
	.laser-cut { stroke-dashoffset: 0; }
	.grain-line { stroke-dashoffset: 0; }
	.rotator-word { transition: none; }
	.process-fill { transition: none; }
	body.js .machine-panel.is-active { animation: none; }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 920px) {
	.workshop-grid { grid-template-columns: 1fr; }
	.header-cta { display: none; }

	.machine-panel { grid-template-columns: 1fr; }
	.machine-visual { max-width: 420px; }

	.process { grid-template-columns: 1fr; gap: 0; }
	.process-track { top: 0; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; }
	.process-fill { width: 100%; height: var(--progress, 0%); }
	.process-step {
		display: grid;
		grid-template-columns: 44px 1fr;
		column-gap: 1.1rem;
		padding-bottom: 1.6rem;
	}
	.process-step .process-num { margin-bottom: 0; }
	.process-step h3 { grid-column: 2; margin-top: 0.55rem; }
	.process-step p { grid-column: 2; }

	.stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
	.nav-toggle { display: flex; }

	.main-nav {
		position: fixed;
		inset: 72px 0 auto 0;
		flex-direction: column;
		gap: 0;
		background: var(--bg-soft);
		border-bottom: 1px solid var(--line);
		padding: 0.5rem 0 1rem;
		transform: translateY(-12px);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.22s ease, transform 0.22s ease;
	}
	.nav-open .main-nav {
		transform: none;
		opacity: 1;
		pointer-events: auto;
	}
	.main-nav a {
		padding: 0.85rem clamp(1.1rem, 4vw, 2rem);
		font-size: 1.05rem;
	}

	.hero-actions .btn { width: 100%; justify-content: center; }
	.shop-more .btn { width: 100%; justify-content: center; }
}
