:root {
  --panel: #201d1a;
  --panel-raised: #2a2521;
  --panel-seam: #171512;
  --amber: #e8a33d;
  --amber-bright: #ffc463;
  --amber-dim: #7a5a30;
  --paper: #f2ead9;
  --paper-dim: #b8ae99;
  --teal: #5ba3a0;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--panel);
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.18), transparent 220px),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
  color: var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.rack {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ---------- hero ---------- */

.hero {
  display: flex;
  gap: 20px;
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--panel-seam);
}

.hero__rail {
  flex: 0 0 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--amber), var(--amber-dim));
  box-shadow: 0 0 14px rgba(232, 163, 61, 0.35);
}

.hero__eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--paper-dim);
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: condensed;
  font-size: clamp(64px, 13vw, 148px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-shadow: 0 0 34px rgba(232, 163, 61, 0.28);
  animation: warm-up 900ms ease-out both;
}

.hero__sub {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: 16px;
  color: var(--paper-dim);
}

.lcd {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  padding: 8px 14px;
  border: 1px solid var(--panel-seam);
  border-radius: 4px;
  background: #17140f;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.lcd__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ---------- board / modules ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  background: var(--panel-raised);
  border: 1px solid var(--panel-seam);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 10px 22px -14px rgba(0,0,0,0.6);
  opacity: 0;
  animation: rise 520ms ease-out both;
  animation-delay: calc(var(--stagger, 0) * 70ms);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.module:hover,
.module:focus-within {
  transform: translateY(-3px);
  border-color: var(--amber-dim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 16px 28px -16px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,163,61,0.12);
}

.module__meter {
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 3px;
  background: var(--amber-dim);
  border-radius: 0 0 3px 3px;
  transition: background 180ms ease;
}

.module:hover .module__meter,
.module:focus-within .module__meter {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(232,163,61,0.5);
}

.module__readout {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
}

.module__port {
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.14em;
}

.module__id {
  margin-top: 14px;
}

.module__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: var(--paper);
}

.module__tagline {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.module__desc {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--paper-dim);
  flex-grow: 1;
}

.module__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.module__tags li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
  border: 1px solid var(--panel-seam);
  border-radius: 3px;
  padding: 3px 7px;
}

.module__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid var(--amber-dim);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--amber);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.module__link:hover,
.module__link:focus-visible {
  background: var(--amber);
  color: #201d1a;
}

.module__link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.module__link-arrow {
  transition: transform 160ms ease;
}

.module__link:hover .module__link-arrow {
  transform: translateX(3px);
}

/* ---------- footer ---------- */

.chassis-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--panel-seam);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  text-align: center;
}

/* ---------- motion ---------- */

@keyframes warm-up {
  from { opacity: 0; filter: brightness(1.8) blur(1px); }
  to { opacity: 1; filter: brightness(1) blur(0); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .module,
  .lcd__dot {
    animation: none !important;
  }
  .module { opacity: 1; }
}

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .hero { padding: 48px 0 32px; }
  .board { grid-template-columns: 1fr; margin-top: 32px; }
}
