*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font: 400 1rem/1.55 var(--font), system-ui, sans-serif;
  --space: clamp(40px, 5vw, 72px);
  --field-height: 56px;
}
h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.2vw, 4rem); font-weight: 710; }
h2 { font-size: clamp(1.925rem, 3.35vw, 3rem); font-weight: 680; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { color: var(--muted); }
a { color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
[hidden] { display: none !important; }
[id] { scroll-margin-block-start: 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--tint); color: var(--ink); }
.wrap { width: min(1160px, 100% - 64px); margin-inline: auto; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar { min-height: 76px; display: flex; align-items: center; gap: 34px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 710; white-space: nowrap; text-decoration: none; }
.wordmark svg { flex: 0 0 auto; color: var(--accent); }
.topbar nav { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 25px; }
.topbar nav a, .contact { text-decoration: none; font-size: .94rem; font-weight: 570; }
.topbar a:hover { color: var(--accent); }
.contact { white-space: nowrap; }
.hero { margin-top: clamp(24px, 4vw, 52px); }
.eyebrow { font-size: .88rem; color: var(--accent); font-weight: 670; margin-bottom: 15px; }
.intro { margin-top: 18px; font-size: clamp(1rem, 1.45vw, 1.18rem); max-width: 46ch; }
.button {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--button-ink, #fff);
  font: inherit;
  font-weight: 660;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-hover); }
.button:disabled { cursor: wait; opacity: .7; }
.button.outline { color: var(--accent); background: var(--paper); border-color: var(--line); }
.button.outline:hover { border-color: var(--accent); }
.lead { display: grid; gap: 14px; }
.lead-title { font-size: 1.125rem; letter-spacing: -.015em; }
.lead-controls { display: grid; gap: 10px; }
.lead-controls .button { min-height: var(--field-height); }
.lead.inline .lead-controls { grid-template-columns: minmax(150px, 1fr) minmax(185px, .75fr); }
.phone-field {
  height: var(--field-height);
  position: relative;
  display: block;
  background: var(--paper);
  border: 1px solid var(--input-line);
  border-radius: var(--control-radius);
}
.phone-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.phone-field:has(input:user-invalid) { border-color: #b42732; }
.phone-code { position: absolute; inset: 0 auto 0 13px; z-index: 1; display: flex; align-items: center; gap: 9px; pointer-events: none; }
.flag {
  width: 21px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(#fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66%);
  box-shadow: inset 0 0 0 1px #1112;
}
.phone-field input {
  width: 100%;
  height: 100%;
  padding-inline: 70px 12px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--accent);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.phone-field input::placeholder { color: var(--muted); opacity: 1; }
.consents { display: grid; gap: 8px; font-size: .8125rem; line-height: 1.45; color: var(--muted); }
.consents label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.consents input { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.consents a { color: var(--text-link, var(--accent)); text-underline-offset: 2px; }
.form-status { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--tint); font-size: .87rem; }
.messenger-contact {
  display: grid;
  gap: 10px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.messenger-contact p { font-size: .875rem; }
/* Иконки-мессенджеры в плашках — лёгкий брендовый градиент + мягкое цветное свечение. */
.messenger-links {
  padding: 0;
  list-style: none;
  display: flex;
  width: 100%;
  gap: 10px;
  justify-content: flex-start;
}
.messenger-links a {
  width: 100%;
  flex: 1 1 0;
  /* кап ширины — иконки не растягиваются в широкие плашки в одноколоночных блоках */
  max-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: transform 0.16s cubic-bezier(.16, 1, .3, 1), box-shadow 0.2s ease, filter 0.2s ease;
}
.messenger-links a svg,
.messenger-links img {
  object-fit: contain;
  width: 25px;
  height: 25px;
}

.messenger-links a:hover {
  transform: translateY(-3px);
  filter: saturate(1.05);
}

.messenger-telegram {
  background: linear-gradient(135deg, #2aabee 0%, #1f96d6 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(34, 158, 217, 0.4);
}
.messenger-telegram:hover {
  box-shadow: 0 12px 24px rgba(34, 158, 217, 0.5);
}
.messenger-whatsapp {
  background: linear-gradient(135deg, #45d367 0%, #11b85a 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 184, 90, 0.4);
}
.messenger-whatsapp:hover {
  box-shadow: 0 12px 24px rgba(18, 184, 90, 0.5);
}
.messenger-vk {
  background: linear-gradient(135deg, #4a8cff 0%, #0a73ff 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(10, 115, 255, 0.4);
}
.messenger-vk:hover {
  box-shadow: 0 12px 24px rgba(10, 115, 255, 0.5);
}
.messenger-max {
  background: linear-gradient(135deg, #2b6cf0 0%, #7a2ee0 100%);
  box-shadow: 0 8px 18px rgba(111, 74, 224, 0.42);
}
.messenger-max:hover {
  box-shadow: 0 12px 24px rgba(111, 74, 224, 0.52);
}
/* у MAX в png ~6% поля — чуть крупнее, чтобы визуально совпадал с остальными */
.messenger-max img {
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .messenger-links a {
    transition: none;
  }
  .messenger-links a:hover {
    transform: none;
  }
}

.messenger-links li { flex: 1 1 0; max-width: 96px; }
.messenger-links a:focus-visible { outline-color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section { padding-block: var(--space); }
.section.near { padding-block-start: 0; }
.band { background: var(--wash); }
.section-title { margin-bottom: clamp(22px, 3vw, 36px); }
.section-title p { margin-top: 13px; max-width: 62ch; }
.section-action { margin-top: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--card-radius); padding: clamp(18px, 2.3vw, 28px); }
.cards article h3 + p { margin-top: 9px; }
.card-icon { width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); background: var(--tint); border-radius: 12px; flex: 0 0 auto; }
.cards .card-icon { margin-bottom: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0; list-style: none; }
.steps li { padding: 21px; border-top: 1px solid var(--input-line); }
.steps h3 + p { margin-top: 10px; }
.step-index { display: block; margin-bottom: 16px; color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.service-grid a {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--paper);
  text-decoration: none;
}
.service-grid a:hover { border-color: var(--accent); }
.service-grid strong { font-size: 1.125rem; font-weight: 650; }
.service-grid small { display: block; margin-top: 7px; color: var(--muted); font-size: .92rem; }
.service-grid svg { width: 19px; height: 19px; color: var(--accent); }
.promise { display: flex; align-items: flex-start; gap: 19px; padding: clamp(22px, 3vw, 37px); background: var(--tint); border-radius: var(--card-radius); }
.promise h3 { font-size: clamp(1.4rem, 2.25vw, 2rem); }
.promise p { margin-top: 10px; }
.faq-layout { display: grid; grid-template-columns: minmax(200px, .78fr) minmax(0, 1.8fr); align-items: start; gap: clamp(20px, 4vw, 56px); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; list-style: none; min-height: 58px; padding: 15px 10px; font-weight: 630; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary:focus-visible { outline-offset: -2px; border-radius: 8px; }
.faq details p { max-width: 68ch; padding: 0 32px 18px 10px; }
.chevron { width: 9px; height: 9px; flex: 0 0 9px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -4px 2px 0 0; }
.faq details[open] .chevron { transform: rotate(225deg); margin-top: 4px; }
.closing { padding-bottom: clamp(36px, 5vw, 65px); }
.closing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  border-radius: var(--hero-radius);
  overflow: hidden;
  background: var(--wash);
}
.closing-panel > div { padding: clamp(26px, 4.4vw, 56px); }
.closing-panel h2 + p { margin-top: 14px; }
.closing-panel .lead { margin-top: 21px; }
.panel-art { position: relative; overflow: hidden; }
.panel-art img { position: absolute; inset: 0; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .steps, .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { min-height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-block: 14px; }
  .topbar nav { grid-area: 2 / 1 / 3 / 3; margin: 0; gap: 8px 17px; }
  .topbar nav a, .contact { font-size: .875rem; }
  .wordmark { gap: 6px; font-size: .95rem; }
  .wordmark svg { width: 19px; height: 19px; }
  .lead.inline .lead-controls, .cards, .faq-layout, .closing-panel { grid-template-columns: minmax(0, 1fr); }
  .faq-layout .section-title { margin-bottom: 12px; }
  .closing-panel .panel-art { height: clamp(180px, 66vw, 300px); }
  .steps li, .service-grid a { padding: 14px; }
  .promise { gap: 12px; }
  .promise .card-icon { width: 39px; height: 39px; }
}
@media (max-width: 345px) {
  .topbar { column-gap: 6px; }
  .topbar .contact { font-size: .81rem; }
  .service-grid strong { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@font-face {
  font-family: "Onest";
  src: url("/media/onest-cyr.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("/media/onest-lat.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  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+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
body.course {
  --font: "Onest";
  --ink: #251a40;
  --muted: #5f5572;
  --text-link: #4f318f;
  --accent: #5e40b2;
  --accent-hover: #4d3297;
  --paper: #fff;
  --page: #fdfcfe;
  --wash: #f1edf8;
  --tint: #ebe2fa;
  --line: #e4daee;
  --input-line: #bdb0ce;
  --focus: #5e40b224;
  --control-radius: 11px;
  --card-radius: 22px;
  --hero-radius: 30px;
}
.course-hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 16px; }
.course-hero .hero-copy { padding: clamp(24px, 4vw, 56px); border-radius: var(--hero-radius); background: #eee8fa; }
.course-hero h1 { font-size: clamp(2.125rem, 4.05vw, 3.9rem); }
.course-hero .lead { max-width: 460px; margin-top: 24px; }
.course-hero .messenger-contact { max-width: 460px; }
.hero-note { margin-top: 17px; font-size: .9rem; }
.hero-note strong { color: var(--accent); }
.hero-photo { position: relative; overflow: hidden; border-radius: var(--hero-radius); min-height: 350px; background: var(--tint); }
.hero-photo img { position: absolute; object-position: 50% 49%; }
.hero-photo figcaption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  max-width: min(30ch, 89%);
  padding: 14px 18px;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  font-weight: 610;
  line-height: 1.3;
}
.course .steps li { padding-inline: 0 12px; border-top: 2px solid #c8b5e5; }
.course .course-benefits article { background: #fbf8ff; }
.course-benefits article, .expert-list article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-content: start;
  gap: 6px 12px;
  padding: clamp(16px, 2vw, 22px);
}
.course-benefits article .card-icon, .expert-list article .card-icon {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  margin: 0;
}
.course-benefits article h3 + p, .expert-list article h3 + p { margin: 0; }
.estimate { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 18px; }
.estimate dl { overflow: hidden; background: #fff; border-radius: var(--card-radius); border: 1px solid var(--line); }
.estimate dl div { display: grid; grid-template-columns: minmax(125px, .8fr) minmax(0, 1.6fr); gap: 16px; padding: 18px 24px; }
.estimate dl div + div { border-top: 1px solid var(--line); }
.estimate dt { font-weight: 640; }
.estimate dd { color: var(--muted); }
.estimate aside { padding: 26px; background: #e6dbf6; border-radius: var(--card-radius); display: flex; flex-direction: column; align-items: flex-start; }
.estimate aside .card-icon { background: #fff; margin-bottom: 15px; }
.estimate aside h3 { font-size: 1.35rem; }
.estimate aside p { margin: 10px 0 20px; }
.estimate aside a { margin-top: auto; }
.course .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.course .service-grid a { flex-direction: row; align-items: center; gap: 12px; }
.course .service-grid svg, .related svg { flex-shrink: 0; }
.course .service-grid a:hover { background: #f8f4ff; }
.course-promise { background: #30204f; color: #fff; align-items: center; }
.course-promise h2 { font-size: clamp(1.55rem, 3vw, 2.6rem); }
.course-promise p { color: #f2eafb; max-width: 76ch; }
.expert-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 19px; }
.expert-layout figure { position: relative; overflow: hidden; border-radius: var(--card-radius); min-height: 320px; }
.expert-layout figure img { position: absolute; object-position: center 39%; }
.expert-list { grid-template-columns: minmax(0, 1fr); gap: 11px; }
.course .plain article { border-top-color: #cdb9ed; }
.scope { border: 1px solid var(--line); overflow: hidden; border-radius: var(--card-radius); }
.scope table { border-collapse: collapse; width: 100%; text-align: left; background: #fff; }
.scope th, .scope td { padding: 17px 21px; border-bottom: 1px solid var(--line); }
.scope tbody tr:last-child > * { border: 0; }
.scope thead { background: var(--wash); }
.scope td { color: var(--muted); }
.scope-label { display: none; }
.course-examples .tag { display: inline-block; color: var(--accent); font-size: .87rem; padding-bottom: 10px; }
.course-examples article { display: flex; flex-direction: column; align-items: flex-start; }
.course-examples a { margin-top: auto; padding-top: 17px; color: var(--accent); text-underline-offset: 4px; font-weight: 630; }
.related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none; }
.related a { display: flex; justify-content: space-between; align-items: center; gap: 9px; height: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: #fff; font-weight: 570; }
.related a:hover { border-color: var(--accent); }
.related svg { width: 19px; height: 19px; color: var(--accent); }
.course .closing-panel img { object-position: center 38%; }
@media (min-width: 681px) and (max-width: 1000px) {
  .course-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .course-hero, .estimate, .expert-layout, .related ul { grid-template-columns: minmax(0, 1fr); }
  .course-hero h1 { font-size: clamp(2rem, 9.75vw, 3.2rem); }
  .course-hero .hero-copy { padding: 25px 20px; }
  .hero-photo { min-height: 0; height: clamp(240px, 65vw, 380px); }
  .hero-photo img { object-position: 50% 43%; }
  .hero-photo figcaption { left: 13px; bottom: 13px; max-width: min(30ch, calc(100% - 26px)); padding: 11px 14px; font-size: .9rem; }
  .estimate dl div { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 14px 18px; }
  .course .service-grid a { flex-direction: column; align-items: flex-start; }
  .course .service-grid svg { align-self: flex-end; }
  .expert-layout figure { min-height: 0; height: clamp(240px, 75vw, 365px); }
  .course-promise { align-items: flex-start; }
  .scope table { table-layout: fixed; }
  .scope th, .scope td { padding: 12px 10px; }
}
@media (max-width: 520px) {
  .scope table, .scope tbody { display: block; }
  .scope thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scope tr { display: grid; gap: 10px; padding: 16px; }
  .scope tbody tr + tr { border-top: 1px solid var(--line); }
  .scope th, .scope td { padding: 0; border: 0; }
  .scope th { color: var(--accent); }
  .scope td { font-size: .94rem; }
  .scope-label { display: block; margin-bottom: 2px; color: var(--ink); font-size: .8125rem; font-weight: 650; }
}
