/* Schrijnwerkerij Peeters — demo
   Idea: the workshop drawing. Warm paper, walnut ink, one rust-red pencil for the action.
   Type: Libre Franklin 700 / Source Serif 4 (self-hosted). Structure in common.css. */

@font-face { font-family: "Libre Franklin"; src: url("../fonts/libre-franklin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #f0eeea;
  --surface: #e5e2dc;
  --surface-2: #d9d5ce;
  --ink: #1f1b16;
  --ink-faint: #8a8172;
  --muted: #5f5649;
  --accent: #9a3b12;
  --accent-hover: #7d2f0d;
  --accent-ink: #ffffff;
  --display: "Libre Franklin", "Arial Black", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(2.25rem, 1.2rem + 3.6vw, 4.75rem);
  --margin: clamp(20px, 3vw, 48px);
  --gap: 8px;
  --section: clamp(100px, 12vw, 180px);
  --radius: 4px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 160ms;
}

/* ---------- hero ---------- */
.hero { overflow-x: clip; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding: 24px var(--margin) 64px; min-height: calc(100svh - 70px); }
.hero__kicker { font: 700 0.9375rem/1 var(--display); color: var(--accent); }
.plank { position: relative; margin-top: 18px; --cut: 0%; }
.hero__name { font-size: clamp(4.5rem, 1rem + 12vw, 12rem); line-height: 0.86; letter-spacing: -0.06em; padding: 0.04em 0 0.08em; }
.plank__rough, .plank__plane, .plank__shavings { display: none; }
html.js .plank.is-armed .plank__rough { display: block; position: absolute; inset: -6px -10px; border-radius: 3px; background: #7a3f14 url("../img/nerf-800.webp") center / cover; clip-path: inset(0 0 0 var(--cut)); cursor: pointer; }
html.js .plank.is-done .plank__rough { display: none; }
html.js .plank.is-armed .plank__plane { display: block; position: absolute; left: -60px; top: 50%; width: 120px; margin-top: -40px; pointer-events: none; z-index: 2; }
html.js .plank.is-done .plank__plane { display: none; }
html.js .plank.is-armed .plank__shavings { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.shaving { position: absolute; top: 30%; width: 34px; height: 34px; border-radius: 50%; border: 5px solid #e8c48f; border-right-color: transparent; border-bottom-color: #d6a868; scale: var(--s); animation: fly 1100ms var(--ease-out) forwards; }
@keyframes fly {
  from { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}
.hero__lead { margin-top: 26px; max-width: 30ch; font-size: var(--step-lead); line-height: 1.35; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.replay { margin-top: 18px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font: italic 400 1rem/1 var(--text); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.replay:hover { color: var(--accent); }
.hero__pic { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; }
.hero__pic img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- maatkast tekenaar ---------- */
.draw { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; padding: var(--section) var(--margin) 0; }
.draw__head { grid-column: 1 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.draw__head p { max-width: 42ch; font-size: var(--step-lead); line-height: 1.35; }
.draw__form { grid-column: 1 / 6; display: grid; gap: 26px; align-content: start; }
.draw__fig { grid-column: 6 / 13; display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: clamp(20px, 3vw, 36px); border-radius: var(--radius); background: #faf8f4; }
.cab { width: 100%; height: auto; overflow: visible; }
.cab__dims text { font: 700 13px/1 Arial, sans-serif; fill: #9a3b12; }
.cab.is-drawn [data-cab-body] { animation: settle 500ms var(--ease-out); transform-origin: 50% 100%; transform-box: fill-box; }
.cab.is-drawn .cab__dims { animation: pencil 700ms var(--ease-out); }
@keyframes settle { from { transform: scaleY(0.96); } to { transform: none; } }
@keyframes pencil { from { opacity: 0.2; } to { opacity: 1; } }
.draw__out { display: flex; flex-direction: column; gap: 10px; align-self: end; }
.draw__lbl { font: 700 0.875rem/1.2 var(--display); color: var(--muted); }
.draw__out strong { font: 700 clamp(1.375rem, 1rem + 0.9vw, 1.875rem)/1.05 var(--display); white-space: nowrap; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.draw__note { font-size: 0.9375rem; color: var(--muted); }
.draw__out .btn { margin-top: 8px; align-self: flex-start; }

/* ---------- scene 1: the wardrobe ---------- */
.build { margin-top: var(--section); background: var(--ink); color: var(--bg); }
.build__stage { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 80px var(--margin); min-height: 100svh; }
.build__list { margin-top: 32px; display: grid; gap: 18px; }
.build__list li { max-width: 42ch; padding-left: 18px; border-left: 3px solid rgba(244,239,231,0.18); color: rgba(244,239,231,0.7); transition: color 300ms, border-color 300ms; }
.build__list b { font-family: var(--display); color: var(--bg); }
.build:not(.is-live) .build__list li,
.build[data-beat="0"] [data-step="0"], .build[data-beat="1"] [data-step="1"], .build[data-beat="2"] [data-step="2"], .build[data-beat="3"] [data-step="3"] { color: var(--bg); border-color: #e0884f; }
.build__fig { display: grid; place-items: center; perspective: 1400px; }
.wb { position: relative; width: min(380px, 80%); aspect-ratio: 3 / 4; transform-style: preserve-3d; }
.wb__part, .wb__door { position: absolute; }
.wb__back { inset: 4% 5%; background: #d9b98c; }
.wb__side { top: 0; bottom: 0; width: 5%; background: #c8995f; }
.wb__side--l { left: 0; }
.wb__side--r { right: 0; }
.wb__top, .wb__bottom { left: 0; right: 0; height: 4%; background: #b5844d; }
.wb__top { top: 0; }
.wb__bottom { bottom: 0; }
.wb__shelf { left: 5%; right: 5%; height: 2.6%; background: #b5844d; }
.wb__shelf--1 { top: 26%; }
.wb__shelf--2 { top: 70%; }
.wb__rod { left: 8%; right: 8%; top: 33%; height: 1.4%; border-radius: 4px; background: #8e9399; }
.wb__inside { left: 14%; right: 14%; top: 34%; height: 34%; display: flex; justify-content: space-around; align-items: flex-start; }
.wb__inside span { width: 18%; height: 100%; border-radius: 30% 30% 6px 6px; background: #3f6f86; }
.wb__inside span:nth-child(2) { background: #e0884f; height: 86%; }
.wb__inside span:nth-child(3) { background: #f4efe7; }
.wb__inside span:nth-child(4) { background: #6b4a33; height: 92%; }
.wb__door { top: 0; bottom: 0; width: 50%; background: #c8995f; border: 3px solid #8a5a2b; }
.wb__door i { position: absolute; top: 46%; width: 4px; height: 12%; border-radius: 2px; background: #1f1b16; }
.wb__door--l { left: 0; transform-origin: 0 50%; }
.wb__door--l i { right: 10px; }
.wb__door--r { right: 0; transform-origin: 100% 50%; }
.wb__door--r i { left: 10px; }
.build:not(.is-live) .wb__door--l { transform: rotateY(-105deg); }
.build:not(.is-live) .wb__door--r { transform: rotateY(105deg); }

/* ---------- before / after ---------- */
.reveal { padding: var(--section) var(--margin) 0; }
.reveal__head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 40px; }
.reveal__head p { max-width: 42ch; font-size: var(--step-lead); line-height: 1.35; }
.reveal__note { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }

/* ---------- scene 2 ---------- */
.tools { margin-top: var(--section); }

@media (max-width: 1080px) {
  .draw__form, .draw__fig { grid-column: 1 / 13; }
}
@media (max-width: 899px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 40px; }
  .hero__pic { aspect-ratio: 4 / 3; }
  .draw__head, .reveal__head { grid-template-columns: 1fr; }
  .draw__fig { grid-template-columns: 1fr; }
  .build__stage { grid-template-columns: 1fr; gap: 24px; padding: 56px var(--margin); }
  .build.is-live .build__list li { display: none; }
  .build.is-live[data-beat="0"] [data-step="0"], .build.is-live[data-beat="1"] [data-step="1"], .build.is-live[data-beat="2"] [data-step="2"], .build.is-live[data-beat="3"] [data-step="3"] { display: block; }
  .build.is-live .wb { width: min(240px, 60%); }
}
@media (max-width: 767px) {
  .hero__name { font-size: 24vw; }
  .ba__tag { font-size: 0.75rem; }
}
