/* Andon Deck – sibling of make-mcp.net: same type, same calm, plus the three andon lights. */
:root {
  --bg: #141413;
  --bg-2: #1c1b19;
  --bg-3: #262522;
  --line: #3a3833;
  --fg: #f0eee6;
  --muted: #a8a49a;
  --dim: #75716a;
  --accent: #e8a33d;      /* andon amber: "someone is needed" */
  --accent-2: #f2c27a;
  --clawd: #d97757;
  --ok: #4c9a6a;          /* andon green */
  --ok-2: #8fbf7f;
  --stop: #d1483f;        /* andon red */
  --blue: #8fb3d9;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.65 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { color: var(--accent-2); font-family: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.accent { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 4px 10px; }
.skip:focus { left: 8px; z-index: 10; }

/* the brand mark: three andon lights, cycling */
.lamp { display: inline-flex; gap: 3px; vertical-align: -1px; }
.lamp i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); }
.lamp i:nth-child(1) { animation: lamp-g 6s infinite; }
.lamp i:nth-child(2) { animation: lamp-a 6s infinite; }
.lamp i:nth-child(3) { animation: lamp-r 6s infinite; }
@keyframes lamp-g { 0%, 55% { background: var(--ok); box-shadow: 0 0 8px var(--ok); } 60%, 100% { background: var(--bg-3); box-shadow: none; } }
@keyframes lamp-a { 0%, 55% { background: var(--bg-3); box-shadow: none; } 60%, 92% { background: var(--accent); box-shadow: 0 0 8px var(--accent); } 96%, 100% { background: var(--bg-3); } }
@keyframes lamp-r { 0%, 92% { background: var(--bg-3); } 94%, 98% { background: var(--stop); box-shadow: 0 0 8px var(--stop); } 100% { background: var(--bg-3); } }
@media (prefers-reduced-motion: reduce) { .lamp i { animation: none; } .lamp i:nth-child(1) { background: var(--ok); } }

/* nav */
.top { position: sticky; top: 0; z-index: 5; background: rgb(20 20 19 / .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--bg-3); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { color: var(--fg); font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.links { display: flex; gap: 18px; font-size: 13px; align-items: center; }
.links a { color: var(--muted); }
.links a:hover { color: var(--fg); text-decoration: none; }
@media (max-width: 640px) { .links > a { display: none; } .links { gap: 12px; } }

/* hero */
.hero { padding: 72px 16px 40px; }
.hero, .demo, .split, .cards { min-width: 0; }
.logo { margin: 0 0 22px; font-size: clamp(12px, 3.6vw, 28px); line-height: 1.15; color: var(--fg); white-space: pre; overflow: hidden; }
.kicker { color: var(--clawd); font-size: 13px; margin: 0 0 10px; }
h1 { font-size: clamp(26px, 5vw, 44px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.02em; }
h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); max-width: 720px; margin: 0 0 32px; font-size: 16px; }
.lead b { color: var(--fg); font-weight: 400; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 700; }
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn-ghost { background: none; color: var(--fg); border: 1px solid var(--line); font-weight: 400; }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--dim); }
.works { color: var(--dim); font-size: 13px; margin: 18px 0 0; }
.works b { color: var(--muted); font-weight: 400; }

/* the deck */
.demo { margin-top: 24px; }
.deck-frame { background: #0c0c0b; border: 1px solid var(--line); border-radius: 18px; padding: 0 0 14px;
  box-shadow: 0 30px 80px -30px rgb(232 163 61 / .28), 0 0 0 1px rgb(0 0 0 / .3); }
