/* shacalls.com - та же единая тёмная тема, что в приложении.

   Цвет - из логотипа: лаймовый градиент (#CCFF00 → #80E800) на почти
   чёрном листе с зеленоватым оттенком. Лайм - единственный яркий цвет;
   текст на нём тёмный. Обводок нет, блок отделяется собственным цветом;
   одно яркое пятно на блок; ничего не отвечает на наведение; движется
   только transform и opacity.

   Контраст проверен числом (WCAG):
     --ink   на --bg          17,3 : 1
     --ink-2 на --surface      7,6 : 1
     --accent на --bg         15,3 : 1
     --on-accent на лайме     13,8 : 1
   --ink-3 (4,1 : 1) - только для третьестепенного, на главный текст не ставить. */

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  --accent:     #C4F52B;
  --accent-btn: #B8F21C;
  /* Заливка главной кнопки - градиент логотипа, чуть приглушённый. */
  --accent-grad: linear-gradient(160deg, #CCFA1E 0%, #A6EE10 100%);
  --on-accent:  #101700;
  --red:        #FF5C72;

  /* Лист глубже карточки: разница между ними и есть граница. */
  --bg:        #0B0D09;
  --surface:   #141711;
  --surface-2: #1D2119;
  --surface-3: #272C22;

  --ink:   #EEF3E6;
  --ink-2: #A2AB97;
  --ink-3: #6D7664;

  --t-h1:    clamp(30px, 6vw, 44px);
  --t-lead:  clamp(17px, 2vw, 19px);
  --t-base:  16px;
  --t-small: 14px;

  --r-lg: 24px;

  --ease-out: cubic-bezier(.23, 1, .32, 1);

  --pad: 24px;
  --col: 560px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  /* Серая вспышка под пальцем - то же наведение, только на телефоне. */
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: proportional-nums;
  /* Наклонённое пятно света шире экрана: без этого страница уезжала бы вбок. */
  overflow-x: hidden;
  /* Свет (.glow, z-index: -1) рисуется внутри body, над его фоном. Без
     этого он уходил под фон body и был не виден вовсе. */
  isolation: isolate;
}

/* Без этого ссылки становятся синими и подчёркнутыми по всей странице. */
a { color: inherit; text-decoration: none; }

/* Спрятанное прячется всегда - даже у кнопок, которым задан свой display. */
[hidden] { display: none !important; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }

img {
  max-width: 100%;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Единственное состояние на странице - кольцо фокуса с клавиатуры. */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2 { margin: 0; font-weight: 600; }

/* ── Свет вместо картинки ──────────────────────────────────────────────
   Снимка у проекта нет, поэтому фон собран из двух мягких пятен в цвете
   акцента. Маска гасит их снизу, чтобы они растворялись в листе без шва. */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
          mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
}
.glow::before,
.glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.glow::before {
  width: 620px; height: 420px;
  left: 50%; top: -220px;
  transform: translateX(-60%) rotate(-8deg);
  background: radial-gradient(closest-side, rgba(170, 238, 18, .22), transparent);
}
.glow::after {
  width: 420px; height: 320px;
  left: 50%; top: -120px;
  transform: translateX(10%);
  background: radial-gradient(closest-side, rgba(204, 250, 30, .11), transparent);
}

/* ── Рама ─────────────────────────────────────────────────────────────── */

.top {
  width: min(100% - var(--pad) * 2, 1120px);
  margin: 0 auto;
  padding: 22px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
}
.top__mark { width: 26px; height: 26px; border-radius: 8px; }
.top__brand { display: inline-flex; align-items: center; gap: 10px; }
/* Вход - справа в шапке, тихой кнопкой: главное на странице - скачать. */
.top__nav { margin-left: auto; }
/* Строчный блок, а не flex: иначе длинное имя аккаунта не обрезалось бы
   многоточием. */
.top__nav .btn {
  display: inline-block;
  min-height: 0;
  height: 38px;
  line-height: 38px;
  max-width: min(220px, 50vw);
  padding: 0 18px;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  flex: 1;
  width: min(100% - var(--pad) * 2, var(--col));
  margin: 0 auto;
  padding: clamp(56px, 12vh, 120px) 0 56px;
}

