/* ==========================================================================
   Landing page. The page is a dark room with one light: amber only where the
   LED lights something, cut red and engrave blue only where a laser file would
   use them. Archivo's width axis does the talking: wide for chapter titles,
   condensed for the readouts, like an instrument.
   ========================================================================== */
.landing { --gut: clamp(16px, 6vw, 96px); --num: "tnum" 1, "lnum" 1; }
.landing .site-nav { background: rgba(14, 16, 19, .86); backdrop-filter: blur(10px); }

/* hero tweaks over site.css */
.landing .hero h1 { font-stretch: 110%; max-width: 17ch; font-size: clamp(34px, 3.9vw, 54px); }

/* --------------------------------------------------------------------------
   The process: a rail of the five steps beside the chapters
   -------------------------------------------------------------------------- */
.process {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(24px, 4vw, 64px);
  padding: 0 var(--gut); border-top: 1px solid rgba(255, 255, 255, .05);
}
.rail { position: relative; }
.rail ol { position: sticky; top: 112px; list-style: none; margin: 120px 0 0; padding: 0; display: grid; gap: 4px; }
.rail a {
  display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--text-3); text-decoration: none;
  font-weight: 560; font-size: var(--fs-l); transition: color .2s;
}
.rail a span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-3); font-size: var(--fs-s); font-weight: 650; font-feature-settings: var(--num);
  transition: border-color .2s, background .2s, color .2s;
}
.rail a:hover { color: var(--text-1); }
.rail a.on { color: var(--text-1); }
.rail a.on span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.rail a.done span { border-color: rgba(243, 181, 91, .55); color: var(--accent); }

.process-lead { margin: 0; padding: 112px 0 0; max-width: 56ch; color: var(--text-3); font-size: var(--fs-l); line-height: 1.6; }

.chapter {
  display: grid; grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px);
  align-items: start; padding: clamp(56px, 8vw, 112px) 0; scroll-margin-top: 64px;
}
.chapter + .chapter { border-top: 1px solid rgba(255, 255, 255, .05); }
.chapter-wide { grid-template-columns: minmax(0, 1fr); }
.chapter-wide .ch-copy { max-width: 720px; }
.ch-copy { position: sticky; top: 112px; }
.ch-n { margin: 0 0 14px; color: var(--accent); font-weight: 640; font-stretch: 80%; font-size: var(--fs-l); }
.chapter h2, .everything h2, .closer h2 {
  margin: 0; font-size: clamp(26px, 2.25vw, 34px); line-height: 1.1; letter-spacing: -.015em;
  font-weight: 740; font-stretch: 112%; text-wrap: balance;
}
.ch-copy > p:not(.ch-n) { margin: 18px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.62; max-width: 46ch; }
.ch-copy > .ch-aside { color: var(--text-3); font-size: var(--fs-m); }

/* a scene is a window into the dark room */
.scene { position: relative; border-radius: 10px; background: #000; border: 1px solid var(--line); overflow: hidden; }
.scene-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding: 16px 18px; background: var(--surface-0); border-top: 1px solid var(--line); }

