/* Оформление страницы — apps/happ.json (theme). */
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #182232;
  --muted: #5B6578;
  --accent: #315CEC;
  --accent-hover: #2449C9;
  --on-accent: #FFFFFF;
  --accent-soft: #E6ECFD;
  --accent-ink: #315CEC;
  --line: #E2E7EF;
  --line-strong: #C9D1DE;
  --header-bg: #FFFFFF;
  --foot-bg: #FFFFFF;
  --shadow: 0 1px 2px rgba(24, 34, 50, 0.04), 0 8px 24px rgba(24, 34, 50, 0.06);
  --radius: 12px;
  --btn-radius: 12px;
  --badge-radius: 999px;
  --icon-radius: 12px;
  --mark-rx: 8;
  --font: Inter;
  --font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-stack: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-cyrillic-wght-normal.71d5ee93cc.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/inter-latin-wght-normal.3100e775e8.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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 из
   apps/<app>.json (их ставит build.mjs выше), особенности оформления
   приложения — themes/<app>.css ниже. Ширина от 320 px. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 120px;
}

@media (min-width: 900px) {
  html {
    scroll-padding-top: 88px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

svg {
  display: block;
}

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

.wrap {
  width: 100%;
  max-width: 1232px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--btn-radius);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--accent);
  border-radius: var(--btn-radius);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

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

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 15px;
}

.btn-lg {
  min-height: 56px;
  padding: 14px 28px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

/* Шапка */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  padding-top: 10px;
}

.logo {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.mark {
  flex: none;
  width: 32px;
  height: 32px;
}

.mark-bg {
  fill: var(--accent);
}

.mark-fg {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-app {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.logo-dot {
  display: none;
}

.nav {
  display: flex;
  order: 3;
  gap: 16px;
  width: calc(100% + 32px);
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  flex: none;
  padding: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

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

.top-cta {
  flex: none;
}

@media (min-width: 480px) {
  .logo-text {
    display: block;
  }

  .logo-app {
    font-size: inherit;
  }

  .logo-dot {
    display: inline;
  }
}

@media (min-width: 900px) {
  .top-in {
    flex-wrap: nowrap;
    gap: 32px;
    min-height: 72px;
    padding-top: 0;
  }

  .logo {
    flex: none;
  }

  .nav {
    order: 0;
    gap: 28px;
    width: auto;
    margin: 0 0 0 auto;
    padding: 0;
    overflow: visible;
  }

  .nav a {
    padding: 8px 0;
    font-size: 15px;
  }
}

/* Первый экран */

.hero {
  padding: 40px 0 56px;
}

.hero-in {
  display: grid;
  gap: 40px;
  align-items: center;
}

.kicker {
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 700;
}

h1 {
  font-size: clamp(32px, 4.6vw + 16px, 60px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(17px, 0.5vw + 15px, 20px);
}

.cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.cta-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-note {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.hero-art svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

@media (min-width: 560px) {
  .cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 72px 0 96px;
  }

  .hero-in {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
  }
}

/* Разделы */

.sec {
  padding: 64px 0;
}

@media (min-width: 900px) {
  .sec {
    padding: 96px 0;
  }
}

.sec-k {
  margin-bottom: 12px;
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
}

.sec-h {
  max-width: 22em;
  margin-bottom: 32px;
  font-size: clamp(28px, 2vw + 20px, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

@media (min-width: 900px) {
  .sec-h {
    margin-bottom: 48px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

/* Преимущества */

.cards {
  display: grid;
  gap: 16px;
}

.benefit {
  padding: 24px;
}

.benefit-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: var(--icon-radius);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.benefit p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

@media (min-width: 560px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Тарифы */

.trial {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-bottom: 32px;
  padding: 24px;
}

.trial-label {
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
}

.trial-title {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
}

.trial-text {
  margin-top: 6px;
  color: var(--muted);
}

.trial-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  width: 100%;
}

.trial-price {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.trial-buy .btn {
  flex: 1 1 100%;
}

@media (min-width: 560px) {
  .trial-buy .btn {
    flex: 1 1 auto;
  }
}

@media (min-width: 768px) {
  .trial {
    padding: 28px 32px;
  }

  .trial-buy {
    width: auto;
  }

  .trial-buy .btn {
    flex: none;
  }
}

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

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
}

.plan-best {
  border: 2px solid var(--accent);
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 3px 10px;
  border-radius: var(--badge-radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-term {
  font-size: 17px;
}

.plan-price {
  margin-top: 12px;
  font-size: clamp(24px, 1.2vw + 20px, 36px);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.plan-month {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.plan-save {
  margin-top: 8px;
  font-size: 14px;
}

.plan-save b {
  color: var(--accent-ink);
  white-space: nowrap;
}

.plan-cond {
  flex: 1;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.plan .btn {
  margin-top: 16px;
  padding-right: 12px;
  padding-left: 12px;
}

@media (max-width: 399px) {
  .btn {
    padding-right: 16px;
    padding-left: 16px;
  }

  .trial {
    padding: 20px;
  }

  .plan-badge {
    left: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 8px;
  }
}

@media (min-width: 560px) {
  .plan {
    padding: 28px 20px 20px;
  }

  .plan-badge {
    left: 20px;
  }

  .plan-cond {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }

  .plan {
    padding: 32px 24px 24px;
  }

  .plan-badge {
    left: 24px;
  }
}

/* Как подключиться */

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

.step {
  padding: 24px;
}

.step-n {
  display: block;
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
}

.how-cta {
  margin-top: 32px;
}

@media (max-width: 559px) {
  .how-cta .btn {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .step {
    padding: 32px;
  }
}

/* Вопросы */

.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-right: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: translateY(-3px) rotate(45deg);
}

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

.faq details p {
  padding: 0 20px 20px;
  color: var(--muted);
}

@media (min-width: 768px) {
  .faq summary {
    padding: 22px 28px;
    font-size: 18px;
  }

  .faq details p {
    padding: 0 28px 24px;
  }
}

/* Подвал */

.foot {
  padding: 56px 0 40px;
  background: var(--foot-bg);
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.foot-in {
  display: grid;
  gap: 32px;
}

.foot .logo {
  flex: none;
}

.provider {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.foot-h {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foot-col p + p {
  margin-top: 8px;
}

.foot-link,
.foot-links a {
  color: var(--accent-ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

.foot-links {
  display: grid;
  gap: 8px;
}

.disclaimer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 768px) {
  .foot-in {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

/* Happ: светлый коммерческий минимализм — белые полосы и карточки, синие
   кнопки, ключ и ссылка на первом экране. */

.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 14px;
}

.sec-benefits,
.sec-how {
  background: var(--surface);
}

.sec-benefits .card,
.sec-how .card {
  background: var(--bg);
  border-color: transparent;
  box-shadow: none;
}

.step-n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 18px;
}

.plan-best {
  box-shadow: 0 16px 40px rgba(49, 92, 236, 0.16);
}

.btn-ghost {
  background: var(--surface);
}
