/* ==========================================================================
   [БРЕНД] — styles.css
   Палитра: чистые чёрный / белый + два серых.
   Шрифты: Unbounded (заголовки, широкий гротеск) + Golos Text (текст).
   ========================================================================== */

:root {
  --black: #000000;
  --white: #ffffff;
  --grey-1: #e6e6e6;   /* линии на белом */
  --grey-2: #8a8a8a;   /* вторичный текст */
  --grey-3: #2b2b2b;   /* линии на чёрном */

  --font-display: "Unbounded", "Arial Black", Impact, sans-serif;
  --font-text: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.75rem, 6vw, 5.5rem);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --space: clamp(72px, 10vw, 140px);

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.section-dark :focus-visible { outline-color: var(--white); }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }

.skip-link {
  position: absolute; left: 8px; top: -60px;
  background: var(--black); color: var(--white); padding: 10px 14px; z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--black); transition: width .1s linear; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--grey-1);
  transition: padding .3s var(--ease);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0;
  transition: padding .3s var(--ease);
}
.site-header.is-compact .header-inner { padding: 12px 0; }

.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.logo-mark { width: 26px; height: 26px; background: var(--black); border-radius: 50% 50% 50% 0; transition: border-radius .4s var(--ease); }
.logo:hover .logo-mark { border-radius: 0 50% 50% 50%; }

.nav { display: flex; gap: 28px; font-size: var(--step--1); font-weight: 500; }
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--black); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.burger { display: none; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--black); margin: 7px 0; transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border: 1px solid var(--black); border-radius: 999px;
  font-weight: 600; font-size: var(--step--1); line-height: 1;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--black); color: var(--white); }
.btn-solid:hover { background: var(--white); color: var(--black); }
.btn-ghost { background: transparent; color: var(--black); }
.btn-ghost:hover { background: var(--black); color: var(--white); }
.btn-invert { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-invert:hover { background: transparent; color: var(--white); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 110px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 80px); align-items: end;
  padding-bottom: clamp(48px, 7vw, 96px);
}
.hero-kicker { color: var(--grey-2); font-size: var(--step--1); margin-bottom: 28px; }
.hero-title { font-size: var(--step-4); line-height: .98; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise .9s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .1s; }
.hero-title .line:nth-child(3) > span { animation-delay: .2s; }
.hero-title .line-muted { font-family: var(--font-text); font-weight: 400; font-size: .42em; color: var(--grey-2); margin-top: .5em; letter-spacing: 0; }
@keyframes rise { to { transform: translateY(0); } }

.hero-lead { max-width: 56ch; margin-top: 36px; font-size: var(--step-1); line-height: 1.5; opacity: 0; animation: fade .8s .5s var(--ease) forwards; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; opacity: 0; animation: fade .8s .7s var(--ease) forwards; }
@keyframes fade { to { opacity: 1; } }

.hero-media { margin: 0; }
.hero-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: grayscale(1); background: var(--grey-1); transition: filter .6s var(--ease); }
.hero-media:hover img, .media:hover img { filter: grayscale(0); }
figcaption { font-size: var(--step--1); color: var(--grey-2); margin-top: 10px; }

/* Ticker — один непрерывный ряд вторичных ключей */
.ticker { border-block: 1px solid var(--black); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 0; padding: 14px 0; animation: ticker 40s linear infinite; }
.ticker-track span { font-family: var(--font-display); font-size: var(--step--1); font-weight: 400; padding-inline: 32px; border-right: 1px solid var(--black); }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- Sections / split layout ---------- */
.section { padding-block: var(--space); }
.section-line { border-top: 1px solid var(--grey-1); }
.section-dark { background: var(--black); color: var(--white); }
.section-dark .btn-solid { background: var(--white); color: var(--black); border-color: var(--white); }
.section-dark figcaption, .section-dark .hero-kicker { color: var(--grey-2); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 96px); align-items: start; }
.split-aside { position: sticky; top: 96px; }
.split-aside h2 { font-size: var(--step-3); max-width: 14ch; }
.split-body { min-width: 0; }

.prose { max-width: 66ch; }
.prose h3 { font-size: var(--step-1); margin: 1.6em 0 .6em; }
.prose strong { font-weight: 600; }

