/* Beyne Vision — стили сайта. Палитра «Жемчуг», раскладка «Журнал»:
   центрированная подача, крупная тонкая типографика, тонкие линии вместо теней,
   форматы лентой роликов, калькулятор в одну колонку с панелью цены снизу. */

/* Запасной шрифт с размерами Roboto: когда Roboto догружается, текст не прыгает (CLS). */
@font-face {
  font-family: "Roboto Fallback"; src: local("Arial");
  size-adjust: 100.3%; ascent-override: 92.49%; descent-override: 24.34%; line-gap-override: 0%;
}

/* ---------- палитра «Жемчуг» (brand/brandbook.html) ---------- */
:root {
  --bg: #faf8fd;
  --bg-alt: #f2edfc;
  --surface: #ffffff;
  --field: #faf8fd;
  --ink: #241a3a;
  --muted: #6b6280;
  --line: #e6e0f2;
  --line-strong: #d3c8ec;
  --primary: #6e4fc4;
  --primary-hover: #5b3fb0;
  --lavender: #b9a3ee;
  --on-primary: #ffffff;
  --selected: #e6dcfa;
  --accent: #f7e6a1;
  --on-accent: #3a2e12;
  --highlight: linear-gradient(100deg, #6e4fc4 10%, #a27fe0 50%, #c9a84a 95%);
  --glow-a: rgba(205, 185, 245, .55);
  --glow-b: rgba(255, 241, 199, .7);
  --ph-1: linear-gradient(170deg, #f4d8ef, #cdb9f5 70%);
  --ph-2: linear-gradient(120deg, #e6dcfa, #f4d8ef 28%, #fff1c7 52%, #d8ecf6 76%, #cdb9f5);
  --ph-3: linear-gradient(190deg, #fff1c7, #e6dcfa 65%);
  --ph-4: linear-gradient(160deg, #d8ecf6, #cdb9f5 60%, #f4d8ef);
  --shadow: 0 0 0 1px var(--line);
  --danger: #b23a48;
  --success: #2f7d5b;

  --display-font: "Roboto", "Roboto Fallback", "Helvetica Neue", Arial, sans-serif;
  --display-weight: 300;
  --display-case: none;
  --display-track: -.02em;

  --sans: "Roboto", "Roboto Fallback", "Helvetica Neue", Arial, sans-serif;
  --serif: "Roboto Serif", Georgia, "Times New Roman", serif;
  --r: 18px;
  --r-sm: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ================= база ================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg);
  color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 500; }
p { margin: 0; }
img, video { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.display {
  font-family: var(--display-font); font-weight: var(--display-weight);
  text-transform: var(--display-case); letter-spacing: var(--display-track);
}
.accent-text { background: var(--highlight); -webkit-background-clip: text; background-clip: text; color: transparent; }
.surface { background: var(--surface); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 14px 26px; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font-size: 15px; font-weight: 500; text-decoration: none; text-align: center;
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--primary); }
.btn:active { transform: none; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-line:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--primary); }
.btn-sm { min-height: 40px; padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- шапка ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 31;
  background: var(--bg);
}
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav a:hover, .nav a.is-active { color: var(--ink); }
@media (max-width: 920px) { .nav { display: none; } }

/* ---------- первый экран ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; pointer-events: none; }
.lead { margin-top: 22px; font-size: 18px; font-weight: 300; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.promo-pill {
  display: inline-flex; margin-top: 18px; padding: 8px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; text-decoration: none;
}
.facts { margin: 0; padding: 0; }
.facts dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.play {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(36, 26, 58, .22);
}
.play::after { content: ""; margin-left: 4px; border-left: 16px solid #241a3a; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
@keyframes float { 50% { transform: translateY(-14px) rotate(3deg); } }
@media (max-width: 520px) { .actions .btn { flex: 1 1 100%; } }

/* ---------- секции ---------- */
.section { padding-block: 104px; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px 48px; margin-bottom: 44px; }
.section-head h2 { margin-top: 10px; line-height: 1.1; }
.section-head > p { max-width: 44ch; color: var(--muted); }
@media (max-width: 720px) { .section { padding-block: 68px; } .section-head { margin-bottom: 28px; } }

/* ---------- ролики ---------- */
.work-media {
  position: relative; width: 100%; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: var(--r); overflow: hidden;
  background: var(--ph-2); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
}
.work-media video, .work-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-media .play { position: relative; z-index: 1; transition: opacity .25s; }
.work-media.is-playing .play { opacity: 0; }
.work-soon { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .8); color: #564c70; font-size: 12px; text-align: left; }

/* ---------- калькулятор ---------- */
.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.stepper button {
  display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--muted);
  padding: 8px 16px 8px 8px; border-radius: 999px; font-size: 15px; transition: background .2s, color .2s;
}
.stepper button span {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-strong);
}
.stepper button:hover { color: var(--ink); }
.stepper button[aria-current="step"] { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--shadow); }
.stepper button[aria-current="step"] span { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.stepper button.is-done span { background: var(--selected); box-shadow: none; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 28px; align-items: start; }
.calc-main { min-width: 0; }
.calc-step { display: flex; flex-direction: column; gap: 16px; animation: step-in .35s var(--ease); }
@keyframes step-in { from { opacity: .4; transform: translateY(6px); } }
.step-title { font-size: 22px; font-weight: 500; }
.step-title-sm { margin-top: 16px; font-size: 19px; }
.step-note { margin-top: -8px; color: var(--muted); font-size: 15px; }

.format-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.format-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 22px; border: 0; border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: box-shadow .2s, transform .2s var(--ease);
}
.format-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line-strong); }
.format-card[aria-checked="true"] { box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); }
.format-card b { font-size: 18px; font-weight: 500; padding-right: 28px; }
.format-card small { color: var(--muted); font-size: 14px; line-height: 1.5; }
.format-card .fc-price { margin-top: auto; padding-top: 10px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.format-card::after {
  content: ""; position: absolute; top: 20px; right: 20px; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow .2s;
}
.format-card[aria-checked="true"]::after { box-shadow: inset 0 0 0 7px var(--primary); }

.panel {
  display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: var(--r); min-width: 0;
  background: var(--surface); box-shadow: var(--shadow);
}
.panel-head h4 { font-size: 17px; font-weight: 500; }
.group { display: flex; flex-direction: column; gap: 10px; }
.group-label, .field label { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--field); font-size: 15px;
  box-shadow: inset 0 0 0 1px var(--line-strong); transition: background .2s, box-shadow .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--primary); }
