/* site.css — оформление сайта «Мастербук».
   Принципы: без внешних запросов (ни шрифтов, ни иконок из сети), системные шрифты,
   мобильный первым, тёмная «витринная» тема с тёплым акцентом. */

:root {
  --bg: #14100f;
  --bg-2: #1b1614;
  --surface: #221b19;
  --surface-2: #2b2220;
  --line: rgba(255, 255, 255, .09);
  --text: #f6efec;
  --muted: #b6a8a2;
  --accent: #e0603f;
  --accent-2: #f08a5d;
  --ok: #5fbf8a;
  --r: 18px;
  --r-lg: 26px;
  --pad: 20px;
  --maxw: 1120px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; margin: 0; }

h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 720; }
h2 { font-size: clamp(24px, 3.4vw, 36px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 680; }

p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ── шапка ─────────────────────────────────────────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 16, 15, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex; align-items: center; gap: 18px;
  min-height: 62px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 720; letter-spacing: -.02em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--accent-2), var(--accent) 60%, #b6381f);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}

.head-nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.head-nav a { color: var(--muted); }
.head-nav a:hover { color: var(--text); text-decoration: none; }

/* ── кнопки ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 660; text-align: center; cursor: pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.985); }

.btn-primary { background: linear-gradient(140deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 10px 26px rgba(224, 96, 63, .3); }
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-disabled { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); cursor: not-allowed; }
.btn-disabled:hover { transform: none; }

.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

/* ── первый экран ──────────────────────────────────────────────────────── */

.hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 46px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(224, 96, 63, .12); border: 1px solid rgba(224, 96, 63, .28);
  color: var(--accent-2); font-size: 13px; font-weight: 640;
}

.hero h1 { margin: 18px 0 14px; }
.hero .lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 33em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.hero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts span::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* ── макет телефона ────────────────────────────────────────────────────── */

.phones { position: relative; display: flex; justify-content: center; }

.phone {
  width: 290px; flex: none; border-radius: 34px; padding: 10px;
  background: #0b0908; border: 1px solid #2f2725;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.phone + .phone { position: absolute; right: -6px; bottom: -26px; width: 210px; transform: rotate(4deg); opacity: .96; }

.phone-screen {
  border-radius: 26px; overflow: hidden; background: var(--bg-2);
  aspect-ratio: 9 / 18.4; display: flex; flex-direction: column;
}

.ph-top { padding: 14px 14px 6px; display: flex; align-items: center; justify-content: space-between; }
.ph-title { font-size: 15px; font-weight: 700; }
.ph-pill { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }

.ph-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 6px 12px 10px; }
.ph-dow { font-size: 9px; color: var(--muted); text-align: center; }
.ph-day {
  aspect-ratio: 1; border-radius: 7px; background: var(--surface);
  display: grid; place-items: center; font-size: 10px; font-weight: 620; position: relative;
}
.ph-day.other { color: var(--muted); opacity: .45; }
.ph-day.sel { background: linear-gradient(150deg, var(--accent-2), var(--accent)); color: #fff; }
.ph-day.has::after {
  content: ""; position: absolute; bottom: 3px; width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent-2);
}
.ph-day.sel::after { background: #fff; }

.ph-list { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.ph-card {
  background: var(--surface); border-radius: 11px; padding: 8px 10px;
  display: flex; gap: 9px; align-items: baseline;
}
.ph-time { font-size: 11px; font-weight: 720; color: var(--accent-2); flex: none; }
.ph-name { font-size: 11px; font-weight: 620; }
.ph-svc { font-size: 9.5px; color: var(--muted); }
.ph-sum { margin-left: auto; font-size: 10.5px; font-weight: 660; }

.ph-total {
  margin: auto 12px 12px; padding: 9px 11px; border-radius: 12px;
  background: rgba(224, 96, 63, .1); border: 1px solid rgba(224, 96, 63, .22);
  display: flex; justify-content: space-between; align-items: baseline; font-size: 11px;
}
.ph-total b { font-size: 14px; }

/* ── секции ────────────────────────────────────────────────────────────── */

section { padding: 64px 0; }

.sec-head { max-width: 640px; margin-bottom: 34px; }
.sec-head p { margin-top: 12px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; display: flex; flex-direction: column; gap: 8px;
}
.card p { color: var(--muted); font-size: 15px; }
.card .ico {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 4px;
  background: rgba(224, 96, 63, .13); border: 1px solid rgba(224, 96, 63, .22);
  display: grid; place-items: center; color: var(--accent-2); font-size: 18px;
}

/* шаги */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; counter-reset: s; }
.step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px;
  border-radius: 9px; background: rgba(224, 96, 63, .14); color: var(--accent-2);
  font-weight: 760; font-size: 14px;
}
.step p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* тарифы */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: start; }