/* ---------- Benefits ---------- */
.benefits {
  list-style: none; display: grid; grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--grey-3);
}
.benefit { padding: 32px 28px 32px 0; border-bottom: 1px solid var(--grey-3); }
.benefit:nth-child(odd) { border-right: 1px solid var(--grey-3); }
.benefit:nth-child(even) { padding-left: 28px; }
.benefit h3 { font-size: var(--step-1); margin-bottom: 12px; }
.benefit p { color: var(--grey-2); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 6vw, 80px); }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.stat-label { color: var(--grey-2); font-size: var(--step--1); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; }
.step { position: relative; counter-increment: step; padding: 26px 0 26px 72px; border-top: 1px solid var(--grey-1); }
.step:last-child { border-bottom: 1px solid var(--grey-1); }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 26px;
  font-family: var(--font-display); font-size: var(--step-1);
}
.step h3 { font-size: var(--step-1); margin-bottom: 8px; }
.step p { margin: 0; color: var(--grey-2); }

.media { margin: clamp(40px, 6vw, 72px) 0 0; }
.media img { width: 100%; aspect-ratio: 14 / 9; object-fit: cover; filter: grayscale(1); background: var(--grey-1); transition: filter .6s var(--ease); }

/* ---------- Table ---------- */
.compare { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: var(--step--1); }
.compare caption { text-align: left; font-family: var(--font-display); font-size: var(--step-0); padding-bottom: 14px; }
.compare th, .compare td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--grey-1); vertical-align: top; }
.compare thead th { font-weight: 600; border-bottom: 1px solid var(--black); }
.compare tbody th { font-weight: 500; }
.compare td:last-child, .compare th:last-child { text-align: right; padding-right: 0; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--grey-1); }
.faq-item:last-child { border-bottom: 1px solid var(--grey-1); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: var(--step-0); font-family: var(--font-text); font-weight: 600; }
.faq-item summary::after {
  content: ""; flex: 0 0 14px; width: 14px; height: 14px;
  background:
    linear-gradient(var(--black), var(--black)) center / 100% 1px no-repeat,
    linear-gradient(var(--black), var(--black)) center / 1px 100% no-repeat;
  transition: transform .35s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { overflow: hidden; }
.faq-answer p { max-width: 62ch; color: var(--grey-2); padding-bottom: 24px; margin: 0; }

/* ---------- CTA ---------- */
.cta { text-align: left; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.cta-title { font-size: var(--step-3); grid-column: 1 / -1; max-width: 22ch; }
.cta-text { color: var(--grey-2); margin: 0; max-width: 48ch; }
.cta .btn { justify-self: end; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--black); padding-top: 56px; font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-about { color: var(--grey-2); max-width: 40ch; margin: 18px 0 0; }
.site-footer nav { display: flex; flex-direction: column; gap: 12px; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 0 28px; border-top: 1px solid var(--grey-1); color: var(--grey-2); }

/* ---------- Reveal on scroll (только изображения) ---------- */
.reveal { transition: clip-path 1s var(--ease); }
.reveal.is-visible { clip-path: inset(0 0 0 0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .split { grid-template-columns: 1fr; }
  .split-aside { position: static; }
  .split-aside h2 { max-width: none; margin-bottom: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
    flex-direction: column; gap: 8px; padding: 96px 28px;
    background: var(--white); border-left: 1px solid var(--grey-1);
    font-size: var(--step-1); transform: translateX(100%); transition: transform .4s var(--ease);
  }
  .nav.is-open { transform: translateX(0); }
  .burger { display: block; position: relative; z-index: 51; }
  .header-cta { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .benefit:nth-child(odd) { border-right: 0; }
  .benefit:nth-child(even) { padding-left: 0; }
  .stats { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .cta .btn { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .compare thead { display: none; }
  .compare tr { display: grid; grid-template-columns: 1fr; padding: 10px 0; border-bottom: 1px solid var(--grey-1); }
  .compare th, .compare td { border: 0; padding: 2px 0; text-align: left; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-title .line > span { transform: none; }
  .hero-lead, .hero-actions { opacity: 1; }
  .reveal { clip-path: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .progress, .ticker, .cta, .burger { display: none; }
  body { font-size: 11pt; }
}
