:root {
  --bg: #0b0d10;
  --bg-alt: #0f1318;
  --card: #151a21;
  --card-hover: #1a212b;
  --line: #232b36;
  --fg: #e8eef5;
  --muted: #94a3b4;
  --accent: #f97316;
  --accent-2: #fb923c;
  --ready: #22c55e;
  --radius: 16px;
  --container: 1120px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
p { margin: 0; }

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

.accent { color: var(--accent); }
.mono { font-family: "Cascadia Code", Consolas, "Courier New", monospace; font-size: 0.92em; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #1a1206;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 13, 16, 0.94);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.12rem;
}
.brand-logo { display: block; border-radius: 10px; }
.brand-name { white-space: nowrap; }

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color .2s ease;
}
.nav a:hover { color: var(--fg); }

.header-cta { margin-left: 4px; }

.burger {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #1a1206;
  box-shadow: 0 10px 26px -12px rgba(249, 115, 22, .8);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 10vw, 104px) 0 clamp(40px, 7vw, 72px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto 0;
  height: 620px;
  background:
    radial-gradient(560px 320px at 18% 0%, rgba(249, 115, 22, .22), transparent 70%),
    radial-gradient(520px 300px at 92% 12%, rgba(56, 189, 248, .12), transparent 72%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  margin-bottom: 20px;
}
.lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  max-width: 640px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  min-width: 148px;
  padding: 16px 20px;
  background: linear-gradient(180deg, var(--card), rgba(21, 26, 33, .4));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.hero-stats strong { font-size: 1.5rem; color: var(--fg); }
.hero-stats span { color: var(--muted); font-size: 0.86rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 92px) 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { max-width: 620px; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, .55);
  background: var(--card-hover);
}
.card-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(249, 115, 22, .12);
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }
.card-body { min-width: 0; }
.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card-top h3 { font-size: 1.12rem; }
.card-body p { color: var(--muted); font-size: 0.94rem; }
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}
.tags li {
  font-size: 0.76rem;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge-ready { color: var(--ready); background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .3); }
.badge-dev { color: var(--accent-2); background: rgba(249, 115, 22, .12); border-color: rgba(249, 115, 22, .32); }
.badge-share { color: #60a5fa; background: rgba(96, 165, 250, .12); border-color: rgba(96, 165, 250, .32); }

.cards-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-more::after { content: " →"; }
.card-more:hover { color: var(--accent-2); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text h2 { margin-bottom: 18px; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.principles li {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.principle-mark {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .15);
}
.principles strong { display: block; margin-bottom: 2px; }
.principles p { color: var(--muted); font-size: 0.92rem; }

/* ---------- CTA ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(249, 115, 22, .16), transparent 70%),
    var(--card);
}
.cta-text h2 { margin-bottom: 10px; }
.cta-text p { color: var(--muted); max-width: 520px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-small { font-size: 1rem; }
.footer-note { color: var(--muted); font-size: 0.86rem; }
.footer-link { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.footer-link:hover { color: var(--accent-2); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
}

/* ---------- Страница программы (driverscan.html) ---------- */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.file:hover { border-color: #2f3a48; }

.file-main { display: flex; align-items: center; gap: 18px; min-width: 0; }

.file-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.file-icon-plain {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  font-family: "Cascadia Code", Consolas, monospace;
  color: var(--accent);
  font-size: 0.95rem;
}

.file h3 { font-size: 1.1rem; margin-bottom: 6px; }
.file p { color: var(--muted); font-size: 0.94rem; max-width: 62ch; }
.file .file-meta { color: #64748b; font-size: 0.86rem; margin-top: 6px; }

.note {
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.note h3 { font-size: 1.05rem; margin-bottom: 10px; }
.note p { color: var(--muted); font-size: 0.94rem; margin-bottom: 12px; }
.note p:last-child { margin-bottom: 0; }

.sums {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--fg);
}

.faq { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 760px; }

.faq li {
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq h3 { font-size: 1rem; margin-bottom: 8px; }
.faq p { color: var(--muted); font-size: 0.94rem; }

@media (max-width: 640px) {
  .file { flex-direction: column; align-items: stretch; }
  .file .btn { justify-content: center; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 14px 24px 22px;
    background: rgba(11, 13, 16, .98);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav a:last-child { border-bottom: none; }
  .header-cta { display: none; }
  .burger { display: flex; }
}
