/* ===== Total Studio — стили витрины ===== */
:root {
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --ink: #14213D;
  --muted: #5B6478;
  --line: #D6DCE6;
  --accent: #2F5BEA;
  --accent-dark: #1F44C4;
  --sun: #FFC93C;
  --radius-lg: 18px;
  --radius: 10px;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 18px; font-weight: 500; }
p { margin: 0; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ----- Кнопки ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 2px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff; font: 700 15px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--ink); }
.btn--light:hover { background: var(--sun); border-color: var(--sun); }
.btn--line { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn--line:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* ----- Шапка ----- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(238,241,246,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 17px/1 var(--display); text-decoration: none; }
.logo__mark { width: 26px; height: 20px; border: 2.5px solid var(--ink); border-radius: 5px; position: relative; }
.logo__mark::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2.5px solid var(--ink); }
.logo__mark::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 5px; background: var(--sun); border-radius: 1px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* ----- Окно браузера (главный визуальный приём) ----- */
.frame { display: block; position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; text-decoration: none; }
.frame__bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 2px solid var(--ink); background: #F7F8FB; }
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.frame__bar i:first-child { background: var(--sun); }
.frame__bar span { margin-left: 10px; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 1px 12px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Длинный скриншот страницы прокручивается при наведении */
.frame__shot { aspect-ratio: 16 / 11; background: #E4E8EF top center / 100% auto no-repeat; transition: background-position 5s cubic-bezier(.45,.05,.55,.95); }
.frame:hover .frame__shot, .frame:focus-visible .frame__shot { background-position: bottom center; }
.frame__shot--empty { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.badge { position: absolute; top: 42px; right: 12px; background: var(--sun); color: var(--ink); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 99px; border: 2px solid var(--ink); }

/* ----- Первый экран ----- */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 100px); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 62px); max-width: 13ch; }
.lead { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 52ch; }
.search { display: flex; gap: 10px; margin-top: 32px; max-width: 560px; padding: 6px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px; font: inherit; color: var(--ink); }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 4px rgba(47,91,234,.25); }
.hero__count { margin-top: 16px; font-size: 15px; color: var(--muted); }
.hero__stack { position: relative; height: 440px; }
.hero__stack .frame { position: absolute; width: 74%; box-shadow: 10px 10px 0 var(--ink); }
.hero__stack .frame--0 { right: 0; top: 0; z-index: 3; }
.hero__stack .frame--1 { left: 0; top: 70px; z-index: 2; transform: rotate(-4deg); }
.hero__stack .frame--2 { right: 8%; top: 160px; z-index: 1; transform: rotate(3deg); }
.hero__stack .frame__shot { transition-duration: 9s; }
@media (prefers-reduced-motion: no-preference) {
  .hero__stack .frame--0 .frame__shot { animation: peek 14s 1s ease-in-out infinite alternate; }
}
@keyframes peek { 0%, 15% { background-position: top center; } 85%, 100% { background-position: bottom center; } }

