/* ============================================================
   components.css — компоненты страницы, сверху вниз по макету:
   hazard → topbar → hero → term → report → steps → band →
   two-col/honesty → final/tg → footer. Мобильные оверрайды — в конце.
   ============================================================ */

/* --- аварийная полоса --- */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, var(--ink) 14px 28px);
}

/* --- шапка --- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .wrap {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .02em;
}
.top-cta {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  white-space: nowrap;
}
.top-cta:hover { color: var(--accent); }

/* --- hero --- */
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 80px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}
.hero-copy h1 .strike {
  position: relative;
  white-space: nowrap;
  color: var(--muted);
}
.hero-copy h1 .strike::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 50%;
  height: .09em;
  background: var(--diff-red);
  transform: rotate(-2deg);
}
.hero-sub {
  max-width: 46ch;
  color: var(--muted);
  font-size: 19px;
  margin: 0;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.cta-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* --- терминал с diff --- */
.term {
  background: var(--code-bg);
  color: var(--code-ink);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  min-width: 0;
}
.term-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #ffffff1c;
  color: var(--code-muted);
  font-size: 12px;
}
.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--code-muted);
  opacity: .55;
}
.term-body { padding: 16px 0; overflow-x: auto; }
.term-body pre { margin: 0; min-width: max-content; }
.tl { display: block; padding: 0 18px; white-space: pre; }
.tl.ctx { color: var(--code-muted); }
.tl.del { color: #E89A8D; background: #b23a2c26; }
.tl.add { color: #9CD3AC; background: #2e7a4c26; }

/* анимация строк — только при работающем JS (.js на <html>) */
.js .term .tl { opacity: 0; animation: lineIn .35s ease forwards; }
.term .tl:nth-child(1) { animation-delay: .2s; }
.term .tl:nth-child(2) { animation-delay: .55s; }
.term .tl:nth-child(3) { animation-delay: .9s; }
.term .tl:nth-child(4) { animation-delay: 1.25s; }
.term .tl:nth-child(5) { animation-delay: 1.6s; }
.term .tl:nth-child(6) { animation-delay: 2.1s; }
.term .tl:nth-child(7) { animation-delay: 2.45s; }
.term .tl:nth-child(8) { animation-delay: 2.8s; }
.term .tl:nth-child(9) { animation-delay: 3.15s; }

@keyframes lineIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .term .tl { animation: none; opacity: 1; }
}

/* --- акт осмотра (симптомы) --- */
.report {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 34px 34px 38px;
}
.report-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.stamp {
  position: absolute;
  top: -22px;
  right: 22px;
  transform: rotate(-7deg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--diff-red);
  border: 3px double var(--diff-red);
  padding: 8px 14px;
  background: var(--paper);
}
.report-foot {
  margin-top: 26px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 60ch;
}
.report-foot strong { color: var(--ink); }

/* --- diff-списки: минусы (симптомы) и плюсы (результат) --- */
.difflist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.difflist li {
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.5;
  padding: 7px 14px;
  display: flex;
  gap: 12px;
}
.difflist .sign { flex: none; font-weight: 700; }
.difflist.minus li { background: var(--diff-red-bg); color: var(--diff-red); }
.difflist.plus li { background: var(--diff-green-bg); color: var(--diff-green); }

/* --- процесс --- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step {
  background: var(--card);
  padding: 26px 22px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-no {
  font-family: var(--display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}
.step h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }
.step .tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  margin-top: auto;
  padding-top: 10px;
}

/* --- полоса статистики --- */
.band {
  background: var(--band-bg);
  color: var(--band-ink);
  border-top: 1px solid var(--line);
}
.band .wrap { padding-top: 64px; padding-bottom: 68px; }
.band-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 34px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 28px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-nums {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 8vw, 44px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-nums .was {
  color: var(--band-muted);
  text-decoration: line-through;
  text-decoration-color: var(--diff-red);
  text-decoration-thickness: 3px;
}
.stat-nums .arrow { color: var(--accent); padding: 0 6px; }
.stat-nums .now { color: var(--band-ink); }
.stat-cap { font-family: var(--mono); font-size: 12.5px; color: var(--band-muted); }
.band-foot {
  margin-top: 40px;
  margin-bottom: 0;
  font-size: 14px;
  color: var(--band-muted);
  max-width: 70ch;
}

/* --- две колонки: «стало» + правила --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.honesty { display: flex; flex-direction: column; gap: 26px; }
.honesty h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0 0 6px;
}
.honesty p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 52ch; }
.honesty .h-item { border-left: 3px solid var(--accent); padding-left: 18px; }

/* --- финальный CTA --- */
.final { text-align: center; }
.final .wrap {
  padding-top: 88px;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.final h2 { font-size: clamp(44px, 7vw, 84px); }
.final .sec-lede { text-align: center; }
.final-note { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0; }

/* --- Telegram contact --- */
.tg {
  --tg-ink: #F4F5F1;
  --tg-mute: #8B9088;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(100%, 460px);
  padding: 22px 24px 20px;
  text-decoration: none;
  color: var(--tg-ink);
  background:
    linear-gradient(135deg, #252826 0%, #1B1D1E 48%, #2A1E16 100%);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
  text-align: left;
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease;
}
.tg::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 8px,
    #1B1D1E 8px 16px
  );
}
.tg:hover {
  transform: translate(3px, 3px);
  box-shadow: 4px 4px 0 var(--accent);
}
.tg:hover .tg-go { transform: translateX(4px); color: var(--accent); }
.tg:hover .tg-handle { color: #fff; }

.tg-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tg-mute);
}
.tg-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3DDC84;
  box-shadow: 0 0 0 0 #3ddc8480;
  animation: tgPulse 1.8s ease-out infinite;
}
.tg-status-label { color: #B8C0B4; }
.tg-status-meta {
  margin-left: auto;
  color: var(--accent);
  letter-spacing: .04em;
}

.tg-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 10px;
}
.tg-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #1B1D1E;
  background: var(--accent);
  border: 2px solid #F4F5F1;
}
.tg-handle {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 36px);
  letter-spacing: .03em;
  text-transform: none;
  line-height: 1;
  color: var(--tg-ink);
  transition: color .14s ease;
}
.tg-at { color: var(--accent); }
.tg-go {
  margin-left: auto;
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--tg-mute);
  transition: transform .14s ease, color .14s ease;
}
.tg-hint {
  padding-left: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--tg-mute);
}

