/* ==========================================================================
   PRO STAGE TIMER — PRODUCTION DESIGN SYSTEM
   Palette: canvas #0F0E0D, surface #1A1816 / #221F1C, hairlines #2B2825 / #3A3631
   Text #F5F1EA, muted #A39E95, signal orange #FF5A1F
   Timer phases: green #3DDC97, amber #FFB020 (<=60s), red #FF4D4D (overtime)
   Type: Instrument Serif (headlines), Inter (body), JetBrains Mono (digits)
   ========================================================================== */

:root {
  --bg: #0F0E0D;
  --s1: #1A1816;
  --s2: #221F1C;
  --ln: #2B2825;
  --ln2: #3A3631;
  --tx: #F5F1EA;
  --mu: #A39E95;
  --ac: #FF5A1F;
  --g: #3DDC97;
  --a: #FFB020;
  --r: #FF4D4D;
  --timer-color: var(--g);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

.sec {
  padding: 104px 0;
  border-top: 1px solid var(--ln);
}

.eb {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--ac);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1, h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 {
  font-size: 84px;
  line-height: 0.98;
  max-width: 900px;
  margin: 18px 0 24px;
}

h1 em {
  font-style: normal;
  color: var(--ac);
}

h2 {
  font-size: 48px;
  line-height: 1.05;
  margin: 12px 0 16px;
}

h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 600;
}

p {
  color: var(--mu);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

a {
  color: inherit;
}

/* Button & Accessible Targets */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--ln2);
  color: var(--tx);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  border-color: var(--mu);
}

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

.pri {
  background: var(--ac);
  border-color: var(--ac);
  color: #0F0E0D;
}

.pri:hover {
  background: #ff7340;
  border-color: #ff7340;
  color: #0F0E0D;
}

/* Header & Navigation */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--ln);
}

.hi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
}

.brand-link:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
  border-radius: 4px;
}

.menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.menu a {
  color: var(--mu);
  text-decoration: none;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.menu a:hover {
  color: var(--tx);
}

.menu a:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
  border-radius: 4px;
}

.menu a.btn {
  color: #0F0E0D;
  min-height: 40px;
  padding: 0 18px;
}

.bg {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--ln2);
  border-radius: 6px;
  background: transparent;
  color: var(--tx);
  padding: 0;
}

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

/* Live Badge */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--mu);
  letter-spacing: 0.06em;
}

.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--r);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Hero Interactive Demo Box */
.demo {
  border: 1px solid var(--ln2);
  border-radius: 8px;
  background: var(--s1);
  overflow: hidden;
  position: relative;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--ln);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0 22px;
  min-height: 50px;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--mu);
  cursor: pointer;
  white-space: nowrap;
  border: none;
  border-right: 1px solid var(--ln);
  background: transparent;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tab-btn:hover {
  color: var(--tx);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: -2px;
}

.tab-btn.active {
  background: var(--s2);
  color: var(--tx);
  box-shadow: inset 0 -2px 0 var(--ac);
}

.stage {
  min-height: 430px;
}

.pn {
  display: none;
  min-height: 430px;
}

.pn.active {
  display: block;
}

/* Digits & Progress Bars */
.dg {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  color: var(--timer-color);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: color 0.2s ease;
}

.bar {
  height: 8px;
  border-radius: 4px;
  background: var(--ln);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--timer-color);
  width: 100%;
  transition: width 0.1s linear, background-color 0.2s ease;
}

.cue {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--r);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 14px;
  border-radius: 6px;
}

.cue.visible {
  display: flex;
}

.p1 {
  background: #000000;
  padding: 28px 36px;
  transition: outline 0.15s ease, box-shadow 0.15s ease;
}

.p1.is-flashing {
  outline: 4px solid var(--r);
  box-shadow: inset 0 0 40px rgba(255, 77, 77, 0.45);
}

.p2, .p3 {
  padding: 28px 32px;
}

.p4 {
  padding: 20px;
}

.big {
  font-size: clamp(84px, 15vw, 190px);
  text-align: center;
  margin: 18px 0;
}

/* Transport Controls on Controller Tab */
.k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid var(--ln2);
  color: var(--tx);
  background: var(--s2);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.k:hover {
  border-color: var(--mu);
}

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

.k.go {
  background: var(--ac);
  border-color: var(--ac);
  color: #0F0E0D;
}

.k.go:hover {
  background: #ff7340;
  border-color: #ff7340;
}

.k.sm {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.k.active {
  border-color: var(--ac);
  color: var(--tx);
  background: #2a2520;
}

/* Controller View Broadcast Deck */
.ctrl-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ln);
}

.ctrl-status-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ctrl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 4px;
  background: var(--s2);
  border: 1px solid var(--ln2);
  color: var(--mu);
  letter-spacing: 0.04em;
}

.ctrl-badge.live-sync {
  color: var(--g);
  border-color: rgba(61, 220, 151, 0.25);
}

.ctrl-badge.live-sync i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
  display: inline-block;
}

.ctrl-modes {
  display: inline-flex;
  border: 1px solid var(--ln2);
  border-radius: 6px;
  overflow: hidden;
  background: var(--cv);
}

