/* ============================================================
   Vireqonix — styles.css (трек B1, единственный CSS сайта)
   Токены — ТЗ §5: editorial-premium, «спортивная пресса, не казино»
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var-latin-ext.woff2') format('woff2');
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/sourcesans3-var-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/sourcesans3-var-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF;
}

:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --ink: #17202B;
  --ink-soft: #4A5561;
  --line: #E3E0D8;
  --primary: #0E7A4A;
  --primary-hover: #0A5E39;
  --accent: #1C3D6E;
  --warn: #B4552D;
  --band-bg: #EFEAE0;
  --radius-s: 8px;
  --radius-m: 12px;
  --shadow: 0 1px 3px rgba(23, 32, 43, .08), 0 4px 14px rgba(23, 32, 43, .06);
  --font-display: 'Archivo', 'Trebuchet MS', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--primary); }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin-bottom: var(--s-4); }
h3 { font-size: 1.15rem; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 var(--s-4); }
.container.narrow { max-width: 780px; }

.section { padding: var(--s-7) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: var(--s-2) var(--s-4); z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: var(--s-4);
  min-height: 60px;
}
.logo {
  display: flex; align-items: center; gap: var(--s-2);
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.logo-mark { color: var(--primary); flex: none; }
.logo-word {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.site-nav { display: flex; gap: var(--s-5); }
.site-nav a {
  text-decoration: none; color: var(--ink-soft);
  font-weight: 600; font-size: .95rem; padding: var(--s-2) 0;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.age-badge {
  flex: none;
  font-family: var(--font-display); font-weight: 700; font-size: .8rem;
  border: 2px solid var(--ink); border-radius: 50%;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle { display: none; }

/* --- Bande ANJ --- */
.anj-band {
  background: var(--band-bg);
  border-bottom: 1px solid var(--line);
  font-size: .82rem; line-height: 1.45;
  color: var(--ink-soft);
  padding: var(--s-2) var(--s-4);
  text-align: center;
}
.anj-band a { color: var(--ink); }

/* --- Hero --- */
.hero { padding: var(--s-7) 0 var(--s-5); }
.hero h1 { max-width: 900px; }
.hero-sub { max-width: 68ch; margin-top: var(--s-4); font-size: 1.1rem; color: var(--ink-soft); }
.hero-trust {
  margin-top: var(--s-4); font-family: var(--font-display); font-weight: 600;
  font-size: .9rem; color: var(--ink);
}

/* --- Кнопки и disclosure --- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: 10px 18px; border-radius: var(--radius-s);
  text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.cta-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: var(--s-1); }
.disclosure-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* --- Таблица сравнения --- */
.op-table { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-5); }
.op-row {
  display: grid;
  grid-template-columns: 36px 1.4fr 1fr 1.2fr auto;
  gap: var(--s-4); align-items: center;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--s-4) var(--s-5);
  box-shadow: var(--shadow);
}
.op-rank {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  color: var(--ink-soft);
}
.op-id { display: flex; align-items: center; gap: var(--s-3); }
.op-chip {
  flex: none; width: 44px; height: 44px; border-radius: var(--radius-s);
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.op-chip-lg { width: 52px; height: 52px; font-size: 1.5rem; }
.op-chip.op-logo {
  background: var(--surface); border: 1px solid var(--line); padding: 5px;
}
.op-chip.op-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.score-overall .op-chip { margin-bottom: var(--s-3); }
.op-name { font-size: 1.15rem; }
.op-license { font-size: .74rem; color: var(--ink-soft); }
.op-score { font-variant-numeric: tabular-nums; }
.op-score-num { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.op-score-max { color: var(--ink-soft); font-weight: 600; }
.op-subscores { font-size: .8rem; color: var(--ink-soft); }
.op-bestfor { font-size: .92rem; color: var(--ink-soft); }
.op-actions { display: flex; flex-direction: column; gap: var(--s-2); align-items: stretch; }
.table-footnote { margin-top: var(--s-4); font-size: .85rem; color: var(--ink-soft); }

/* --- Top-3 карточки --- */
.top-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5); margin-top: var(--s-5);
}
.top-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4);
}
.section:not(.section-alt) .top-card, .guide-card, .team-card { background: var(--surface); }
.top-card-head { display: flex; gap: var(--s-3); align-items: center; }
.top-card-note { font-size: .88rem; color: var(--ink-soft); }
.top-card-actions { margin-top: auto; }

/* --- Плюсы/минусы --- */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin: var(--s-4) 0; }
.pros-title, .cons-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: var(--s-2); }
.pros-title { color: var(--primary); }
.cons-title { color: var(--warn); }
.pros li, .cons li { font-size: .92rem; margin-bottom: var(--s-1); }

/* --- Методология, списки --- */
.method-list { list-style: none; padding: 0; }
.method-list li {
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line);
}
.method-list li:last-child { border-bottom: 0; }

/* --- Гайды --- */
.guide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); margin-top: var(--s-5); }
.guide-card {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--s-5); box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.guide-card:hover { border-color: var(--primary); color: var(--ink); }
.guide-card h3 { margin-bottom: var(--s-2); }
.guide-card p { font-size: .92rem; color: var(--ink-soft); }

