/* ============================================================
   Локальные шрифты (Archivo Black + Inter)
   ============================================================ */

@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/archivo-black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/archivo-black-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter variable (веса 400–700 в одном файле) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   chestny-obzor.ru — Concept C: Contrast Mono
   ============================================================ */

:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F4F5;
  --bg-translucent: rgba(255, 255, 255, 0.85);
  --surface: #FFFFFF;
  --border: #E4E4E7;
  --border-strong: #D4D4D8;

  --text: #0A0A0A;
  --text-2: #71717A;
  --text-3: #A1A1AA;

  --accent: #FF4D1C;
  --accent-hover: #E63A0B;
  --accent-soft: #FFF1EB;
  --accent-text: #FFFFFF;

  --warning: #DC2626;
  --success: #16A34A;

  --font-heading: 'Archivo Black', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-full: 999px;

  --container: 1200px;
  --pad: 24px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);

  --t: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;
    --bg-soft: #18181B;
    --bg-translucent: rgba(10, 10, 10, 0.85);
    --surface: #18181B;
    --border: #27272A;
    --border-strong: #3F3F46;

    --text: #FAFAFA;
    --text-2: #A1A1AA;
    --text-3: #71717A;

    --accent: #FF4D1C;
    --accent-hover: #FF6B3D;
    --accent-soft: rgba(255, 77, 28, 0.12);
    --accent-text: #FFFFFF;

    --warning: #F87171;
    --success: #4ADE80;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font: inherit; }
ul, ol { list-style: none; padding: 0; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.25; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--soft { background: var(--bg-soft); }

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.section__footer { margin-top: 2.5rem; text-align: center; }

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid--2 { gap: 2rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--text); background: var(--bg-soft); }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.logo__icon { flex-shrink: 0; }
.logo__text { line-height: 1; }

.nav { display: flex; align-items: center; gap: 0.25rem; }

.nav__link {
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-full);
  transition: color var(--t), background var(--t);
}
.nav__link:hover { color: var(--text); background: var(--bg-soft); }

.nav__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  color: var(--text-2);
  transition: color var(--t), background var(--t);
}
.nav__search:hover { color: var(--text); background: var(--bg-soft); }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
}
.nav__burger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

@media (max-width: 767px) {
  .nav__link, .nav__search { display: none; }
  .nav__burger { display: flex; }

  .nav.is-open .nav__link {
    display: block;
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1rem;
  }
  .nav.is-open .nav__link + .nav__link { margin-top: 0.25rem; }
}

.hero {
  padding-block: clamp(3rem, 10vw, 7rem);
  text-align: center;
}
.hero__title {
  font-size: clamp(2rem, 6vw, 4.5rem);
  max-width: 14ch;
  margin-inline: auto;
}
.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-2);
  max-width: 42ch;
  margin: 1.5rem auto 2rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.hero__stats strong { color: var(--text); font-weight: 700; }

.card { position: relative; }
.card__link {
  display: block;
  border-radius: var(--r-lg);
  transition: transform var(--t);
}
.card__link:hover { transform: translateY(-2px); }
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card__link:hover .card__media img { transform: scale(1.03); }
.card__title { margin-top: 1rem; font-size: 1.125rem; }
.card__meta { margin-top: 0.5rem; color: var(--text-2); font-size: 0.875rem; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
}
.badge--category {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: var(--bg);
  color: var(--text);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.rating__stars { color: var(--accent); letter-spacing: 0.05em; }

.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) {
  .categories { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}
.category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.category:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.category__icon { font-size: 1.75rem; }
.category__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  line-height: 1.2;
}
.category__count { font-size: 0.8125rem; color: var(--text-3); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  counter-reset: step;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.step__num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.step__title { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step__text { color: var(--text-2); font-size: 0.9375rem; }

.post__link {
  display: block;
  border-radius: var(--r-lg);
  transition: transform var(--t);
}
.post__link:hover { transform: translateY(-2px); }
.post__media {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
}
.post__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post__link:hover .post__media img { transform: scale(1.03); }
.post__title {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-block: 0.75rem 0.5rem;
}
.post__excerpt {
  color: var(--text-2);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.post__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-3);
}

.subscribe {
  padding-block: clamp(3rem, 8vw, 6rem);
  background: var(--bg-soft);
}
.subscribe__inner {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}
.subscribe__title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 0.75rem; }
.subscribe__text { color: var(--text-2); margin-bottom: 1.75rem; }
.subscribe__form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.subscribe__form input {
  flex: 1 1 240px;
  padding: 0.875rem 1.25rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--t);
}
.subscribe__form input:focus { outline: none; border-color: var(--accent); }
.subscribe__form .btn { flex: 0 0 auto; }

.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}
.footer__inner {
  display: grid;
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }
  .footer__copy { grid-column: 1 / -1; }
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.footer__nav a { color: var(--text-2); transition: color var(--t); }
.footer__nav a:hover { color: var(--text); }
.footer__copy { color: var(--text-3); font-size: 0.8125rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Filters + Pagination + Empty state
   ============================================================ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filters a {
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.filters a:hover {
  color: var(--text);
  background: var(--bg-soft);
}
.filters a.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all var(--t);
}
.pagination a:hover {
  color: var(--text);
  background: var(--bg-soft);
  border-color: var(--border-strong);
}
.pagination .active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.empty-message {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-2);
  font-size: 1.0625rem;
}

/* ============================================================
   Article CTA — блок «Ещё обзоры по теме»
   ============================================================ */

.article-cta {
  margin-block: 3rem;
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  text-align: center;
}
.article-cta h3 {
  margin-bottom: 0.75rem;
}
.article-cta p {
  color: var(--text-2);
  max-width: 50ch;
  margin: 0 auto 1.5rem;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ============================================================
   Back to top
   ============================================================ */

.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, visibility .25s, transform .25s, background .2s, color .2s;
  z-index: 40;
  cursor: pointer;
  border: none;
  padding: 0;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  background: var(--accent);
  color: #FFFFFF;
}
.to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .to-top {
    right: 1rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
  }
  .to-top svg {
    width: 18px;
    height: 18px;
  }
}
