/* ===========================================================
   Stagecraft Instruments — design tokens
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* color */
  --bg:        #0B0D0E;
  --bg-raised: #111416;
  --ink:       #E8E6E1;
  --ink-dim:   #9BA39C;
  --rule:      #2A2F2C;
  --signal:    #4F7A5E;   /* live/good */
  --signal-dim:#33473A;
  --brass:     #A6815A;   /* connector / accent */
  --brass-dim: #5C4A36;
  --warn:      #B5552E;

  /* type */
  --font-mono: 'Space Mono', 'JetBrains Mono', monospace;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* layout */
  --margin: 48px;
  --rail-w: 1px;
  --max-w: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- signal rail (signature element) ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 28px;
  width: var(--rail-w);
  height: 100vh;
  background: var(--rule);
  z-index: 1;
}
.rail::after {
  content: '';
  position: absolute;
  left: -2px;
  width: 5px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--signal), transparent);
  animation: trace 7s linear infinite;
  filter: drop-shadow(0 0 4px var(--signal));
}
@keyframes trace {
  0%   { top: -10%; }
  100% { top: 110%; }
}
@media (max-width: 880px) {
  .rail { display: none; }
}

/* ---------- layout shells ---------- */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--margin);
}
@media (max-width: 880px) {
  .wrap { padding: 0 24px; }
  :root { --margin: 24px; }
}

main { padding-left: 28px; }
@media (max-width: 880px) {
  main { padding-left: 0; }
}

/* ---------- header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11,13,14,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  flex-shrink: 0;
}
nav.primary {
  display: flex;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}
nav.primary a {
  color: var(--ink-dim);
  transition: color 0.15s ease;
  position: relative;
  padding: 4px 0;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] { color: var(--ink); }
nav.primary a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
}
.nav-toggle { display: none; }
@media (max-width: 720px) {
  nav.primary {
    display: none;
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    padding: 32px 24px;
    gap: 8px;
    z-index: 20;
    overflow-y: auto;
  }
  nav.primary.open { display: flex; }
  nav.primary a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--rule);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 12px;
    position: relative;
    z-index: 21;
  }
  header.site { backdrop-filter: none; }
}

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--brass);
}

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 18px; }
p { color: var(--ink-dim); margin: 0; }
.lede {
  font-size: 19px;
  color: var(--ink);
  max-width: 640px;
}

/* ---------- sections ---------- */
section { padding: 88px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 48px;
  max-width: 680px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border: 1px solid var(--brass);
  color: var(--ink);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--brass); color: var(--bg); }
.btn.ghost { border-color: var(--rule); }
.btn.ghost:hover { background: var(--bg-raised); color: var(--ink); border-color: var(--ink-dim); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- readout strip (hero signature) ---------- */
.readout {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  font-family: var(--font-mono);
  font-size: 12px;
}
.readout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-dim);
}
.readout-row:last-child { border-bottom: none; }
.readout-row .val { color: var(--ink); }
.readout-row .val.ok { color: var(--signal); }
.readout-row .val.warn { color: var(--warn); }
.led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  margin-right: 8px;
  box-shadow: 0 0 5px var(--signal);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- cards / grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 880px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.card {
  border: 1px solid var(--rule);
  background: var(--bg-raised);
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 14.5px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.spec-table tr { border-bottom: 1px solid var(--rule); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table td { padding: 12px 0; }
.spec-table td:first-child { color: var(--ink-dim); width: 42%; }
.spec-table td:last-child { color: var(--ink); }

/* ---------- product index cards ---------- */
.product-card {
  display: block;
  border: 1px solid var(--rule);
  padding: 32px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.product-card:hover { border-color: var(--brass-dim); transform: translateY(-2px); }
.product-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.product-card h3 { font-size: 22px; margin: 10px 0 12px; }
.product-card .arrow { color: var(--brass); font-family: var(--font-mono); font-size: 13px; margin-top: 18px; display: block; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
  margin-top: 0;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
footer.site a:hover { color: var(--ink); }

/* ---------- contact form ---------- */
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brass);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- utility ---------- */
.mt-48 { margin-top: 48px; }
.center-note {
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-top: 24px;
}

/* visible focus state everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .rail::after, .led { animation: none; }
}