.chip[aria-checked="true"] { background: var(--selected); box-shadow: inset 0 0 0 1.5px var(--primary); font-weight: 500; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-inline { max-width: 240px; }
.input-wrap { position: relative; }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: var(--r-sm); background: var(--field); font-size: 16px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s;
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--primary); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }
.input.has-suffix { padding-right: 56px; }
.suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
textarea.input { min-height: 112px; resize: vertical; line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); text-align: right; }
.err { font-size: 13px; color: var(--danger); }
.err:empty { display: none; }
.stepper-input { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px auto; align-items: center; gap: 6px; }
.stepper-input .input { text-align: center; font-variant-numeric: tabular-nums; }
.stepper-input button {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--field); font-size: 20px; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.stepper-input button:hover { box-shadow: inset 0 0 0 1px var(--primary); }
.stepper-input .unit { padding-left: 4px; font-size: 14px; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.switch-row span { display: flex; flex-direction: column; }
.switch-row b { font-weight: 500; }
.switch-row small { font-size: 13px; color: var(--muted); }
.switch { flex: none; position: relative; width: 52px; height: 32px; border: 0; border-radius: 999px; background: var(--line-strong); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.drop {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; cursor: pointer;
  border: 1.5px dashed var(--line-strong); background: var(--field); transition: border-color .2s, background .2s;
}
.drop:hover, .drop.is-over { border-color: var(--primary); }
.drop svg, .channel svg { flex: none; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.drop svg { color: var(--primary); }
.drop span { display: flex; flex-direction: column; color: var(--ink); font-size: 15px; }
.drop small { font-size: 13px; color: var(--muted); }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.refs:empty { display: none; }
.ref { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--field); }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: rgba(36, 26, 58, .75); color: #fff; font-size: 16px; line-height: 1;
}

.channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.channel {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 0; border-radius: var(--r); text-align: left;
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: box-shadow .2s;
}
.channel svg { color: var(--primary); }
.channel span { display: flex; flex-direction: column; gap: 2px; }
.channel b { font-weight: 500; }
.channel small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.channel[aria-checked="true"] { box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); }
.channel-text { color: var(--muted); }
.channel-text b { color: var(--ink); font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { color: var(--danger); font-size: 14px; }
.done { align-items: center; text-align: center; padding-block: 36px; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--selected); position: relative; }
.done-mark::after { content: ""; position: absolute; left: 20px; top: 15px; width: 12px; height: 22px; border: solid var(--primary); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done h4 { font-size: 20px; font-weight: 500; }
.done p { color: var(--muted); }
.consent { font-size: 13px; color: var(--muted); }
.consent a { color: var(--ink); }

.summary { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); min-width: 0; }
.summary-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 28px; border-radius: 26px;
  background: var(--surface); box-shadow: var(--shadow);
}
.summary-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 170px; background: var(--ph-2); opacity: .5; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent);
}
.summary-card > * { position: relative; }
.summary-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.promo-chip { align-self: flex-start; margin-bottom: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 500; }
.summary-old { color: var(--muted); font-size: 17px; }
.summary-price { display: block; font-size: clamp(36px, 3.6vw, 46px); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary-price.is-text { font-size: 20px; font-weight: 400; letter-spacing: 0; }
.summary-list { margin: 16px 0 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 14px; font-size: 14px; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; text-align: right; font-weight: 500; }
.summary-note { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .calc { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 620px) {
  .format-cards, .channels, .fields { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px; }
  .stepper { gap: 2px; }
  .stepper button { padding-right: 12px; font-size: 14px; gap: 8px; }
}

/* ---------- вопросы ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { padding: 0 24px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--selected); color: var(--ink); font-size: 20px; font-weight: 300; transition: transform .25s var(--ease);
}
.faq details[open]:not(.is-closing) summary::after { transform: rotate(45deg); }
.faq-body { overflow: hidden; }
.faq details p { max-width: 62ch; padding-bottom: 22px; color: var(--muted); }

/* ---------- подвал ---------- */
.foot { padding-block: 48px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; font-size: 14px; color: var(--muted); }
.foot-brand { display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.wm { padding-left: .32em; font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: .32em; line-height: 1; text-transform: uppercase; }
.wm-sub { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding-left: .6em; font-size: 10px; font-weight: 300; letter-spacing: .6em; text-transform: uppercase; }
.wm-sub::before, .wm-sub::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .5; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- окно после «Написать в Instagram» ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 14, 36, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-card {
  position: relative; width: min(520px, 100%); max-height: calc(100% - 32px); overflow: auto;
  display: flex; flex-direction: column; gap: 16px; padding: 30px; border-radius: 26px;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(20, 14, 36, .6);
}
.sheet-card h2 { font-size: 24px; font-weight: 500; padding-right: 40px; }
.sheet-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.sheet-steps b { color: var(--ink); font-weight: 500; }
.sheet-msg { margin: 0; max-height: 220px; overflow: auto; padding: 14px; border-radius: 14px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font-family: inherit; font-size: 13px; white-space: pre-wrap; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-actions .btn { flex: 1 1 180px; }
.sheet-x { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--field); font-size: 22px; line-height: 1; }
body.has-sheet { overflow: hidden; }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: calc(100% - 32px);
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 981px) { .toast { bottom: 28px; } }

/* ================= раскладка «Журнал» ================= */

/* ---------- шапка: логотип по центру ---------- */
.top-inner { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 78px; }
.nav { margin-left: 0; gap: 32px; }
.nav-right { justify-content: flex-end; }
.brand-center { flex-direction: column; gap: 0; color: var(--ink); }
.brand-center .wm { font-size: 20px; }
.brand-center .wm-sub { font-size: 9px; margin-top: 5px; color: var(--muted); }
.top-cta { display: none; }
@media (max-width: 920px) {
  .top-inner { display: flex; }
  .brand-center { align-items: flex-start; }
  .top-cta { display: inline-flex; margin-left: auto; }
}

/* ---------- первый экран: всё по центру ---------- */
.hero { padding-block: 40px 0; text-align: center; }
.hero::before { inset: -10% 10% auto 10%; height: 90%; background: radial-gradient(closest-side, var(--glow-a), transparent 75%), radial-gradient(closest-side at 50% 80%, var(--glow-b), transparent 70%); }
.hero-center { position: relative; display: flex; flex-direction: column; align-items: center; }
.bubble-xl { width: clamp(170px, 20vw, 280px); height: auto; margin-bottom: 28px; background: radial-gradient(closest-side at 50% 58%, rgba(110, 79, 196, .34) 72%, transparent 100%); animation: float 8s ease-in-out infinite; }
.hero h1 { margin-top: 18px; max-width: 10em; font-size: clamp(42px, 6.6vw, 96px); line-height: 1.02; letter-spacing: -.035em; }
.lead { margin-inline: auto; max-width: 31em; }
.actions { justify-content: center; }
.facts-rule {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 72px;
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.facts-rule div, .facts-rule div + div { padding: 24px 12px; border-top: 0; text-align: center; }
.facts-rule div + div { border-left: 1px solid var(--line); }
.facts-rule dd { font-size: 22px; font-weight: 400; }
@media (max-width: 720px) {
  .facts-rule { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; }
  .facts-rule div:nth-child(3) { border-left: 0; }
  .facts-rule div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .facts-rule dd { font-size: 18px; }
}

/* ---------- заголовки разделов ---------- */
.section { padding-block: 120px; }
.section-head h2 { font-size: clamp(36px, 5vw, 64px); letter-spacing: -.03em; line-height: 1.04; }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.section-head-center > p { max-width: 52ch; }
.section-alt { background: var(--surface); }
@media (max-width: 720px) { .section { padding-block: 72px; } }

/* ---------- форматы: лента роликов ---------- */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.strip-card { display: flex; flex-direction: column; min-width: 0; }
.strip-card .work-media { border-radius: 16px; box-shadow: none; transition: transform .4s var(--ease); }
.strip-card:nth-child(2) .work-media { background: var(--ph-1); }
.strip-card:nth-child(3) .work-media { background: var(--ph-3); }
.strip-card:nth-child(4) .work-media { background: var(--ph-4); }
.strip-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding-top: 18px; }
.strip-body h3 { font-size: 21px; font-weight: 400; }
.strip-body p { flex: 1; font-size: 14px; color: var(--muted); }
.strip-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }
.strip-foot b { font-weight: 500; font-variant-numeric: tabular-nums; }
.link-btn { border: 0; background: none; padding: 6px 0; color: var(--primary); font-size: 15px; font-weight: 500; }
.link-btn::after { content: " →"; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 980px) {
  .strip { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(230px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .strip-card { scroll-snap-align: start; }
}

/* ---------- сравнение: две колонки ---------- */
.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.vs-col { padding: 36px 40px; min-width: 0; }
.vs-col h3 { font-size: 28px; font-weight: 300; margin-bottom: 20px; }
.vs-col dl { margin: 0; }
.vs-col dl div { padding: 16px 0; border-top: 1px solid var(--line); }
.vs-col dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vs-col dd { margin: 4px 0 0; font-size: 18px; color: var(--muted); }
.vs-us { border-radius: 24px; background: var(--bg-alt); }
.vs-us dd { color: var(--ink); font-weight: 500; }
.vs-us h3 { color: var(--primary); }
@media (max-width: 720px) {
  .versus { grid-template-columns: 1fr; gap: 12px; }
  .vs-col { padding: 24px 20px; }
}

/* ---------- процесс: крупные номера ---------- */
.process-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.process-grid .section-head { position: sticky; top: 110px; flex-direction: column; align-items: flex-start; }
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; padding: 28px 0; border-top: 1px solid var(--line-strong); }
.timeline li:last-child { border-bottom: 1px solid var(--line-strong); }
.timeline li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero); grid-row: 1 / 3;
  font-size: 52px; font-weight: 300; line-height: 1; color: var(--lavender); letter-spacing: -.03em;
}
.timeline b { font-size: 20px; font-weight: 500; }
.timeline p { margin-top: 6px; color: var(--muted); }
@media (max-width: 860px) {
  .process-grid { grid-template-columns: 1fr; gap: 0; }
  .process-grid .section-head { position: static; }
  .timeline li { grid-template-columns: 64px minmax(0, 1fr); padding: 22px 0; }
  .timeline li::before { font-size: 36px; }
}

