/* Beacon Table — сайт проекта. Палитра согласована с приложением (web/src/styles/theme.css). */

:root {
  --bg:            #0b1220;
  --bg-alt:        #0e1626;
  --surface:       #141d30;
  --surface-hi:    #1b2740;
  --border:        rgba(255, 255, 255, 0.09);
  --border-hi:     rgba(255, 255, 255, 0.16);

  --text:          #e9edf6;
  --text-dim:      rgba(233, 237, 246, 0.62);
  --text-faint:    rgba(233, 237, 246, 0.40);

  --gold:          #f3b93a;
  --gold-deep:     #c9701f;
  --accent:        #7c6cf0;
  --accent-hi:     #8f81ff;
  --green:         #7fd694;
  --red:           #f0736b;

  --radius:        12px;
  --radius-lg:     20px;
  --maxw:          1120px;

  --shadow:        0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-soft:   0 6px 22px rgba(0, 0, 0, 0.35);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--surface-hi);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .12em .4em;
  /* Длинные адреса вида http://192.168.0.10:8080/broadcast.html не должны
     распирать страницу на телефоне. */
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--mono);
  font-size: .85rem;
  background: #070d18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-dim); font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: 12px; text-align: center; border-bottom: 0; }
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 11px;
  font-weight: 650;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--gold) 0%, #dc9a22 100%);
  color: #221503;
  box-shadow: 0 6px 22px rgba(243, 185, 58, 0.22);
}
.btn-primary:hover { background: linear-gradient(180deg, #ffc94f 0%, var(--gold) 100%); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border-hi);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hi); }

.btn-sm { padding: 9px 17px; font-size: .92rem; }

/* ---------- Первый экран ---------- */

.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -320px; left: 50%;
  width: 1100px; height: 780px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(243, 185, 58, 0.16), rgba(243, 185, 58, 0) 72%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(243, 185, 58, 0.10);
  border: 1px solid rgba(243, 185, 58, 0.26);
  border-radius: 999px;
  padding: 6px 15px;
  margin-bottom: 22px;
}

.hero h1 { margin-bottom: .45em; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--gold) 10%, #ffd97a 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: clamp(1.03rem, 1.7vw, 1.2rem); color: var(--text-dim); max-width: 40em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 13px; margin: 30px 0 18px; }

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: .92rem;
  color: var(--text-faint);
}
.trust-line span { display: inline-flex; align-items: center; gap: 7px; }
.trust-line span::before { content: "✓"; color: var(--green); font-weight: 700; }

.hero-media {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hi);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.hero-media img { width: 100%; }
.media-caption {
  padding: 11px 16px;
  font-size: .87rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ---------- Секции ---------- */

section { padding: clamp(52px, 7vw, 88px) 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 44em; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-dim); margin-bottom: 0; }

/* ---------- Сетка карточек ---------- */

.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; color: var(--text-dim); font-size: .97rem; }
.card .ico { font-size: 1.7rem; line-height: 1; display: block; margin-bottom: 14px; }

.card-link { display: block; color: inherit; transition: border-color .18s ease, transform .12s ease; }
.card-link:hover { text-decoration: none; border-color: var(--border-hi); transform: translateY(-2px); }
.card-link .more { color: var(--gold); font-weight: 600; font-size: .93rem; }

/* ---------- Проблема / решение ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }

.pane { border-radius: var(--radius); padding: 26px 24px; border: 1px solid var(--border); }
.pane.bad  { background: rgba(240, 115, 107, 0.06); border-color: rgba(240, 115, 107, 0.24); }
.pane.good { background: rgba(127, 214, 148, 0.06); border-color: rgba(127, 214, 148, 0.24); }
.pane h3 { font-size: 1.05rem; margin-bottom: 1em; }
.pane ul { margin: 0; padding-left: 1.25em; color: var(--text-dim); }
.pane li { margin-bottom: .6em; }
.pane li::marker { color: var(--text-faint); }

/* ---------- Таблица ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .95rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-hi); font-size: .88rem; letter-spacing: .01em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; background: var(--surface); }
td.yes { color: var(--green); }
td.no  { color: var(--red); }
.col-us { background: rgba(243, 185, 58, 0.07); }
thead th.col-us { background: rgba(243, 185, 58, 0.14); color: var(--gold); }

/* ---------- Галерея ---------- */

.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  margin: 0;
}
.shot img { width: 100%; }
.shot figcaption { padding: 12px 16px; font-size: .9rem; color: var(--text-dim); border-top: 1px solid var(--border); }

/* ---------- Шаги ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 22px 20px 66px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 22px; top: 20px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(243, 185, 58, 0.14);
  border: 1px solid rgba(243, 185, 58, 0.35);
  color: var(--gold);
  font-weight: 700; font-size: .95rem;
}
.steps li p:last-child { margin-bottom: 0; }

/* ---------- Заметки / предупреждения ---------- */

.note {
  border-left: 3px solid var(--gold);
  background: rgba(243, 185, 58, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--gold); }

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

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 17px 22px;
  font-weight: 620;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 22px 18px; color: var(--text-dim); }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Финальный призыв ---------- */

.cta-band { text-align: center; }
.cta-band .wrap { max-width: 720px; }
.cta-band .cta-row { justify-content: center; }
.cta-band .trust-line { justify-content: center; }

/* ---------- Подвал ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 34px;
  font-size: .93rem;
  color: var(--text-faint);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* ---------- Cookie-баннер ---------- */

.cookie-bar {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 100;
  max-width: 720px;
  margin: 0 auto;
  background: rgba(20, 29, 48, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: none;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .92rem;
  color: var(--text-dim);
}
.cookie-bar.show { display: flex; }
.cookie-bar p { margin: 0; flex: 1 1 300px; }
.cookie-bar .btn { flex-shrink: 0; }

/* ---------- Прочее ---------- */

.page-head { padding: clamp(44px, 6vw, 72px) 0 8px; }
.page-head .eyebrow { margin-bottom: 16px; }

.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.35em; color: var(--text-dim); }
.prose li { margin-bottom: .5em; }
.prose table { min-width: 520px; }

.dl-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.dl-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 20px;
}
.dl-row .os { font-weight: 650; flex: 1 1 190px; }
.dl-row .hint { color: var(--text-faint); font-size: .88rem; flex: 1 1 100%; margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
