/* pshosts: everything is a unit in the rack. */
:root {
  --room: #0d0f12;
  --rack: #17191d;
  --rail: #23272d;
  --rail-hi: #2e333a;
  --face: #1e2126;
  --face-hi: #2a2e35;
  --edge: #353a42;
  --hole: #07080a;
  --ink: #ebe7de;
  --muted: #a0a6ae;
  --dim: #6d737b;
  --amber: #ffb43a;
  --amber-deep: #e08a00;
  --amber-glow: rgba(255, 180, 58, 0.55);
  --lcd: #150f05;
  --green: #4ade80;
  --red: #ff6b5e;
  --u: clamp(52px, 7.2vw, 92px);
  --rail-w: clamp(30px, 4vw, 48px);
  --max: 1180px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 180, 58, 0.07), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--room);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber); }
a:hover { color: #ffd08a; }
img, svg { display: block; max-width: 100%; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* silkscreen labels: the condensed uppercase text printed on hardware */
.silk {
  font-family: var(--label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- top bar ---------- */
.topbar { border-bottom: 1px solid #1f2328; background: rgba(13, 15, 18, 0.85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--label); font-weight: 700; font-size: 1.45rem; letter-spacing: 0.04em; }
.logo:hover { color: var(--ink); }
.logo svg { width: 26px; height: 26px; color: var(--amber); }
.logo small { font-family: var(--label); font-weight: 500; color: var(--dim); font-size: 1rem; letter-spacing: 0.08em; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 4px; font-size: 0.95rem; }
.topnav a:hover { color: var(--ink); background: #1b1e23; }
.topnav a.cta { color: #1a1204; background: var(--amber); font-weight: 600; }
.topnav a.cta:hover { background: #ffc461; }
@media (max-width: 640px) { .topnav a:not(.cta) { display: none; } }

/* ---------- the rack ---------- */
.rack {
  position: relative;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w);
  background: var(--rack);
  border: 1px solid #262a30;
  border-radius: 6px;
  padding: 10px 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 6px #121417;
  perspective: 1400px;
}
.rail {
  grid-row: 1 / -1;
  background:
    radial-gradient(circle at 50% 50%, var(--hole) 0 3px, transparent 3.6px) 50% 0 / 100% calc(var(--u) / 3) repeat-y,
    linear-gradient(90deg, var(--rail-hi), var(--rail) 45%, #1c1f24);
  border-inline: 1px solid #2f343b;
  position: relative;
}
.rail.l { grid-column: 1; }
.rail.r { grid-column: 3; }
.rail ol { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.rail li {
  height: var(--u);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 2px;
  font: 600 0.6rem/1 var(--label);
  letter-spacing: 0.08em;
  color: var(--dim);
  border-top: 1px solid rgba(0, 0, 0, 0.35);
}
.bay { grid-column: 2; display: flex; flex-direction: column; gap: 0; padding: 0 2px; }

.unit {
  --size: 1;
  position: relative;
  min-height: calc(var(--u) * var(--size));
  display: flex; align-items: center; gap: clamp(12px, 2vw, 26px);
  padding: 10px clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, var(--face-hi), var(--face) 38%, #1a1d21);
  border: 1px solid var(--edge);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 0 #08090b;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s;
}
/* rack ears with screws */
.unit::before, .unit::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: clamp(22px, 3vw, 34px);
  background:
    radial-gradient(circle, #5b616a 0 3px, #2b2f35 3.5px 5px, transparent 5.5px) 50% calc(var(--u) * 0.22) / 100% calc(var(--u) * 0.56) no-repeat,
    radial-gradient(circle, #5b616a 0 3px, #2b2f35 3.5px 5px, transparent 5.5px) 50% calc(100% - var(--u) * 0.22) / 100% calc(var(--u) * 0.56) no-repeat,
    linear-gradient(180deg, #30353c, #23272d);
}
.unit::before { left: 0; border-right: 1px solid #15171a; }
.unit::after { right: 0; border-left: 1px solid #15171a; }
.unit.s2 { --size: 2; }
.unit.s3 { --size: 3; }
.unit.s4 { --size: 4; }
a.unit:hover, a.unit:focus-visible {
  transform: translateZ(26px) translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--amber-deep);
  color: var(--ink);
}

.vents {
  flex: 1 1 60px; align-self: stretch; margin: 8px 0; min-width: 40px;
  background: repeating-linear-gradient(90deg, var(--hole) 0 3px, transparent 3px 8px);
  border-radius: 2px;
  opacity: 0.85;
  mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
}
.handle { flex: none; width: 14px; align-self: stretch; margin: 10% 0; border: 3px solid #444a53; border-radius: 7px; }
.handle.l { border-right-color: transparent; }
.handle.r { border-left-color: transparent; }

.leds { display: flex; gap: 14px; flex: none; }
.led-cell { display: grid; justify-items: center; gap: 4px; }
.led {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green), 0 0 14px rgba(74, 222, 128, 0.35);
}
.led.amber { background: var(--amber); box-shadow: 0 0 6px var(--amber), 0 0 14px var(--amber-glow); }
.led.off { background: #2a2e34; box-shadow: none; }
.led.blink { animation: blink var(--d, 1.4s) steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.lcd {
  font: 500 clamp(0.72rem, 1.3vw, 0.95rem)/1.35 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  text-shadow: 0 0 6px var(--amber-glow);
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px),
    var(--lcd);
  border: 2px solid #0a0b0d;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.8), 0 0 0 1px #3a3f47;
  border-radius: 3px;
  padding: 8px 12px;
  min-width: 0;
  white-space: pre;
  overflow: hidden;
}
.plate { display: grid; gap: 2px; flex: none; }
.plate .name { font: 700 clamp(1.05rem, 2vw, 1.5rem)/1 var(--label); letter-spacing: 0.1em; text-transform: uppercase; }
.blank { justify-content: center; }
.blank .silk { color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .led.blink { animation: none; }
  .unit { transition: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1rem/1.2 var(--sans);
  padding: 12px 18px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  background: #22262c;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #2a2f36; color: var(--ink); }
.btn.key {
  color: #1d1404;
  background: linear-gradient(180deg, #ffc867, var(--amber) 55%, var(--amber-deep));
  border: 1px solid #8a5600;
  box-shadow: 0 0 0 3px #0c0d0f, 0 0 0 4px #474c54, 0 0 24px var(--amber-glow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 14px 22px;
}
.btn.key:hover { background: linear-gradient(180deg, #ffd486, #ffc04f 55%, #f09a10); color: #1d1404; }
.btn.key:active { transform: translateY(1px); }
.btn .sub { display: block; font-weight: 500; font-size: 0.78rem; opacity: 0.8; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.sm { padding: 6px 11px; font-size: 0.85rem; border-radius: 4px; }

/* ---------- sections ---------- */
section { padding: clamp(56px, 9vw, 110px) 0; }
.eyebrow { margin: 0 0 10px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 14px; }
h1 { font: 700 clamp(2.6rem, 6.4vw, 5rem)/0.98 var(--label); text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font: 700 clamp(2rem, 4.2vw, 3.1rem)/1 var(--label); text-transform: uppercase; letter-spacing: 0.02em; }
h3 { font-size: 1.12rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #cfcbc2; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.amber { color: var(--amber); }

footer { border-top: 1px solid #1f2328; padding: 36px 0 48px; color: var(--dim); font-size: 0.86rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
footer p { margin: 0; max-width: 70ch; }