.ctrl-mode-btn {
  background: transparent;
  border: none;
  border-right: 1px solid var(--ln2);
  color: var(--mu);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctrl-mode-btn:last-child {
  border-right: none;
}

.ctrl-mode-btn:hover {
  color: var(--tx);
}

.ctrl-mode-btn.active {
  background: var(--s2);
  color: var(--tx);
}

.ctrl-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
}

@media (max-width: 820px) {
  .ctrl-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.ctrl-section-label {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  color: var(--ac);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ctrl-speaker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--mu);
  margin-bottom: 6px;
}

.ctrl-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.ctrl-preset-btn {
  background: var(--s2);
  border: 1px solid var(--ln);
  color: var(--mu);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctrl-preset-btn:hover {
  border-color: var(--mu);
  color: var(--tx);
}

.ctrl-preset-btn.selected {
  border-color: var(--ac);
  color: var(--tx);
  background: #26211c;
}

.ctrl-out-card {
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--ln);
  border-radius: 6px;
  margin-bottom: 10px;
}

.ctrl-out-card:last-child {
  margin-bottom: 0;
}

.ctrl-out-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.ctrl-out-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx);
}

.ctrl-out-route {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  color: var(--ac);
}

.ctrl-out-desc {
  font-size: 12px;
  color: var(--mu);
  line-height: 1.45;
  margin: 0;
}

.ln {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--ln);
  font-size: 15px;
}

/* Feature Spec Strip */
.fx {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
}

.fx > div {
  padding: 32px 28px;
  border-right: 1px solid var(--ln);
}

.fx > div:last-child {
  border-right: 0;
}

.fx b {
  display: block;
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.fx span {
  color: var(--mu);
  font-size: 14px;
}

/* 2x2 Feature Grid */
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ln);
  border-radius: 8px;
  background: var(--s1);
}

.g2 > div {
  padding: 36px;
  border-bottom: 1px solid var(--ln);
}

.g2 > div:nth-child(odd) {
  border-right: 1px solid var(--ln);
}

.g2 > div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.g2 .n {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--ac);
  margin-bottom: 14px;
}

/* 3-Column Use Cases */
.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gd a {
  display: block;
  padding: 28px;
  border: 1px solid var(--ln);
  border-radius: 8px;
  text-decoration: none;
  background: var(--s1);
  transition: border-color 0.15s ease;
}

.gd a:hover {
  border-color: var(--ac);
}

.gd a:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

.gd .ar {
  display: block;
  margin-top: 18px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--ac);
}

/* Pricing Grid */
.pr {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
}

.pc {
  border: 1px solid var(--ln);
  border-radius: 8px;
  padding: 36px;
  background: var(--s1);
}

.pc.hl {
  border-color: var(--ac);
}

.pc ul {
  list-style: none;
  padding: 0;
  margin: 26px 0;
}

.pc li {
  padding: 11px 0;
  border-top: 1px solid var(--ln);
  font-size: 15px;
  color: #d8d3ca;
}

/* FAQ Details */
details {
  border-top: 1px solid var(--ln);
  padding: 22px 0;
}

summary {
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}

summary::-webkit-details-marker {
  display: none;
}

summary:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 4px;
  border-radius: 4px;
}

summary::after {
  content: "+";
  color: var(--ac);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

details[open] summary::after {
  content: "\2212";
}

details p {
  margin-top: 12px;
  max-width: 760px;
}

/* Animated Elements */
.flow {
  stroke-dasharray: 6 6;
  animation: flow 1.2s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -24;
  }
}

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

/* Footer */
.ft {
  background: var(--s1);
  border-top: 1px solid var(--ln);
}

.fg {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.fg h4 {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--mu);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.fg a {
  display: block;
  color: var(--tx);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.fg a:hover {
  color: var(--ac);
}

.fg a:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
  border-radius: 2px;
}

.fb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 0;
  border-top: 1px solid var(--ln);
  color: var(--mu);
  font-size: 14px;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  .flow,
  .live i {
    animation: none !important;
  }
  .bar i {
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 820px) {
  h1 {
    font-size: 48px;
  }
  h2 {
    font-size: 34px;
  }
  .sec {
    padding: 68px 0;
  }
  .bg {
    display: flex;
  }
  .menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--ln);
    padding: 8px 24px 20px;
  }
  .menu.open {
    display: flex;
  }
  .menu a {
    padding: 14px 0;
    border-bottom: 1px solid var(--ln);
  }
  .menu a.btn {
    margin-top: 14px;
    border: 1px solid var(--ln2);
    justify-content: center;
  }
  .menu a.btn.pri {
    border-color: var(--ac);
  }
  .fx {
    grid-template-columns: 1fr 1fr;
  }
  .fx > div {
    border-bottom: 1px solid var(--ln);
  }
  .g2, .g3, .pr, .fg {
    grid-template-columns: 1fr;
  }
  .g2 > div {
    border-right: 0 !important;
    border-bottom: 1px solid var(--ln) !important;
  }
  .p1 {
    padding: 20px;
  }
  .big {
    font-size: 22vw;
  }
  .cue {
    font-size: 20px;
  }
  .p2 .g3x {
    grid-template-columns: 1fr !important;
  }
}

