:root {
  --bg: #f6f8fc;
  --bg-soft: #ffffff;
  --surface: rgba(255,255,255,0.80);
  --surface-strong: #ffffff;
  --text: #0b1220;
  --muted: #475569;
  --border: rgba(15,23,42,0.10);
  --border-strong: rgba(15,23,42,0.14);
  --navy: #0b1220;
  --accent: #2563eb;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.10);
  --shadow-soft: 0 18px 40px rgba(2, 6, 23, 0.06);
  --radius: 22px;
  --radius-sm: 16px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { max-width: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  /* Safe-area support for iOS / in-app browsers (falls back to 24px) */
  padding-left: calc(24px + env(safe-area-inset-left));
  padding-right: calc(24px + env(safe-area-inset-right));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246,248,252,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}

@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: rgba(246,248,252,0.92); }
}

.topbar__inner {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand__logo { width: 52px; height: 52px; }
.brand__name { font-weight: 800; letter-spacing: 0.5px; }

.nav { display: flex; gap: 16px; align-items: center; }
.nav__link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__link:hover { color: var(--navy); background: rgba(37,99,235,0.08); }


.topbar__cta { display: flex; gap: 10px; align-items: center; }
.btnRow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0px); }

.btn:focus-visible,
.nav__link:focus-visible,
.brand:focus-visible,
.faq summary:focus-visible {
  outline: 3px solid rgba(37,99,235,0.45);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.btn--primary {
  background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
  color: white;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 18px 35px rgba(2,6,23,0.18);
}
.btn--primary:hover { box-shadow: 0 22px 46px rgba(2,6,23,0.22); }

.btn--secondary {
  background: rgba(255,255,255,0.82);
  color: var(--navy);
  border-color: var(--border-strong);
  box-shadow: 0 10px 22px rgba(2,6,23,0.05);
  backdrop-filter: blur(10px);
}
.btn--secondary:hover { border-color: rgba(37,99,235,0.22); box-shadow: 0 14px 30px rgba(2,6,23,0.08); }

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 16px;
  outline: none;
}
.input::placeholder { color: rgba(71,85,105,0.85); }
.input:focus {
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.muted-sm { color: var(--muted); font-size: 14px; }


.btn--lg { padding: 14px 22px; font-size: 15px; }

.hero {
  background:
    radial-gradient(1200px 560px at 12% -10%, rgba(37,99,235,0.18), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(2,6,23,0.10), transparent 62%),
    linear-gradient(to bottom, rgba(255,255,255,0.95), var(--bg));
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  /* Keep horizontal padding from .container; only add vertical spacing here */
  padding-top: 48px;
  padding-bottom: 36px;
}

h1 {
  margin: 0 0 14px;
  font-size: 48px;
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 18px;
  font-size: 18px;
  color: var(--muted);
}

.bullets {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--text);
}
.bullets li { margin: 6px 0; }

.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  box-shadow: 0 12px 26px rgba(2,6,23,0.05);
  backdrop-filter: blur(10px);
}
.note strong { color: var(--text); }

.trustRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.trustPill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.80);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(2,6,23,0.04);
  backdrop-filter: blur(10px);
}

.trustPill:hover {
  border-color: rgba(37,99,235,0.22);
  box-shadow: 0 14px 30px rgba(2,6,23,0.07);
}

.trustI {
  font-size: 14px;
  opacity: 0.92;
}

.preview {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.preview__label {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.preview__img {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(15,23,42,0.02), rgba(15,23,42,0.0)),
    repeating-linear-gradient(0deg, rgba(30,42,57,0.04) 0, rgba(30,42,57,0.04) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(90deg, rgba(30,42,57,0.04) 0, rgba(30,42,57,0.04) 1px, transparent 1px, transparent 18px);
}
.placeholder__text {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.section { padding: 72px 0; }
.section--soft { background: rgba(255,255,255,0.70); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

h2 {
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.sublead { margin: 0 0 22px; color: var(--muted); font-size: 16px; }

.section__head {
  max-width: 820px;
  margin: 0 0 22px;
}
.section__head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.section--alt {
  background: rgba(255,255,255,0.70);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.nav__link[aria-current="page"] {
  color: var(--navy);
  background: rgba(37,99,235,0.10);
}

.muted { color: var(--muted); }

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

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card__media {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  margin-bottom: 12px;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.card__media:hover img { transform: scale(1.02); }

/* Handwriting preview cards: keep them компактными (как в кабинете) */
.card__media--hw {
  aspect-ratio: auto;
  height: clamp(120px, 14vw, 160px);
  background: white;
}
.card__media--hw img {
  object-fit: contain;
  padding: 12px;
  background: white;
}

.card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card__k {
  font-weight: 800;
  color: var(--text);
}


.preview__img--photo {
  border: 1px solid var(--border);
  background: white;
}
.preview__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tip {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  h1 { font-size: 36px; }
  .grid4 { grid-template-columns: 1fr; }
}

.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.card__title { font-weight: 800; margin: 0 0 8px; }
.card__text { margin: 0; color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step__num {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37,99,235,0.12);
  color: var(--accent);
  font-weight: 900;
  margin-bottom: 10px;
}

.step {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.step__title {
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.step__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.price {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.price__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.price__name {
  font-weight: 900;
  font-size: 16px;
  color: var(--text);
}

.price__big {
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--navy);
}

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

.price__list {
  margin: 12px 0 18px;
  padding-left: 18px;
  color: var(--text);
}

.price__list li {
  margin: 8px 0;
}

.price--highlight {
  border-color: rgba(37,99,235,0.30);
  box-shadow: 0 16px 34px rgba(37,99,235,0.14);
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(37,99,235,0.28);
  color: var(--accent);
  background: rgba(37,99,235,0.10);
  font-size: 12px;
  font-weight: 800;
}
.faq {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.faq details {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 12px 26px rgba(2,6,23,0.04);
  backdrop-filter: blur(10px);
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.ctaBox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(15,23,42,0.10);
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(37,99,235,0.16), transparent 65%),
    radial-gradient(900px 420px at 95% 10%, rgba(2,6,23,0.10), transparent 70%),
    linear-gradient(to bottom, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.ctaBox__title {
  font-weight: 900;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.ctaBox__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.linkRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.linkRow a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(30,42,57,0.22);
}
.linkRow a:hover {
  border-bottom-color: rgba(30,42,57,0.55);
}

.copyBlock {
  background: rgba(255,255,255,0.85);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
  user-select: text;
}


.footer {
  padding: 38px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.footer a { color: var(--navy); text-decoration: none; font-weight: 700; }
.footer a:hover { text-decoration: underline; }


.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sep { color: var(--muted); }

@media (max-width: 900px) {
  .nav { display: none; }
  .hero__inner { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__links { justify-content: flex-start; }
  .ctaBox { flex-direction: column; align-items: stretch; }
  .ctaBox .btn { width: 100%; }
}
