@font-face {
  font-family: "Jockey One";
  src: url("fonts/JockeyOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0b0b0b;
  --panel: #111111;
  --panel-2: #181818;
  --line: #282828;
  --line-strong: #3a3a3a;
  --text: #f5f5f5;
  --muted: #aaaaaa;
  --muted-2: #808080;
  --accent: #ff8c00;
  --accent-2: #ffa500;
  --good: #2fd06f;
  --warn: #ffbf3f;
  --bad: #ff6b6b;
  --info: #62b7ff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 140, 0, 0.1), transparent 28rem),
    linear-gradient(180deg, #000 0%, var(--bg) 34rem, #030303 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-2);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--text);
  font-family: "Jockey One", Arial, Helvetica, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #000;
  font-family: "Jockey One", Arial, Helvetica, sans-serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.nav-links a.active,
.nav-links a:hover {
  color: #000;
  background: var(--accent);
}

.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 18px 20px;
  z-index: -1;
  border: 1px solid rgba(255, 140, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 140, 0, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 140, 0, 0.06) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, #000 0%, #000 35%, transparent 80%);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin: 0 0 10px;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 70px);
  max-width: 900px;
  text-shadow: 0 0 34px rgba(255, 140, 0, 0.12);
}

h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  color: var(--text);
}

h3 {
  font-size: 19px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  max-width: 760px;
  margin: 18px 0 0;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: #202020;
  color: var(--text);
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.button.primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.button:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #000;
  transform: translateY(-1px);
}

.section {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.section.alt {
  background: var(--bg-soft);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 140, 0, 0.055), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.card:hover {
  border-color: rgba(255, 140, 0, 0.42);
}

.card h3 {
  color: var(--accent);
  margin-bottom: 10px;
}

.card p,
.card li {
  color: var(--muted);
}

.card p {
  margin: 0;
}

.card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: #161616;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.dot.good {
  background: var(--good);
}

.dot.warn {
  background: var(--warn);
}

.dot.bad {
  background: var(--bad);
}

.diagram {
  background:
    linear-gradient(180deg, rgba(255, 140, 0, 0.06), transparent),
    #080808;
  border: 1px solid rgba(255, 140, 0, 0.22);
  border-radius: 8px;
  padding: 16px;
}

.flow {
  display: grid;
  gap: 10px;
}

.flow-node {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-2);
}

.flow-node strong {
  display: block;
  color: var(--text);
}

.flow-node span {
  color: var(--muted);
  font-size: 13px;
}

.flow-arrow {
  color: var(--accent);
  text-align: center;
  font-weight: 800;
}

.network-animation {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 140, 0, 0.08), transparent 58%),
    radial-gradient(circle at 18% 20%, rgba(255, 140, 0, 0.16), transparent 26%),
    #070707;
  border: 1px solid rgba(255, 140, 0, 0.26);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
}

.network-animation svg {
  display: block;
  width: 100%;
  height: auto;
}

.network-animation figcaption {
  border-top: 1px solid rgba(255, 140, 0, 0.16);
  color: var(--muted);
  padding: 14px 16px 16px;
  margin: 0;
  font-size: 14px;
}

.architecture-cards {
  margin-top: 18px;
}

.motion-path {
  fill: none;
  stroke: transparent;
  stroke-width: 1;
}

.route-path {
  fill: none;
  stroke: rgba(255, 140, 0, 0.78);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 10 14;
  marker-end: url("#route-arrow");
  animation: routeFlow 1.5s linear infinite;
}

.route-path-secondary {
  stroke: rgba(98, 183, 255, 0.72);
  animation-duration: 1.9s;
}

.route-bus,
.route-bus-lower {
  stroke: rgba(255, 165, 0, 0.32);
  stroke-width: 2;
  stroke-dasharray: none;
  marker-end: none;
  animation: none;
}

.wave-link {
  fill: none;
  stroke: rgba(98, 183, 255, 0.9);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: none;
  animation: wavePulse 2.2s ease-in-out infinite;
}

.wave-link-short {
  animation-delay: 0.5s;
}

.external-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 10;
  animation: routeFlow 1.4s linear infinite;
}

.external-white {
  stroke: rgba(245, 245, 245, 0.92);
  transform: translateY(-4px);
}

.external-red {
  stroke: rgba(255, 70, 70, 0.92);
  transform: translateY(4px);
  animation-delay: -0.7s;
}

.internal-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 10;
  animation: routeFlow 1.4s linear infinite;
}

.internal-white {
  stroke: rgba(245, 245, 245, 0.92);
  transform: translateY(-4px);
}

.internal-red {
  stroke: rgba(255, 70, 70, 0.92);
  transform: translateY(4px);
  animation-delay: -0.7s;
}

.tap-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12 10;
  animation: routeFlow 1.4s linear infinite;
}

.tap-white {
  stroke: rgba(245, 245, 245, 0.92);
  transform: translateX(-4px);
}

.tap-red {
  stroke: rgba(255, 70, 70, 0.92);
  transform: translateX(4px);
  animation-delay: -0.7s;
}