/* readouts: condensed numerals, like a meter */
.readout { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.readout dt { color: var(--text-3); font-size: var(--fs-s); }
.readout dd { margin: 2px 0 0; font-size: 22px; font-weight: 640; font-stretch: 72%; font-feature-settings: var(--num); color: var(--text-1); letter-spacing: .005em; }
.readout dd small { font-size: 14px; color: var(--text-3); font-weight: 520; margin-left: 2px; }
.readout-col { flex-direction: column; gap: 14px; }
.readout .warm { color: var(--accent); }

/* --------------------------------------------------------------------------
   1 · compare: drawing vs simulated wall
   -------------------------------------------------------------------------- */
.scene-compare { background: #000; }
.compare-stage { position: relative; aspect-ratio: 901 / 877; margin: 0 auto; max-width: 100%; cursor: ew-resize; touch-action: pan-y; user-select: none; --x: 50%; outline: none; }
.compare-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.compare-art-clip { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 0; border-left: 1.5px solid rgba(255, 236, 205, .85); pointer-events: none; }
.compare-handle span {
  position: absolute; top: 50%; left: 0; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 6px rgba(243, 181, 91, .18), 0 4px 18px rgba(0, 0, 0, .5);
}
.compare-handle span::before, .compare-handle span::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 5px solid transparent; transform: translateY(-50%);
}
.compare-handle span::before { left: 6px; border-right-color: var(--accent-ink); }
.compare-handle span::after { right: 6px; border-left-color: var(--accent-ink); }
.compare-stage:focus-visible .compare-handle span { box-shadow: 0 0 0 3px var(--select), 0 4px 18px rgba(0, 0, 0, .5); }
.compare-tag {
  position: absolute; top: 14px; padding: 4px 10px; border-radius: 12px; font-size: var(--fs-s); font-weight: 600; pointer-events: none;
  background: rgba(14, 16, 19, .72); color: var(--text-1); backdrop-filter: blur(6px);
}
.tag-art { left: 14px; } .tag-wall { right: 14px; }

.picker { display: flex; gap: 6px; flex-wrap: wrap; }
.picker button {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 18px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-weight: 560; font-size: var(--fs-m);
}
.picker button img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #f6ecdc; }
.picker button:hover { border-color: var(--line-3); color: var(--text-1); }
.picker button[aria-checked="true"] { border-color: var(--accent); color: var(--text-1); background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   2 · place: drag the box, the generator's runs swap in
   -------------------------------------------------------------------------- */
.scene-place { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, 1fr); align-items: center; }
.place-wall { position: relative; touch-action: none; }
.place-wall img, .place-net img { display: block; width: 100%; height: auto; transition: opacity .35s var(--ease); }
.place-wall img.next, .place-net img.next { position: absolute; left: 0; top: 0; opacity: 0; }
.place-box {
  position: absolute; border: 2px solid var(--accent); border-radius: 2px; cursor: grab; outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 0 28px rgba(243, 181, 91, .35); transition: left .45s var(--ease), top .45s var(--ease);
  display: grid; place-items: center;
}
.place-box span { padding: 3px 8px; border-radius: 10px; background: rgba(14, 16, 19, .78); color: var(--accent-hi); font-size: var(--fs-s); font-weight: 650; }
.place-box.dragging { cursor: grabbing; transition: none; }
.place-box:focus-visible { box-shadow: 0 0 0 3px var(--select); }
.place-side { align-self: stretch; display: grid; align-content: start; gap: 20px; padding: 22px 22px 24px; background: var(--surface-0); border-left: 1px solid var(--line); }
.place-net { margin: 0; position: relative; }
.place-net img { aspect-ratio: 1; object-fit: contain; }
.place-net figcaption { margin-top: 8px; color: var(--text-3); font-size: var(--fs-s); }

/* --------------------------------------------------------------------------
   3 · shapes
   -------------------------------------------------------------------------- */
.shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.shape { margin: 0; }
.shape-img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.shape-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shape figcaption { display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; margin-top: 14px; }
.shape figcaption svg { grid-row: span 3; width: 30px; height: 30px; fill: none; stroke: var(--text-2); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.shape h3 { margin: 0; font-size: var(--fs-l); font-weight: 680; font-stretch: 110%; }
.shape p { margin: 0; color: var(--text-2); font-size: var(--fs-m); line-height: 1.45; }
.shape .shape-match { color: var(--text-3); font-size: var(--fs-s); font-feature-settings: var(--num); }

/* --------------------------------------------------------------------------
   4 · the manufacturing check
   -------------------------------------------------------------------------- */
.advice { margin: 28px 0 0; padding: 14px 16px; border-left: 2px solid var(--warn); background: var(--warn-soft); border-radius: 0 var(--r3) var(--r3) 0; }
.advice figcaption { color: var(--text-3); font-size: var(--fs-s); }
.advice blockquote { margin: 6px 0 0; color: var(--text-1); font-size: var(--fs-l); line-height: 1.5; }

.scene-check { background: var(--surface-0); }
.check-verdict { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.check-verdict .verdict-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.check-verdict.v-warn .verdict-icon { background: var(--warn-soft); color: var(--warn); }
.check-verdict.v-good .verdict-icon { background: var(--good-soft); color: var(--good); }
.check-verdict b { display: block; font-size: var(--fs-xl); font-weight: 700; font-stretch: 108%; }
.check-verdict small { color: var(--text-2); font-size: var(--fs-m); }
.check-body { display: grid; grid-template-columns: minmax(250px, 5fr) minmax(0, 7fr); }
.check-list { list-style: none; margin: 0; padding: 10px; display: grid; gap: 2px; align-content: start; border-right: 1px solid var(--line); }
.check-list button {
  display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r3);
  border: 1px solid transparent; background: none; color: var(--text-1);
}
.check-list button:hover { background: var(--surface-2); }
.check-list button[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line-3); }
.check-list .i { margin-top: 2px; }
.check-list .c-good .i { color: var(--good); } .check-list .c-warn .i { color: var(--warn); }
.check-list b { font-weight: 620; font-size: var(--fs-m); }
.check-list em { font-style: normal; font-weight: 650; font-stretch: 75%; font-size: var(--fs-l); font-feature-settings: var(--num); }
.check-list small { grid-column: 2 / 4; color: var(--text-3); font-size: var(--fs-s); line-height: 1.45; }

.check-panels { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; }
.panel-row { display: grid; gap: 4px; }
.panel-row header { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: var(--fs-s); }
.panel-row header span:last-child { color: var(--text-3); font-feature-settings: var(--num); }
.panel-row svg { display: block; width: 100%; height: auto; overflow: visible; }
.check-panels .p-wood { stroke: none; }
.check-panels .p-isl { fill: var(--wood); }
.check-panels .p-islands, .check-panels .p-bridges, .check-panels .p-thin { transition: opacity .3s, fill-opacity .3s; }
.check-panels .p-islands { fill: none; stroke-width: 1px; opacity: .35; }
.check-panels .p-bridges { stroke: var(--ov-bridge); stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.check-panels .p-bridges, .check-panels .p-thin { opacity: .7; }
.check-panels[data-focus] .p-islands, .check-panels[data-focus] .p-bridges, .check-panels[data-focus] .p-thin { opacity: .12; }
.check-panels[data-focus="islands"] .p-islands { opacity: 1; }
.check-panels[data-focus="islands"] .p-bridges, .check-panels[data-focus="bridges"] .p-bridges { opacity: 1; }
.check-panels[data-focus="thin"] .p-thin { opacity: 1; }
.check-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; color: var(--text-3); font-size: var(--fs-s); }
.check-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: -1px; }

