/* Kora Stack Showcase — тёмная тема GoHost: #060a13, cyan→indigo */
:root {
  --bg: #060a13;
  --bg2: #0a1120;
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e6edf7;
  --muted: #8b98ad;
  --cyan: #22d3ee;
  --indigo: #818cf8;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --grad: linear-gradient(135deg, #22d3ee, #818cf8);
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --sans: "Space Grotesk", "Inter", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Навбар ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(6, 10, 19, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .logo { font-weight: 700; font-size: 18px; letter-spacing: 0.4px; }
.nav .logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav .links a {
  color: var(--muted); margin-left: 22px; font-size: 14px; font-weight: 500;
  transition: color .2s;
}
.nav .links a:hover { color: var(--text); text-decoration: none; }
.nav .links a.active { color: var(--cyan); }

/* ── Hero с 3D ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 130px 20px 70px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 62% 46% at 50% 42%, rgba(6,10,19,0.55), transparent 72%);
}
#three-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero .kicker {
  font-family: var(--mono); font-size: 13px; color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 84px); font-weight: 700; line-height: 1.05;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; margin-bottom: 18px;
}
.hero .sub { font-size: clamp(16px, 2.4vw, 22px); color: var(--muted); margin-bottom: 30px; }
.hero .badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.badge {
  font-family: var(--mono); font-size: 12.5px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--muted);
}
.badge.ok { color: var(--green); border-color: rgba(52, 211, 153, 0.35); }
.badge.live { color: var(--cyan); border-color: rgba(34, 211, 238, 0.35); }
.badge b { color: var(--text); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 12px;
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--grad); color: #04101a; box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(99, 102, 241, 0.5); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--cyan); transform: translateY(-2px); }

/* ── Секции ── */
.section { max-width: 1180px; margin: 0 auto; padding: 90px 24px; }
.section h2 {
  font-size: clamp(26px, 4vw, 38px); font-weight: 700; margin-bottom: 10px;
}
.section .lead { color: var(--muted); max-width: 720px; margin-bottom: 44px; font-size: 16px; }

/* ── Карточки модулей ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; transition: transform .2s, background .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .2s;
}
.card:hover { transform: translateY(-4px); background: var(--card-hover); border-color: rgba(255,255,255,0.16); }
.card:hover::before { opacity: 1; }
.card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card .orb { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.card h3 { font-size: 19px; font-weight: 700; }
.card .role {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.card .status {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--mono); font-size: 11px; padding: 4px 10px;
  border-radius: 999px; border: 1px solid var(--border); color: var(--muted);
}
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.card .tests { font-family: var(--mono); font-size: 12.5px; color: var(--green); margin-bottom: 14px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card .tag {
  font-family: var(--mono); font-size: 11px; padding: 4px 9px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--cyan); border-radius: 6px;
}
.card a.card-link { position: absolute; inset: 0; z-index: 1; }

/* ── Таблицы статуса фаз / API ── */
.phase-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); margin-bottom: 10px;
}
.phase-row .ph { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--cyan); width: 34px; }
.phase-row .st { font-size: 16px; width: 30px; }
.phase-row .nm { flex: 1; font-weight: 600; }
.phase-row .dt { color: var(--muted); font-size: 13px; flex: 2; }

/* ── Панель API-ответа ── */
.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.api-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.api-card h3 { font-size: 17px; }
.api-card .desc { color: var(--muted); font-size: 13.5px; }
.api-card .endpoint {
  font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,0.35);
  padding: 8px 12px; border-radius: 8px; display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--border);
}
.method { font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.method.GET { background: rgba(52, 211, 153, 0.15); color: var(--green); }
.method.POST { background: rgba(34, 211, 238, 0.15); color: var(--cyan); }
.method.RPC, .method.gRPC { background: rgba(129, 140, 248, 0.15); color: var(--indigo); }
.api-card button.run {
  align-self: flex-start; margin-top: auto; padding: 10px 18px; border-radius: 10px;
  background: var(--grad); border: none; color: #04101a; font-weight: 700;
  cursor: pointer; font-size: 14px; transition: transform .15s, box-shadow .2s;
}
.api-card button.run:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,.4); }
.api-card button.run:disabled { opacity: .55; cursor: wait; transform: none; }
.response {
  font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.45);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: #b9f5d3;
}
.response.err { color: #fda4af; }
.response .spin::after {
  content: ""; display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,.2); border-top-color: var(--cyan);
  border-radius: 50%; animation: sp 0.8s linear infinite; vertical-align: middle;
  margin-left: 8px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ── Детальный модуль ── */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail .col { display: flex; flex-direction: column; gap: 12px; }
.detail h4 { font-size: 15px; color: var(--cyan); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.detail ul { list-style: none; }
.detail ul li { padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; margin-bottom: 8px; color: var(--muted); }
.detail ul li b { color: var(--text); }
.ep-row { font-family: var(--mono); font-size: 12.5px; padding: 9px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.ep-row .p { color: var(--text); }

/* ── Live-строка ── */
.livebar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 26px; font-family: var(--mono); font-size: 12px;
  background: rgba(6, 10, 19, 0.9); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); color: var(--muted);
  flex-wrap: wrap;
}
.livebar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.livebar .dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.livebar .sep { opacity: 0.3; }

/* ── Футер ── */
.footer {
  text-align: center; padding: 40px 20px 80px; color: var(--muted);
  font-size: 13px; border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer b { color: var(--text); }

/* ── Анимация появления ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.vis { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .grid, .api-grid { grid-template-columns: 1fr; }
  .nav .links a { margin-left: 12px; font-size: 13px; }
}
