/**
 * Theme Name: APEC
 * Theme URI: https://apec.biz
 * Author: apec.biz
 * Description: Editorial-premium тема для «Карта АТЭС под ключ». Дисциплина по образцу Anthropic (тёплые нейтральные, без теней/градиентов, строгая шкала отступов). Чистый CSS + ванильный JS, самохостинг-шрифты (Manrope / JetBrains Mono).
 * Version: 2.1.0
 * Requires at least: 6.0
 * License: GPL-2.0-or-later
 * Text Domain: apec
 */

/* =====================================================================
   1. Design tokens — strict, disciplined
   ===================================================================== */
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces — warm neutrals (elevation by tone, not shadow) */
  --canvas:    #F2EFE8;   /* page */
  --surface:   #FBF9F3;   /* card */
  --surface-2: #ECE5D6;   /* feature / sand panel */
  --surface-3: #E3DCCB;   /* deep warm container */

  /* Ink + text (APEC navy identity) */
  --ink:     #0E1B33;
  --ink-2:   #2B3A55;
  --body:    #3C4860;
  --muted:   #58534A;
  --line:    #DAD3C5;     /* hairline */
  --line-2:  #E7E1D3;

  /* Accents — restrained, role-bound */
  --blue:    #1B4FD8;     /* primary accent: links + CTAs only */
  --blue-dk: #1640B8;
  --red:     #C23A2E;     /* status / stamp only */
  --ok:      #2E7D5B;
  --gold:    #B0822E;

  /* Dark premium finale */
  --dark:    #0E1B33;
  --dark-2:  #16294A;

  /* Type */
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;

  /* Radius — restrained, consistent */
  --r-xs: 4px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --pill: 999px;

  /* Strict spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --ease: cubic-bezier(.22,1,.36,1);

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 36px);
  --section-y: clamp(64px, 8vw, 112px);
  --header-h: 68px;
}

/* =====================================================================
   2. Reset & base — robust, no horizontal scroll
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font);
  font-size: clamp(16px, .35vw + 14.5px, 18px);
  line-height: 1.6;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
/* Icon sizing — .ico is a span; must be a grid so its width/height apply, with the svg filling it. */
.ico { display: inline-grid; place-items: center; flex: none; line-height: 0; }
.ico > svg { width: 100%; height: 100%; display: block; }
.btn > svg { width: 17px; height: 17px; flex: none; }
.cta-band .perks svg { width: 18px; height: 18px; flex: none; }
.review .src svg { width: 13px; height: 13px; vertical-align: -1px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { padding-left: 1.1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(27,79,216,.16); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* =====================================================================
   3. Typography — strong, consistent scale
   ===================================================================== */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.12; letter-spacing: -.024em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 4.4vw + .6rem, 3.85rem); line-height: 1.05; letter-spacing: -.032em; }
h2 { font-size: clamp(1.7rem, 2vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.12rem, .5vw + 1rem, 1.32rem); }
p { color: var(--body); }
.lead { font-size: clamp(1.05rem, .4vw + .98rem, 1.22rem); color: var(--ink-2); line-height: 1.5; }
h2 .serif, h1 .serif, .section-head h2 .serif { color: var(--blue); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; opacity: .7; }
.eyebrow--accent { color: var(--red); }

.section-head { max-width: 720px; margin: 0 0 var(--s6); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: var(--s3); color: var(--muted); max-width: 60ch; }
.section-head.center p { margin-inline: auto; }

/* =====================================================================
   4. Layout primitives
   ===================================================================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--surface-2); }
.section--tint { background: linear-gradient(180deg, var(--canvas), var(--surface-2)); }
.center { text-align: center; }
.mt-s { margin-top: var(--s3); } .mt-m { margin-top: var(--s5); } .mt-l { margin-top: var(--s7); }

.grid { display: grid; gap: var(--s5); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

/* =====================================================================
   5. Buttons — solid, flat, no glow/shadow
   ===================================================================== */
.btn {
  --pad-y: 13px; --pad-x: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: var(--pad-y) var(--pad-x);
  font-weight: 700; font-size: .98rem; line-height: 1; letter-spacing: -.003em;
  border-radius: var(--r-sm); border: 1.5px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
  text-decoration: none; white-space: nowrap; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn .ico { width: 17px; height: 17px; flex: none; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--blue); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--light:hover { border-color: var(--ink); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); }
