/* Casting Scout — сайт bestoptions.space. Образ «Сигнал», тот же, что у бота (app/web/brand.py). */
:root {
  --bg: #F1F5FF;
  --surface: #FFFFFF;
  --soft: #E6ECFF;
  --ink: #0F1B3D;
  --muted: #55627F;
  --line: #D6DEF3;
  --blue: #3A66F5;
  --violet: #7048F0;
  --mint: #1FC896;
  --night: #1B2A6B;
  --link: #2F55D9;
  --gradient: linear-gradient(135deg, var(--blue) 0%, var(--violet) 100%);
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --text: "Golos Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 50px); line-height: 1.08; }
h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
h3 { font: 600 19px/1.3 var(--text); margin: 0 0 6px; }
p { margin: 0 0 14px; }

.wrap { width: min(100%, var(--wrap)); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: 64ch; }
.muted { color: var(--muted); }

/* Шапка */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span { font: 700 17px/1 var(--display); white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 14px;
  font: 600 17px/1 var(--text); text-decoration: none; cursor: pointer;
}
.btn { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease, filter .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-main { background: var(--gradient); color: #fff; box-shadow: 0 10px 24px -12px rgba(58, 102, 245, .8); }
.btn-main:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 16px 30px -12px rgba(88, 80, 245, .85); }
.btn-plain { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.btn-plain:hover { color: var(--blue); border-color: var(--blue); }
.top .btn { min-height: 44px; padding: 0 18px; font-size: 16px; }

/* Первый экран */
.hero { padding: clamp(24px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero p.lead { font-size: clamp(18px, 1.6vw, 20px); color: #26345C; margin: 22px 0 30px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .free { margin: 18px 0 0; color: var(--muted); font-size: 16px; }

/* Лента: единственная смелая деталь страницы */
.stream {
  position: relative; height: 480px; margin: 0; border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #2B3F95 0%, var(--night) 60%);
  box-shadow: 0 30px 60px -30px rgba(27, 42, 107, .7);
}
.stream::before {   /* волны знака: бот слушает каналы */
  content: ""; position: absolute; inset: -40% -40% auto; height: 520px; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 100%, rgba(255,255,255,.07) 0 2px, transparent 2px 46px);
}
.stream-head, .stream-foot {
  position: absolute; left: 0; right: 0; z-index: 2; padding: 16px 20px;
  color: rgba(255,255,255,.82); font-size: 14px;
}
.stream-head { top: 0; background: linear-gradient(var(--night) 40%, transparent); }
.stream-foot { bottom: 0; background: linear-gradient(transparent, var(--night) 55%); display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.stream-foot b { color: #fff; font-weight: 600; white-space: nowrap; }
.reel { position: absolute; left: 20px; right: 20px; top: 0; animation: drift 42s linear infinite; }
.post {
  margin: 0 0 12px; padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.08); font-size: 15px; line-height: 1.4;
}
.post b { display: block; color: rgba(255,255,255,.7); font-weight: 600; margin-bottom: 2px; }
.post.fit { background: #fff; color: var(--ink); border: 2px solid var(--mint); box-shadow: 0 0 0 6px rgba(31,200,150,.18); }
.post.fit b { color: var(--ink); }
.post .chip {
  display: block; width: fit-content; margin-top: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(31,200,150,.16); color: #0B7A5A; font-size: 13px; font-weight: 600;
}
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes glow { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* Первый экран собирается по очереди — один раз, при загрузке */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(40px) scale(.98); } to { opacity: 1; transform: none; } }
.hero h1 { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
.hero .lead { animation: rise .8s cubic-bezier(.2,.7,.2,1) .12s both; }
.hero .actions { animation: rise .8s cubic-bezier(.2,.7,.2,1) .24s both; }
.hero .free { animation: rise .8s cubic-bezier(.2,.7,.2,1) .34s both; }
.hero .stream { animation: slide-in 1s cubic-bezier(.2,.7,.2,1) .2s both; }

/* Разделы проявляются при прокрутке (site.js ставит .in); пункты — лесенкой через --i */
.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 110ms);
}

@media (prefers-reduced-motion: reduce) {
  .reel, .cta-band, .hero h1, .hero .lead, .hero .actions, .hero .free, .hero .stream { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
  html { scroll-behavior: auto; }
}

/* Разделы */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.white { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { margin-bottom: 14px; }
.section .intro { color: var(--muted); max-width: 46em; margin-bottom: 36px; }

/* Как это работает — настоящая последовательность, поэтому с номерами */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { position: relative; padding-top: 64px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gradient); color: #fff; font: 700 18px/1 var(--display);
}
.steps li:not(:last-child)::after {   /* линия к следующему шагу */
  content: ""; position: absolute; top: 22px; left: 56px; right: -20px; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--line) 60%, transparent);
  transform-origin: left; transition: transform 1s cubic-bezier(.2,.7,.2,1) .35s;
}
.js .steps li.reveal:not(.in)::after { transform: scaleX(0); }
.steps p { color: #33416A; margin: 0; }

/* Что ещё умеет — простой список, не карточки */
.abilities { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 56px; margin: 0; }
.abilities div { padding: 18px 0 18px 22px; border-top: 1px solid var(--line); position: relative; }
.abilities div::before { content: ""; position: absolute; left: 0; top: 26px; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.abilities dt { font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.abilities dd { margin: 0; color: #33416A; }

.note {
  margin-top: 40px; padding: 18px 22px; border-radius: 16px; background: var(--soft);
  color: #26345C; max-width: 60em;
}

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.plan { padding: 28px 26px 30px; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan.main { position: relative; background: linear-gradient(180deg, #F6F4FF 0%, var(--surface) 70%); }
.plan.main::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--gradient); }
.plan h3 { font-size: 18px; color: var(--muted); font-weight: 500; }
.price { font: 700 clamp(30px, 3.2vw, 40px)/1.1 var(--display); margin: 6px 0 4px; }
.price small { display: block; margin-top: 8px; font: 500 15px/1.2 var(--text); color: var(--muted); }
.plan ul { margin: 16px 0 0; padding-left: 20px; color: #33416A; }
.plan li { margin-bottom: 6px; }
.after-plans { margin-top: 18px; color: var(--muted); }

/* Финальный призыв */
.cta-band {
  background: radial-gradient(60% 120% at 0% 0%, rgba(112,72,240,.55), transparent 60%),
              radial-gradient(50% 120% at 100% 100%, rgba(58,102,245,.5), transparent 60%), var(--night);
  background-size: 160% 160%; animation: glow 14s ease-in-out infinite alternate;
  color: #fff; border-radius: 28px; padding: clamp(28px, 5vw, 56px); display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; max-width: 18em; }
.cta-band p { color: rgba(255,255,255,.8); margin: 10px 0 0; }

/* Документы */
.block ul.doc-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.block .doc-list li { margin: 0; border-bottom: 1px solid var(--line); }
.doc-list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px; text-decoration: none; color: var(--ink); }
.doc-list a span { color: var(--muted); white-space: nowrap; }
.doc-list a:hover b { color: var(--blue); text-decoration: underline; }
.facts { display: grid; grid-template-columns: 220px 1fr; gap: 10px 24px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
table.prices { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; }
table.prices th, table.prices td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
table.prices th { color: var(--muted); font-weight: 500; font-size: 15px; }
table.prices td.num, table.prices th.num { text-align: right; white-space: nowrap; }
.page-head { padding: clamp(24px, 4vw, 48px) 0 8px; }
.page-head p { color: var(--muted); max-width: 46em; margin-top: 14px; }
.block { margin-top: 44px; }
.block h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 16px; }
.block ul { padding-left: 22px; }
.block li { margin-bottom: 8px; }

/* Подвал */
.foot { padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot .name-note { margin: 0 0 8px; color: var(--ink); max-width: 46em; }
.foot a { color: var(--muted); }

/* Телефон */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stream { height: 380px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps li { padding: 0 0 0 64px; min-height: 44px; }
  .steps li:not(:last-child)::after { top: 52px; left: 21px; right: auto; width: 2px; height: calc(100% - 36px); background: linear-gradient(var(--blue), var(--line) 60%, transparent); transform-origin: top; }
  .js .steps li.reveal:not(.in)::after { transform: scaleY(0); }
  .abilities { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 12px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .top .wrap { gap: 12px; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: 15px; }
  .top .btn { margin-left: auto; min-height: 40px; padding: 0 14px; font-size: 15px; white-space: nowrap; }
  /* Таблица цен: на узком экране — тариф и цена строкой, что даёт — под ними */
  table.prices thead { display: none; }
  table.prices tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.prices td { padding: 0; border: 0; }
  table.prices td:nth-child(1) { font-weight: 600; }
  table.prices td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--muted); margin-top: 4px; }
  table.prices td.num { grid-column: 2; grid-row: 1; font-weight: 600; }
  .hero .actions .btn { width: 100%; }
}