/* ---------- калькулятор: одна колонка, цена — панелью снизу ---------- */
.calc-narrow { max-width: 920px; }
.stepper { justify-content: center; }
.calc { grid-template-columns: minmax(0, 1fr); gap: 20px; }
.panel, .format-card, .channel { box-shadow: 0 0 0 1px var(--line); }
.format-card[aria-checked="true"], .channel[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--primary); }
.summary { position: sticky; top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 5; }
.summary-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "label list btn" "price list btn" "old list btn";
  align-items: center; column-gap: 32px; row-gap: 0; padding: 18px 18px 18px 28px; border-radius: 24px;
  background: var(--ink); color: #fff; box-shadow: 0 24px 50px -20px rgba(36, 26, 58, .55);
}
.summary-card::before, .promo-chip, .summary-note { display: none; }
.summary-label { grid-area: label; color: rgba(255, 255, 255, .6); }
.summary-price { grid-area: price; font-size: 34px; }
.summary-price.is-text { font-size: 18px; }
.summary-old { grid-area: old; color: rgba(255, 255, 255, .55); font-size: 14px; }
.summary-list { grid-area: list; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; font-size: 14px; }
.summary-list dt { display: none; }
.summary-list dd { color: rgba(255, 255, 255, .85); font-weight: 400; text-align: left; }
.summary-list dd + dt + dd::before { content: "·"; margin: 0 10px; color: rgba(255, 255, 255, .4); }
.summary-card .btn { grid-area: btn; width: auto; background: var(--accent); color: var(--on-accent); }
.summary-card .btn:hover { box-shadow: none; background: #fbefc2; }
@media (max-width: 980px) {
  .summary { position: sticky; }
  .summary-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label btn" "price btn" "old btn"; padding: 14px 14px 14px 22px; }
  .summary-list { display: none; }
  .summary-price { font-size: 26px; }
  .summary-label { font-size: 11px; white-space: nowrap; }
}

/* ---------- вопросы: одна колонка, линии ---------- */
.faq-narrow { max-width: 860px; }
.faq { gap: 0; }
.faq details { padding: 0; border-radius: 0; background: transparent; box-shadow: none; border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary { padding: 26px 0; font-size: 19px; font-weight: 400; }

/* ---------- подвал по центру ---------- */
.foot-center { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-center img { width: 64px; height: 64px; }
.foot-center .foot-links { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= анимации по прокрутке (assets/js/scroll.js) ================= */
.section { overflow-x: clip; }
.bubble-xl { position: relative; z-index: 0; }
.hero h1, .hero .lead, .hero .actions, .hero .eyebrow { position: relative; z-index: 1; }
.strip { position: relative; }

/* линия прогресса страницы в шапке */
.has-scroll-fx .top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--primary), var(--lavender) 60%, var(--accent)); transform-origin: 0 50%;
}

/* вертикальная линия рядом с шагами работы */
.timeline { position: relative; }
.has-scroll-fx .timeline::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -22px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--primary), var(--lavender)); transform-origin: 50% 0;
}
.has-scroll-fx .timeline li::before { color: var(--primary); transform-origin: 0 50%; }
@media (max-width: 860px) { .has-scroll-fx .timeline::after { left: -11px; } }

