/* ============================================================
   30 дней отжиманий — стили
   Тёмная тема: чёрный / белый / один акцент.
   Порядок: токены → база → утилиты → компоненты → секции → адаптив
   ============================================================ */

/* ---------- Токены ---------- */
:root {
  --bg:         #0a0a0a;
  --bg-alt:     #101010;
  --surface:    #161616;
  --surface-2:  #1e1e1e;
  --line:       #2a2a2a;
  --line-soft:  #1f1f1f;

  --text:        #ffffff;
  --text-muted:  #a3a3a3;
  --text-dim:    #7a7a7a;
  --text-footer: #8a8a8a;

  --accent:      #ff5a1f;
  --accent-dark: #e04a12;
  --accent-ink:  #0a0a0a;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --wrap:      1160px;
  --wrap-narrow: 780px;
  --header-h:  64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.9);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h1 { font-size: clamp(2.6rem, 11vw, 5.2rem); }
h2 { font-size: clamp(1.75rem, 5.4vw, 2.9rem); }
h3 { font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

img { max-width: 100%; display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

strong { font-weight: 700; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Утилиты ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-lead {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin-bottom: 2.5rem;
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-accent {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  --btn-bd: var(--accent);
  box-shadow: 0 10px 30px -12px rgb(255 90 31 / 0.75);
}
.btn-accent:hover { --btn-bg: var(--accent-dark); --btn-bd: var(--accent-dark); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--line); }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: #3a3a3a; }

.btn-sm { padding: 10px 18px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(10 10 10 / 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.logo-text { font-size: 0.9375rem; text-transform: lowercase; color: var(--text-muted); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное меню */
.nav {
  position: absolute;
  left: 0; right: 0; top: 100%;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px 20px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.nav.is-open { display: flex; }
.nav a {
  padding: 12px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-soft);
}
.nav a:hover { color: var(--text); }
/* Цвет берём из --btn-fg, а не задаём жёстко: иначе неактивная кнопка
   остаётся тёмной на тёмном фоне и пропадает из виду */
.nav .btn { margin-top: 12px; border-bottom: 0; color: var(--btn-fg); }
.nav .btn:hover { color: var(--btn-fg); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 26px;
    padding: 0;
    background: transparent;
    border: 0;
  }
  .nav a {
    padding: 6px 0;
    font-size: 0.9375rem;
    border-bottom: 0;
  }
  .nav .btn { margin-top: 0; color: var(--btn-fg); }
}

@media (min-width: 900px) and (max-width: 1023px) {
  .nav { gap: 12px; }
  .nav a { font-size: 0.875rem; white-space: nowrap; }
}

/* ---------- Секции ---------- */
.section {
  padding: clamp(64px, 11vw, 120px) 0;
  border-top: 1px solid var(--line-soft);
}
.section-alt { background: var(--bg-alt); }

/* Отступ под липкую шапку при переходе по якорю */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Рамки под фото ---------- */
.photo {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    135deg,
    rgb(255 255 255 / 0.035) 0 12px,
    transparent 12px 24px
  );
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.photo-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px dashed #333;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  background: rgb(10 10 10 / 0.7);
}
.photo-hero   { aspect-ratio: 4 / 3; }
.photo-square { aspect-ratio: 4 / 3; }
.photo-avatar { aspect-ratio: 1 / 1; width: 96px; border-radius: var(--radius-sm); flex: none; }

/* Фото заполняет рамку без искажений */
.photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* В квадратном аватаре оставляем лицо в кадре */
.photo-avatar > img { object-position: 50% 20%; }

@media (min-width: 660px) {
  .photo-hero, .photo-square { aspect-ratio: 4 / 5; }
}

/* ============================================================
   1. ПЕРВЫЙ ЭКРАН
   ============================================================ */
.hero {
  padding: clamp(40px, 7vw, 80px) 0 clamp(64px, 11vw, 120px);
  background:
    radial-gradient(80% 55% at 78% 0%, rgb(255 90 31 / 0.14) 0%, transparent 62%),
    var(--bg);
}
.hero-inner { display: grid; gap: 40px; }

.hero h1 { margin-bottom: 1.2rem; }
.hero-line { display: block; color: var(--text); }
.hero-word {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 54ch;
  color: var(--text-muted);
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  margin-bottom: 1.25rem;
}

.hero-price {
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}
.hero-price strong { color: var(--text); font-weight: 800; }

/* На узких экранах кнопки встают в столбик: так они не ломают вёрстку
   и дают крупную цель для пальца */
.hero-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
}
.cta-note {
  margin: 10px 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-footer);
}
@media (min-width: 560px) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .hero-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 64px;
  }
}

/* ============================================================
   2. ПРОБЛЕМА — карточки
   ============================================================ */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.9375rem; }

.chat-subsections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 36px;
}
@media (min-width: 640px) {
  .chat-subsections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   3. РЕШЕНИЕ — шаги
   ============================================================ */
.how-media { margin: 0 0 32px; }
.how-photo { aspect-ratio: 16 / 9; }

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

.step {
  position: relative;
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.9375rem; }

/* ============================================================
   4. МЕХАНИКА
   ============================================================ */
.mechanics { display: grid; gap: 36px; }
.mechanics-aside .callout { margin-top: 0; }
@media (min-width: 900px) {
  .mechanics { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
}

.timeline { display: grid; gap: 26px; counter-reset: tl; }
.timeline li {
  position: relative;
  padding-left: 46px;
}
.timeline li::before {
  counter-increment: tl;
  content: counter(tl);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 800;
}
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--text-muted); font-size: 0.9375rem; }