/* --- FAQ --- */
.faq { margin-top: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--ink);
  padding: var(--s-4) var(--s-5);
  position: relative; padding-right: var(--s-7);
}
.faq-q::after {
  content: "+"; position: absolute; right: var(--s-5); top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem; color: var(--primary); transition: transform .15s ease;
}
.faq-q[aria-expanded="true"]::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { display: none; padding: 0 var(--s-5) var(--s-4); color: var(--ink-soft); }
.faq-item.open .faq-a { display: block; }

/* --- Byline, breadcrumbs --- */
.byline { font-size: .85rem; color: var(--ink-soft); margin-bottom: var(--s-3); }
.breadcrumbs { font-size: .82rem; color: var(--ink-soft); padding-top: var(--s-4); }

/* --- Страница обзора --- */
.review-head { padding-top: var(--s-5); }
.score-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-6);
  align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--s-5) var(--s-6); margin-top: var(--s-4);
  box-shadow: var(--shadow);
}
.score-overall-num {
  font-family: var(--font-display); font-weight: 700; font-size: 3.2rem;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.score-overall-max { font-size: 1.3rem; color: var(--ink-soft); font-weight: 600; }
.op-products { font-size: .85rem; color: var(--ink-soft); }
.score-bars { display: flex; flex-direction: column; gap: var(--s-2); min-width: 260px; }
.score-row { display: grid; grid-template-columns: 108px 1fr 40px; gap: var(--s-2); align-items: center; }
.score-label { font-size: .82rem; color: var(--ink-soft); }
.score-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.score-fill { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.score-val { font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.review-body { padding-top: var(--s-5); padding-bottom: var(--s-6); }
.review-body h2 { margin-top: var(--s-6); }
.review-final-cta { margin-top: var(--s-6); text-align: center; }
.review aside { padding-bottom: var(--s-7); }

/* --- Sticky CTA (mobile, обзоры) --- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: var(--s-3);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: var(--s-2) var(--s-4);
  box-shadow: 0 -2px 12px rgba(23, 32, 43, .12);
}
.sticky-cta .cta-wrap { flex-direction: row; align-items: center; gap: var(--s-2); }
.sticky-cta .btn { padding: 8px 14px; font-size: .88rem; }
.sticky-cta-note { font-family: var(--font-display); font-weight: 600; font-size: .88rem; }

/* --- Статьи (гайды, юридика) --- */
.article { padding-top: var(--s-5); padding-bottom: var(--s-6); }
.article h1 { margin-bottom: var(--s-3); }
.article h2 { margin-top: var(--s-6); }
.article p { margin: var(--s-3) 0; max-width: 72ch; }
.article ul { margin: var(--s-3) 0; }
.key-takeaways {
  margin-top: var(--s-6); background: var(--surface);
  border-left: 4px solid var(--primary); border-radius: var(--radius-s);
  padding: var(--s-4) var(--s-5);
}
.key-takeaways h2 { margin-top: 0; font-size: 1.1rem; }
.team-card {
  border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: var(--s-5); margin: var(--s-4) 0;
}
.team-role { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); font-weight: 600; }
.team-photo {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; margin-bottom: var(--s-3);
}
.team-photo-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
}
.contact-email { margin: var(--s-5) 0; }

/* --- Footer --- */
.site-footer {
  background: var(--ink); color: #C7CCD3;
  padding: var(--s-6) 0; margin-top: var(--s-7);
  font-size: .88rem;
}
.site-footer a { color: #fff; }
.footer-anj strong { color: #fff; }
.footer-disclosure { margin-top: var(--s-3); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-4); margin: var(--s-5) 0; }
.footer-nav a { text-decoration: none; font-weight: 600; }
.footer-nav a:hover { text-decoration: underline; color: #fff; }
.footer-help { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: .82rem; }
.footer-copy { margin-top: var(--s-5); font-size: .8rem; color: #8B93A0; }

/* --- Cookie banner (CNIL: кнопки равного веса) --- */
.cookie-banner {
  position: fixed; left: var(--s-3); right: var(--s-3); bottom: var(--s-3); z-index: 60;
  max-width: 640px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 6px 24px rgba(23, 32, 43, .2);
  padding: var(--s-4) var(--s-5);
  font-size: .88rem;
}
.cookie-actions { display: flex; gap: var(--s-3); margin-top: var(--s-3); }
.cookie-actions .btn { flex: 1; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .op-row { grid-template-columns: 28px 1.3fr 1fr auto; }
  .op-bestfor { display: none; }
}

@media (max-width: 767px) {
  .site-nav {
    position: fixed; inset: 60px 0 auto 0; z-index: 49;
    flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: var(--s-3) var(--s-4);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: var(--s-2);
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .15s ease, opacity .15s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: var(--s-6) 0; }
  .op-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "id score"
      "actions actions";
    row-gap: var(--s-3);
  }
  .op-rank { display: none; }
  .op-id { grid-area: id; }
  .op-score { grid-area: score; text-align: right; }
  .op-subscores { max-width: 160px; }
  .op-actions { grid-area: actions; flex-direction: row; }
  .op-actions .btn, .op-actions .cta-wrap { flex: 1; }

  .top-cards, .guide-cards { grid-template-columns: 1fr; }
  .proscons { grid-template-columns: 1fr; }
  .score-card { grid-template-columns: 1fr; gap: var(--s-4); text-align: left; }
  .score-bars { min-width: 0; }
  .sticky-cta.visible { display: flex; }
  body.has-sticky-cta { padding-bottom: 64px; }
}
