/* tangistream.com, "control room": the site looks like the gear it replaces. Tally light,
   LED meters, a routing board, stencil headlines and monospace readouts; square edges,
   1px rules, no gradients on text, no emoji. Fonts are served from here (OFL, fonts/), so
   the site still talks to nothing else (the privacy policy says so). */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  --bg: #0a0c0b;
  --rack: #111413;
  --rack-2: #171b19;
  --rule: #262c29;
  --rule-hi: #3a423e;
  --text: #e6e9e4;
  --dim: #8b948e;
  --amber: #f2b544;
  --amber-ink: #171104;
  --tally: #ff3b30;
  --led: #39e07a;
  --led-off: #16221b;
  --twitch: #a970ff;
  --youtube: #ff4e45;
  --kick: #53fc18;
  --tiktok: #ff2d6f;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); overflow-x: hidden;
  /* a faint rack grid behind everything */
  background-image: linear-gradient(var(--rack) 1px, transparent 1px), linear-gradient(90deg, var(--rack) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: var(--amber); }
.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; }
.mono { font-family: var(--mono); }
.label { font: 600 12px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---------- top bar: brand, tally, nav ---------- */
.top { position: sticky; top: 0; z-index: 10; background: #0a0c0bf0; border-bottom: 1px solid var(--rule); backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.brand img { width: 28px; height: 28px; }
.brand em { font-style: normal; color: var(--amber); }
.tally { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid #ff3b3055; color: var(--tally); font: 600 11px/1 var(--mono); letter-spacing: .16em; }
.tally::before { content: ""; width: 8px; height: 8px; background: var(--tally); box-shadow: 0 0 10px var(--tally); animation: tally 2.4s ease-in-out infinite; }
@keyframes tally { 50% { opacity: .35; box-shadow: none; } }
.top nav { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.top nav a { color: var(--dim); text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.top nav a:hover { color: var(--text); }

/* square, labelled buttons like hardware keys */
.key {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; text-decoration: none; cursor: pointer;
  font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); background: var(--rack-2); border: 1px solid var(--rule-hi); border-radius: 2px;
  box-shadow: inset 0 -2px 0 #0006;
}
.key:hover { border-color: var(--dim); }
.key.go { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.key.go:hover { filter: brightness(1.06); }
.top .key { min-height: 36px; padding: 0 14px; font-size: 11px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--rule); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
h1, h2, h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: .95; }
h1 { font-weight: 800; font-size: clamp(52px, 8vw, 104px); margin: 14px 0 22px; }
h1 span { display: block; color: var(--amber); }
.lead { font-size: 18px; color: #c4cac4; max-width: 32em; margin: 0 0 30px; }
.keys { display: flex; gap: 12px; flex-wrap: wrap; }
.note { margin-top: 18px; }

/* the routing board: one feed, a bus, each platform with its own meter and mix */
.board { border: 1px solid var(--rule-hi); background: var(--rack); box-shadow: 0 30px 80px #0009; }
.board-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.board-src { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px dashed var(--rule-hi); font: 600 13px/1.3 var(--mono); }
.board-src b { padding: 4px 8px; background: var(--text); color: var(--bg); letter-spacing: .08em; }
.routes { position: relative; padding: 6px 14px 10px 34px; }
/* the bus: one line down, a branch to every row */
.routes::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 26px; width: 2px; background: var(--amber); }
.route { position: relative; display: grid; grid-template-columns: 12px 86px 1fr 104px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); font: 13px/1.2 var(--mono); }
.route:last-child { border-bottom: 0; }
.route::before { content: ""; position: absolute; left: -14px; top: 50%; width: 12px; height: 2px; background: var(--amber); }
.led { width: 10px; height: 10px; background: var(--led); box-shadow: 0 0 8px var(--led); }
.led.wait { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dest { font-weight: 600; letter-spacing: .06em; }
.dest i { display: inline-block; width: 8px; height: 8px; margin-right: 8px; }
.spec { color: var(--dim); font-size: 12px; }
.mix { text-align: right; font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.mix.on { color: var(--led); }
.meter { grid-column: 2 / 5; height: 8px; background: var(--led-off); position: relative; overflow: hidden;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); mask: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 9px); }
.meter i { position: absolute; inset: 0 auto 0 0; width: 70%;
  background: linear-gradient(90deg, var(--led) 0 70%, var(--amber) 70% 88%, var(--tally) 88%); background-size: 100% 100%;
  animation: level 1.6s steps(9) infinite alternate; }
/* each meter moves to its own beat */
.route:nth-child(2) .meter i { animation-duration: 1.3s; animation-delay: -.4s; }
.route:nth-child(3) .meter i { animation-duration: 1.9s; animation-delay: -.9s; }
.route:nth-child(4) .meter i { animation-duration: 1.1s; animation-delay: -.2s; }
.route:nth-child(5) .meter i { animation-duration: 1.7s; animation-delay: -1.1s; }
@keyframes level { from { clip-path: inset(0 52% 0 0); } to { clip-path: inset(0 14% 0 0); } }
.meter i { width: 100%; }
.board-foot { display: flex; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--rule); }

/* ---------- sections ---------- */
section { padding: 80px 0; border-bottom: 1px solid var(--rule); }
.sec-head { display: grid; grid-template-columns: 180px 1fr; gap: 12px 24px; align-items: baseline; margin-bottom: 40px; }
h2 { font-weight: 800; font-size: clamp(40px, 5.6vw, 72px); margin: 0; }
/* label | title, then the description under the title (the label is a <p> too: place each explicitly) */
.sec-head > .label { grid-column: 1; grid-row: 1; margin: 0; }
.sec-head > h2 { grid-column: 2; grid-row: 1; }
.sec-head > p:not(.label) { grid-column: 2; grid-row: 2; margin: 0; color: #c4cac4; font-size: 18px; max-width: 40em; }

/* the spec sheet: channels, not cards */
.channels { border-top: 1px solid var(--rule-hi); }
.ch { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.ch:hover { background: linear-gradient(90deg, var(--rack), transparent); }
.ch h3 { font-size: 30px; font-weight: 800; margin: 0; }
.ch p { margin: 0; color: #c4cac4; }
.ch .label b { color: var(--amber); }

/* the signal chain */
.chain { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule-hi); }
.link { padding: 22px; border-right: 1px solid var(--rule); position: relative; background: var(--rack); }
.link:last-child { border-right: 0; }
.link:not(:last-child)::after { content: "▶"; position: absolute; right: -9px; top: 26px; color: var(--amber); font-size: 14px; background: var(--bg); line-height: 1; }
.link h3 { font-size: 28px; margin: 10px 0 8px; }
.link p { margin: 0; color: #c4cac4; font-size: 15px; }

/* the vertical, drawn like a crop guide */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }
.frame { position: relative; aspect-ratio: 9 / 16; border: 1px solid var(--rule-hi); background: var(--rack); padding: 14px; display: grid; grid-template-rows: 30% 1fr 18%; gap: 10px; }
.frame > div { position: relative; border: 1px dashed var(--dim); display: grid; place-items: center; }
.frame > div span { font: 600 12px/1 var(--mono); letter-spacing: .14em; color: var(--dim); }
.frame .cam { border-color: var(--amber); }
.frame .cam span { color: var(--amber); }
.frame .game { border: 1px solid var(--led); background: repeating-linear-gradient(135deg, #39e07a0d 0 10px, transparent 10px 20px); }
.frame .game span { color: var(--led); }
/* crop marks on the corners */
.frame::before, .frame::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--text); }
.frame::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
.dims { display: flex; justify-content: space-between; margin-top: 10px; }
.facts { margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); color: #c4cac4; }

/* the rate card */
.switch { display: inline-flex; border: 1px solid var(--rule-hi); margin-bottom: 26px; }
.switch button { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); background: none; border: 0; padding: 12px 18px; cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.rates { width: 100%; border-collapse: collapse; border: 1px solid var(--rule-hi); background: var(--rack); }
.rates th, .rates td { padding: 14px 18px; border-bottom: 1px solid var(--rule); text-align: left; }
.rates thead th { vertical-align: bottom; border-bottom: 1px solid var(--rule-hi); }
.rates thead th:not(:first-child) { width: 26%; }
.rates .plan { font: 800 34px/1 var(--display); text-transform: uppercase; color: var(--text); display: block; }
.rates .price { font: 800 56px/1 var(--display); color: var(--amber); }
.rates .price small { font: 400 13px var(--mono); color: var(--dim); margin-left: 4px; }
.rates td:first-child { color: #c4cac4; }
.rates .yes, .rates .no { font-family: var(--mono); }
.rates .yes::before { content: "■ "; color: var(--led); }
.rates .no { color: #4a524e; }
.rates .no::before { content: "□ "; }
.rates tfoot td { border-bottom: 0; padding-top: 18px; padding-bottom: 18px; }
.rates-note { margin-top: 14px; }

/* plugin strip */
.plugin { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px; border: 1px solid var(--amber); background: var(--rack); }
.plugin h2 { font-size: clamp(32px, 4vw, 48px); }
.plugin .label { margin-top: 10px; }

/* field notes (FAQ) */
.notes details { border-bottom: 1px solid var(--rule); }
.notes summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 180px 1fr 24px; gap: 24px; padding: 18px 0; font: 600 20px/1.3 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "+"; font: 600 20px/1 var(--mono); color: var(--amber); }
.notes details[open] summary::after { content: "−"; }
.notes details p { margin: 0 0 20px calc(180px + 24px); color: #c4cac4; max-width: 46em; }

/* ---------- footer: a readout ---------- */
footer { padding: 34px 0 48px; }
footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
footer nav a { color: var(--dim); text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
footer nav a:hover { color: var(--text); }
.readout { width: 100%; padding-top: 18px; border-top: 1px solid var(--rule); }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 32px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(44px, 6vw, 72px); margin: 10px 0 8px; }
.legal .updated { margin: 0 0 32px; }
.legal h2 { font-size: 28px; margin: 40px 0 10px; }
.legal p, .legal li { color: #d2d6d0; }
.legal .box { padding: 18px 20px; border: 1px solid var(--rule-hi); border-left: 3px solid var(--amber); background: var(--rack); }

@media (prefers-reduced-motion: reduce) {
  .tally::before, .meter i { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 900px) {
  .hero { padding: 36px 0 40px; }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 36px; }
  .split .frame { max-width: 240px; }
  .top nav a:not(.key) { display: none; }
  .sec-head, .ch { grid-template-columns: 1fr; gap: 8px; }
  .sec-head > .label, .sec-head > h2, .sec-head > p:not(.label) { grid-column: 1; grid-row: auto; }
  /* the rate card on a phone: marks only, so the feature column keeps its room */
  .rates td.yes, .rates td.no { font-size: 0; }
  .rates td.yes::before, .rates td.no::before { font-size: 16px; }
  .rates td:first-child { font-size: 14px; }
  .chain { grid-template-columns: 1fr; }
  .link { border-right: 0; border-bottom: 1px solid var(--rule); }
  .link:not(:last-child)::after { content: "▼"; right: auto; left: 22px; top: auto; bottom: -9px; }
  .rates th, .rates td { padding: 12px 10px; }
  .rates .price { font-size: 40px; }
  .rates .plan { font-size: 26px; }
  .plugin { grid-template-columns: 1fr; }
  .notes summary { grid-template-columns: 1fr 24px; }
  .notes summary .label { display: none; }
  .notes details p { margin-left: 0; }
  .facts li { grid-template-columns: 1fr; gap: 2px; }
  section { padding: 56px 0; }
  .route { grid-template-columns: 12px 78px 1fr; }
  .route .mix { grid-column: 2 / 4; text-align: left; }
}