.deck-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--bg-3); }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.deck-title { color: var(--dim); font-size: 12px; flex: 1; }
.replay { font: 12px var(--mono); color: var(--dim); background: none; border: 0; cursor: pointer; }
.replay:hover { color: var(--fg); }
.deck { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(5px, 1.4vw, 14px); padding: clamp(12px, 3vw, 28px); }
.deck img, .key { display: block; width: 100%; aspect-ratio: 1; border-radius: 12%; background: #000;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .04), 0 2px 0 rgb(0 0 0 / .6); transition: transform .12s, box-shadow .12s; }
.deck img.pressed { transform: scale(.9); box-shadow: 0 0 0 3px var(--accent), 0 0 24px rgb(232 163 61 / .6); }
.deck-caption { margin: 0 clamp(12px, 3vw, 28px); min-height: 3.3em; color: var(--fg); font-size: 14px; }
.deck-steps { list-style: none; display: flex; gap: 6px; margin: 8px clamp(12px, 3vw, 28px) 0; padding: 0; }
.deck-steps li { flex: 1; height: 3px; border-radius: 2px; background: var(--bg-3); overflow: hidden; position: relative; }
.deck-steps li.done { background: var(--dim); }
.deck-steps li.now::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: fillbar var(--ms, 4s) linear forwards; transform-origin: left; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 560px) { .deck { gap: 4px; padding: 10px; } .deck-caption { font-size: 13px; } }

/* manifesto */
.manifesto { padding-top: 88px; padding-bottom: 8px; }
blockquote { margin: 0 0 24px; padding-left: 18px; border-left: 3px solid var(--accent); }
blockquote p { margin: 0; font-size: clamp(19px, 3vw, 26px); line-height: 1.4; font-weight: 700; }
.manifesto > p { color: var(--muted); max-width: 760px; }

/* sections */
section[id], section[aria-labelledby] { scroll-margin-top: 64px; }
h2 { font-size: 20px; margin: 88px 0 20px; font-weight: 700; }
.hash { color: var(--accent); }
h3 { font-size: 15px; margin: 0 0 6px; }
.section-lead { color: var(--muted); max-width: 760px; margin: 0 0 22px; }

