:root {
  --bg: #07110f;
  --panel: rgba(14, 31, 27, 0.82);
  --panel-2: rgba(255, 255, 255, 0.035);
  --line: rgba(156, 224, 193, 0.16);
  --line-strong: rgba(156, 224, 193, 0.32);
  --text: #eff9f4;
  --muted: #a3b8ae;
  --muted-dim: #7d918a;
  --accent: #18d279;
  --accent-strong: #0da965;

  /* channel colors */
  --audio: #ffd166;
  --light: #ffb072;
  --video: #57c8ff;
  --control: #ff8a72;
  --network: #8ef0a0;
  --led: #c58cff;

  /* phase colors */
  --p1: #ffce6a;
  --p2: #57c8ff;
  --p3: #c58cff;

  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --radius: 26px;
  --radius-sm: 16px;
  --site-width: min(1320px, calc(100vw - 32px));
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", "Avenir Next", "Segoe UI Variable", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 12% -4%, rgba(24, 210, 121, 0.16), transparent 26%),
    radial-gradient(circle at 88% 4%, rgba(87, 200, 255, 0.10), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(197, 140, 255, 0.08), transparent 30%),
    linear-gradient(135deg, #040806 0%, #07110f 48%, #0a1713 100%);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; }

.page-shell {
  position: relative;
  z-index: 1;
  width: var(--site-width);
  margin: 0 auto;
  padding: 26px 0 60px;
}

/* ---------- HEADER ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0 26px;
}

.brand-lockup { display: flex; align-items: center; gap: 16px; }
.brand-mark { width: 150px; height: auto; }

.eyebrow,
.section-kicker,
.block-label,
.col-cap,
.pm-tag,
.cs-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--accent);
}

.site-header h1 {
  margin: 4px 0 0;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.header-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.header-nav a {
  text-decoration: none;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 160ms ease;
}
.header-nav a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- GENERIC ---------- */
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

h2, h3, h4 { letter-spacing: -0.01em; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.02;
}
.section-heading.compact h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-note {
  margin: 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 22px;
}

section { margin-top: 26px; }

/* phase badge */
.phase-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  color: var(--p1);
}
.phase-badge.sm { padding: 4px 10px; font-size: 0.68rem; }
[data-phase="1"] .phase-badge, .phase-badge { color: var(--p1); }
[data-phase="2"] .phase-badge { color: var(--p2); }
[data-phase="3"] .phase-badge { color: var(--p3); }

/* ---------- HERO ---------- */
.hero { align-items: stretch; }
.hero-copy { padding: 34px; }
.hero-copy h2 {
  margin: 12px 0 0;
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.lead {
  margin: 20px 0 26px;
  max-width: 60ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}
.lead strong { color: var(--text); font-weight: 600; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.kpi-grid article {
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.kpi-grid strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.kpi-grid span {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.hero-foot { margin-top: 24px; }
.hero-foot p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}
.hero-foot .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-top: 6px; flex: none;
  box-shadow: 0 0 0 4px rgba(24, 210, 121, 0.15);
}

/* hero summary card */
.hero-summary { padding: 28px; display: flex; flex-direction: column; }
.phase-mini { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.phase-mini li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--p1);
}
.phase-mini li[data-phase="2"] { border-left-color: var(--p2); }
.phase-mini li[data-phase="3"] { border-left-color: var(--p3); }
.pm-tag {
  font-size: 0.62rem;
  color: var(--p1);
  font-weight: 700;
}
.phase-mini li[data-phase="2"] .pm-tag { color: var(--p2); }
.phase-mini li[data-phase="3"] .pm-tag { color: var(--p3); }
.phase-mini strong { display: block; font-size: 0.96rem; }
.phase-mini p { margin: 3px 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.pm-cost { font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; }

.hero-total {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.hero-total span { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.hero-total strong { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.hero-total em { font-style: normal; font-size: 0.7rem; color: var(--muted); font-weight: 500; }

/* ---------- LADDER ---------- */
.ladder {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ladder-card {
  --pc: var(--p1);
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--pc) 14%, transparent), transparent 42%),
    var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--pc);
  box-shadow: var(--shadow);
}
.ladder-card[data-phase="2"] { --pc: var(--p2); }
.ladder-card[data-phase="3"] { --pc: var(--p3); }
.ladder-card header { margin-bottom: 14px; }
.ladder-card h3 {
  margin: 12px 0 2px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ladder-tagline { margin: 0; color: var(--pc); font-weight: 600; font-size: 0.92rem; }
.ladder-desc { margin: 0 0 16px; color: var(--muted); line-height: 1.6; font-size: 0.94rem; }
.capability-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.capability-list li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
}
.capability-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 7px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--pc);
}
.ladder-card footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ladder-cost { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.ladder-cost-note { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ladder cumulative bar */
.ladder-bar { margin-top: 18px; padding: 24px 26px; }
.ladder-bar-label { margin: 0 0 18px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.progress-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.progress-step .bar-fill {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--p1), var(--p2));
}
.progress-step[data-phase="1"] .bar-fill { background: var(--p1); width: 33%; }
.progress-step[data-phase="2"] .bar-fill { background: linear-gradient(90deg, var(--p1), var(--p2)); width: 66%; }
.progress-step[data-phase="3"] .bar-fill { background: linear-gradient(90deg, var(--p1), var(--p2) 55%, var(--p3)); width: 100%; }
.step-meta { margin-top: 12px; }
.step-meta strong { display: block; font-size: 0.98rem; }
.step-meta span { display: block; margin-top: 4px; font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

/* ---------- PHASE DETAIL ---------- */
.phase-detail {
  --pc: var(--p1);
  padding: 28px;
  margin-top: 18px;
  border-left: 3px solid var(--pc);
}
.phase-detail[data-phase="2"] { --pc: var(--p2); }
.phase-detail[data-phase="3"] { --pc: var(--p3); }
.phase-detail-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.phase-detail-head h3 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.phase-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; max-width: 70ch; }
.phase-detail-cost {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--pc);
  white-space: nowrap;
}
.phase-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.85fr);
  gap: 22px;
}

