/* Каркас сайта: шапка с меню, хлебные крошки, подвал, главная и текстовые страницы.
   Цвета и шрифты берутся из переменных css/style.css (светлая и тёмная тема работают сами). */

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: .6em 1em; border-radius: 0 0 8px 8px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 0; }

/* ---------- шапка ---------- */
.site-header { position: relative; z-index: 30; background: var(--surface); border-bottom: 1.5px solid var(--line); }
.sh-in { max-width: 1040px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px 20px; min-height: 66px; }
.brand { display: inline-flex; align-items: baseline; gap: 2px; text-decoration: none; color: var(--ink); line-height: 1; padding: 6px 0 6px 12px; border-left: 3px solid var(--red); flex: none; }
.brand-name { font-family: var(--hand); font-size: 2rem; letter-spacing: .01em; }
.brand-dom { font-size: .85rem; color: var(--ink-2); }
.brand:hover .brand-name { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }

.nav-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); background: var(--soft); border: 1.5px solid var(--line); border-radius: 8px; padding: .5em .85em; cursor: pointer; }
.nt-bars, .nt-bars::before, .nt-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px; content: ""; position: relative; }
.nt-bars::before { position: absolute; top: -6px; left: 0; }
.nt-bars::after { position: absolute; top: 6px; left: 0; }

.site-nav { margin-left: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 2px; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.nav-link {
  display: inline-flex; align-items: center; padding: 22px 11px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1rem; line-height: 1.2;
  box-shadow: inset 0 -3px 0 transparent;
}
.nav-link:hover { box-shadow: inset 0 -3px 0 var(--line); }
.nav-item.is-here > .nav-link, .nav-link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); }
.sub-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; margin-left: -8px; padding: 0; font: inherit; color: var(--ink-2);
  background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.sub-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.nav-item.open > .sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
.sub-toggle:hover { color: var(--ink); }

.subnav {
  display: none; position: absolute; left: 0; top: 100%; width: 400px; max-width: calc(100vw - 24px); z-index: 40;
  background: var(--surface); border: 1.5px solid var(--line); border-top: 3px solid var(--red); border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 28px rgba(20, 30, 70, .2); padding: 14px 18px 12px;
}
.nav-item.has-sub.open > .subnav { display: block; }
@media (hover: hover) and (min-width: 901px) { .nav-item.has-sub:hover > .subnav { display: block; } }
.stage { margin: 0 0 12px; }
.stage-t { display: inline-block; font-weight: 700; color: var(--ink); text-decoration: none; margin-bottom: 5px; }
.stage-t:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.sub-all { display: inline-block; margin-top: 2px; font-size: .92rem; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; font-size: .92rem; line-height: 1.2; padding: .35em .75em; border-radius: 8px; border: 1.5px solid var(--line);
  color: var(--ink); text-decoration: none; background: var(--paper);
}
a.chip { border-color: var(--ink-2); background: var(--soft); font-weight: 700; }
a.chip:hover { border-color: var(--ink); filter: brightness(1.04); }
.chip.soon { border-style: dashed; color: var(--ink-2); opacity: .8; }

/* ---------- хлебные крошки ---------- */
.crumbs { max-width: 900px; margin: 0 auto; padding: 14px 16px 0; font-size: .88rem; color: var(--ink-2); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "›"; margin: 0 .55em; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--text); }

/* ---------- подвал ---------- */
.site-footer { background: var(--surface); border-top: 1.5px solid var(--line); font-size: .93rem; line-height: 1.5; color: var(--text); }
.sf-in { max-width: 1040px; margin: 0 auto; padding: 30px 16px 8px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 24px 28px; }
.sf-col h2 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; font-weight: 700; }
.sf-col ul { list-style: none; margin: 0; padding: 0; }
.sf-col li { margin: 0 0 4px; }
.sf-col p { margin: 0 0 .6em; }
.sf-col a { color: var(--ink); }
.sf-col .brand { margin-bottom: 8px; }
.sf-small { color: var(--ink-2); font-size: .88rem; }
.sf-copy { max-width: 1040px; margin: 0 auto; padding: 14px 16px 26px; color: var(--ink-2); font-size: .85rem; }
.sf-copy a { color: var(--ink-2); }
.site-footer .linklike { color: var(--ink); font-size: inherit; }