.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.plan.is-featured { border-color: rgba(224, 96, 63, .45); background: linear-gradient(180deg, rgba(224, 96, 63, .08), var(--surface) 60%); }

.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-name { font-size: 19px; font-weight: 700; }
.badge {
  font-size: 12px; font-weight: 660; padding: 4px 10px; border-radius: 999px;
  background: rgba(224, 96, 63, .16); color: var(--accent-2); border: 1px solid rgba(224, 96, 63, .3);
}

.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font-size: 34px; font-weight: 760; letter-spacing: -.03em; }
.price span { color: var(--muted); font-size: 15px; }
.price-year { font-size: 14px; color: var(--muted); }

.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.plan li { display: flex; gap: 9px; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 800; flex: none; }
.plan li.off { color: var(--muted); }
.plan li.off::before { content: "—"; color: var(--muted); }

.plan .btn { margin-top: auto; }

.trial-note {
  margin-top: 18px; padding: 16px 18px; border-radius: var(--r);
  background: rgba(95, 191, 138, .08); border: 1px solid rgba(95, 191, 138, .22);
  font-size: 15px;
}

/* ── блок акции «Приведи друга» ─────────────────────────────────────────── */

.promo {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 20px 24px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, rgba(224, 96, 63, .13), rgba(224, 96, 63, .04) 60%, transparent);
  border: 1px solid rgba(224, 96, 63, .28);
}
.promo-text { flex: 1 1 340px; }
.promo-tag {
  display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px;
  background: rgba(224, 96, 63, .18); color: var(--accent-2);
  font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}
.promo h3 { font-size: 20px; margin-bottom: 6px; }
.promo p { color: var(--muted); font-size: 15px; }
.promo .btn { flex: none; }

/* вопросы */

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px;
}
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 640; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-2); font-size: 20px; font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 0 16px; color: var(--muted); font-size: 15px; }

/* подвал */

.site-foot { border-top: 1px solid var(--line); padding: 40px 0 54px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 28px; }
.foot-col h4 { margin: 0 0 10px; color: var(--text); font-size: 14px; font-weight: 680; }
.foot-col a { display: block; color: var(--muted); margin-bottom: 7px; }
.foot-col a:hover { color: var(--text); text-decoration: none; }
.foot-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* Реквизиты исполнителя: по закону ФИО, ИНН и адрес должны быть доступны на сайте.
   Стоят в подвале каждой страницы — так их видно с любой страницы, включая документы. */
.foot-legal {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted);
}
.foot-legal span { display: inline-flex; align-items: center; gap: 6px; }
.foot-legal span + span::before { content: "·"; color: var(--line); margin-right: 4px; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--text); }

/* ── страницы документов ───────────────────────────────────────────────── */

.doc { max-width: 820px; margin: 0 auto; padding: 46px 0 70px; }
.doc h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 8px; }
.doc h2 { font-size: 21px; margin: 30px 0 10px; }
.doc p, .doc li { color: #ded2cd; }
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { margin: 10px 0; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.doc .back { display: inline-block; margin-bottom: 22px; font-size: 15px; }
.note-inline {
  margin: 18px 0; padding: 14px 16px; border-radius: 12px;
  background: rgba(224, 96, 63, .09); border: 1px solid rgba(224, 96, 63, .22); font-size: 15px;
}

/* ── адаптив ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .phones { justify-content: flex-start; }
  .phone + .phone { display: none; }
  .head-nav { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  section { padding: 46px 0; }
  .hero { padding: 34px 0 30px; }
  .hero-actions .btn { width: 100%; }
  .price b { font-size: 30px; }
  .foot-grid { grid-template-columns: 1fr; }
  .site-head .wrap { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