/* --------------------------------------------------------------------------
   5 · the laser job
   -------------------------------------------------------------------------- */
.scene-cut { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px, 1fr); background: #050505; }
.scene-cut { align-items: center; }
.laser { position: relative; padding: clamp(14px, 2vw, 24px); }
.laser-sheet { position: relative; aspect-ratio: 1; border-radius: 3px; background: #15120f; box-shadow: inset 0 0 0 1px #2a2520; }
.laser-sheet svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.laser-sheet #engrave { fill: #4d7dff; fill-opacity: .5; }
.laser-sheet .cut-done { fill: none; stroke: var(--cut); stroke-width: .55; }
.laser-sheet .cut-live { fill: none; stroke: #ffd2c4; stroke-width: .8; filter: drop-shadow(0 0 1.2px var(--cut)); }
.laser-sheet #labels text { fill: #3cc56c; opacity: .8; }
.laser-sheet #labels path { fill: none; stroke: #3cc56c; stroke-width: .3; opacity: .8; }
.laser-sheet .head { fill: #fff; filter: drop-shadow(0 0 2px #ff6a4d) drop-shadow(0 0 5px #ff3b2a); }
.laser-replay { position: absolute; right: clamp(22px, 2.6vw, 34px); bottom: clamp(22px, 2.6vw, 34px); background: rgba(14, 16, 19, .85); }
.job { align-self: stretch; display: grid; align-content: start; gap: 22px; padding: 24px 22px; background: var(--surface-0); border-left: 1px solid var(--line); }
.job-clock { display: grid; }
.job-clock span { font-size: 52px; line-height: 1; font-weight: 600; font-stretch: 66%; font-feature-settings: var(--num); color: var(--text-1); }
.job-clock small { margin-top: 6px; color: var(--text-3); font-size: var(--fs-s); }
.files { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.files li { color: var(--text-2); font-size: var(--fs-m); padding-left: 16px; position: relative; line-height: 1.5; }
.files li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 1px; background: var(--cut); }
.files li:nth-child(2)::before { background: var(--engrave); }
.files li:nth-child(3)::before { background: #2a2622; box-shadow: inset 0 0 0 1px var(--line-3); }
.files li:nth-child(4)::before { background: var(--accent); }
.files b { color: var(--text-1); font-weight: 620; }

/* --------------------------------------------------------------------------
   What it handles: an index, not a card grid
   -------------------------------------------------------------------------- */
.everything { padding: clamp(72px, 9vw, 128px) var(--gut); border-top: 1px solid rgba(255, 255, 255, .05); }
.index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 48px); margin-top: 48px; }
.index h3 { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line-3); font-size: var(--fs-l); font-weight: 680; font-stretch: 112%; color: var(--accent); }
.index dl { margin: 0; display: grid; gap: 18px; }
.index dt { color: var(--text-1); font-weight: 620; }
.index dd { margin: 3px 0 0; color: var(--text-3); line-height: 1.5; font-size: var(--fs-m); }

/* closing call */
.closer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding: clamp(56px, 7vw, 96px) var(--gut); border-top: 1px solid rgba(255, 255, 255, .05); background: radial-gradient(ellipse 50% 120% at 85% 50%, rgba(243, 181, 91, .09), transparent 70%); }
.closer h2 { max-width: 20ch; }

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .process { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .chapter { grid-template-columns: minmax(0, 1fr); }
  .ch-copy { position: static; max-width: 640px; }
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}
@media (max-width: 860px) {
  .process-lead { padding-top: 64px; }
  .scene-place, .scene-cut { grid-template-columns: minmax(0, 1fr); }
  .place-side, .job { border-left: 0; border-top: 1px solid var(--line); }
  .place-side { grid-template-columns: 1fr 1fr; align-items: start; }
  .shapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check-body { grid-template-columns: minmax(0, 1fr); }
  .check-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .job-clock span { font-size: 40px; }
  .job { grid-template-columns: auto 1fr; gap: 20px 28px; }
}
@media (max-width: 560px) {
  .index { grid-template-columns: minmax(0, 1fr); }
  .place-side { grid-template-columns: minmax(0, 1fr); }
  .job { grid-template-columns: minmax(0, 1fr); }
  .readout { gap: 6px 20px; }
  .readout dd { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .place-box, .place-wall img, .rail a span { transition: none; }
}
