/* ─────────────────────────────────────────────────────────────
   arcade.css — Arcade cabinet project page, michell.info style.
   Interactive CSS-3D concept viewer + shared project sections.
   ───────────────────────────────────────────────────────────── */

/* ── Page header (matches the rest of the site) ── */
.page-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(110px, 14vw, 170px) var(--pad-x) clamp(28px, 4vw, 48px);
}
.crumbs {
  font-family: "Geist Mono", monospace; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.crumbs a { color: var(--ink-2); transition: color .2s; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: 0.5; }

h1.page-title {
  font-family: "Instrument Serif", serif; font-weight: 400;
  font-size: clamp(64px, 10vw, 150px);
  line-height: 0.92; letter-spacing: -0.02em;
  margin: 0 0 18px 0;
}
h1.page-title .it { color: var(--ink-2); }
.page-lede {
  font-family: "Instrument Serif", serif;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.25; color: var(--ink-2);
  max-width: 44ch; margin: 0;
}

.play-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(60px, 9vw, 110px);
}

.mono { font-family: "Geist Mono", monospace; }

/* ═══════════════════════════════════════════════════════════════
   Interactive 3D concept viewer
   A deliberate "viewport" surface (dark in both themes) so the
   glowing wireframe model reads clearly. CSS-3D, no dependencies.
   ═══════════════════════════════════════════════════════════════ */
.viewer-stage {
  position: relative;
  width: 100%;
  height: clamp(440px, 62vh, 640px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 18%, oklch(0.26 0.03 250 / 0.55), transparent 60%),
    radial-gradient(100% 100% at 50% 120%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 55%),
    linear-gradient(180deg, #0c1018, #070a0f);
  cursor: grab;
  touch-action: none;
  user-select: none;
  perspective: 1500px;
  perspective-origin: 50% 42%;
  isolation: isolate;
}
.viewer-stage.grabbing { cursor: grabbing; }

/* faint blueprint grid wash over the whole stage */
.viewer-stage::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 16%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 16%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 78%);
          mask-image: radial-gradient(120% 80% at 50% 35%, #000 30%, transparent 78%);
  opacity: 0.5;
}

.viewer-world {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── 3D primitives (built by viewer.js) ── */
.v-box { position: absolute; transform-style: preserve-3d; }
.v-face {
  position: absolute; left: 50%; top: 50%;
  background: color-mix(in oklab, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 50%, transparent);
  box-shadow:
    inset 0 0 22px color-mix(in oklab, var(--accent) 16%, transparent),
    0 0 1px color-mix(in oklab, var(--accent) 60%, transparent);
  backface-visibility: visible;
}
.v-face.dim { background: color-mix(in oklab, var(--accent) 5%, transparent); border-color: color-mix(in oklab, var(--accent) 30%, transparent); }

/* screen panel highlight */
.v-screen {
  position: absolute; inset: 12% 10%;
  border-radius: 3px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 2px, transparent 2px 4px),
    linear-gradient(150deg, color-mix(in oklab, var(--accent) 70%, #fff) , color-mix(in oklab, var(--accent) 40%, #000));
  box-shadow: 0 0 26px color-mix(in oklab, var(--accent) 60%, transparent);
}
/* marquee label */
.v-marquee {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: "Geist Mono", monospace; font-weight: 600;
  font-size: 15px; letter-spacing: 0.32em; color: #fff;
  text-shadow: 0 0 12px color-mix(in oklab, var(--accent) 90%, transparent);
}
/* control-deck buttons hint */
.v-controls { position: absolute; inset: 0; display: flex; gap: 9px; align-items: center; justify-content: center; }
.v-controls i {
  width: 11px; height: 11px; border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 80%, #fff);
  box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 80%, transparent);
}
.v-controls .stick { width: 6px; height: 18px; border-radius: 4px; background: #fff; opacity:.85; margin-right: 6px; }

/* floor grid plane */
.v-floor {
  position: absolute; left: 50%; top: 50%;
  background-image:
    linear-gradient(color-mix(in oklab, var(--accent) 34%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in oklab, var(--accent) 34%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 70%);
          mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 70%);
}

/* ── Viewer overlay chrome (2D, not transformed) ── */
.v-overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.v-tag {
  position: absolute; font-family: "Geist Mono", monospace;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(225,235,245,.62);
}
.v-tag.tl { top: 16px; left: 18px; }
.v-tag.tr { top: 16px; right: 18px; color: color-mix(in oklab, var(--accent) 70%, #fff); }
.v-tag.bl { bottom: 16px; left: 18px; }
.v-hint {
  position: absolute; bottom: 16px; right: 18px;
  display: flex; align-items: center; gap: 8px;
  font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: rgba(225,235,245,.62);
}
.v-hint .ic { width: 14px; height: 14px; opacity: .8; }
/* dimension bracket on the right */
.v-dim {
  position: absolute; top: 50%; right: 46px; transform: translateY(-50%);
  height: 56%; width: 14px; pointer-events: none;
  border-right: 1px solid rgba(225,235,245,.28);
  border-top: 1px solid rgba(225,235,245,.28);
  border-bottom: 1px solid rgba(225,235,245,.28);
}
.v-dim span {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%) rotate(0deg);
  white-space: nowrap; font-family: "Geist Mono", monospace; font-size: 10px;
  letter-spacing: 0.08em; color: rgba(225,235,245,.55);
}
@media (max-width: 620px) { .v-dim { display: none; } .v-tag.bl { display: none; } }

/* the "model coming" note pinned under the viewer */
.viewer-note {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  font-family: "Geist Mono", monospace; font-size: 11px;
  letter-spacing: 0.04em; color: var(--ink-3);
}
.viewer-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; box-shadow: 0 0 8px var(--warn); }

/* ═══════════════════════════════════════════════════════════════
   Shared project sections — Status · Workshop · Gallery
   (same system as the rest of the site)
   ═══════════════════════════════════════════════════════════════ */
.stand-body { display: grid; gap: clamp(26px, 4vw, 40px); }
.stand-lede {
  font-family: "Instrument Serif", serif;
  font-size: clamp(20px, 2.1vw, 28px); line-height: 1.35;
  color: var(--ink); margin: 0; max-width: 48ch;
}
.stand-lede .it { color: var(--ink-2); }

.prog { max-width: 520px; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.prog-label { font-size: 13px; color: var(--ink-2); }
.prog-val { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.prog-track { height: 8px; border-radius: 999px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.prog-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--good)));
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.prog-stage { margin-top: 11px; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; }

.miles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 520px; }
.mile { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.miles .mile:last-child { border-bottom: none; }
.mile-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1.5px solid var(--line-strong); background: var(--bg); position: relative; transition: all .3s; }
.mile.done { color: var(--ink); }
.mile.done .mile-dot { background: var(--good); border-color: var(--good); }
.mile.done .mile-dot::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 8px; color: var(--bg); font-weight: 700; }
.mile.now { color: var(--ink); }
.mile.now .mile-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mile.now .mile-txt { font-weight: 500; }