.btn--accent { background: var(--red); color: #fff; }
.btn--block { width: 100%; }
.btn--lg { --pad-y: 16px; --pad-x: 30px; font-size: 1.04rem; }
.btn--sm { --pad-y: 10px; --pad-x: 16px; font-size: .88rem; }

/* =====================================================================
   6. Header / navigation
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(242,239,232,.9); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: var(--s4); }

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 32px; height: 32px; flex: none; }
.brand small { display: block; font-family: var(--mono); font-size: .58rem; font-weight: 500; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; }

.nav { margin-inline: auto; }
.nav-shell { display: contents; }
.nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 2px; }
.nav a { display: inline-block; padding: 8px 12px; color: var(--ink-2); font-weight: 600; font-size: .94rem; text-decoration: none; transition: color .15s; position: relative; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.is-active { color: var(--blue); }
.nav a.is-active::after { content:""; position:absolute; left:12px; right:12px; bottom:2px; height:2px; background: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-messengers { display: inline-flex; align-items: center; gap: 6px; }
.ms-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
.ms-btn:hover { text-decoration: none; }
.ms-btn svg { width: 18px; height: 18px; }
.ms-btn--tg { color: #1aa3e0; } .ms-btn--wa { color: #1ebe5d; }
.ms-btn--tg:hover { background: #1aa3e0; border-color: #1aa3e0; color: #fff; }
.ms-btn--wa:hover { background: #1ebe5d; border-color: #1ebe5d; color: #fff; }

.nav-toggle { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line); align-items: center; justify-content: center; background: var(--surface); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 19px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.scrim { position: fixed; inset: 0; background: rgba(14,27,51,.5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 99; }
.scrim.is-open { opacity: 1; visibility: visible; }

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .brand small { display: none; }
  .header-cta { display: none; }
  .nav-shell { position: fixed; inset: 0; pointer-events: none; z-index: 101; }
  .nav {
    position: absolute; top: 0; right: 0; height: 100dvh; width: min(84vw, 340px);
    background: var(--canvas); border-left: 1px solid var(--line);
    padding: calc(var(--header-h) + var(--s4)) var(--s5) var(--s5);
    opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), visibility .22s;
    overflow-y: auto; pointer-events: auto;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { display: block; padding: 14px 4px; font-size: 1.04rem; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav a.is-active::after { display: none; }
}
@media (max-width: 560px) {
  :root { --header-h: 58px; }
  .header-inner { gap: var(--s2); }
  .brand { font-size: 1.02rem; gap: 8px; }
  .brand .logo { width: 28px; height: 28px; }
}

/* =====================================================================
   7. Hero — robust 2-col, document = protagonist, Document Reveal motion
   ===================================================================== */
.hero { position: relative; background: var(--canvas); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-map { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none; }
.hero-map svg { width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(40px, 4vw, 68px); }
.hero-copy { max-width: 560px; }
.hero h1 { color: var(--ink); }
.hero h1 .serif { color: var(--blue); }
.hero .lead { color: var(--ink-2); margin-top: var(--s4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-trust { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s6); }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.hero-trust li b { color: var(--ink); font-weight: 700; }
.hero-trust .d { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); display: inline-block; flex: none; }

/* The APEC document — robust flex panel (no fragile absolutes) */
.hero-doc { position: relative; width: 100%; max-width: 440px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--s4); }
.apec-card {
  position: relative; background: var(--ink); color: var(--canvas); border-radius: var(--r-lg);
  padding: var(--s6); display: flex; flex-direction: column; gap: var(--s5); min-height: 230px;
}
.apec-card .c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.apec-card .c-mark { font: 800 15px/1.05 var(--font); letter-spacing: .01em; }
.apec-card .c-mark small { display: block; font: 500 10px/1 var(--mono); letter-spacing: .22em; color: #8EA4CC; margin-top: 8px; }
.apec-card .seal { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); display: grid; place-items: center; font: 600 10px/1 var(--mono); letter-spacing: .06em; color: #C9D6EE; flex: none; }
.apec-card .c-access { margin-top: auto; }
.apec-card .c-access .lbl { font: 600 10px/1 var(--mono); letter-spacing: .18em; color: #6E86B0; text-transform: uppercase; }
.apec-card .c-access .val { font: 800 clamp(22px, 3vw, 28px)/1.1 var(--font); letter-spacing: -.02em; margin-top: 8px; }
.apec-card .c-access .val .serif { color: #8FB0FF; }
.apec-card .c-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding-top: var(--s4); border-top: 1px solid rgba(255,255,255,.14); font: 500 10px/1 var(--mono); letter-spacing: .12em; color: #6E86B0; text-transform: uppercase; }
.apec-card .c-foot b { color: #C9D6EE; font-weight: 600; }
/* single status stamp — inline within the card header, robust */
.apec-card .stamp { border: 1.5px solid #E7A28E; color: #E7A28E; border-radius: 5px; padding: 6px 10px; font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; flex: none; }

/* clean feature row under the card (robust, in-flow) */
.hero-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.hero-feats .f { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3) var(--s3); }
.hero-feats .f .n { font: 700 11px/1 var(--mono); color: var(--blue); letter-spacing: .08em; }
.hero-feats .f .t { font-weight: 700; font-size: .86rem; color: var(--ink); margin-top: 6px; line-height: 1.25; }

/* Document Reveal sequence (finite) */
[data-hero] [data-hr] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-hero].is-revealed [data-hr] { opacity: 1; transform: none; }
[data-hero].is-revealed .hero-copy > [data-hr]:nth-child(1) { transition-delay: .05s; }
[data-hero].is-revealed .hero-copy > [data-hr]:nth-child(2) { transition-delay: .14s; }
[data-hero].is-revealed .hero-copy > [data-hr]:nth-child(3) { transition-delay: .23s; }
[data-hero].is-revealed .hero-copy > [data-hr]:nth-child(4) { transition-delay: .32s; }
[data-hero].is-revealed .hero-copy > [data-hr]:nth-child(5) { transition-delay: .41s; }
[data-hero].is-revealed .apec-card { transition-delay: .18s; }
[data-hero].is-revealed .hero-feats { transition-delay: .5s; }
@media (prefers-reduced-motion: reduce) {
  [data-hero] [data-hr] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s7); }
  .hero-doc { order: -1; max-width: 100%; }
}
@media (max-width: 560px) {
  .hero-feats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hero-feats .f { padding: 10px; }
  .hero-feats .f .t { font-size: .78rem; }
}

/* =====================================================================
   8. Trust bar
   ===================================================================== */
.trustbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trustbar-inner { display: grid; grid-template-columns: repeat(6, 1fr); padding-block: var(--s6); }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-inline: var(--s3); font-size: .82rem; line-height: 1.25; color: var(--muted); text-align: center; border-left: 1px solid var(--line); }
.trust-item:first-child { border-left: 0; }
.trust-item .big { font-size: clamp(1.5rem, 1.4vw + 1rem, 1.9rem); font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
@media (max-width: 860px) { .trustbar-inner { grid-template-columns: repeat(3, 1fr); row-gap: var(--s6); } .trust-item:nth-child(3n+1) { border-left: 0; } }
@media (max-width: 480px) { .trustbar-inner { grid-template-columns: repeat(2, 1fr); } .trust-item { border-left: 0; } }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars svg { width: 16px; height: 16px; }

/* =====================================================================
   9. Cards / lists — flat, hairline, consistent sizing
   ===================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s6); height: 100%; transition: border-color .2s; }
.card:hover { border-color: var(--ink-2); }
.card .ic { width: 28px; height: 28px; color: var(--blue); margin-bottom: var(--s4); }
.card .ic svg { width: 28px; height: 28px; }
.card .ic--accent { color: var(--red); }
.card .ic--gold { color: var(--gold); }
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--muted); font-size: .96rem; }

.checks { list-style: none; padding: 0; display: grid; gap: var(--s3); }
.checks li { display: flex; gap: var(--s3); align-items: flex-start; color: var(--body); }
.checks .ico { width: 20px; height: 20px; flex: none; color: var(--ok); margin-top: 2px; }
.checks .x { color: var(--red); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.split.reverse .split-media { order: -1; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split.reverse .split-media { order: 0; } }
.split-media { border-radius: var(--r-lg); padding: clamp(26px, 4vw, 40px); background: var(--ink); color: var(--canvas); position: relative; overflow: hidden; }

/* asymmetric status composition */
.status-comp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.status-comp .s { padding: var(--s4) 0; border-top: 1px solid rgba(255,255,255,.14); }
.status-comp .s .num { font-size: clamp(1.9rem, 1.2vw + 1.5rem, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: #fff; }
.status-comp .s .num .serif { color: #8FB0FF; }
.status-comp .s .lbl { color: rgba(255,255,255,.66); font-size: .86rem; margin-top: 8px; }
.status-comp .s.wide { grid-column: 1 / -1; }

/* =====================================================================
   10. Economies — clean region-grouped layout (no fake map)
   ===================================================================== */
.economies { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
.econ-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); }
.econ-group-title { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 0 0 var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.econ-items { list-style: none; padding: 0; margin: 0; }
.econ-items li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.econ-items li:last-child { border-bottom: 0; }
.econ-items .nm { font-weight: 600; color: var(--ink); font-size: .95rem; }
.econ-items .d { font-family: var(--mono); font-size: .74rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 980px) { .economies { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .economies { grid-template-columns: 1fr; } }

.econ-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s3) var(--s5); margin-top: var(--s6); padding: var(--s5) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: .92rem; color: var(--muted); text-align: center; }
.econ-foot b { color: var(--ink); font-weight: 800; }
.econ-foot .sep { width: 1px; height: 16px; background: var(--line); }
@media (max-width: 560px) { .econ-foot .sep { display: none; } .econ-foot { gap: var(--s2) var(--s4); } }

/* =====================================================================
   11. Steps
   ===================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); counter-reset: step; }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s6) var(--s5) var(--s5); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font: 700 .82rem/1 var(--mono); letter-spacing: .06em; color: var(--blue);
  margin-bottom: var(--s4);
}
.step .when { display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--s2); }
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { font-size: .92rem; color: var(--muted); }

/* =====================================================================
   12. Pricing
   ===================================================================== */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); align-items: stretch; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; } }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); transition: border-color .2s; }