/* ----- Каталог ----- */
.catalog { padding: 72px 0; background: var(--surface); border-block: 2px solid var(--ink); }
.catalog__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 32px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 16px; font: 500 15px/1.2 var(--body); color: var(--ink); cursor: pointer; }
.chip span { color: var(--muted); margin-left: 4px; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on span { color: rgba(255,255,255,.65); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 40px 28px; }
.card { display: flex; flex-direction: column; }
.card .frame { transition: transform .2s, box-shadow .2s; }
.card .frame[href]:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.card__body { display: flex; flex-direction: column; flex: 1; padding-top: 16px; }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.price { text-align: right; white-space: nowrap; line-height: 1.25; }
.price b { display: block; font-size: 18px; }
.price s { font-size: 14px; color: var(--muted); }
.card__cat { font-size: 14px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.card__desc { margin-top: 8px; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.tags li { font-size: 13px; background: var(--bg); border-radius: 6px; padding: 2px 9px; }
.card__actions { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; }
.card__actions .btn { flex: 1; }
.card[hidden] { display: none; }
.empty { padding: 40px 0; color: var(--muted); }

/* ----- Шаги ----- */
.steps { padding: 88px 0; }
.steps__list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps__list li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.steps__list li::before { content: counter(s); font: 700 15px/1 var(--display); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); margin-bottom: 6px; }
.steps__list b { font-size: 18px; }
.steps__list span { color: var(--muted); font-size: 15px; }

/* ----- Тарифы ----- */
.prices { padding: 0 0 88px; }
.prices__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 36px; align-items: start; }
.plan { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; }
.plan--main { border-color: var(--ink); box-shadow: 8px 8px 0 var(--accent); }
.plan__price { font: 700 32px/1.1 var(--display); margin-top: 14px; }
.plan__note { color: var(--muted); font-size: 15px; margin-top: 6px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

/* ----- Вопросы ----- */
.faq { padding: 0 0 88px; }
.faq__in { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
details { border-bottom: 1.5px solid var(--line); }
details:first-child { border-top: 1.5px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: 500 26px/1 var(--display); color: var(--accent); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { padding: 0 0 20px; color: var(--muted); max-width: 64ch; }

/* ----- Призыв ----- */
.cta { background: var(--accent); color: #fff; padding: 64px 0; }
.cta__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta p { margin-top: 10px; opacity: .85; max-width: 52ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.foot { background: var(--ink); color: rgba(255,255,255,.7); padding: 28px 0; font-size: 15px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }

/* ----- Окно заказа ----- */
.modal { border: 0; padding: 0 12px 12px 0; background: transparent; max-width: 572px; width: calc(100% - 20px); overflow: visible; }
.modal::backdrop { background: rgba(20,33,61,.55); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.modal__box { position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 32px; box-shadow: 10px 10px 0 var(--ink); }
.modal__close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 50%; }
.modal__close:hover { background: var(--bg); color: var(--ink); }
.modal h2 { font-size: 26px; }
.modal__form > .muted { margin: 6px 0 20px; font-size: 15px; }
.modal__done { text-align: center; padding: 20px 0 4px; }
.modal__done p { margin: 10px 0 24px; color: var(--muted); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--line); border-radius: var(--radius); padding: 11px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .is-bad { border-color: #D33A2C; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp { position: absolute; left: -9999px; }
.form-error { color: #B42318; font-size: 15px; margin-bottom: 12px; }

/* ----- Страница демо ----- */
.demo-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #DDE2EB; }
.demobar { display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: var(--surface); border-bottom: 2px solid var(--ink); }
.demobar__back { text-decoration: none; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.demobar__back:hover { background: var(--bg); }
.demobar__title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.demobar__title b { font-family: var(--display); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demobar__title span { font-size: 14px; color: var(--muted); }
.devices { display: flex; gap: 4px; margin-left: auto; background: var(--bg); padding: 4px; border-radius: 10px; }
.devices button { width: 40px; height: 34px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.devices svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.devices button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }
.demobar__ext { font-size: 14px; color: var(--muted); }
.stage { flex: 1; display: flex; justify-content: center; padding: 0; overflow: hidden; }
.stage iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .25s ease; }
.stage.is-device { padding: 20px 20px 30px; }
.stage.is-device iframe { border: 2px solid var(--ink); border-radius: 16px; box-shadow: 8px 8px 0 var(--ink); }

/* ----- Адаптив ----- */
@media (max-width: 960px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__stack { height: 340px; max-width: 560px; }
  .steps__list { grid-template-columns: repeat(2, 1fr); }
  .faq__in { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar__in { justify-content: space-between; }
  .grid { grid-template-columns: 1fr; }
  .search { flex-direction: column; border-radius: 22px; }
  .search input { padding: 10px 14px; }
  .hero__stack { height: 260px; }
  .demobar { gap: 10px; flex-wrap: wrap; }
  .demobar__back span, .devices, .demobar__ext { display: none; }
  .demobar .btn { margin-left: auto; }
}
@media (max-width: 520px) {
  .steps__list { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .modal__box { padding: 26px 20px; }
  .card__actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 760px) {
  .hero__stack .frame--2 { display: none; }
  .hero__stack .frame { width: 82%; }
  .hero__stack { height: 250px; }
}
