/* Публичный сайт SerpWatch: главная, страницы инструментов, справка.
   Токены цвета — из app.css (светлая тема по умолчанию, тёмная — html[data-theme=dark]). */
body.site { background: var(--bg); font-size: 15px; }
.site h1, .site h2, .site h3 { color: var(--head); letter-spacing: -0.025em; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 40px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.h-xl { font-size: clamp(32px, 3.6vw, 50px); line-height: 1.08; font-weight: 750; margin: 0 0 18px; }
.h-lg { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.12; font-weight: 720; margin: 0 0 14px; }
.h-md { font-size: clamp(20px, 2vw, 26px); line-height: 1.2; font-weight: 680; margin: 0 0 10px; }
.lead { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--muted); max-width: 720px; }
.center { text-align: center; } .center .lead { margin-left: auto; margin-right: auto; }
.btn-lg { padding: 13px 24px; font-size: 16px; border-radius: 12px; font-weight: 600; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.center .cta-row { justify-content: center; }

/* --- шапка сайта --- */
.sh { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--line); }
.sh__in { display: flex; align-items: center; gap: 22px; height: 64px; }
.sh nav { display: flex; gap: 4px; flex: 1; align-items: center; }
.sh nav > a, .sh .menu > button { color: var(--text); font: inherit; font-weight: 500; padding: 8px 12px; border-radius: 9px; background: none; border: 0; cursor: pointer; }
.sh nav > a:hover, .sh .menu > button:hover { background: var(--surface); text-decoration: none; }
.sh__right { display: flex; gap: 10px; align-items: center; }
.menu { position: relative; }
.menu__panel { position: absolute; top: calc(100% + 8px); left: -12px; width: min(760px, 92vw); padding: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.menu:hover .menu__panel, .menu:focus-within .menu__panel { opacity: 1; visibility: visible; transform: none; }
.menu__panel a { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 10px; border-radius: 12px; color: var(--text); }
.menu__panel a:hover { background: var(--surface-2); text-decoration: none; }
.menu__panel b { display: block; font-weight: 600; font-size: 14px; }
.menu__panel small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ticon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.ticon svg { width: 19px; height: 19px; }
.sh__burger { display: none; }
.sh__right .btn { white-space: nowrap; }
@media (min-width: 981px) and (max-width: 1180px) {
  .sh__in { gap: 12px; }
  .sh nav { gap: 0; min-width: 0; }
  .sh nav > a, .sh .menu > button { padding: 8px 7px; }
}
@media (max-width: 980px) {
  .sh nav { display: none; }
  .sh__burger { display: block; margin-left: auto; }
  .sh__burger summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }
  .sh__burger summary::-webkit-details-marker { display: none; }
  .sh__burger[open] .mnav { display: grid; }
  .mnav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; gap: 2px; box-shadow: var(--shadow-lg); max-height: calc(100vh - 64px); overflow: auto; }
  .mnav a { padding: 9px 4px; color: var(--text); }
  .sh__right .btn:not(.primary) { display: none; }
}

/* --- герой --- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 640px; z-index: -1;
  background: radial-gradient(60% 60% at 30% 30%, rgba(47, 107, 255, .16), transparent 70%),
              radial-gradient(40% 50% at 80% 20%, rgba(122, 92, 255, .14), transparent 70%); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: 14px; }
.trust span::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* окно браузера со скриншотом */
.frame { background: var(--surface); border-radius: 16px; box-shadow: 0 30px 70px rgba(16, 24, 40, .18), 0 0 0 1px var(--line);
  overflow: hidden; }