.plan:hover { border-color: var(--ink-2); }
.plan--featured { border-color: var(--ink); }
.plan--featured::before { content: "Хит"; position: absolute; top: -11px; left: var(--s5); background: var(--ink); color: #fff; font: 700 .68rem/1 var(--mono); letter-spacing: .1em; padding: 5px 10px; border-radius: var(--r-xs); }
.plan .plan-name { font-weight: 800; color: var(--ink); font-size: 1.18rem; }
.plan .plan-sub { color: var(--muted); font-size: .9rem; margin-top: 4px; min-height: 2.6em; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin: var(--s4) 0 4px; }
.plan .price .now { font-size: 2.2rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.plan .price .old { color: var(--muted); text-decoration: line-through; font-size: 1rem; }
.plan .price-note { color: var(--muted); font-size: .82rem; margin-bottom: var(--s5); }
.plan .checks { margin-bottom: var(--s5); flex: 1; }
.plan .badge-save { display: inline-block; background: var(--surface-2); color: var(--red); font-weight: 700; font-size: .76rem; padding: 3px 8px; border-radius: var(--r-xs); margin-left: 8px; vertical-align: middle; }

/* =====================================================================
   13. Testimonials
   ===================================================================== */
.tcv-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); justify-content: space-between; margin-bottom: var(--s6); }
.rating-big { display: flex; align-items: center; gap: var(--s3); }
.rating-big .score { font-size: 2.4rem; font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -.03em; }
.rating-big .meta { font-size: .88rem; color: var(--muted); }
.rating-big .stars svg { width: 20px; height: 20px; }
.tcv { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
@media (max-width: 900px) { .tcv { grid-template-columns: 1fr; } }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s6); display: flex; flex-direction: column; gap: var(--s3); transition: border-color .2s; }
.review:hover { border-color: var(--ink-2); }
.review .stars svg { width: 15px; height: 15px; }
.review p { color: var(--body); font-size: .96rem; }
.review .who { display: flex; align-items: center; gap: var(--s3); margin-top: auto; }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ink); font-size: 1rem; }
.review .nm { font-weight: 700; color: var(--ink); line-height: 1.2; }
.review .role { font-size: .8rem; color: var(--muted); }
.review .src { font-size: .74rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }

/* =====================================================================
   14. Comparison table
   ===================================================================== */
.compare { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 17px 22px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; vertical-align: middle; }
.compare thead th { background: var(--surface-2); color: var(--ink); font-weight: 800; }
.compare th:first-child { width: 40%; }
.compare .col-apec { background: rgba(27,79,216,.06); }
.compare thead .col-apec { color: var(--blue); }
.compare td .yes { color: var(--ok); font-weight: 700; }
.compare td .no { color: var(--muted); font-weight: 600; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; color: var(--ink-2); }
.compare .ico { width: 16px; height: 16px; vertical-align: middle; }
.compare td .ico { margin-right: 10px; }
@media (max-width: 640px) { .compare th, .compare td { padding: 12px 12px; font-size: .85rem; } .compare th:first-child, .compare td:first-child { width: 42%; } .compare td .ico { margin-right: 7px; } }

/* =====================================================================
   15. Documents
   ===================================================================== */
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
@media (max-width: 900px) { .docs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .docs { grid-template-columns: 1fr; } }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s6); }
.doc .num { width: 32px; height: 32px; border-radius: var(--r-xs); border: 1.5px solid var(--ink); color: var(--ink); font: 700 .86rem/1 var(--mono); display: grid; place-items: center; margin-bottom: var(--s4); }
.doc h3 { font-size: 1.04rem; margin-bottom: 6px; }
.doc p { font-size: .9rem; color: var(--muted); }