/* ---------- общие блоки страниц ---------- */
.ph { margin: 6px 0 22px; }
.ph h1 { font-size: clamp(1.9rem, 5.4vw, 2.7rem); line-height: 1.12; margin: 0 0 12px; color: var(--ink); letter-spacing: -.01em; }
.kicker { margin: 0 0 8px; font-size: .9rem; color: var(--red); font-weight: 700; letter-spacing: .02em; }
.h2 { font-size: 1.4rem; margin: 36px 0 12px; color: var(--red); padding-left: 12px; border-left: 2px solid var(--red); font-weight: 700; line-height: 1.25; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 0 0 8px; padding: 0; list-style: none; }
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px 14px; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink); line-height: 1.25; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.card p { margin: 0 0 .5em; font-size: .97rem; }
.card .chips { margin-top: 10px; }
.card.is-soon { background: transparent; border-style: dashed; }
.card.is-soon h3, .card.is-soon p { color: var(--ink-2); }
.card-n { display: inline-block; font-family: var(--hand); font-size: 1.9rem; line-height: 1; color: var(--red); margin-bottom: 4px; transform: rotate(-4deg); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12em .6em; border-radius: 99px; background: var(--soft); border: 1.5px solid var(--line); color: var(--ink-2); vertical-align: middle; margin-left: .4em; }
.btns { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 18px 0 8px; }
.note { color: var(--ink-2); font-size: .92rem; margin: 6px 0 0; }

/* ---------- главная ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 34px; align-items: center; margin: 10px 0 34px; }
.home-hero h1 { font-size: clamp(1.8rem, 4.8vw, 2.5rem); line-height: 1.12; margin: 0 0 14px; color: var(--ink); letter-spacing: -.01em; }
.home-hero .lead { margin: 0 0 6px; max-width: 54ch; }
.demo { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 22px 16px 26px; box-shadow: 4px 5px 0 var(--line); transform: rotate(1.2deg); }
.demo::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; border-left: 2px solid var(--red); }
.demo-top { margin: 0 0 8px; font-size: .85rem; color: var(--ink-2); }
.demo-q { margin: 0 0 6px; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.demo-a { font-family: var(--hand); font-size: 1.35rem; color: var(--red); margin-left: .25em; }
.demo-mark { position: absolute; right: 16px; bottom: 6px; font-size: 3.6rem; line-height: 1; color: var(--red); transform: rotate(-9deg); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.steps { list-style: none; counter-reset: st; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.steps li { counter-increment: st; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px 12px; }
.steps li::before { content: counter(st); display: block; font-family: var(--hand); font-size: 1.9rem; line-height: 1; color: var(--red); margin-bottom: 2px; }
.steps b { display: block; color: var(--ink); margin-bottom: 2px; }
.steps span { font-size: .95rem; }
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- текстовые страницы ---------- */
.prose .tblock p, .prose .tblock li { max-width: 66ch; }
.prose ul, .prose ol { max-width: 66ch; margin: 0 0 .9em; padding-left: 1.3em; }
.prose li { margin: 0 0 .45em; }
.prose .tblock h2 { margin-top: 6px; }
.prose .contact { background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 16px; max-width: 66ch; }
.soon-page { text-align: left; }

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; }
  .sh-in { flex-wrap: wrap; min-height: 58px; padding-top: 4px; padding-bottom: 4px; }
  .js .site-nav { display: none; flex: 1 0 100%; margin: 0 -16px; padding: 0 16px 10px; border-top: 1.5px solid var(--line); }
  .js .site-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-item:last-child { border-bottom: 0; }
  .nav-link { flex: 1; padding: 14px 4px; box-shadow: none !important; }
  .nav-item.is-here > .nav-link, .nav-link[aria-current="page"] { color: var(--red); }
  .sub-toggle { width: 48px; margin-left: 0; }
  .subnav { position: static; display: none; flex: 1 0 100%; width: auto; max-width: none; border: 0; border-left: 2px solid var(--red); border-radius: 0; box-shadow: none; padding: 4px 0 4px 14px; margin: 0 0 10px 4px; background: transparent; }
  html:not(.js) .site-nav { display: block; flex: 1 0 100%; margin: 0 -16px; padding: 0 16px 10px; }
  html:not(.js) .subnav { display: block !important; }
  .chip { padding: .5em .85em; }
  .stage-t { padding: .4em 0; margin-bottom: 2px; }
  .sub-all { padding: .6em 0; }
  .sf-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) { .cards.two { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; }
  .demo { max-width: 340px; transform: rotate(.8deg); }
  .teaser { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .sf-in { grid-template-columns: 1fr; padding-top: 24px; }
  .brand-name { font-size: 1.75rem; }
}
@media print {
  .site-header, .site-footer, .crumbs, .cookie { display: none; }
}
