/* HardSound — общий CSS сайта (токены, тема, типографика, шапка/футер, базовые компоненты).
   Странично-специфичные стили остаются инлайн в <style> каждой страницы. */

:root {
  --font-head: "Manrope", system-ui, "Segoe UI", sans-serif;
  --font-body: system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --bg: #171513;
  --bg-elev: #201d1a;
  --bg-elev-2: #2a2622;
  --text: #ece6dd;
  --text-dim: #a79c8e;
  --border: rgba(255,255,255,.09);
  --accent: #e8a33c;
  --accent-text: #e8a33c;
  --accent-contrast: #171513;
  --focus: #f5b95a;
  --dot: rgba(255,255,255,.035);

  --seg-budget: #8fc06a;
  --seg-mid: var(--accent-text);
  --seg-high: #e6714f;

  --radius: 10px;
  --container: 1080px;
}

/* Тёмная тема — безусловный дефолт (SPEC: «Тёмная тема по умолчанию»).
   Светлая включается только явно, атрибутом data-theme="light" (переключатель в шапке). */
:root[data-theme="light"] {
  --bg: #f6f2ea;
  --bg-elev: #ffffff;
  --bg-elev-2: #efe9dd;
  --text: #241f1a;
  --text-dim: #6e6459;
  --border: rgba(0,0,0,.10);
  --accent: #8f5310;
  --accent-text: #9c5c18;
  --accent-contrast: #ffffff;
  --focus: #9c5c18;
  --dot: rgba(0,0,0,.04);

  --seg-budget: #3f6b22;
  --seg-mid: #7a4a0f;
  --seg-high: #9c3a1f;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.18; }
h3 { line-height: 1.3; }
h1 { text-wrap: balance; }
#main { scroll-margin-top: 84px; }
.mono { font-family: var(--font-mono); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--accent); color: var(--accent-contrast);
  padding: .6em 1em; border-radius: 0 0 8px 8px; z-index: 100;
  font-weight: 700; text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

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

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__logo { height: 28px; width: auto; }
.nav { display: none; }
.nav__list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav__link {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text-dim); font-size: .92rem; font-weight: 600;
}
.nav__link:hover { color: var(--text); background: var(--bg-elev); }
.nav__link--active { color: var(--accent-text); background: var(--bg-elev); }

.header-controls { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .burger {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  border-radius: 8px; width: 38px; height: 38px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 1rem; padding: 0;
}
.theme-toggle:hover, .burger:hover { border-color: var(--accent); }
.theme-toggle::before { content: "☀"; }
:root[data-theme="light"] .theme-toggle::before { content: "☾"; }
.burger__bar { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.burger__bar::before, .burger__bar::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.burger__bar::before { top: -6px; } .burger__bar::after { top: 6px; }

.mobile-nav {
  display: none; border-bottom: 1px solid var(--border); background: var(--bg-elev);
}
.mobile-nav.is-open { display: block; max-height: calc(100dvh - 62px); overflow-y: auto; }
.mobile-nav__list { list-style: none; margin: 0; padding: 8px 20px 16px; display: flex; flex-direction: column; }
.mobile-nav__list a {
  display: block; padding: 12px 4px; text-decoration: none; color: var(--text-dim);
  font-weight: 600; border-bottom: 1px solid var(--border);
}
.mobile-nav__list a:last-child { border-bottom: none; }
.mobile-nav__list a.nav__link--active { color: var(--accent-text); }

@media (min-width: 900px) {
  .nav { display: block; }
  .burger { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---- Page intro ---- */
.page-intro { padding: 40px 0 8px; }
.eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .09em;
  font-size: .78rem; color: var(--accent-text); margin: 0 0 10px;
}
h1 {
  font-family: var(--font-head); font-weight: 800; margin: 0 0 14px;
  font-size: clamp(1.6rem, 5vw, 2.4rem); letter-spacing: -.01em;
}
.page-intro__lead { color: var(--text-dim); max-width: 62ch; margin: 0 0 4px; font-size: 1.02rem; }
.page-intro__stat { color: var(--text-dim); font-size: .9rem; margin: 14px 0 0; }
.page-intro__stat .mono { color: var(--text); }

/* ---- Lite YouTube embed ---- */
.lite-embed {
  position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px;
  overflow: hidden; margin-bottom: 12px;
}
.lite-embed__btn {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0;
  border: none; background: none; cursor: pointer; display: block;
}
.lite-embed__thumb {
  width: 100%; height: 100%; object-fit: cover; opacity: .82;
}
.lite-embed__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.lite-embed__btn:hover .lite-embed__thumb { opacity: 1; }
.lite-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Buttons ---- */
.btn-primary {
  background: var(--accent); color: var(--accent-contrast); text-decoration: none; font-weight: 700;
  padding: 11px 20px; border-radius: 8px; white-space: nowrap; font-size: .92rem; display: inline-block;
}
.btn-primary:hover { background: var(--focus); }
.btn-secondary {
  background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); text-decoration: none;
  font-weight: 600; padding: 10px 18px; border-radius: 8px; display: inline-block; font-size: .9rem;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-text); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 28px; margin-top: 20px; }
.site-footer__top {
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; margin-bottom: 24px;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__brand img { height: 24px; }
.footer-col { min-width: 160px; }
.footer-col__heading {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  font-size: .72rem; color: var(--text-dim); margin: 0 0 10px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { text-decoration: none; color: var(--text); font-size: .88rem; }
.footer-col a:hover { color: var(--accent-text); }
.site-footer__bottom {
  border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: space-between; color: var(--text-dim); font-size: .8rem;
}
.site-footer__bottom a { color: var(--text-dim); }
.site-footer__bottom a:hover { color: var(--accent-text); }
