/* ============================================================
   KodikDevKit — documentation site
   Dark terminal theme · vanilla CSS · responsive
   ============================================================ */

:root {
  --bg:        #0b0f0c;
  --bg-2:      #0f1512;
  --panel:     #10171300;
  --surface:   #121a15;
  --surface-2: #0c110e;
  --border:    #1e2b22;
  --border-2:  #294034;
  --text:      #d7e5dc;
  --text-dim:  #8aa093;
  --muted:     #5f7568;

  --green:     #3ddc84;
  --green-2:   #26b567;
  --cyan:      #45d0d8;
  --yellow:    #e3c341;
  --red:       #ef6461;
  --magenta:   #c792ea;
  --str:       #9ccc65;

  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius: 12px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, #123021 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  color: var(--green);
}
.accent { color: var(--green); }

/* ───────────────── Nav ───────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 12, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 20px;
}
.nav__brand {
  font-family: var(--mono); font-weight: 700; font-size: 1.05rem;
  color: var(--text); display: flex; align-items: center; gap: 8px;
}
.nav__brand:hover { text-decoration: none; }
.nav__logo { width: 30px; height: 30px; border-radius: 6px; display: block; }
.nav__links {
  margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.nav__links a {
  color: var(--text-dim); font-size: 0.9rem; padding: 6px 10px; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav__links a.active { color: var(--green); }
.nav__cta {
  border: 1px solid var(--border-2); color: var(--green) !important;
}
.nav__cta:hover { background: #13251b !important; }

.nav__toggle {
  display: none; margin-left: auto; flex-direction: column; gap: 4px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ───────────────── Hero ───────────────── */
.hero { position: relative; padding: 64px 0 48px; overflow: hidden; text-align: center; }
.hero__glow {
  position: absolute; inset: -20% 0 auto 0; height: 480px; pointer-events: none;
  background: radial-gradient(600px 240px at 50% 0, rgba(61,220,132,.18), transparent 70%);
}
.hero__inner { position: relative; }

.banner {
  font-family: var(--mono);
  color: var(--green);
  text-shadow: 0 0 18px rgba(61, 220, 132, .35);
  font-size: clamp(3.4px, 1.32vw, 13px);
  line-height: 1.05;
  margin: 0 auto 8px;
  overflow-x: auto;
  white-space: pre;
  display: inline-block;
  text-align: left;
}
.hero__subtitle {
  font-family: var(--mono); color: var(--cyan); letter-spacing: .12em;
  text-transform: uppercase; font-size: clamp(.8rem, 2.4vw, 1.1rem);
  margin: 8px 0 20px;
}
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.badge {
  font-family: var(--mono); font-size: .74rem; color: var(--green);
  border: 1px solid var(--border-2); background: #0e1712;
  padding: 4px 10px; border-radius: 999px;
}
.badge--cyan { color: var(--cyan); }

.hero__lead {
  max-width: 680px; margin: 0 auto 28px; color: var(--text-dim); font-size: 1.02rem;
}
.hero__lead strong { color: var(--text); }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-family: var(--mono); font-size: .92rem; padding: 11px 22px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: .15s; display: inline-block;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--green); color: #06210f; font-weight: 700; }
.btn--primary:hover { background: #5ef29c; }
.btn--ghost { border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface); }

/* ───────────────── Sections ───────────────── */
.section { padding: 52px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }
.section__title {
  font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 14px; color: var(--text);
  font-weight: 700; letter-spacing: -.01em;
}
.section__hash { color: var(--green); font-family: var(--mono); }
.section__desc { color: var(--text-dim); max-width: 760px; font-size: 1.02rem; margin: 0 0 22px; }
.section__desc strong { color: var(--text); }
.section__desc em { color: var(--cyan); font-style: normal; }

/* Command head */
.cmd__head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 16px; }
.cmd__num {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: #06210f;
  background: var(--green); border-radius: 10px; padding: 6px 12px; line-height: 1.4;
  box-shadow: 0 0 18px rgba(61,220,132,.35); flex: none;
}
.cmd__sig {
  display: inline-block; margin-top: 8px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--cyan); font-size: .84rem;
  padding: 6px 10px; border-radius: 8px;
}

.feature-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  font-family: var(--mono); font-size: .76rem; color: var(--text-dim);
  border: 1px solid var(--border); background: var(--surface-2);
  padding: 4px 10px; border-radius: 999px;
}

