/* EmailFast landing — тёмная тема как база, светлая через prefers-color-scheme */

:root {
  --bg: #0B0E14;
  --surface: #141925;
  --surface-2: #1B2230;
  --text: #E8ECF4;
  --text-dim: #94A3B8;
  --accent: #2AABEE;
  --accent-2: #34D399;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.4);

  --font-sans: "InterVariable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #F7F8FB;
    --surface: #FFFFFF;
    --surface-2: #F0F2F7;
    --text: #101522;
    --text-dim: #5B6472;
    --border: rgba(16, 21, 34, 0.08);
    --shadow: rgba(16, 21, 34, 0.08);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@font-face {
  font-family: "InterVariable";
  src: url("fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 88px 0;
}

@media (max-width: 640px) {
  section { padding: 56px 0; }
}

h1, h2, h3 {
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

p {
  margin: 0 0 16px;
  color: var(--text-dim);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

/* ===== Кнопки ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #06131f;
  box-shadow: 0 8px 30px rgba(42, 171, 238, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(42, 171, 238, 0.5);
}

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

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

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

/* ===== Шапка ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: rgba(11, 14, 20, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

@media (prefers-color-scheme: light) {
  .site-header { background: rgba(247, 248, 251, 0.75); }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo img { width: 28px; height: 28px; }

.header-cta { display: none; }

@media (min-width: 720px) {
  .header-cta { display: inline-flex; }
}

/* ===== Hero ===== */

.hero {
  position: relative;
  padding-top: 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background:
    radial-gradient(60% 60% at 30% 20%, rgba(42, 171, 238, 0.22), transparent 70%),
    radial-gradient(50% 50% at 80% 10%, rgba(52, 211, 153, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(60% 50% at 50% 0%, black, transparent);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 32px;
  }
}

.hero-copy h1 {
  font-size: clamp(32px, 5.2vw, 64px);
}

.hero-copy .lead {
  font-size: clamp(17px, 2vw, 19px);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.hero-note {
  font-size: 14px;
  color: var(--text-dim);
}

.hero-stats-inline {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.hero-stats-inline div strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
}

.hero-stats-inline div span {
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== Телефон-мокап с анимацией диалога ===== */

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

.phone-wrap::before {
  content: "";
  position: absolute;
  inset: 8% 12%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(42, 171, 238, 0.35), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(320px, 82vw);
  border-radius: 36px;
  background: linear-gradient(180deg, #1a2130, #10141d);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px var(--shadow);
  padding: 14px;
}

.phone-screen {
  background: var(--bg);
  border-radius: 24px;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.phone-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.phone-bar .dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  overflow: hidden;
  flex: none;
}

.phone-bar .dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-bar .status {
  font-weight: 400;
  color: var(--accent-2);
  font-size: 12px;
}

.chat {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-end;
}

.bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
}

.bubble.in {
  align-self: flex-start;
  background: var(--surface-2);
  border-bottom-left-radius: 4px;
}

.bubble.out {
  align-self: flex-end;
  background: var(--accent);
  color: #06131f;
  border-bottom-right-radius: 4px;
}

.bubble.code {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}

.bubble .code-digits {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent-2);
}

.bubble .mini-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
}

.typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
  opacity: 0;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

/* Таймлайн анимации — управляется добавлением классов через JS (app.js),
   с уважением к prefers-reduced-motion (см. секцию ниже). */
.bubble.show,
.typing.show {
  animation: bubble-in 0.4s ease forwards;
}

@keyframes bubble-in {
  to { opacity: 1; transform: translateY(0); }
}

.typing.show { animation: typing-in 0.3s ease forwards; }
@keyframes typing-in { to { opacity: 1; } }

.typing span { animation: typing-dot 1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.code-digit {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
}

.code-digit.show {
  animation: bubble-in 0.25s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .typing, .code-digit {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

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

.steps {
  display: grid;
  gap: 20px;
}

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(42, 171, 238, 0.12);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 { font-size: 18px; margin-bottom: 8px; }
.step-card p { margin: 0; font-size: 15px; }

/* ===== Сервисы ===== */

.services-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 8px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 560px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.service-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}

.service-chip .swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #06131f;
}

/* ===== Цены ===== */

.pricing-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 780px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.price-card.is-accent {
  border-color: rgba(42, 171, 238, 0.4);
  background: linear-gradient(180deg, rgba(42, 171, 238, 0.08), var(--surface) 60%);
}

.price-card h3 { font-size: 17px; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }

.price-value {
  font-size: 32px;
  font-weight: 700;
  margin: 4px 0 16px;
}

.price-value span { font-size: 15px; font-weight: 400; color: var(--text-dim); }

.price-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-list li { display: flex; justify-content: space-between; gap: 12px; }
.price-list li b { color: var(--text); font-weight: 600; }

/* ===== Цифры ===== */

.stats-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}

@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-num {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ===== FAQ ===== */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq-item summary .plus {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform 0.2s ease;
}

.faq-item[open] summary .plus { transform: rotate(45deg); }

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.faq-item .faq-body {
  padding: 0 20px 18px;
  font-size: 15px;
  color: var(--text-dim);
}

.faq-item .faq-body p { margin: 0; }

/* ===== Подвал ===== */

.footer-cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 56px 24px;
  margin: 0 20px 0;
  max-width: calc(var(--container) - 40px);
  margin-inline: auto;
}

.footer-cta h2 { margin-bottom: 12px; }

site-footer, .site-footer {
  padding: 40px 0 120px;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 40px;
}

.footer-links nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a:hover { color: var(--text); }

.footer-refer {
  font-size: 13px;
  max-width: 640px;
  margin: 24px auto 0;
  text-align: center;
}

/* ===== Липкая кнопка на мобильных ===== */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}

@media (prefers-color-scheme: light) {
  .sticky-cta { background: rgba(247, 248, 251, 0.9); }
}

.sticky-cta .btn { width: 100%; }

@media (min-width: 720px) {
  .sticky-cta { display: none; }
}

body.has-sticky-cta { padding-bottom: 76px; }

/* ===== Появление секций при скролле ===== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  background: var(--accent);
  color: #06131f;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}
