/* Лендинг. Общий слой — base.css. */

.hero {
  position: relative;
  padding-block: clamp(3rem, 1.5rem + 6vw, 6rem);
  overflow: hidden;
}

/* Свечение за первым экраном — то же, что за героем экрана в приложении.
   Декоративное, поэтому лежит псевдоэлементом и скринридеру не достаётся. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto;
  height: 780px;
  background: radial-gradient(
    50% 50% at 50% 40%,
    color-mix(in srgb, var(--brand) 22%, transparent),
    transparent 70%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 1rem + 5vw, 4rem);
  align-items: center;
  justify-items: center;
  text-align: center;
}

/* На широком экране — две колонки: текст слева, устройство справа. Колонка
   устройства уже: телефон вертикальный, и отдавать ему половину ширины значит
   оставить заголовок в четыре строки. */
@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    justify-items: start;
    text-align: start;
  }
}

.hero__text {
  display: grid;
  gap: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  justify-items: inherit;
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: var(--step-4);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0;
  max-width: 48ch;
  font-size: var(--step-1);
  color: var(--muted);
}

.hero__note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--faint);
}

/* ── Телефон ─────────────────────────────────────────────────────────── */

/* Корпус нарисован рамкой, а не картинкой: любой макет устройства — это
   лишний файл, который надо тащить, масштабировать под ретину и менять
   вслед за модой на скругления. */
.phone {
  position: relative;
  /* Ширина подобрана так, чтобы высота корпуса примерно равнялась высоте
     текстовой колонки: телефон вертикальный, и при 300 px он был вдвое выше
     заголовка с кнопками — пара переставала читаться парой. */
  width: clamp(210px, 21vw, 262px);
  padding: 9px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2c2740, #14111d 55%, #2c2740);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 8%) inset,
    0 40px 80px -40px rgb(12 8 22 / 80%);
  transform: rotate(4deg);
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .phone {
    transition: transform 0.4s ease;
  }

  .phone:not(.phone--step):hover {
    transform: rotate(0deg);
  }
}

/* Свечение вокруг корпуса: тот же фирменный градиент, сильно размытый.
   Лежит под телефоном и чуть больше него — так подсветка читается ореолом,
   а не рамкой. */
.phone::before {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(
    from 210deg,
    var(--brand),
    var(--brand-2),
    var(--brand-3),
    var(--brand)
  );
  filter: blur(48px);
  opacity: 0.55;
  pointer-events: none;
}

/* Корпус в шагах — тот же, что в первом экране, но без наклона: три
   наклонённых телефона в ряд читаются как небрежность, а не как приём.
   Свечение здесь не горит постоянно, иначе три ореола рядом спорят с
   единственным акцентом первого экрана — оно зажигается по наведению. */
.phone--step {
  width: min(262px, 72vw);
  transform: none;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 8%) inset,
    0 0 0 1px var(--rule),
    0 24px 50px -30px rgb(12 8 22 / 55%);
}

.phone--step::before {
  opacity: 0;
}

.phone--step:hover::before {
  opacity: 0.5;
}

@media (prefers-reduced-motion: no-preference) {
  .phone--step,
  .phone--step::before {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .phone--step:hover {
    transform: translateY(-6px);
  }
}

.phone__screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 38px;
}

/* Островок камеры: без него рамка читается как планшет или как рамка для
   фотографии, а не как телефон. */
.phone__island {
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  height: 18px;
  border-radius: 999px;
  background: #0b0813;
  z-index: 1;
}

.section {
  padding-block: var(--section);
}

.section--soft {
  background: var(--bg-soft);
}

.section__head {
  max-width: 46ch;
  margin: 0 auto clamp(2rem, 1rem + 3vw, 3.5rem);
  text-align: center;
}

.section h2 {
  margin: 0 0 12px;
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0;
  color: var(--muted);
  font-size: var(--step-1);
}

/* ── Как это работает ────────────────────────────────────────────────── */

.steps {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.step {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

.step h3 {
  margin: 0;
  font-size: var(--step-1);
}

.step p {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
}

/* ── Возможности ─────────────────────────────────────────────────────── */

.features {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature {
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature svg {
  width: 26px;
  height: 26px;
  color: var(--brand);
}

.feature h3 {
  margin: 12px 0 8px;
  font-size: var(--step-1);
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* ── Частые вопросы ──────────────────────────────────────────────────── */

.faq {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--surface);
  padding: 4px 20px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-size: var(--step-1);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* Плюс, который поворачивается в минус. Значок нарисован рамками, чтобы не
   тащить ради него ни иконочный шрифт, ни картинку. */
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.faq p {
  margin: 0 0 18px;
  color: var(--muted);
}

.cta {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.cta h2 {
  max-width: 18ch;
}