.foot {
  width: min(100% - var(--pad) * 2, 1120px);
  margin: 0 auto;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  color: var(--ink-3);
  font-size: var(--t-small);
}

/* ── Текст ────────────────────────────────────────────────────────────── */

.eyebrow { margin: 0 0 12px; color: var(--ink-2); font-size: var(--t-small); }

/* ── Первый экран ─────────────────────────────────────────────────────
   Знак, имя и два действия - по центру страницы. Кнопки одной ширины и
   одной высоты: рядом они читаются как пара, а не как главная и довесок. */
.hero {
  padding: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding-bottom: 10vh;
}
.hero__mark { display: block; width: 96px; height: 96px; margin-bottom: 22px; }
.hero .title { font-size: clamp(38px, 8vw, 58px); }
.hero__actions {
  display: grid;
  gap: 12px;
  width: min(100%, 300px);
  margin-top: 34px;
}
.hero__actions .btn { width: 100%; }

.title { font-size: var(--t-h1); letter-spacing: -.02em; line-height: 1.15; }
/* Имя проекта - единственное место, где уместен градиент. */
.title--brand {
  background: linear-gradient(100deg, #A6EE10 10%, #E2FF8E 95%);
  /* Градиент - по ширине слова, а не всей колонки: иначе лайм уходил бы в
     пустоту справа от надписи. */
  width: fit-content;
  padding-right: 4px;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
/* Код звонка - главное на странице, поэтому он и есть ударение. Длинный и
   несокращаемый: обрезать нельзя, его затем и показывают, чтобы прочесть. */
.title--code { color: var(--accent); overflow-wrap: anywhere; }

.lead { margin: 12px 0 0; font-size: var(--t-lead); color: var(--ink-2); }

.small { font-size: var(--t-small); color: var(--ink-2); }

/* Пока число участников не пришло, строка держит высоту, иначе кнопка под
   ней прыгнула бы вниз ровно тогда, когда к ней тянется палец. */
.status { min-height: 1.5em; }

/* ── Кнопки ───────────────────────────────────────────────────────────
   Ничего не меняют ни при наведении, ни при нажатии. */

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.btn--primary { background: var(--accent-btn) var(--accent-grad); color: var(--on-accent); font-weight: 600; }
/* Нажатие - коротким потемнением, как в приложении; не размером. */
.btn { transition: filter 180ms ease; }
.btn:active { filter: brightness(.82); transition-duration: 50ms; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
/* Значки - залитые, со скруглёнными углами (Material Symbols Rounded), как в приложении. */
.icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.hint {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: var(--t-small);
}
.hint a { color: var(--accent); font-weight: 500; }

/* ── Карточка «приложения нет» ────────────────────────────────────────
   Появляется, только если после нажатия ничего не открылось. */
.card {
  margin-top: 32px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.card h2 { font-size: 17px; }
.card p { margin: 8px 0 0; color: var(--ink-2); }
.card .actions { margin-top: 20px; }

.card[hidden] { display: none; }
.card.is-in { animation: rise 420ms var(--ease-out) both; }

.points {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.points li {
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.points b { display: block; font-weight: 600; }
.points span { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--t-small); }

.reveal { animation: rise 520ms var(--ease-out) both; }
.reveal:nth-child(2) { animation-delay: 60ms; }
.reveal:nth-child(3) { animation-delay: 120ms; }
.reveal:nth-child(4) { animation-delay: 180ms; }
.reveal:nth-child(n+5) { animation-delay: 240ms; }

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

/* ── Вход и аккаунт ───────────────────────────────────────────────────
   Колонка уже, чем у лендинга: форма в 420 пикселей читается одним
   взглядом, а поля не растягиваются в длинные полосы. */

main.auth {
  width: min(100% - var(--pad) * 2, 420px);
  padding-top: clamp(40px, 9vh, 96px);
}

.view.is-in > * { animation: rise 460ms var(--ease-out) both; }
.view.is-in > :nth-child(2) { animation-delay: 40ms; }
.view.is-in > :nth-child(3) { animation-delay: 80ms; }
.view.is-in > :nth-child(4) { animation-delay: 120ms; }
.view.is-in > :nth-child(n+5) { animation-delay: 160ms; }

.form { display: grid; gap: 16px; margin-top: 28px; }
.form .btn--wide { margin-top: 6px; }

.field { display: block; min-width: 0; }
.field__label { display: block; margin-bottom: 8px; font-size: var(--t-small); color: var(--ink-2); }
.field__hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

.input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
  /* 16px и не меньше: на iPhone поле мельче этого увеличивает всю страницу. */
  font-size: 16px;
  transition: background-color 320ms ease;
}
.input::placeholder { color: var(--ink-3); }
/* Вместо кольца фокуса поле чуть светлеет - кольцо Chromium рисовал бы
   даже у поля, получившего фокус само. */
.input:focus-visible { outline: none; background-color: var(--surface-3); }
/* Автозаполнение Chromium красит поле в свой светлый цвет - возвращаем наш. */
.input:-webkit-autofill,
.input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 40px var(--surface-2) inset;
  caret-color: var(--ink);
}
.input.is-bad { animation: bad 1.5s ease; }
@keyframes bad {
  0%, 100% { background-color: var(--surface-2); }
  30%, 60% { background-color: #45202A; }
}

/* Код - крупно и вразрядку, цифры одной ширины: так его сверяют с письмом. */
.input--code {
  height: 60px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding-left: calc(16px + .32em);
}
.input--code::placeholder { color: var(--ink-3); opacity: .5; }

/* Поле пароля с глазом внутри. */
.pass { position: relative; }
.pass .input { padding-right: 56px; }
.pass__eye {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-2);
}
.pass__eye .icon { width: 22px; height: 22px; }

/* Вход или регистрация - два сегмента одной плашки. */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 28px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
}
.seg__btn {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: background-color 320ms ease, color 320ms ease;
}
.seg__btn[aria-selected="true"] { background: var(--surface-2); color: var(--ink); }
.seg + .form { margin-top: 20px; }

.err { min-height: 1.5em; margin: 0; font-size: var(--t-small); color: var(--red); }

/* Ссылка-кнопка: второстепенное действие, без подложки. Клетка 44 в
   высоту - чтобы попадать пальцем. */
.link {
  justify-self: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
}
.link:disabled { color: var(--ink-3); }

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: -8px 0 20px -10px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 14.5px;
}
.back .icon { width: 20px; height: 20px; }

.badge {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(196, 245, 43, .12);
  color: var(--accent);
}
.badge .icon { width: 28px; height: 28px; }

.lead b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

.who {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
}
.avatar {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #475262;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
}
.who__text { min-width: 0; display: grid; }
.who__text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__text span { color: var(--ink-2); font-size: var(--t-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.stack { display: grid; gap: 12px; margin-top: 24px; }
.stack + .err, .stack + .hint { margin-top: 16px; }
.view > .err:last-child { margin-top: 12px; }

.btn--wide { width: 100%; }
.btn--quiet { background: var(--surface-2); }
.btn:disabled { opacity: .6; }

/* Кнопка занята: надпись гаснет, на её месте крутится дуга. Ширина та же -
   ничего вокруг не сдвигается. */
.btn { position: relative; }
.btn .spinner { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity 200ms ease; }
.btn__text { transition: opacity 200ms ease; }
.btn.is-busy { opacity: 1; }
.btn.is-busy .btn__text, .btn.is-busy > .icon { opacity: 0; }
.btn.is-busy .spinner { opacity: 1; }

.spinner {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, currentColor);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.seg__btn, .link, .back, .pass__eye { transition: background-color 320ms ease, color 320ms ease, filter 180ms ease; }
.seg__btn:active, .link:active:not(:disabled), .back:active, .pass__eye:active { filter: brightness(.82); transition-duration: 320ms, 320ms, 50ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .card.is-in, .view.is-in > * { animation: fade 300ms ease both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .spinner { animation-duration: 2.4s; }
}
