/* ==========================================================================
   AzForge — Home Page Styles (Aurora Glass)
   ========================================================================== */

.card-body,
.code-inner {
  position: relative;
  z-index: 2;
}

/* ---------- Мобильное выпадающее меню главной ---------- */
.mnav {
  display: none;
  flex-direction: column;
  max-width: 1240px;
  margin: 8px auto 0;
  border-radius: 16px;
  padding: 10px 12px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.mnav.open { display: flex; }
.mnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.mnav a:hover { background: var(--bg-hover); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 24px;
}
body[data-theme="dark"] .kicker {
  border: 1px solid rgba(34, 211, 238, 0.30);
  background: rgba(6, 182, 212, 0.10);
  color: #a5f3fc;
}
body[data-theme="light"] .kicker {
  border: 1px solid #c7d2fe;
  background: rgba(238, 242, 255, 0.92);
  color: #4338ca;
}

.kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.9);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.8vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--text);
}
.hero h1 .hot {
  background: linear-gradient(90deg, #22d3ee 0%, #818cf8 52%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body[data-theme="light"] .hero h1 .hot {
  background: linear-gradient(90deg, #0284c7 0%, #4f46e5 52%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--text-dim);
  font-size: 17.5px;
  line-height: 1.65;
  max-width: 560px;
  margin: 22px 0 32px;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
body[data-theme="dark"] .btn-docs svg { color: #67e8f9; }
body[data-theme="light"] .btn-docs svg { color: #4f46e5; }

.micro {
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.micro i {
  font-style: normal;
  opacity: 0.65;
}

/* ---------- Карточка кода Mod.cpp ---------- */
.code-card {
  overflow: hidden;
  box-shadow: var(--shadow);
}
body[data-theme="dark"] .code-card {
  background: rgba(10, 15, 29, 0.78);
}
body[data-theme="light"] .code-card {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(30, 41, 59, 0.85);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}
.cd { width: 10px; height: 10px; border-radius: 50%; }
.cd.r { background: #f87171; }
.cd.y { background: #fbbf24; }
.cd.g { background: #34d399; }

.code-name {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #67e8f9;
  font-weight: 600;
}

.copy {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
}
.copy:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.copy.copied {
  background: rgba(16, 185, 129, 0.20);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}
.copy svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.code-card pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.72;
  padding: 20px 22px;
  overflow-x: auto;
  color: #e2e8f0;
  min-height: 96px;
}
.code-card pre::-webkit-scrollbar { height: 7px; }
.code-card pre::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 4px; }

.t-cm { color: #64748b; font-style: italic; }
.t-kw { color: #a5b4fc; font-weight: 500; }
.t-type { color: #67e8f9; }
.t-tag { color: #38bdf8; font-weight: 600; }
.t-str { color: #6ee7b7; }
.t-num { color: #fcd34d; }

.code-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
}
.code-status .ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}
.code-status b { color: #6ee7b7; font-weight: 600; }

/* ---------- Секции ---------- */
.sec {
  padding: 72px 0;
  scroll-margin-top: 88px;
}
.sec-head {
  max-width: 660px;
  margin-bottom: 42px;
}
.sec-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--accent);
}
body[data-theme="dark"] .sec-kicker { color: #67e8f9; }
body[data-theme="dark"] .sec-kicker-alt { color: #a5b4fc; }

.sec h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.sec-sub {
  color: var(--text-dim);
  margin-top: 10px;
  font-size: 16px;
}

/* ---------- Возможности (сетка 3x2) ---------- */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card { padding: 24px; }
.card:hover { transform: translateY(-3px); }

.icw {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
body[data-theme="dark"] .icw {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(99, 102, 241, 0.20));
  border: 1px solid rgba(34, 211, 238, 0.26);
  color: #67e8f9;
}
body[data-theme="light"] .icw {
  background: #eef2ff;
  border: 1px solid rgba(199, 210, 254, 0.9);
  color: #4f46e5;
}
.icw svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.card p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.62;
}
.card a {
  font-weight: 600;
  color: var(--link);
  text-underline-offset: 4px;
}
.card a:hover { text-decoration: underline; }

/* ---------- Установка (3 шага с соединительной линией) ---------- */
.steps-wrap { position: relative; }
.steps-line {
  position: absolute;
  top: 46px;
  left: 14%;
  right: 14%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.42), rgba(129, 140, 248, 0.55), rgba(167, 139, 250, 0.42));
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
.step { padding: 24px; }
.step:hover { transform: translateY(-3px); }

.step .n {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
body[data-theme="dark"] .step .n {
  background: #0b1224;
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #67e8f9;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
}
body[data-theme="light"] .step .n {
  background: #ffffff;
  border: 1px solid #a5b4fc;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.step h4 {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.step p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.62;
}
.step p a {
  font-weight: 600;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Анимация появления ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.rv.on {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
}

/* ---------- Адаптив главной ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .steps-line { display: none; }
}
@media (max-width: 860px) {
  .topbar { padding: 10px 12px 0; }
  .topnav { display: none; }
  .burger { display: grid; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .grid3 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 60px; }
  .sec { padding: 52px 0; }
}