.wifi-symbol path {
  fill: none;
  stroke: rgba(98, 183, 255, 0.8);
  stroke-width: 4;
  stroke-linecap: round;
  animation: wifiPulse 2.4s ease-in-out infinite;
}

.network-node text,
.network-device text,
.route-label {
  fill: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.route-label {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.message-bubble {
  opacity: 0;
}

.message-bubble rect {
  fill: rgba(10, 10, 10, 0.94);
  stroke: rgba(255, 140, 0, 0.72);
  stroke-width: 2;
}

.reply-bubble rect {
  stroke: rgba(98, 183, 255, 0.72);
}

.message-bubble text {
  fill: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 800;
}

.wire-legend text {
  fill: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.telegram-node circle {
  fill: #229ed9;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 2;
}

.telegram-plane {
  fill: #fff;
}

.device-shell,
.bus-box {
  fill: #111;
  stroke: rgba(255, 140, 0, 0.58);
  stroke-width: 2;
}

.master-shell {
  stroke: rgba(47, 208, 111, 0.7);
}

.master-port {
  fill: #222;
  stroke: rgba(47, 208, 111, 0.52);
  stroke-width: 2;
}

.server-slot {
  fill: #222;
  stroke: rgba(255, 140, 0, 0.3);
}

.device-led {
  fill: var(--good);
  animation: ledBlink 1.45s ease-in-out infinite;
}

.device-big {
  fill: var(--accent);
  font-family: "Jockey One", Arial, Helvetica, sans-serif;
  font-size: 38px;
  font-weight: 400;
}

.signal-bar,
.master-ports {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.bus-wire,
.bus-wire-lower {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
}

.bus-wire {
  stroke: rgba(245, 245, 245, 0.92);
}

.bus-wire-lower {
  stroke: rgba(255, 70, 70, 0.92);
}

.device-display,
.oled-screen {
  fill: #050505;
  stroke: rgba(98, 183, 255, 0.72);
  stroke-width: 2;
  animation: screenGlow 2.8s ease-in-out infinite;
}

.packet {
  opacity: 0;
}

.packet-card {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1.5;
}

.request-card {
  fill: var(--accent);
}

.response-card {
  fill: var(--info);
}

.local-card {
  fill: var(--good);
}

.packet-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.packet-line-dark {
  stroke: #000;
}

.packet-line-light {
  stroke: #fff;
}

.oled-message {
  opacity: 0;
}

.oled-message text {
  fill: var(--accent-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.message-examples {
  margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(255, 140, 0, 0.06), transparent 70%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.message-examples h2 {
  font-size: 24px;
  margin-bottom: 14px;
}

.example-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.example-list span {
  border: 1px solid rgba(255, 140, 0, 0.42);
  border-radius: 999px;
  background: #0b0b0b;
  color: var(--text);
  padding: 8px 11px;
  font-size: 14px;
  font-weight: 800;
}

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

@keyframes wifiPulse {
  0%,
  100% {
    opacity: 0.38;
  }

  50% {
    opacity: 1;
  }
}

@keyframes wavePulse {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

@keyframes ledBlink {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

@keyframes screenGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(98, 183, 255, 0));
  }

  50% {
    filter: drop-shadow(0 0 8px rgba(98, 183, 255, 0.48));
  }
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.matrix th,
.matrix td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.matrix th {
  background: #090909;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.matrix td {
  color: var(--muted);
  background: var(--panel);
}

.matrix tr:last-child td {
  border-bottom: 0;
}

.code-panel {
  background: #080808;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
  color: #d8d8d8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.kpi-item b {
  display: block;
  font-size: 24px;
  color: var(--accent);
}

.kpi-item span {
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 12px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #000;
  font-weight: 900;
}

.step div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.step strong {
  display: block;
  color: var(--text);
}

.step span {
  color: var(--muted);
}

.hero-console {
  background:
    linear-gradient(180deg, rgba(255, 140, 0, 0.11), transparent 44%),
    #070707;
  border: 1px solid rgba(255, 140, 0, 0.3);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.console-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.console-title {
  color: var(--accent);
  font-weight: 900;
}

.console-lines {
  display: grid;
  gap: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.console-lines div {
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid #252525;
  border-radius: 6px;
  padding: 9px;
  color: #d7d7d7;
}

.console-lines b {
  color: var(--accent);
}

.page-title {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 20px 36px;
}

.page-title h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.page-title p {
  color: var(--muted);
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #000;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .hero,
  .split,
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .kpi {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 12px;
  }
}

@media (max-width: 720px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 7px 8px;
    font-size: 13px;
  }

  .hero {
    padding-top: 34px;
  }

  .footer-inner {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .route-path,
  .external-line,
  .internal-line,
  .tap-line,
  .wave-link,
  .message-bubble,
  .oled-message,
  .wifi-symbol path,
  .device-led,
  .device-display,
  .oled-screen {
    animation: none;
  }

  .packet {
    display: none;
  }
}
