/* Robot Toes arcade. Layers on top of /styles.css (tokens, type, header,
   buttons, eyebrows, footer) and adds the cabinet list and the cabinet shell
   that frames a canvas game. No inline styles anywhere: the CSP is
   style-src 'self', so every runtime value travels through a CSS custom
   property or a class set from JavaScript. */

/* ---------- header: sticky, same treatment as the cards page ---------- */
.site-header { position: sticky; top: 0; background: linear-gradient(to bottom, rgba(7, 8, 15, .94), rgba(7, 8, 15, .72)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------- hero ---------- */
.arcade-hero { min-height: auto; display: block; padding: clamp(6rem, 11vw, 9rem) max(1.25rem, calc((100vw - var(--max)) / 2)) clamp(2.5rem, 5vw, 4rem); background: transparent; color: var(--ink); }
.arcade-hero .hero-content { width: auto; margin: 0; padding: 0; }
.arcade-hero h1 { margin: 0 0 1.2rem; font-size: clamp(2.3rem, 6vw, 4.4rem); }
.arcade-hero .hero-copy { max-width: 560px; }

/* ---------- cabinet list ---------- */
.arcade-section { background: var(--band-light); }
.arcade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.cabinet-card { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); transition: transform .3s var(--ease-out), border-color .3s ease, box-shadow .3s ease; }
.cabinet-card:hover { transform: translateY(-4px); border-color: rgba(79, 242, 255, .45); box-shadow: 0 24px 70px -30px rgba(79, 242, 255, .5); }
.cabinet-card.soon { opacity: .72; }
.cabinet-card.soon:hover { transform: none; border-color: var(--line); box-shadow: var(--shadow); }
.cabinet-tag { display: inline-flex; align-items: center; gap: .5rem; color: var(--foil-1); font: 600 .58rem/1 var(--label); letter-spacing: .24em; text-transform: uppercase; }
.cabinet-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--foil-1); box-shadow: 0 0 10px var(--foil-1); }
.cabinet-card.soon .cabinet-tag { color: var(--dim); }
.cabinet-card.soon .cabinet-tag i { background: var(--dim); box-shadow: none; }
.cabinet-card h3 { margin: 0; font: 700 1.5rem/1.05 var(--display); letter-spacing: -.02em; }
.cabinet-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.cabinet-card .button { margin-top: auto; align-self: start; }
.cabinet-art { position: relative; height: 132px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(circle at 50% 120%, rgba(45, 60, 255, .3), transparent 62%), linear-gradient(160deg, var(--surface-2), var(--bg)); }
.cabinet-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cabinet-facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.cabinet-facts li { padding: .3rem .6rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); font: 600 .56rem/1.4 var(--label); letter-spacing: .14em; text-transform: uppercase; }

