/* ========== Audit Home: Premium ==========
   Three voices: Onest (display sans, RU-first, variable),
   Newsreader (italic editorial accent), JetBrains Mono (labels). */

@font-face {
  font-family: 'Onest';
  src: url('/static/fonts/Onest-100_900.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/static/fonts/Newsreader-200_800.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/static/fonts/Newsreader-200_800-ital.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
.ah {
  --ah-bg:        #0a0a0a;
  --ah-fg:        #f4ede0;
  --ah-fg-mute:   #807e76;
  --ah-fg-dim:    #4a4944;
  --ah-line:      #1f1d18;
  --ah-line-soft: #131210;
  --ah-accent:    #e8b25c;        /* warm amber */
  --ah-accent-2:  #c44d3a;        /* terracotta */

  position: relative;
  background: var(--ah-bg);
  color: var(--ah-fg);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "ss03";
  width: 100%;
  overflow-x: hidden;
}

/* Page-wide background takeover when this section is on the page */
body:has(.ah) {
  background: var(--ah-bg, #0a0a0a) !important;
}
body:has(.ah) {
  overflow-x: hidden;
}
body:has(.ah) > main {
  padding: 0 !important;
  max-width: none !important;
  overflow-x: hidden;
}
body:has(.ah) header { background: transparent; border: none; }
body:has(.ah) .logo { color: #f4ede0; }
body:has(.ah) .header-nav a {
  color: #f4ede0;
  border-color: rgba(244, 237, 224, 0.2);
}
body:has(.ah) .tagline { display: none; }

.ah * { box-sizing: border-box; }
.ah a { color: inherit; }

/* Subtle grid background */
.ah-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(244, 237, 224, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 237, 224, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 0%, transparent 80%);
  z-index: 0;
}

.ah > * { position: relative; z-index: 1; }

/* ---------- Eyebrow (small mono label) ---------- */
.ah-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ah-fg-mute);
  margin: 0 0 28px;
}

/* ---------- HERO ---------- */
.ah-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(60px, 9vh, 110px) 24px clamp(48px, 7vh, 80px);
}
.ah-h1 {
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 250;
  font-size: clamp(40px, 4.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 32px;
  color: var(--ah-fg);
  max-width: 980px;
}
.ah-h1 em {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--ah-accent);
}
.ah-sub {
  max-width: 580px;
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.55;
  color: var(--ah-fg-mute);
  margin: 0 0 32px;
}

/* CTA buttons. Цвета прибиты ко всем состояниям ссылки — браузерный visited-purple
   не должен перекрывать наш текст. */
.ah-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ah .btn-primary,
.ah .btn-primary:link,
.ah .btn-primary:visited,
.ah .btn-ghost,
.ah .btn-ghost:link,
.ah .btn-ghost:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 999px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.ah .btn-primary,
.ah .btn-primary:link,
.ah .btn-primary:visited {
  background: var(--ah-accent) !important;     /* amber */
  color: #1a1408 !important;                    /* почти чёрный, тёплый */
  border: 1px solid var(--ah-accent) !important;
}
.ah .btn-primary:hover,
.ah .btn-primary:focus {
  background: var(--ah-fg) !important;          /* cream */
  color: #1a1408 !important;
  border-color: var(--ah-fg) !important;
  transform: translateY(-1px);
}
.ah .btn-ghost,
.ah .btn-ghost:link,
.ah .btn-ghost:visited {
  background: transparent !important;
  color: var(--ah-fg) !important;
  border: 1px solid rgba(244, 237, 224, 0.25) !important;
}
.ah .btn-ghost:hover,
.ah .btn-ghost:focus {
  border-color: var(--ah-fg) !important;
  background: rgba(244, 237, 224, 0.05) !important;
}

/* ---------- STATS strip ---------- */
.ah-stats {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--ah-line);
  border-bottom: 1px solid var(--ah-line);
}
.ah-stats > div { padding: 4px 0; }
.ah-stat-num {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(32px, 2.8vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ah-accent);
  margin: 0 0 6px;
}
.ah-stat-lbl {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ah-fg-mute);
  margin: 0;
}

/* ---------- SECTION shared ---------- */
.ah-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 8vh, 96px) 24px;
}
.ah-section-head { max-width: 760px; margin: 0 0 48px; }
.ah-h2 {
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 250;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ah-fg);
}
.ah-h2 em {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.012em;
  color: var(--ah-accent);
}

/* ---------- CHECKS list ---------- */
.ah-checks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--ah-line);
}
.ah-checks-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--ah-line);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ah-fg);
  transition: padding-left 0.2s ease;
}
.ah-checks-list li:hover { padding-left: 16px; color: var(--ah-accent); }
.ah-checks-list li > span {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ah-fg-mute);
  padding-top: 4px;
}

/* ---------- AUDIENCE ---------- */
.ah-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--ah-line);
  border-radius: 4px;
}
.ah-audience-grid > div {
  padding: 28px 28px;
  border-right: 1px solid var(--ah-line);
  border-bottom: 1px solid var(--ah-line);
}
.ah-audience-grid > div:nth-child(2n) { border-right: none; }
.ah-audience-grid > div:nth-last-child(-n+2) { border-bottom: none; }

.ah-audience-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ah-accent);
  margin: 0 0 16px;
}
.ah-audience-grid h3 {
  font-family: 'Onest', system-ui, sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ah-fg);
}
.ah-audience-grid p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ah-fg-mute);
  margin: 0;
}
.ah-audience-grid p code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  background: var(--ah-line);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ah-accent);
}

/* ---------- NORMS table ---------- */
.ah-norms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.ah-norms-table tr {
  border-bottom: 1px solid var(--ah-line);
}
.ah-norms-table tr:last-child { border-bottom: none; }
.ah-norms-table td {
  padding: 16px 12px;
  vertical-align: top;
  color: var(--ah-fg-mute);
  line-height: 1.5;
}
.ah-norms-table td:first-child {
  width: 180px;
  color: var(--ah-fg);
}
.ah-norms-table td:first-child strong {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ah-norms-table code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  background: var(--ah-line);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ---------- FINAL CTA ---------- */
.ah-final {
  text-align: center;
  border-top: 1px solid var(--ah-line);
}
.ah-final h2 { margin: 0 auto 20px; max-width: 720px; }
.ah-final .ah-sub { margin: 0 auto 36px; }
.ah-final .ah-cta { justify-content: center; }

/* ---------- Footer ---------- */
.ah-foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ah-line);
  flex-wrap: wrap;
  gap: 16px;
}
.ah-foot-brand {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  margin: 0;
  color: var(--ah-fg);
}
.ah-foot-by {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ah-fg-mute);
  margin: 4px 0 0;
}
.ah-foot-links {
  display: flex;
  gap: 28px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ah-foot-links a {
  color: var(--ah-fg-mute);
  text-decoration: none;
  transition: color 0.15s;
}
.ah-foot-links a:hover { color: var(--ah-accent); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .ah-stats { grid-template-columns: repeat(2, 1fr); }
  .ah-checks-list li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 20px 0;
  }
  .ah-checks-list li:hover { padding-left: 0; }
  .ah-audience-grid { grid-template-columns: 1fr; }
  .ah-audience-grid > div { border-right: none; }
  .ah-audience-grid > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--ah-line); }
  .ah-audience-grid > div:last-child { border-bottom: none; }
  .ah-norms-table td:first-child { width: auto; }
}

/* Reveal */
@media (prefers-reduced-motion: no-preference) {
  .ah-hero, .ah-section { animation: ah-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
  .ah-section { animation-delay: 0.05s; }
}
@keyframes ah-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
