/* ─────────────────────────────────────────────
   Products (/products and /products/<product>): the workshop, "where we make it".
   Same world as the start page: dark, blueprint grid, diagnostic lines. Every product is shown
   being built (works.js adds .is-built when a stage scrolls into view). Little text, more showing.
   prefers-reduced-motion: every stage is shown finished, nothing moves (WCAG 2.3.3).
   ───────────────────────────────────────────── */
.page-works {
  --bg: #171314;
  --panel: rgb(222 216 204 / .04);
  --line: rgb(222 216 204 / .14);
  --line-2: rgb(222 216 204 / .32);
  --ox: #8a1a14;                         /* a lighter Oxblood, for shapes on the dark ground */
  --ox-deep: #4A0404;
  --moss: #6f8a5c;
  --slate: #8095AA;
  --brass: #c79a5e;
  --ink-on: #171314;
  --oat-80: rgb(222 216 204 / .84);
  --oat-60: rgb(222 216 204 / .7);
  --oat-45: rgb(222 216 204 / .62);      /* small labels stay above 4.5:1 on the dark ground */
  --ease: cubic-bezier(.16, 1, .3, 1);
  background:
    linear-gradient(rgb(222 216 204 / .05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(222 216 204 / .05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgb(222 216 204 / .06) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, rgb(222 216 204 / .06) 1px, transparent 1px) 0 0 / 120px 120px,
    var(--bg);
  color: var(--oat);
}

.wk { position: relative; overflow: clip; }
.wk-wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.wk-kicker { margin: 0; font: 400 12px/1.5 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.wk-kicker::before { content: "// "; color: var(--oat-45); }

/* hero */
.wk-hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: center; padding: clamp(120px, 16vh, 160px) 0 clamp(64px, 10vh, 120px); }
.wk-hero__grid { display: grid; gap: 40px 64px; align-items: center; }
@media (min-width: 980px) { .wk-hero__grid { grid-template-columns: 5fr 7fr; } }
.wk-h1 { margin: 14px 0 0; font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 400; line-height: .98; letter-spacing: -.04em; }
.wk-lede { margin: 22px 0 0; max-width: 30rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.55; color: var(--oat-80); }
.wk-price { margin: 28px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.wk-price b { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 400; letter-spacing: -.02em; }
.wk-price span { font: 400 12px/1.5 var(--font-mono); letter-spacing: .08em; color: var(--oat-60, rgb(222 216 204 / .66)); }
.wk-act { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.wk-btn {
  display: inline-flex; align-items: center; gap: .8em; padding: 15px 22px;
  border: 1px solid var(--oat); background: var(--oat); color: var(--ink-on);
  font: 700 12px var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.wk-btn:hover, .wk-btn:focus-visible { background: var(--brass); border-color: var(--brass); }
.wk-btn--line { background: transparent; color: var(--oat); border-color: var(--line-2); }
.wk-btn--line:hover, .wk-btn--line:focus-visible { background: var(--oat); color: var(--ink-on); border-color: var(--oat); }
.wk-btn [aria-hidden] { transition: transform .4s var(--ease); }
.wk-btn:hover [aria-hidden] { transform: translateX(4px); }
.page-works :focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* the stage: a workbench with crop marks and a status line */
.stage { position: relative; padding: 28px; border: 1px solid var(--line); background: var(--panel); }
.stage::before, .stage::after { content: ""; position: absolute; width: 18px; height: 18px; border: 0 solid var(--brass); }
.stage::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.stage::after { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
.stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.stage__status { margin: 14px 0 0; display: flex; justify-content: space-between; gap: 12px; font: 400 11px/1.4 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--oat-45); }
.stage__status b { font-weight: 400; color: var(--brass); }
.stage__led { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 10px var(--brass); }

/* parts of a drawing */
.st-frame { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.st-dim { stroke: var(--brass); stroke-width: 1; fill: none; }
.st-dim-t { fill: var(--brass); font: 400 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.st-wire { fill: none; stroke: var(--oat-45); stroke-width: 1.2; stroke-dasharray: 5 5; }
.st-fill { fill: rgb(222 216 204 / .14); }
.st-fill--ox { fill: var(--ox); }
.st-fill--oat { fill: var(--oat); }
.st-text { fill: var(--oat); font: 500 13px var(--font-sans, Inter, sans-serif); }
.st-mono { fill: var(--oat-80); font: 400 11px var(--font-mono); letter-spacing: .06em; }
.st-sketch { fill: none; stroke: var(--oat-80); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 0; }

/* build sequence: everything starts "unbuilt" and arrives in order (--d = step) */
@media (prefers-reduced-motion: no-preference) {
  .js-works .stage [data-s] { transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 260ms); transform-box: fill-box; transform-origin: center; }
  .js-works .stage:not(.is-built) [data-s="in"] { opacity: 0; }
  .js-works .stage:not(.is-built) [data-s="up"] { opacity: 0; transform: translateY(26px); }
  .js-works .stage:not(.is-built) [data-s="drop"] { opacity: 0; transform: translateY(-60px) rotate(-12deg); }
  .js-works .stage:not(.is-built) [data-s="grow"] { opacity: 0; transform: scale(.2); }
  .js-works .stage:not(.is-built) [data-s="out"] { opacity: 1; }
  .js-works .stage.is-built [data-s="out"] { opacity: 0; }
  .js-works .stage:not(.is-built) [data-s="slide"] { opacity: 0; transform: translateX(-80px); }
  .js-works .stage:not(.is-built) .st-sketch { stroke-dashoffset: 600; }
  .js-works .stage .st-sketch { transition: stroke-dashoffset 1.6s ease-out; }
  .js-works .stage:not(.is-built) .st-dim { stroke-dasharray: 400; stroke-dashoffset: 400; }
  .js-works .stage .st-dim { transition: stroke-dashoffset 1s var(--ease); transition-delay: calc(var(--d, 0) * 260ms); }
  .js-works .stage.is-built .st-dim { stroke-dasharray: 400; stroke-dashoffset: 0; }
  /* the language switch keeps flipping, the key turns once it is in the lock */
  .stage.is-built .lang-flip { animation: flip 4s 3.2s ease-in-out infinite; }
  @keyframes flip { 0%, 45% { transform: translateX(0); } 50%, 95% { transform: translateX(34px); } 100% { transform: translateX(0); } }
  .stage.is-built .key { animation: turnkey 1.2s 3s ease-in-out both; transform-box: fill-box; transform-origin: 0% 50%; }
  @keyframes turnkey { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-28deg); } 70% { transform: rotate(8deg); } }
  .stage__led { animation: blink 1.6s steps(2) infinite; }
  @keyframes blink { 50% { opacity: .25; } }
}

/* a product on the overview: the bench */
.bench { padding: clamp(56px, 9vh, 100px) 0; border-top: 1px solid var(--line); }
.bench__grid { display: grid; gap: 36px 64px; align-items: center; }
@media (min-width: 980px) { .bench__grid { grid-template-columns: 7fr 5fr; } .bench--flip .bench__grid { grid-template-columns: 5fr 7fr; } .bench--flip .stage { order: 2; } }
.bench__n { font: 400 12px var(--font-mono); letter-spacing: .2em; color: var(--oat-45); }
.bench__name { margin: 10px 0 0; font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 400; line-height: 1; letter-spacing: -.035em; }
.bench__line { margin: 14px 0 0; max-width: 28rem; font-size: 1.15rem; line-height: 1.5; color: var(--oat-80); }

/* product page sections */
.wk-sec { padding: clamp(64px, 10vh, 112px) 0; border-top: 1px solid var(--line); }
.wk-h2 { margin: 10px 0 30px; font-size: clamp(1.9rem, 4vw, 3.2rem); font-weight: 400; line-height: 1.02; letter-spacing: -.03em; }

/* what you get: parts on the bench, one word each */
/* each part draws its own lines, so a half-full last row leaves no grey cells */
.parts { margin: 0; padding: 0 1px 1px 0; list-style: none; display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.parts li { display: grid; gap: 14px; align-content: start; padding: 20px 16px; margin: 0 -1px -1px 0; border: 1px solid var(--line); background: var(--bg); transition: background .3s; }
.parts li:hover { background: #211b1c; }
.parts svg { width: 34px; height: 34px; fill: none; stroke: var(--brass); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.parts b { font-size: 1.05rem; font-weight: 500; line-height: 1.3; }
.parts span { display: block; margin-top: 4px; font: 400 12px/1.5 var(--font-mono); letter-spacing: .04em; color: var(--oat-60, rgb(222 216 204 / .66)); }
@media (prefers-reduced-motion: no-preference) {
  .js-works .parts:not(.is-built) li { opacity: 0; transform: translateY(18px); }
  .js-works .parts li { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
}

/* how we make it: A R C, handover, SHIFT on one line that fills */
.line { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
@media (min-width: 900px) { .line { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.line::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 2px; background: var(--line); }
@media (min-width: 900px) { .line::before { left: 0; right: 0; top: 21px; bottom: auto; width: auto; height: 2px; } }
.line__fill { position: absolute; left: 21px; top: 0; width: 2px; height: 100%; background: var(--brass); transform-origin: top; }
@media (min-width: 900px) { .line__fill { left: 0; top: 21px; width: 100%; height: 2px; transform-origin: left; } }
.line li { position: relative; padding-left: 64px; }
@media (min-width: 900px) { .line li { padding: 64px 22px 0 0; } }
.line i { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; font: 700 16px var(--font-mono); font-style: normal; color: var(--ink-on); background: var(--oat); border: 2px solid var(--bg); }
.line .l-a i { background: var(--ox); color: var(--oat); } .line .l-r i { background: var(--slate); } .line .l-c i { background: var(--moss); }
.line .l-h i, .line .l-s i { background: var(--brass); }
.line b { display: block; font-size: 1.1rem; font-weight: 500; }
.line span { display: block; margin-top: 6px; max-width: 22rem; font-size: .98rem; line-height: 1.5; color: var(--oat-80); }
@media (prefers-reduced-motion: no-preference) {
  .js-works .line:not(.is-built) .line__fill { transform: scale(0); }
  .js-works .line .line__fill { transition: transform 2.4s var(--ease); }
  @media (min-width: 900px) { .js-works .line:not(.is-built) .line__fill { transform: scaleX(0); } }
  @media (max-width: 899px) { .js-works .line:not(.is-built) .line__fill { transform: scaleY(0); } }
  .js-works .line:not(.is-built) li { opacity: .25; }
  .js-works .line li { transition: opacity .6s; transition-delay: calc(var(--i, 0) * 420ms); }
}

/* fit: three tags */
.fit { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.fit li { padding: 10px 16px; border: 1px solid var(--line-2); font: 400 13px/1.4 var(--font-mono); letter-spacing: .06em; }
.fit li::before { content: "\2713  "; color: var(--brass); }
.wk-note { margin: 26px 0 0; max-width: 40rem; font-size: 1rem; line-height: 1.6; color: var(--oat-80); }
.wk-note b { color: var(--oat); font-weight: 500; }

/* price card and what happens next */
.card { display: grid; gap: 40px 64px; }
@media (min-width: 900px) { .card { grid-template-columns: 1fr 1fr; } }
.card dl { margin: 0; border-top: 1px solid var(--line-2); }
.card dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.card dt { font: 400 12px/1.6 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--oat-60, rgb(222 216 204 / .66)); }
.card dd { margin: 0; text-align: right; font-size: 1.05rem; }
.card dd.big { font-size: 2rem; letter-spacing: -.02em; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: "0" counter(s); grid-row: span 2; font: 400 12px/1.8 var(--font-mono); color: var(--brass); }
.steps b { font-weight: 500; }
.steps em { font-style: normal; font-size: .95rem; color: var(--oat-80); }
.steps a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* closing */
.wk-final { padding: clamp(96px, 16vh, 180px) 0; border-top: 1px solid var(--line); }
.wk-final h2 { margin: 0; max-width: 16ch; font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 400; line-height: .98; letter-spacing: -.04em; }

/* the overview hero: the podium from the start page under the workshop */
.wk-podium { display: block; width: min(820px, 100%); height: auto; margin: clamp(32px, 6vh, 64px) auto 0; opacity: .55; pointer-events: none; mask-image: linear-gradient(to top, transparent, #000 45%); }
.wk-hero .wk-wrap { position: relative; z-index: 1; }
.wk-hero--center { text-align: left; }
.wk-measure { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 26px; font: 400 12px/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--oat-45); }
.wk-measure span::before { content: ""; display: inline-block; width: 22px; height: 1px; margin: 0 10px 4px 0; vertical-align: middle; background: var(--brass); }

/* ── what you get: a full grid (2, 3 or 4 columns); the price tile fills the last row (works.js) ── */
.parts { grid-template-columns: repeat(2, 1fr) !important; }
@media (min-width: 760px) { .parts { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1100px) { .parts { grid-template-columns: repeat(4, 1fr) !important; } }
.parts span { font-size: 14px !important; line-height: 1.45 !important; color: var(--oat-60) !important; }
.parts__cta { align-content: space-between !important; gap: 18px !important; background: rgb(199 154 94 / .1) !important; }
.parts__cta b { font-size: 1.6rem !important; letter-spacing: -.02em; }
.parts__cta .wk-btn { justify-self: start; padding: 12px 16px; }
@media (max-width: 420px) { .parts li { padding: 18px 12px; } .parts b { font-size: .98rem; } }

/* ═════ the overview hero: the workshop switches on ═════
   The grid opens from the middle, a laser cuts the title letter by letter, the two products come in
   on a belt with their price counting up, light sweeps over the podium and dust drifts in it.
   Only transform and opacity move; prefers-reduced-motion shows it all at rest. */
.wk-hero--show { min-height: min(100svh, 920px); align-content: center; overflow: hidden; }
.hx-grid { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 70%, rgb(199 154 94 / .12), transparent 60%),
    linear-gradient(rgb(199 154 94 / .09) 1px, transparent 1px) 50% 50% / 48px 48px,
    linear-gradient(90deg, rgb(199 154 94 / .09) 1px, transparent 1px) 50% 50% / 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 55%, #000 30%, transparent 75%); }
.hx-text { position: relative; z-index: 2; }
.hx-title { position: relative; display: inline-block; }
.hx-cut span { display: inline-block; }
.hx-cut .sp { width: .26em; }
.hx-laser { position: absolute; left: 0; top: 52%; width: 100%; height: 2px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--brass) 70%, #fff); box-shadow: 0 0 14px 2px rgb(199 154 94 / .7); transform-origin: left; }
.hx-belt { position: relative; margin-top: 30px; padding-bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px 18px; }
.hx-belt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 14px, transparent 14px 26px); }
.hx-part { display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 16px; border: 1px solid var(--line-2); background: rgb(23 19 20 / .8); color: var(--oat); font: 400 14px/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: border-color .3s; }
.hx-part:hover { border-color: var(--brass); }
.hx-part > span { color: var(--brass); }
.hx-dim { font-style: normal; color: var(--oat-60); letter-spacing: .04em; }
.hx-dim b { font-weight: 400; color: var(--oat); }
.hx-podium { position: relative; z-index: 1; width: min(860px, 100%); margin: clamp(28px, 6vh, 64px) auto 0; padding: 0 var(--gutter); }
.hx-podium img { display: block; width: 100%; height: auto; opacity: .62; mask-image: linear-gradient(to top, transparent, #000 45%); }
.hx-sweep { position: absolute; inset: 0 var(--gutter); overflow: hidden; pointer-events: none;
  mask-image: url(/assets/arcuhn/podium.webp); mask-size: 100% 100%; -webkit-mask-image: url(/assets/arcuhn/podium.webp); -webkit-mask-size: 100% 100%; }
.hx-sweep::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(90deg, transparent, rgb(255 230 190 / .45), transparent); transform: skewX(-20deg) translateX(0); opacity: 0; }
.hx-dust { position: absolute; left: 0; right: 0; bottom: 20%; width: 100%; height: 220%; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .hx-grid { animation: gridOpen 1.6s var(--ease) both; }
  @keyframes gridOpen { from { opacity: 0; transform: scale(.35); } }
  .hx-cut span { opacity: 0; transform: translateY(.18em); animation: cut .5s var(--ease) both; animation-delay: calc(.5s + var(--i) * 60ms); }
  @keyframes cut { from { opacity: 0; transform: translateY(.18em); } to { opacity: 1; transform: none; } }
  .hx-laser { animation: laser 1.25s .45s cubic-bezier(.4, 0, .2, 1) both; }
  @keyframes laser { 0% { opacity: 0; transform: scaleX(0); } 10% { opacity: 1; } 85% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
  .hx-part { opacity: 0; transform: translateX(-120px); animation: belt .9s var(--ease) both; animation-delay: calc(1.6s + var(--i) * 220ms); }
  @keyframes belt { to { opacity: 1; transform: none; } }
  .hx-belt::after { animation: beltRun 1.4s 1.5s linear both; transform-origin: left; }
  @keyframes beltRun { from { transform: scaleX(0); } }
  .hx-podium img { animation: podiumUp 1.6s .3s var(--ease) both; }
  @keyframes podiumUp { from { opacity: 0; transform: translateY(40px) scale(.96); } }
  .hx-sweep::before { animation: sweep 6s 2s ease-in-out infinite; }
  @keyframes sweep { 0% { opacity: 0; transform: skewX(-20deg) translateX(0); } 15% { opacity: 1; } 55% { opacity: 1; transform: skewX(-20deg) translateX(480%); } 60%, 100% { opacity: 0; transform: skewX(-20deg) translateX(480%); } }
}
@media (prefers-reduced-motion: reduce) { .hx-laser, .hx-dust { display: none; } }