/* ───────────────── Terminal blocks ───────────────── */
.terminal {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.7);
  margin: 0 0 8px;
}
.terminal__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #0a0e0b; border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--red { background: #ff5f56; } .dot--yellow { background: #ffbd2e; } .dot--green { background: #27c93f; }
.terminal__title {
  font-family: var(--mono); font-size: .78rem; color: var(--muted);
  margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy {
  margin-left: auto; font-family: var(--mono); font-size: .72rem;
  color: var(--text-dim); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; transition: .15s; flex: none;
}
.copy:hover { color: var(--green); border-color: var(--border-2); }
.copy.copied { color: var(--green); border-color: var(--green-2); }
.terminal__body {
  margin: 0; padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: .82rem; line-height: 1.55; color: var(--text);
  white-space: pre;
}
.terminal__body code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* syntax colors */
.c-dim { color: var(--muted); }
.c-bold { color: #fff; font-weight: 700; }
.c-green { color: var(--green); }
.c-cyan { color: var(--cyan); }
.c-yellow { color: var(--yellow); }
.c-red { color: var(--red); }
.c-magenta { color: var(--magenta); }
.c-str { color: var(--str); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Note callout */
.note {
  margin: 16px 0 0; padding: 14px 16px; border-left: 3px solid var(--green-2);
  background: #0e1712; border-radius: 0 8px 8px 0; color: var(--text-dim); font-size: .94rem;
}
.note strong { color: var(--text); }

/* Menu card */
.menu-card { margin-top: 22px; }
.menu-card__label { color: var(--text-dim); font-size: .96rem; margin: 0 0 10px; }
.menu-card__body, .menu-card__body code {
  font-family: var(--mono); font-size: .84rem;
}
.menu-card__body {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin: 0; overflow-x: auto;
  white-space: pre; line-height: 1.6; color: var(--text);
}
.menu-card__body code { background: none; border: 0; padding: 0; color: inherit; }

/* ───────────────── Shield cards ───────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px;
}
.card__title { margin: 0 0 8px; font-size: 1.05rem; color: var(--text); }
.card p { margin: 0; color: var(--text-dim); font-size: .92rem; }

/* ───────────────── Commands table ───────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.cmd-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cmd-table th, .cmd-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cmd-table thead th { background: var(--surface-2); color: var(--text-dim); font-family: var(--mono); font-size: .82rem; }
.cmd-table tbody tr:last-child td { border-bottom: 0; }
.cmd-table tbody tr:hover { background: #0e1712; }
.cmd-table td:first-child { white-space: nowrap; }

/* ───────────────── Easter-egg hint ───────────────── */
/* Деликатный намёк на скрытый Zen Mode (набор «99» в меню).
   Приглушён по умолчанию, чуть проявляется при наведении. */
.easter-hint {
  margin: 12px 2px 0;
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.5;
  opacity: .5;
  cursor: help;
  transition: opacity .25s ease;
  user-select: none;
}
.easter-hint:hover { opacity: .9; }
.easter-hint::before { content: '🐾 '; }

/* ───────────────── Footer ───────────────── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 20px; background: var(--bg-2); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.footer__brand { font-family: var(--mono); font-weight: 700; }
.footer__ver { color: var(--muted); font-size: .84rem; margin-left: 10px; font-family: var(--mono); }
.footer__note { color: var(--text-dim); font-size: .9rem; margin: 0; flex: 1 1 320px; }
/* Шёпот из Zen Mode — цитата пасхалки, едва различима, до hover. */
.footer__whisper {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: .8rem; font-style: italic;
  color: var(--muted); opacity: .55; cursor: help;
  transition: opacity .25s ease;
}
.footer__whisper:hover { opacity: .95; color: var(--text-dim); }
.footer__up { margin-left: auto; color: var(--text-dim); font-family: var(--mono); font-size: .85rem; }

/* ───────────────── Responsive ───────────────── */
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 10px 16px; margin: 0;
    max-height: 0; overflow: hidden; transition: max-height .25s ease; padding-block: 0;
  }
  .nav__links.open { max-height: 420px; padding-block: 10px; }
  .nav__links a { padding: 10px 8px; }
  .nav__cta { text-align: center; margin-top: 4px; }
  .cmd__head { gap: 12px; }
  .cmd__num { font-size: .95rem; padding: 5px 10px; }
}
@media (max-width: 420px) {
  .banner { font-size: 3px; }
}