/* =====================================================================
   16. FAQ
   ===================================================================== */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: var(--s3); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px var(--s5); transition: border-color .2s; }
.faq details[open] { border-color: var(--ink-2); }
.faq summary { list-style: none; cursor: pointer; min-height: 44px; padding: var(--s5) 0; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--blue); transition: transform .2s, background .2s; position: relative; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; background: var(--blue); border-radius: 2px; }
.faq summary .pm::before { width: 11px; height: 2px; }
.faq summary .pm::after { width: 2px; height: 11px; transition: transform .2s; }
.faq details[open] summary .pm { background: var(--ink); border-color: var(--ink); }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: #fff; }
.faq details[open] summary .pm::after { transform: rotate(90deg); }
.faq .answer { padding: 0 0 var(--s5); color: var(--body); }
.faq .answer p + p { margin-top: var(--s2); }

/* =====================================================================
   17. Order form / CTA band (dark premium finale)
   ===================================================================== */
.cta-band { position: relative; overflow: hidden; background: var(--ink); color: var(--canvas); border-radius: var(--r-lg); padding: clamp(32px, 5vw, 56px); }
.cta-band .inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
@media (max-width: 860px) { .cta-band .inner { grid-template-columns: 1fr; } }
.cta-band h2 { color: #fff; }
.cta-band h2 .serif { color: #8FB0FF; }
.cta-band .eyebrow { color: #8FB0FF; }
.cta-band .eyebrow::before { background: #8FB0FF; }
.cta-band p { color: rgba(255,255,255,.76); }
.cta-band .perks { list-style: none; padding: 0; display: grid; gap: var(--s3); margin-top: var(--s5); }
.cta-band .perks li { display: flex; gap: var(--s3); align-items: center; color: rgba(255,255,255,.9); }
.cta-band .perks .ico { width: 18px; height: 18px; color: #8FB0FF; flex: none; }

.leadform { background: var(--surface); color: var(--body); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 32px); border: 1px solid var(--line); }
.leadform h3 { color: var(--ink); }
.leadform .sub { color: var(--muted); font-size: .92rem; margin: 6px 0 var(--s5); }
.field { margin-bottom: var(--s4); }
.field label { display: block; font-family: var(--mono); font-weight: 600; color: var(--ink); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.field .req { color: var(--red); }
.input, .select, .textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--canvas); color: var(--ink); font-size: 16px; transition: border-color .15s; }
.input::placeholder, .textarea::placeholder { color: #9aa0aa; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); }
.input.is-invalid, .select.is-invalid { border-color: var(--red); }
.textarea { min-height: 92px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; color: var(--muted); margin-bottom: var(--s4); }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--blue); }
.consent a { color: var(--blue); }
.form-msg { display: none; border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; font-weight: 600; margin-top: 4px; }
.form-msg.is-ok { display: block; background: #E6F3EC; color: var(--ok); border: 1px solid #BFE0CD; }
.form-msg.is-err { display: block; background: #FBECEC; color: var(--red); border: 1px solid #F3CFCF; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.spin { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   18. Footer
   ===================================================================== */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); padding-block: clamp(48px, 6vw, 76px) 28px; }
.site-footer a { color: rgba(255,255,255,.76); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: clamp(24px, 4vw, 48px); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-size: .98rem; margin-bottom: var(--s4); letter-spacing: 0; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: rgba(255,255,255,.58); font-size: .9rem; margin-top: var(--s3); max-width: 36ch; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ico { width: 17px; height: 17px; color: #8FB0FF; flex: none; margin-top: 3px; }
.footer-bottom { margin-top: clamp(28px, 4vw, 44px); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: center; font-size: .84rem; color: rgba(255,255,255,.5); }
.footer-bottom .links { display: flex; gap: var(--s5); flex-wrap: wrap; }

/* =====================================================================
   19. Sticky mobile CTA + scroll reveal
   ===================================================================== */
.mobile-cta { position: fixed; inset: auto 0 0 0; z-index: 90; display: none; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(242,239,232,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.mobile-cta .btn { flex: 1; }
@media (max-width: 980px) { body.has-mobile-cta .mobile-cta { display: flex; } body.has-mobile-cta { padding-bottom: 72px; } }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; } }

/* =====================================================================
   20. Inner pages
   ===================================================================== */
.page-hero { background: var(--ink); color: #fff; padding-block: clamp(40px, 6vw, 72px); }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.82); }
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin: var(--s7) 0 var(--s3); } .prose h3 { margin: var(--s6) 0 var(--s2); }
.prose p { margin-bottom: var(--s4); } .prose ul, .prose ol { margin: 0 0 var(--s4); }
.prose a { font-weight: 600; }