.notes-section { background: var(--band-dark); }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; padding: 0; margin: 0; list-style: none; }
.notes-grid li { padding: 1.4rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.notes-grid h3 { margin: 0 0 .6rem; font: 700 1.05rem/1.2 var(--display); letter-spacing: -.01em; }
.notes-grid p { margin: 0; color: var(--muted); font-size: .86rem; }

/* ---------- the cabinet: a table canvas with an instrument rail ---------- */
.table-section .section-heading { margin-bottom: 1.5rem; }
.table-section { padding-block: clamp(2rem, 4vw, 3.25rem) clamp(3rem, 6vw, 5rem); background: var(--band-light); border-top: 0; }
.cabinet { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.cabinet-rail { position: relative; padding: 1.8rem; overflow: hidden; border-right: 1px solid var(--line); background: linear-gradient(155deg, var(--surface-2), var(--bg-2)); }
.cabinet-rail::after { content: ""; position: absolute; left: -110px; bottom: -110px; width: 260px; height: 260px; border: 1px solid rgba(79, 242, 255, .16); border-radius: 50%; box-shadow: 0 0 0 36px rgba(79, 242, 255, .025), 0 0 0 72px rgba(79, 242, 255, .025); }
.rail-topline { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.6rem; color: var(--foil-1); font: 600 .62rem/1 var(--label); letter-spacing: .2em; text-transform: uppercase; }

.readouts { position: relative; z-index: 2; margin: 0 0 1.5rem; border-top: 1px solid var(--line); }
.readouts div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.readouts dt { color: var(--muted); font: 500 .62rem/1.4 var(--label); letter-spacing: .16em; text-transform: uppercase; }
.readouts dd { margin: 0; color: var(--ink); font: 700 1.05rem/1 var(--display); font-variant-numeric: tabular-nums; }
.readouts .readout-best dd { color: var(--foil-3); font-size: .84rem; }
.readouts .readout-balls dd { color: var(--foil-1); letter-spacing: .1em; }

.cabinet-status { position: relative; z-index: 2; min-height: 3.6em; padding: .7rem .85rem; margin-bottom: 1.3rem; border-left: 3px solid var(--foil-2); border-radius: 0 10px 10px 0; background: rgba(255, 255, 255, .04); color: var(--ink-2); font: 600 .72rem/1.5 var(--label); letter-spacing: .03em; }
.cabinet-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.6rem; }
.cabinet-actions .button { min-height: 40px; padding: .6rem 1rem; font-size: .66rem; }
.cabinet-actions .button[aria-pressed="true"] { border-color: var(--foil-1); color: var(--foil-1); }

.controls-list { position: relative; z-index: 2; margin: 0; border-top: 1px solid var(--line); }
.controls-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.controls-list dt { color: var(--muted); font: 500 .62rem/1.4 var(--label); letter-spacing: .12em; text-transform: uppercase; }
.controls-list dd { margin: 0; color: var(--ink-2); font: 700 .66rem/1.4 var(--label); letter-spacing: .06em; text-align: right; }
.controls-list kbd { display: inline-block; padding: .1rem .38rem; border: 1px solid var(--line-2); border-radius: 5px; background: var(--bg); color: var(--ink); font: 700 .62rem/1.4 var(--label); }

.cabinet-stage { display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 50% 30%, rgba(45, 60, 255, .16), transparent 58%); }
.cabinet-frame { position: relative; width: 100%; max-width: min(100%, calc((100dvh - 360px) * 0.682)); aspect-ratio: 600 / 880; border-radius: 16px; }
.cabinet-frame::before { content: ""; position: absolute; inset: -10px; border: 1px solid rgba(79, 242, 255, .18); border-radius: 22px; box-shadow: 0 0 60px -18px rgba(79, 242, 255, .5); pointer-events: none; }
.cabinet-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 16px; background: transparent; cursor: pointer; touch-action: none; }
.cabinet-canvas:focus-visible { outline: 2px solid var(--foil-1); outline-offset: 6px; }
.stage-fallback { margin: 0; padding: 2rem; color: var(--muted); text-align: center; }

.touch-bar { display: none; gap: .6rem; width: 100%; margin-top: 1rem; }
.touch-bar button { flex: 1; min-height: 62px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--ink-2); font: 700 .64rem/1.2 var(--label); letter-spacing: .16em; text-transform: uppercase; touch-action: none; }
.touch-bar button:active { border-color: var(--foil-1); color: var(--foil-1); background: var(--surface-2); }

.credit-line { margin: 1.6rem 0 0; color: var(--dim); font: 500 .68rem/1.6 var(--label); letter-spacing: .06em; }
.credit-line a { color: var(--muted); }

@media (max-width: 960px) {
  .cabinet { grid-template-columns: 1fr; }
  .cabinet-rail { order: 2; border-right: 0; border-top: 1px solid var(--line); }
  .cabinet-stage { padding: 1rem; }
  .cabinet-frame { max-width: min(100%, calc((100dvh - 200px) * 0.682)); }
  .touch-bar { display: flex; }
}

@media (max-width: 720px) {
  .arcade-hero { padding-top: 7rem; }
  .table-section { padding-inline: .9rem; }
  .cabinet-rail { padding: 1.3rem; }
  .readouts div, .controls-list div { padding-block: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cabinet-card:hover { transform: none; }
}
body.reduce-motion .cabinet-card:hover { transform: none; }