.shop-body { display: grid; gap: clamp(34px, 5vw, 52px); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.flow-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 18px 0; border-top: 1px solid var(--line); }
.flow-step:first-child { border-top: none; }
.flow-no { font-size: 13px; color: var(--ink-3); padding-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: 0.05em; }
.flow-txt h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: clamp(20px, 2vw, 26px); margin: 0 0 6px 0; color: var(--ink); }
.flow-txt p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 52ch; line-height: 1.55; }

.tools-head { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px 0; font-weight: 500; }
.tool-grid { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
.tool { background: var(--bg-2); padding: 16px 18px; display: grid; gap: 5px; }
.tool dt { font-family: "Geist Mono", monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.tool dd { margin: 0; font-size: 15px; color: var(--ink); }
.tool dd:empty::after, .tool dd[data-empty]::after { content: attr(data-placeholder); color: var(--ink-3); font-style: italic; font-family: "Instrument Serif", serif; font-size: 16px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shot { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); cursor: none; aspect-ratio: 4 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .4s; }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 12px; font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.03em; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.shot:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery.is-empty { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.shot-empty { aspect-ratio: 4 / 3; border-radius: var(--radius); border: 1.5px dashed var(--line-strong); background: var(--bg-2); display: grid; place-items: center; text-align: center; padding: 20px; }
.shot-empty span { font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: 0.04em; color: var(--ink-3); line-height: 1.6; max-width: 24ch; }
.shot-empty .ico { font-size: 22px; opacity: 0.4; margin-bottom: 8px; display: block; }

.lightbox { position: fixed; inset: 0; z-index: 120; display: none; place-items: center; padding: 5vh 5vw; background: rgba(8, 10, 14, 0.92); backdrop-filter: blur(4px); }
.lightbox.open { display: grid; }
.lb-fig { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; }
.lb-fig img { max-width: 100%; max-height: 80vh; border-radius: 8px; image-rendering: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-fig figcaption { color: #cfe0ee; font-size: 12px; letter-spacing: 0.04em; text-align: center; }
.lb-close { position: fixed; top: 20px; right: 24px; z-index: 121; width: 42px; height: 42px; border-radius: 50%; cursor: none; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); font-size: 16px; transition: background .2s; }
.lb-close:hover { background: rgba(255,255,255,.2); }