@keyframes tgPulse {
  0%   { box-shadow: 0 0 0 0 #3ddc8480; }
  70%  { box-shadow: 0 0 0 10px #3ddc8400; }
  100% { box-shadow: 0 0 0 0 #3ddc8400; }
}

@media (prefers-reduced-motion: reduce) {
  .tg-pulse { animation: none; }
  .tg, .tg-go, .tg-handle { transition: none; }
}

/* --- подвал --- */
footer { border-top: 1px solid var(--line); }
footer .wrap {
  padding-top: 26px;
  padding-bottom: 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
footer a { color: var(--muted); }
.footer-tg {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}
.footer-tg:hover { color: var(--accent); }

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 48px;
    padding-bottom: 56px;
  }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-note { display: none; }
  .hero .wrap { gap: 32px; }
  .term { font-size: 12.5px; box-shadow: 6px 6px 0 var(--accent); }
  .report { padding: 28px 18px 30px; }
  .stamp { right: 10px; font-size: 12.5px; }
  .final .btn,
  .tg {
    font-size: 17px;
    max-width: 100%;
  }
  .tg { box-shadow: 6px 6px 0 var(--accent); padding: 18px 16px 16px; }
  .tg-handle { font-size: 26px; }
  .tg-mark { width: 42px; height: 42px; }
  .tg-go { font-size: 28px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 24px; }
  .difflist li { font-size: 13.5px; }
}
