/* =========================================================
   NAM FILES — базовая дизайн-система (тёмная тема, тема лампового усилителя)
   ========================================================= */

:root {
  --bg: #100e0c;
  --bg-alt: #16130f;
  --surface: #1d1812;
  --surface-2: #251e15;
  --border: #35291c;
  --text: #f3ece1;
  --text-muted: #b6a996;
  --text-dim: #8a7d6c;
  --accent: #ff7a29;
  --accent-2: #ffb238;
  --accent-soft: rgba(255, 122, 41, 0.14);
  --success: #6fcf97;
  --danger: #eb5757;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --font-head: 'Oswald', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255, 122, 41, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 400px at 100% 0%, rgba(255, 178, 56, 0.06), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 14, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--text) !important;
  text-decoration: none !important;
}

.logo .glow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 60%, #7a2f00 100%);
  box-shadow: 0 0 16px rgba(255, 122, 41, 0.65);
  flex: none;
}

.logo strong { color: var(--accent-2); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: var(--accent-2); background: var(--accent-soft); }

.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.lang-switch a {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.lang-switch a.active { color: var(--accent-2); background: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .lang-switch { margin: 8px 0 0; padding: 12px 0 0; border-left: none; border-top: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a0f00;
  box-shadow: 0 8px 20px rgba(255, 122, 41, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 122, 41, 0.45); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */

.hero {
  padding: 76px 0 60px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 41, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero p.lead {
  max-width: 680px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.hero-stats .stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--accent-2);
}
.hero-stats .stat span { font-size: 0.85rem; color: var(--text-dim); }

/* ---------- Section ---------- */

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

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

.section-head p { margin: 0; max-width: 560px; }

/* ---------- Grid / Cards ---------- */

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(255, 122, 41, 0.4); }

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* ---------- Tags / badges ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.accent { color: var(--accent-2); background: var(--accent-soft); border-color: rgba(255,122,41,0.3); }
.tag.green { color: var(--success); background: rgba(111, 207, 151, 0.12); border-color: rgba(111,207,151,0.3); }

/* ---------- File / library cards ---------- */

.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }

.file-card .file-title { font-family: var(--font-head); font-size: 1.05rem; text-transform: none; margin: 0; }
.file-card .file-meta { font-size: 0.85rem; color: var(--text-dim); margin: 0; }

.file-card audio { width: 100%; height: 34px; }

.file-card .file-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-bar select,
.filter-bar input[type="search"] {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.filter-bar input[type="search"] { flex: 1; min-width: 200px; }

.filter-chip {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-chip.active { background: var(--accent-soft); color: var(--accent-2); border-color: rgba(255,122,41,0.4); }

.result-count { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 16px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

/* ---------- Table ---------- */

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.compare th, table.compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
table.compare th {
  background: var(--surface-2);
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
table.compare tr:last-child td { border-bottom: none; }
table.compare td.yes { color: var(--success); font-weight: 700; }
table.compare td.no { color: var(--text-dim); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.step {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.step .num {
  counter-increment: step;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--font-head);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step .num::before { content: counter(step); }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; }

/* ---------- FAQ / accordion ---------- */

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+";
  color: var(--accent-2);
  font-size: 1.3rem;
  font-weight: 400;
}
.accordion-item[open] summary::after { content: "\2212"; }
.accordion-item .accordion-body {
  padding: 0 20px 20px;
  color: var(--text-muted);
}

/* ---------- Callout / notice ---------- */

.callout {
  border: 1px solid rgba(255, 122, 41, 0.35);
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  margin: 24px 0;
}
.callout strong { color: var(--accent-2); }

.callout.muted {
  border-color: var(--border);
  background: var(--surface);
}

/* ---------- Glossary ---------- */

.glossary dt {
  font-family: var(--font-head);
  color: var(--accent-2);
  margin-top: 18px;
  font-size: 1.02rem;
}
.glossary dd { margin: 4px 0 0; color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 26px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h4 {
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--accent-2); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ---------- Page header (inner pages) ---------- */

.page-hero {
  padding: 52px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-hero p.lead { max-width: 700px; margin: 0; font-size: 1.05rem; }
.breadcrumb { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 12px; }
.breadcrumb a { color: var(--text-dim); }

.prose h2 { margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { color: var(--text-muted); padding-left: 22px; }
.prose li { margin-bottom: 8px; }
