/* chat.farangi24.ru — витрина платного чата «Фаранги» (TBF-139).
   Тёмная тема в цветах главной farangi24.ru: тот же фон, карточки и фиолетовый. */
:root {
  --bg: #0e0e10;
  --bg-2: #141418;
  --card: #1c1c21;
  --card-2: #232329;
  --line: #2f2f35;
  --text: #efeff1;
  --muted: #a3a3ae;
  --purple: #9146ff;
  --purple-2: #772ce8;
  --purple-soft: rgba(145, 70, 255, .14);
  --green: #3ecf8e;
  --radius: 18px;
  --wrap: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ── шапка ── */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 14, 16, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
@media (max-width: 400px) { .brand span { display: none; } .nav .btn { padding: 0 16px; } }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 12px; border: 0;
  background: var(--purple); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--purple-2); }
.btn:active { transform: scale(.98); }
.btn.big { min-height: 54px; padding: 0 28px; font-size: 17px; border-radius: 14px; }
.btn.ghost { background: var(--card-2); color: var(--text); }
.btn.ghost:hover { background: var(--line); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ── первый экран ── */
.hero { position: relative; padding: 84px 0 72px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 120%;
  background: radial-gradient(closest-side, rgba(145, 70, 255, .32), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero .logo { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(145, 70, 255, .18), 0 18px 50px rgba(0, 0, 0, .55); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--purple-soft); color: #c9a8ff;
  font-size: 14px; font-weight: 600;
}
.hero h1 { margin: 18px auto 0; max-width: 760px; font-size: clamp(34px, 6vw, 56px); line-height: 1.08; letter-spacing: -.02em; }
.hero p.lead { margin: 18px auto 0; max-width: 640px; color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); }
.hero .cta { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .fine { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* ── разделы ── */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.head { max-width: 680px; margin-bottom: 32px; }
.head h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -.01em; }
.head p { margin-top: 10px; color: var(--muted); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 18px; margin-top: 14px; }
.card p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.ic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--purple-soft); color: #c9a8ff;
}
.ic svg { width: 22px; height: 22px; }

/* ── тарифы ── */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; }
.plan.best { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 20px 50px rgba(145, 70, 255, .18); }
.plan .tag { position: absolute; top: -12px; left: 24px; padding: 3px 10px; border-radius: 999px; background: var(--purple); color: #fff; font-size: 13px; font-weight: 700; }
.plan h3 { font-size: 18px; color: var(--muted); font-weight: 600; }
.plan .price { margin-top: 8px; font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.plan .price small { font-size: 18px; font-weight: 600; color: var(--muted); }
.plan .save { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(62, 207, 142, .14); color: var(--green); font-size: 13px; font-weight: 700; }
.plan ul { list-style: none; margin: 20px 0 24px; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.plan li { position: relative; padding-left: 26px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; width: 100%; }
.plans-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ── шаги ── */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 700;
}
.step h3 { margin-top: 14px; font-size: 18px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ── вопросы ── */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* ── документы (оферта, политика, возврат) ── */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 820px; }
.crumbs { color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }
.doc h1 { margin-top: 14px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -.01em; }
.doc .meta { margin-top: 10px; color: var(--muted); font-size: 14px; }
.doc h2 { margin-top: 40px; font-size: 22px; line-height: 1.25; }
.doc h3 { margin-top: 22px; font-size: 17px; }
.doc p, .doc li { margin-top: 10px; color: #d6d6dc; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li::marker { color: var(--purple); }
.doc a { color: #c9a8ff; }
.doc .box { margin-top: 24px; padding: 20px 22px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.doc .box p:first-child { margin-top: 0; }
.doc table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; width: 38%; }
.doc td { word-break: break-word; }
@media (max-width: 520px) {
  .doc table, .doc tbody, .doc tr, .doc th, .doc td { display: block; width: 100%; }
  .doc th { padding-bottom: 2px; border-bottom: 0; }
  .doc td { padding-top: 0; }
}

/* ── контакты ── */
.contacts { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
@media (max-width: 640px) { .contacts { grid-template-columns: 1fr; } }
.contact { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s; }
a.contact:hover { border-color: var(--purple); }
.contact b { display: block; }
.contact span { color: var(--muted); font-size: 14px; }

/* ── подвал ── */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot .seller { margin-top: 18px; line-height: 1.7; }

/* ── окно оформления (TBF-140) ── */
.paydlg {
  margin: auto; width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: var(--bg-2); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  overscroll-behavior: contain;
}
.paydlg::backdrop { background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.paydlg form { position: relative; padding: 28px 22px 22px; }
.paydlg .x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--card-2); color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.paydlg .x:hover { color: var(--text); }
.paydlg h2 { font-size: 22px; line-height: 1.25; padding-right: 36px; }
.paydlg .sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.paydlg fieldset { border: 0; margin-top: 20px; display: grid; gap: 8px; }
.paydlg legend { margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer;
}
.opt:has(input:checked) { border-color: var(--purple); background: var(--purple-soft); }
.opt input, .seg input, .agree input { accent-color: var(--purple); }
.opt input { width: 18px; height: 18px; flex: none; }
.opt span { flex: 1; min-width: 0; }
.opt b { display: block; font-size: 16px; }
.opt small { color: var(--muted); font-size: 13px; }
.opt em { font-style: normal; font-weight: 700; font-size: 17px; white-space: nowrap; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: block; padding: 9px 4px; border-radius: 9px; text-align: center; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--card-2); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 1px; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 14px; color: var(--muted); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.agree a { color: #c9a8ff; }
.sum { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sum span { color: var(--muted); }
.sum b { font-size: 26px; }
.paydlg .btn { width: 100%; margin-top: 14px; }
.paydlg .btn:disabled { background: var(--card-2); color: var(--muted); cursor: not-allowed; transform: none; }
.paydlg .fine { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.paydlg [data-step="wait"], .paydlg [data-step="closed"] { text-align: center; padding: 18px 0 4px; }
.paydlg [data-step="wait"] h2, .paydlg [data-step="closed"] h2 { padding-right: 0; margin-top: 18px; }
.spin { width: 48px; height: 48px; margin: 8px auto 0; border-radius: 50%; border: 4px solid var(--card-2); border-top-color: var(--purple); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.ic.big { width: 64px; height: 64px; margin: 4px auto 0; border-radius: 18px; }
.ic.big svg { width: 32px; height: 32px; }
.paydlg .more { display: block; margin: 12px auto 0; padding: 8px 14px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; }
.paydlg .more:hover { color: var(--text); }