/* ================= ролики в ленте форматов ================= */
.work-media.has-video { cursor: pointer; color: inherit; font: inherit; }
.work-media.has-video video { opacity: 0; transition: opacity .3s; }
.work-media.is-live video { opacity: 1; }
.work-media.is-live .play { opacity: 0; }
.sound {
  position: absolute; z-index: 1; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(36, 26, 58, .55); color: #fff;
  opacity: 0; transition: opacity .25s;
}
.work-media.is-live .sound { opacity: 1; }
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound svg path:first-child { fill: currentColor; }
.sound-on { display: none; }
.has-sound .sound-on { display: inline; }
.has-sound .sound-off { display: none; }
@media (max-width: 980px) {
  .strip { scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
}

/* ================= первый экран на компьютере помещается в окно целиком ================= */
@media (min-width: 981px) {
  .hero { display: flex; flex-direction: column; min-height: calc(100vh - 79px); min-height: calc(100svh - 79px); padding-block: 1.5vh 0; }
  .hero-center { flex: 1; justify-content: center; width: 100%; }
  .bubble-xl { width: clamp(90px, 18vh, 280px); margin-bottom: 1.6vh; }
  .hero h1 { margin-top: 1.4vh; max-width: 14em; font-size: min(6.6vw, 10.5vh, 96px); }
  .lead { margin-top: 2vh; max-width: 44em; font-size: min(18px, 2.4vh); }
  .actions { margin-top: 2.6vh; }
  .hero > .wrap:last-child { width: 100%; }
  .facts-rule { margin-top: 2.4vh; margin-bottom: 2vh; }
  .facts-rule div, .facts-rule div + div { padding-block: 1.7vh; }
  .facts-rule dd { font-size: min(22px, 2.8vh); }
}

/* покачивание логотипа работает только в начале страницы: при прокрутке оно не нужно и нагружает видеокарту */
.top.is-scrolled ~ main .bubble-xl { animation-play-state: paused; }

/* согласие на обработку данных в форме заявки */
.consent-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent-check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); cursor: pointer; }
.consent-check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
.consent-check a { color: var(--ink); }