/* border legend */
.legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.legend li { display: grid; gap: 6px; align-content: start; }
.legend .key { max-width: 120px; }
.legend b { font-size: 13px; color: var(--fg); }
.legend span { font-size: 13px; color: var(--muted); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--bg-3); border-radius: 10px; padding: 22px; transition: border-color .2s; }
.card:hover { border-color: var(--line); }
.card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap-reverse; }
.card h3 { font-size: 16px; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.card .strip { display: block; width: 200px; height: 100px; border-radius: 8px; border: 1px solid var(--bg-3); margin-top: 6px; }
.tag { font-size: 12px; color: var(--accent-2); background: rgb(232 163 61 / .12); border-radius: 4px; padding: 1px 7px; }

/* alert */
.split > * { min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.deck-frame.small { padding: 0; }
.deck-frame.small .deck { gap: clamp(4px, 1vw, 9px); padding: clamp(10px, 2vw, 18px); }

.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 20px; font-size: 13px; color: var(--muted); }
.facts li::before { content: "✓ "; color: var(--ok-2); }
.split .facts { grid-template-columns: 1fr; }

/* devices */
/* masonry: eleven decks of very different shapes, so columns rather than rows */
.devices { list-style: none; padding: 0; margin: 0; columns: 4 210px; column-gap: 14px; }
.device { break-inside: avoid; margin: 0 0 14px; background: var(--bg-2); border: 1px solid var(--bg-3); border-radius: 10px; padding: 16px; display: grid; gap: 4px; align-content: start; }
.device b { font-size: 13px; font-weight: 700; margin-top: 8px; }
.device > span:last-child { font-size: 12px; color: var(--dim); }
.grid { display: grid; gap: 3px; padding: 7px; background: #0c0c0b; border: 1px solid var(--line); border-radius: 7px; justify-self: start; }
.grid i { display: block; width: 14px; height: 14px; border-radius: 3px; background: var(--bg-3); }
.device:hover .grid i { background: var(--line); }
.device:hover .grid i:nth-child(3n+1) { background: var(--ok); }
.device:hover .grid i:nth-child(7n+2) { background: var(--accent); }
.grid.cols-3 { grid-template-columns: repeat(3, 14px); }
.grid.cols-4 { grid-template-columns: repeat(4, 14px); }
.grid.cols-5 { grid-template-columns: repeat(5, 14px); }
.grid.cols-8 { grid-template-columns: repeat(8, 14px); }
.grid.cols-9 { grid-template-columns: repeat(9, 14px); }
.grid.cols-16 { grid-template-columns: repeat(16, 9px); }
.grid.cols-16 i { width: 9px; height: 9px; border-radius: 2px; }
.is-pedal .grid { grid-template-columns: repeat(3, 26px); gap: 5px; }
.is-pedal .grid i { width: 26px; height: 38px; border-radius: 6px; }
.dials { display: flex; gap: 4px; margin-top: 2px; }
.dials b { width: 14px; height: 14px; margin: 0; border-radius: 50%; border: 1px solid var(--dim); }

/* install steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px;
  background: var(--bg-3); border: 1px solid var(--bg-3); border-radius: 10px; overflow: hidden; }
.steps li { background: var(--bg); padding: 22px 20px; transition: background .2s; }
.steps li:hover { background: var(--bg-2); }
.steps .n { color: var(--accent); font-size: 12px; display: block; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
.install-cta { margin-top: 26px; }
.hint { color: var(--dim); font-size: 13px; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 820px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); font-size: 14px; }
.checks li::before { content: "⏺"; position: absolute; left: 0; top: 0; color: var(--ok); font-size: 12px; line-height: 2; }
.checks b { color: var(--fg); font-weight: 700; }

/* reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease-out, transform .5s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* footer */
.foot { margin-top: 110px; border-top: 1px solid var(--bg-3); padding: 26px 0 32px; font-size: 13px; color: var(--dim); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }
.disclaimer { font-size: 12px; margin-top: 14px; color: var(--dim); }
.foot-langs { margin-top: 14px; font-size: 12px; color: var(--dim); }
.foot-langs a { color: var(--dim); }
.foot-langs a[aria-current] { color: var(--muted); }

/* legal pages */
.legal { padding-top: 56px; max-width: 760px; }
.legal h1 { font-size: 28px; }
.legal h2 { font-size: 17px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 14px; }
.legal-langs { margin-top: 40px !important; }

/* language menu */
.lang-menu { position: relative; display: flex; }
.lang-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 28px; padding: 0 10px;
  font: 12px/1 var(--mono); letter-spacing: .02em; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.lang-btn svg { display: block; flex: none; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { color: var(--fg); border-color: var(--dim); }
.lang-list { position: absolute; right: 0; top: calc(100% + 14px); z-index: 20; list-style: none; margin: 0; padding: 6px;
  width: 210px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .6); animation: drop .12s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.lang-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.lang-list a:hover, .lang-list a:focus-visible { background: var(--bg-3); color: var(--fg); text-decoration: none; outline: none; }
.lang-list .lang-code { font-size: 11px; color: var(--dim); }
.lang-list a[aria-current] { color: var(--accent-2); }
.lang-list a[aria-current] .lang-code::before { content: "✓ "; color: var(--accent); }

.lang-hint { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: 340px; display: grid; gap: 10px; padding: 14px 16px;
  font-size: 13px; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / .6); animation: drop .2s ease-out; }
.lang-hint[hidden] { display: none; }
.lang-hint-actions { display: flex; gap: 16px; align-items: center; }
.lang-hint a { color: var(--bg); background: var(--accent); padding: 4px 10px; border-radius: 6px; font-weight: 700; }
.lang-hint a:hover { background: var(--accent-2); text-decoration: none; }
.lang-hint button { font: inherit; color: var(--dim); background: none; border: 0; cursor: pointer; padding: 0; }
.lang-hint button:hover { color: var(--fg); }
@media (max-width: 560px) { .lang-hint { left: 16px; right: 16px; bottom: 16px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .lang-list, .lang-hint { animation: none; } }