.block-label { margin-bottom: 14px; color: var(--muted); }

/* flow chains */
.flow-chain { display: grid; gap: 14px; }
.chain {
  --cc: var(--audio);
  padding: 16px 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.chain.audio { --cc: var(--audio); }
.chain.light { --cc: var(--light); }
.chain.video { --cc: var(--video); }
.chain.control { --cc: var(--control); }
.chain.led { --cc: var(--led); }
.chain-title {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--cc);
}
.chain-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}
.chain-node {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}
.chain-node small { font-weight: 400; font-size: 0.76rem; color: var(--muted); line-height: 1.3; }
.chain-node.strong {
  background: color-mix(in srgb, var(--cc) 16%, rgba(255, 255, 255, 0.045));
  border-color: color-mix(in srgb, var(--cc) 45%, transparent);
}
.chain-arrow {
  flex: 0 0 26px;
  align-self: center;
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cc) 30%, var(--cc) 100%);
}
.chain-arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 2px solid var(--cc);
  border-right: 2px solid var(--cc);
  transform: translateY(-50%) rotate(45deg);
}
.chain-arrow[data-label]::before {
  content: attr(data-label);
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--cc);
  font-weight: 700;
}
.flow-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(24, 210, 121, 0.07);
  border: 1px solid rgba(24, 210, 121, 0.18);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}
.flow-note strong { color: var(--text); }