.callout {
  margin-top: 32px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.callout p { color: var(--text-muted); font-size: 0.9375rem; }
.callout strong { color: var(--text); }

.callout-warn {
  border-left-color: var(--text-dim);
  background: var(--surface);
  margin-top: 36px;
}

/* ============================================================
   5. ЦЕНА
   ============================================================ */
.price-grid { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .price-grid { grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
}

.price-card {
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.price-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.price-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.price-amount {
  font-size: clamp(3rem, 12vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.price-cur { font-size: 1.75rem; font-weight: 700; color: var(--text-muted); }
.price-term { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 22px; }
.price-hint { color: var(--text-dim); font-size: 0.8125rem; margin-top: 14px; text-align: center; }

.price-includes h3 { margin-top: 0; margin-bottom: 14px; }
.price-includes h3 + .check-list { margin-bottom: 30px; }

.check-list, .cross-list { display: grid; gap: 12px; }
.check-list li, .cross-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.check-list li::before,
.cross-list li::before {
  position: absolute;
  left: 0; top: 0;
  font-weight: 800;
}
.check-list li::before { content: "✓"; color: var(--accent); }
.cross-list li::before { content: "—"; color: var(--text-dim); }

/* ============================================================
   6. FAQ
   ============================================================ */
.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  list-style: none;
  transition: color .15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

.faq summary::after {
  content: "";
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(var(--text-muted), var(--text-muted)),
    linear-gradient(var(--text-muted), var(--text-muted));
  background-size: 10px 1.5px, 1.5px 10px;
  background-position: center, center;
  background-repeat: no-repeat;
  transition: transform .2s ease, border-color .2s ease;
}
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::after {
  transform: rotate(135deg);
  border-color: var(--accent);
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
}

.faq details p {
  padding: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 68ch;
}

/* ============================================================
   7. ПОМЕТКИ «ТРЕБУЕТ УТВЕРЖДЕНИЯ» И НЕАКТИВНЫЕ КНОПКИ
   ============================================================ */

/* Баннер черновика над шапкой.
   УДАЛИТЬ вместе с неподтверждёнными условиями — см. УСЛОВИЯ-УЧАСТИЯ.md */
.draft-banner {
  padding: 12px 0;
  background: rgb(255 90 31 / 0.1);
  border-bottom: 1px solid rgb(255 90 31 / 0.4);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.draft-banner strong { color: var(--accent); }

/* Пометка на месте условия, которое ещё не утверждено */
.todo-flag {
  margin: 28px 0 0;
  padding: 14px 16px;
  border: 1px dashed rgb(255 90 31 / 0.45);
  border-radius: var(--radius-sm);
  background: rgb(255 90 31 / 0.05);
  color: var(--text-muted);
  font-size: 0.875rem;
}
.todo-flag-tag {
  display: inline-block;
  margin-right: 8px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Пояснение, почему кнопка неактивна */
.link-pending {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px dashed var(--line);
  color: var(--text-dim);
  font-size: 0.8125rem;
}
.link-pending[hidden] { display: none; }
.link-pending.is-flash {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* Кнопка без подтверждённой ссылки.
   Видно, что она есть и что будет делать, но она честно неактивна
   и не изображает рабочий путь. */
.btn.is-inactive,
.btn[aria-disabled="true"] {
  --btn-bg: transparent;
  --btn-fg: var(--text-muted);
  --btn-bd: var(--line);
  border-style: dashed;
  box-shadow: none;
  cursor: not-allowed;
}
.btn.is-inactive:hover,
.btn[aria-disabled="true"]:hover {
  transform: none;
  --btn-bg: transparent;
  --btn-bd: #3a3a3a;
}

/* Неподтверждённые данные в блоке контактов */
[data-pending-text] { color: var(--text-dim); }
.contact-value-pending { color: var(--text-dim); font-style: italic; }

/* Юридический блок — отдельная секция: верхний отступ у неё убран,
   разделитель рисует сам блок */
.legal-section { padding-top: 0; border-top: 0; }
.legal { padding-top: 40px; border-top: 1px solid var(--line); }
.legal h2 { font-size: clamp(1.35rem, 3.6vw, 1.9rem); }
.legal .cross-list { margin-top: 8px; }

/* ============================================================
   8. КОНТАКТЫ
   ============================================================ */
.contacts { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .contacts { grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: start; }
}

.contacts-main { display: flex; gap: 20px; align-items: flex-start; }
/* На узких экранах текст не зажимается в колонку рядом с аватаром */
@media (max-width: 659px) {
  .contacts-main { flex-direction: column; }
}
.contact-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 2px; }
.contact-role { color: var(--accent); font-size: 0.875rem; font-weight: 600; margin-bottom: 12px; }
.contact-bio { color: var(--text-muted); font-size: 0.9375rem; }

.contacts-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contacts-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.contact-key {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contacts-list a { color: var(--accent); font-weight: 600; text-decoration: none; }
.contacts-list a:hover { text-decoration: underline; }

/* ---------- Подвал ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  background: var(--bg-alt);
}
.footer-inner { display: grid; gap: 18px; }
.footer-brand { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.footer-legal { color: var(--text-footer); font-size: 0.8125rem; max-width: 78ch; margin: 0; }
.footer-copy { color: var(--text-footer); font-size: 0.8125rem; margin: 0; }
.footer-copy a { color: var(--text-muted); }

/* ---------- Уважение к настройкам пользователя ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .btn:hover { transform: none; }
}