.frame__bar { height: 30px; display: flex; gap: 6px; align-items: center; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .frame__bar i:nth-child(2) { background: #febc2e; }
.frame__bar i:nth-child(3) { background: #28c840; }
.frame__bar span { margin-left: 10px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 6px; }
.frame img { display: block; width: 100%; height: auto; }
.tilt { transform: perspective(1600px) rotateY(-7deg) rotateX(2deg); transform-origin: left center; }
@media (max-width: 960px) { .tilt { transform: none; } }
.shot { border-radius: 14px; box-shadow: 0 18px 50px rgba(16, 24, 40, .14), 0 0 0 1px var(--line); display: block; width: 100%; height: auto; background: var(--surface); }

/* --- карточки инструментов (цветные, как у Топвизора) --- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tool { position: relative; display: flex; flex-direction: column; min-height: 250px; border-radius: 22px; padding: 22px; overflow: hidden;
  color: #10213d; text-decoration: none; transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; isolation: isolate; }
.tool:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(16, 24, 40, .16); text-decoration: none; }
.tool small { font-size: 13px; font-weight: 600; opacity: .8; }
.tool b { font-size: 19px; line-height: 1.25; font-weight: 700; margin-top: 8px; letter-spacing: -0.015em; }
.tool__ico { margin-top: auto; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 10px 24px rgba(0, 0, 0, .10);
  backdrop-filter: blur(6px); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tool--light .tool__ico { background: rgba(255, 255, 255, .7); color: #2459e6; }
.tool__ico svg { width: 38px; height: 38px; }
.tool:hover .tool__ico { transform: translateY(-4px) rotate(-4deg); }
.tool__more { position: absolute; right: 22px; bottom: 24px; font-size: 13px; font-weight: 600; opacity: .85; }
.tool::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 70%); z-index: -1; }
.tool--light { color: #10213d; } .tool--dark { color: #fff; }
.c-sky { background: linear-gradient(160deg, #b9efff, #e6f8ff); } .c-sky2 { background: linear-gradient(160deg, #d6ecff, #f0f7ff); }
.c-navy { background: linear-gradient(160deg, #1b2438, #121826); } .c-dark { background: linear-gradient(160deg, #20253a, #11141d); }
.c-dark2 { background: linear-gradient(160deg, #2a2f3d, #171a22); } .c-blue { background: linear-gradient(160deg, #3d7bff, #2459e6); }
.c-green { background: linear-gradient(160deg, #1fd08b, #0fae6f); } .c-violet { background: linear-gradient(160deg, #8b6dff, #6a4cf0); }
.c-teal { background: linear-gradient(160deg, #20c6b6, #0e9f93); } .c-orange { background: linear-gradient(160deg, #ffad5a, #ff8a3d); }
.c-red { background: linear-gradient(160deg, #ff7a6b, #f04e5a); } .c-yellow { background: linear-gradient(160deg, #ffe27a, #ffcd3c); }
.c-slate { background: linear-gradient(160deg, #e7ecf5, #f6f8fc); }
.c-indigo { background: linear-gradient(160deg, #5b5ff0, #3b3fd1); } .c-pink { background: linear-gradient(160deg, #ff7eb6, #e8508f); }
.c-mint { background: linear-gradient(160deg, #c9f6e4, #ecfcf5); }
.ib-sky, .ib-sky2 { background: #31a8e8; } .ib-navy { background: #1b2438; } .ib-dark, .ib-dark2 { background: #2a2f3d; }
.ib-blue { background: #2f6bff; } .ib-green { background: #12b979; } .ib-violet { background: #7a5cff; } .ib-teal { background: #0fb5a9; }
.ib-orange { background: #ff8a3d; } .ib-red { background: #f04e5a; } .ib-yellow { background: #e7a900; } .ib-slate { background: #687387; }
.ib-indigo { background: #4a4ee0; } .ib-pink { background: #e8508f; } .ib-mint { background: #12a676; }

/* --- плитки преимуществ, шаги --- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.tile h3 { font-size: 18px; margin: 12px 0 8px; } .tile p { margin: 0; color: var(--muted); line-height: 1.55; }
.tile .ticon { width: 44px; height: 44px; border-radius: 12px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
@media (max-width: 860px) { .steps3 { grid-template-columns: 1fr; } }
.steps3 > div { background: var(--surface); border-radius: 18px; padding: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.steps3 > div::before { counter-increment: st; content: counter(st); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps3 h3 { font-size: 18px; margin: 0 0 6px; } .steps3 p { margin: 0; color: var(--muted); }

/* блоки «возможность + скриншот» */
.feat { display: grid; grid-template-columns: .8fr 1.7fr; gap: 40px; align-items: center; padding: 36px 0; }
.feat:nth-child(even) { grid-template-columns: 1.7fr .8fr; }
.feat:nth-child(even) .feat__text { order: 2; }
@media (max-width: 900px) { .feat, .feat:nth-child(even) { grid-template-columns: 1fr; gap: 20px; } .feat:nth-child(even) .feat__text { order: 0; } }
.feat__text p { color: var(--muted); font-size: 16px; line-height: 1.65; }

/* сравнение и тарифы */
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); }
.cmp-table th, .cmp-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.cmp-table thead th { font-size: 13px; color: var(--muted); background: var(--surface-2); }
.cmp-table td.us { background: var(--accent-soft); font-weight: 600; }
.cmp-table .yes { color: var(--ok); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border-radius: 22px; padding: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan--hot { border: 2px solid var(--accent); box-shadow: 0 24px 50px rgba(47, 107, 255, .18); position: relative; }
.plan__tag { position: absolute; top: -13px; left: 24px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.plan h3 { font-size: 20px; margin: 0 0 6px; }
.plan__price { font-size: 40px; font-weight: 750; color: var(--head); letter-spacing: -0.03em; margin: 8px 0 2px; }
.plan__price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 9px; flex: 1; }
.plan li { padding-left: 24px; position: relative; line-height: 1.4; }
.plan li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315a34a' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/9px no-repeat; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); margin: 0 0 16px; line-height: 1.6; }

/* призыв */
.cta-band { background: linear-gradient(135deg, #2f6bff, #7a5cff); color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center; }
.cta-band h2 { color: #fff; } .cta-band p { color: rgba(255, 255, 255, .85); font-size: 17px; }
.cta-band .btn { background: #fff; color: #2459e6; border-color: #fff; }

/* подвал */
.sf { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 32px; background: var(--surface); }
.sf__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { .sf__grid { grid-template-columns: 1fr 1fr; } }
.sf h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.sf a { display: block; color: var(--text); padding: 4px 0; font-size: 14px; }
.sf a.brand { display: inline-flex; }
.sf__legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.sf__legal a { display: inline; color: var(--muted); padding: 0; font-size: 12.5px; }

/* хлебные крошки страниц инструментов */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; } .crumbs a { color: var(--muted); }

/* появление при прокрутке (без JS — просто видно) */
@media (prefers-reduced-motion: no-preference) {
  /* сдвиг через translate, чтобы не конфликтовать с transform (наклон окна, hover карточек) */
  .reveal { opacity: 0; translate: 0 18px; transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .2, 1), transform .25s, box-shadow .25s; }
  .reveal.in { opacity: 1; translate: 0 0; }
}
html[data-theme="dark"] .frame, html[data-theme="dark"] .shot { box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 0 0 1px var(--line); }

/* узкий экран: шапка в одну строку, компактные карточки */
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .sh__in { gap: 10px; }
  .sh__right .btn.primary { display: none; }
  .tool { min-height: 180px; padding: 18px; border-radius: 18px; }
  .tool b { font-size: 17px; }
  .tool__ico { width: 54px; height: 54px; border-radius: 16px; }
  .tool__ico svg { width: 27px; height: 27px; }
  .tool__more { right: 18px; bottom: 20px; }
  .hero { padding-top: 36px; }
  .cta-band { padding: 36px 20px; border-radius: 20px; }
  .wk-article { border-radius: 16px; }
}

/* Увеличение скриншотов (zoom.js) */
.shot, .frame img, .wk-shot img, .zoomable { cursor: zoom-in; }
.frame, .wk-shot, .feat__media { position: relative; }
.frame:hover::after, .wk-shot:hover::after, .feat__media:hover::after { content: "Увеличить"; position: absolute; right: 12px; top: 40px; padding: 5px 11px 5px 28px;
  font-size: 12px; font-weight: 600; color: #fff; border-radius: 999px; pointer-events: none;
  background: rgba(16, 24, 40, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-5-5M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat 9px center / 14px; }
.wk-shot:hover::after, .feat__media:hover::after { top: 12px; }
html.zm-lock { overflow: hidden; }
.zm { position: fixed; inset: 0; z-index: 2147483000; display: none; background: rgba(10, 14, 24, .92); }
.zm.is-open { display: block; }
.zm__stage { position: absolute; inset: 0 0 52px; display: flex; align-items: center; justify-content: center; padding: 24px 64px; overflow: auto; }
.zm__img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); cursor: zoom-in; background: #fff; }
.zm.is-full .zm__stage { display: block; text-align: center; }
.zm.is-full .zm__img { max-width: none; max-height: none; width: auto; cursor: zoom-out; }
.zm__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; display: flex; gap: 16px; align-items: center; padding: 0 20px; color: #e6e9f0; font-size: 14px; }
.zm__cap { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zm__cnt { color: #9aa3b5; font-variant-numeric: tabular-nums; }
.zm__hint { color: #7d869a; font-size: 12px; }
.zm__btn { position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 50%;
  width: 44px; height: 44px; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.zm__btn:hover { background: rgba(255, 255, 255, .24); }
.zm__x { top: 14px; right: 14px; }
.zm__prev, .zm__next { top: calc(50% - 48px); }
.zm__prev { left: 12px; } .zm__next { right: 12px; }
.zm.is-single .zm__prev, .zm.is-single .zm__next, .zm.is-single .zm__cnt { display: none; }
@media (max-width: 640px) { .zm__stage { padding: 12px; } .zm__hint { display: none; } .zm__prev, .zm__next { top: auto; bottom: 4px; width: 40px; height: 40px; }
  .zm__prev { left: auto; right: 60px; } .zm__next { right: 12px; } .zm__bar { padding-right: 112px; } }