/* панель цены на телефоне: кнопка не должна наезжать на цену; на шаге 3 она не нужна, способы связи уже на экране */
@media (max-width: 980px) {
  .summary-card { column-gap: 12px; }
  .summary-card .btn { min-height: 44px; padding: 10px 16px; font-size: 14px; white-space: nowrap; }
  .summary-card[data-step="3"] .btn { display: none; }
}
@media (max-width: 420px) { .next-long { display: none; } }

/* шаги калькулятора на телефоне: всегда в один ряд, номер над подписью */
@media (max-width: 560px) {
  .stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 20px; }
  .stepper button { width: 100%; flex-direction: column; gap: 4px; padding: 8px 2px; border-radius: 14px; font-size: 13px; }
}

/* ================= телефон: первый экран, лента, цели для пальца ================= */
@media (max-width: 560px) {
  /* главная кнопка должна быть видна без прокрутки и на маленьких телефонах */
  .hero { padding-block: 14px 0; }
  .bubble-xl { width: clamp(96px, 17vh, 150px); margin-bottom: 12px; }
  .hero h1 { margin-top: 12px; font-size: clamp(34px, 10.4vw, 42px); }
  .lead { margin-top: 14px; font-size: 16px; }
  .actions { margin-top: 20px; }
  .facts-rule { margin-top: 36px; }
}
@media (max-width: 980px) {
  /* лента уходит до края экрана, а не обрезается по внутреннему отступу */
  .strip {
    margin-left: calc(-1 * max(20px, env(safe-area-inset-left, 0px)));
    margin-right: calc(-1 * max(20px, env(safe-area-inset-right, 0px)));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    scroll-padding-inline: max(20px, env(safe-area-inset-left, 0px));
  }
}
.link-btn { min-height: 44px; }
.switch { touch-action: manipulation; }
.switch::before { content: ""; position: absolute; inset: -8px; }
/* совсем низкие экраны (iPhone 5/SE первого поколения) */
@media (max-width: 560px) and (max-height: 600px) {
  .bubble-xl { width: 60px; margin-bottom: 8px; }
  .hero h1 { margin-top: 8px; }
  .actions { margin-top: 14px; }
}