/* equipment table */
.equip-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.equip-table td { padding: 9px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: top; }
.equip-table td em { font-style: normal; color: var(--muted); }
.equip-table .cat {
  color: var(--muted-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  width: 1%;
}
.equip-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.equip-table tr.owned td { color: var(--muted-dim); }
.equip-table tr.owned .num { color: var(--accent); font-weight: 600; font-size: 0.78rem; }
.equip-table tr.equip-sum td {
  border-top: 2px solid var(--line-strong);
  border-bottom: none;
  padding-top: 12px;
  font-weight: 800;
  font-size: 0.96rem;
}
.equip-table tr.equip-sum .num { color: var(--pc, var(--accent)); }

/* ---------- ARCHITECTURE ---------- */
.arch-section { padding: 30px; }
.phase-reveal { display: flex; gap: 8px; flex-wrap: wrap; }
.reveal-btn {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 9px 16px;
  font-size: 0.85rem;
  transition: 160ms ease;
}
.reveal-btn:hover { color: var(--text); border-color: var(--line-strong); }
.reveal-btn.is-active {
  color: var(--text);
  background: rgba(24, 210, 121, 0.14);
  border-color: rgba(24, 210, 121, 0.5);
}

.arch-frame {
  margin-top: 4px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  padding: 10px;
  overflow-x: auto;
}
.arch-svg { width: 100%; min-width: 760px; height: auto; display: block; }

.col-cap { fill: var(--muted-dim); font-size: 13px; letter-spacing: 2px; font-weight: 700; }

.node rect {
  fill: rgba(255, 255, 255, 0.045);
  stroke: color-mix(in srgb, var(--nc) 55%, transparent);
  stroke-width: 1.5;
}
.node .n-title { fill: var(--text); font-size: 15px; font-weight: 700; }
.node .n-title.big { font-size: 19px; font-weight: 800; }
.node .n-sub { fill: var(--muted); font-size: 11.5px; }
.node.ch-audio { --nc: var(--audio); }
.node.ch-light { --nc: var(--light); }
.node.ch-video { --nc: var(--video); }
.node.ch-control { --nc: var(--control); }
.node.ch-network { --nc: var(--network); }
.node.ch-led { --nc: var(--led); }
.node.ch-core { --nc: var(--video); }
.node.vmix rect {
  fill: color-mix(in srgb, var(--video) 14%, rgba(255, 255, 255, 0.045));
  stroke: color-mix(in srgb, var(--video) 70%, transparent);
  stroke-width: 2;
}

.edge { stroke-width: 2.4; fill: none; }
.edge.ch-audio { stroke: var(--audio); }
.edge.ch-video { stroke: var(--video); }
.edge.ch-control { stroke: var(--control); }
.edge.ch-network { stroke: var(--network); }
.edge.ch-led { stroke: var(--led); }
.edge.dashed { stroke-dasharray: 6 5; stroke-width: 1.8; }

/* phase reveal dimming */
.arch-svg.reveal-1 .p2, .arch-svg.reveal-1 .p3,
.arch-svg.reveal-2 .p3 { opacity: 0.1; }
.arch-svg .node, .arch-svg .edge { transition: opacity 240ms ease; }

.arch-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-left: 2px;
}
.arch-legend .lg {
  position: relative;
  padding-left: 22px;
  font-size: 0.8rem;
  color: var(--muted);
}
.arch-legend .lg::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 3px;
  border-radius: 2px;
  background: var(--lc);
}
.lg.ch-audio { --lc: var(--audio); }
.lg.ch-light { --lc: var(--light); }
.lg.ch-video { --lc: var(--video); }
.lg.ch-control { --lc: var(--control); }
.lg.ch-network { --lc: var(--network); }
.lg.ch-led { --lc: var(--led); }

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.principles article {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.principles h4 { margin: 0 0 8px; font-size: 1rem; }
.principles p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }

/* ---------- TBD / equipment note ---------- */
.equip-table .num.tbd { color: var(--muted-dim); font-weight: 600; }
.equip-foot { margin: 12px 0 0; font-size: 0.78rem; color: var(--muted-dim); line-height: 1.5; }

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted-dim);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .grid-2,
  .ladder,
  .phase-detail-grid,
  .principles { grid-template-columns: 1fr; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .progress-track { grid-template-columns: 1fr; }
  .phase-detail-head { grid-template-columns: auto 1fr; }
  .phase-detail-cost { grid-column: 2; }
}

@media (max-width: 680px) {
  .page-shell { width: calc(100vw - 20px); padding: 16px 0 40px; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-nav { width: 100%; }
  .hero-copy, .hero-summary, .arch-section { padding: 22px; }
  .section-heading { flex-direction: column; align-items: flex-start; }
  .kpi-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .phase-detail-head { grid-template-columns: 1fr; }
  .phase-detail-head .phase-detail-cost { grid-column: 1; }
  .chain-row { flex-direction: column; }
  .chain-node { min-width: 0; }
  .chain-arrow {
    width: 2px; height: 22px; align-self: center;
    background: linear-gradient(180deg, transparent, var(--cc) 30%, var(--cc) 100%);
  }
  .chain-arrow::after { right: 50%; top: auto; bottom: 0; transform: translateX(50%) rotate(135deg); }
  .chain-arrow[data-label]::before { top: 50%; left: 14px; transform: translateY(-50%); }
}
