/* director-ops (#157): редакционная колонка на белом, тёмные карточки и тёмный подвал, оранжевый акцент точками.
   Ритм: секция 96 (телефон 64) → заголовок 16 → контент 40 → элементы 16/24; карточки 24 (телефон 20). */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #FFFFFF; --ink: #0B0B0B; --text: #333333; --muted: #69727D; --line: #E4E4E4; --chip: #F4F4F4;
  --night: #0B0B0B; --night-2: #171717; --night-3: #2A2A2E; --night-text: #D8D7D8; --night-muted: #9D9D9D;
  --nav: rgba(255, 255, 255, 0.82); --accent: #C2410C; --glow: #FF6B2C;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --sec: 96px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --ink: #FFFFFF; --text: #D8D7D8; --muted: #9D9D9D; --line: #2C2C2C; --chip: #1A1A1A;
    --night: #121212; --night-2: #1C1C1C; --night-3: #2E2F33; --nav: rgba(0, 0, 0, 0.72); --accent: #FF6B2C; color-scheme: dark; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
svg.i { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 80; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(16px + env(safe-area-inset-top, 0px)); }
.band { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: 880px; margin: 0 auto; }
.narrow { max-width: 680px; }

/* Шапка */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--nav); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.top .bar { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.logo .mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; }
.logo .mark svg { width: 20px; height: 20px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a.l { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 9999px; transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.top nav a.l:hover, .top nav a.l[aria-current="page"] { color: var(--ink); background: var(--chip); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 16px; line-height: 24px; padding: 12px 24px; border-radius: 12px;
  border: 0; background: var(--ink); color: var(--bg); text-decoration: none; cursor: pointer; transition: transform 300ms var(--ease), opacity 300ms var(--ease); }
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn.sm { font-size: 14px; line-height: 20px; padding: 8px 16px; }
.btn.light { background: #FFFFFF; color: #0B0B0B; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: default; transform: none; }

/* Нижняя панель на телефоне */
.dock { display: none; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 55;
  align-items: center; gap: 8px; padding: 8px; border-radius: 20px; background: rgba(23, 23, 23, 0.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24); width: max-content; max-width: calc(100% - 32px); }
.dock .menu { width: 48px; height: 48px; border-radius: 12px; background: #000000; border: 0; color: #FFFFFF; cursor: pointer; position: relative; flex: none; }
.dock .menu span { position: absolute; left: 14px; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 500ms var(--ease); }
.dock .menu span:nth-child(1) { top: 19px; } .dock .menu span:nth-child(2) { top: 27px; }
.dock .menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.dock .menu[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.dock .btn { background: #FFFFFF; color: #0B0B0B; }
.panel { position: fixed; inset: 0; z-index: 54; background: rgba(11, 11, 11, 0.94); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); color: #FFFFFF;
  padding: calc(64px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(112px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.panel a { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; color: #FFFFFF; padding-block: 4px; opacity: 0; transform: translateY(24px);
  transition: transform 500ms var(--ease), opacity 500ms var(--ease); }
.panel.open a { opacity: 1; transform: none; }
@media (max-width: 860px) { .top nav { display: none; } .dock { display: flex; } footer.f { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }

/* Общие блоки */
section.s { padding-block: var(--sec); }
.s-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; max-width: 680px; }
.s-head h2 { font-size: 48px; line-height: 1; }
.s-head p { font-size: 18px; line-height: 28px; }
.kicker { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent); }
.lead { font-size: 18px; line-height: 28px; }
.hint { font-size: 14px; line-height: 20px; color: var(--muted); }
.hint b { color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink); background: var(--chip); padding: 4px 12px; border-radius: 9999px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 9999px;
  transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.pills a:hover { background: var(--ink); color: var(--bg); }
.circle { width: 32px; height: 32px; border: 2px solid var(--ink); border-radius: 9999px; display: grid; place-items: center; color: var(--ink); flex: none; }
.circle svg { width: 16px; height: 16px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 9999px; background: var(--glow); box-shadow: 0 0 12px var(--glow); flex: none; }
.textlink { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; display: inline-flex; gap: 8px; align-items: center; transition: color 300ms var(--ease); }
.textlink:hover { color: var(--accent); }
.crumbs { font-size: 14px; line-height: 20px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* Герой */
.hero { padding-block: 80px var(--sec); }
.hero .col > * { max-width: 680px; }
.hero h1 { font-size: 60px; line-height: 1; }
.hero .lead { margin-top: 24px; }
.cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.offer-card { margin-top: 40px; max-width: 880px !important; background: var(--night); color: var(--night-text); border-radius: 32px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; }
.offer-card .t { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--night-muted); }
.offer-card h3 { color: #FFFFFF; font-size: 24px; line-height: 32px; margin-top: 8px; }
.offer-card p { font-size: 14px; line-height: 20px; color: var(--night-muted); margin-top: 4px; }

/* История */
.story p { font-size: 18px; line-height: 28px; }
.story p + p { margin-top: 16px; }

/* Архитектура */
.c4 { background: var(--chip); border-radius: 32px; padding: 24px; }
.c4 svg { display: block; width: 100%; height: auto; }
.c4 .narrow-map { display: none; }
@media (max-width: 640px) { .c4 .wide-map { display: none; } .c4 .narrow-map { display: block; } .c4 { padding: 16px; border-radius: 24px; } }
.c4 text { font-family: var(--font); }
.c4 .node rect { transition: transform 300ms var(--ease); }
.c4 a.node:hover rect.box, .c4 a.node:focus-visible rect.box { stroke: var(--accent); stroke-width: 3; }
.c4-legend { margin-top: 16px; font-size: 14px; line-height: 20px; color: var(--muted); }

/* Сервисы */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.svc { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 24px; background: var(--chip); text-decoration: none; color: inherit; transition: transform 300ms var(--ease); }
.svc:hover { transform: translateY(-2px); }
.svc .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.svc h3 { font-size: 24px; line-height: 32px; }
.svc .role { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent); }
.svc p { font-size: 16px; line-height: 24px; }
.svc .path { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: auto; padding-top: 8px; }

/* Статьи */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.card img { border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--chip); transition: transform 300ms var(--ease); }
.card:hover img { transform: translateY(-2px); }
.card h3 { font-size: 18px; line-height: 28px; letter-spacing: -0.02em; }
.card .svcname { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }

/* Страница сервиса */
.problem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.problem div { padding: 24px; border-radius: 24px; background: var(--chip); color: var(--muted); }
.features { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.features > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.features .n { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); }
.features h3 { font-size: 20px; line-height: 28px; letter-spacing: -0.02em; margin-bottom: 4px; }
.formula { padding-block: var(--sec); }
.formula p { font-size: 48px; line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-align: center; max-width: 880px; margin: 0 auto; text-wrap: balance; }

/* Статья */
.deck { position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: var(--night); }
.deck iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose { max-width: 680px; }
.prose p, .prose li { font-size: 18px; line-height: 28px; }
.prose p + p { margin-top: 16px; }
.prose h2 { font-size: 30px; line-height: 36px; margin: 48px 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 16px 0; display: flex; flex-direction: column; gap: 8px; }
.prose blockquote { margin: 24px 0; padding: 0 0 0 24px; border: 2px solid var(--accent); border-width: 0 0 0 2px; font-size: 20px; line-height: 28px; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose > *:first-child { margin-top: 0; }

/* PDF */
.pdf { background: var(--night); color: var(--night-text); border-radius: 32px; padding: 40px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: center; }
.pdf img { border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); width: 100%; aspect-ratio: 210 / 297; object-fit: cover; }
.pdf h2 { color: #FFFFFF; font-size: 36px; line-height: 40px; }
.pdf ul { margin: 16px 0 24px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pdf li { display: flex; gap: 12px; align-items: center; }
.pdf li svg { color: var(--glow); }
.pdf .actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.pdf .actions a.alt { color: var(--night-muted); font-size: 14px; line-height: 20px; }

/* Telegram и подвал */
footer.f { padding-top: 32px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.night { background: var(--night); color: var(--night-text); border-radius: 64px 64px 0 0; padding-block: 24px 40px; }
.night .handle { width: 32px; height: 4px; border-radius: 9999px; background: #FFFFFF; margin: 0 auto 64px; }
.final { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.final h2 { color: #FFFFFF; font-size: 48px; line-height: 1; }
.final p { color: var(--night-muted); }
.final .hint b { color: #FFFFFF; }
.neon { position: relative; padding-block: 16px; margin-top: 8px; }
.neon::before, .neon::after { content: ""; position: absolute; left: 50%; width: 40px; height: 8px; margin-left: -20px; border-radius: 9999px; background: var(--glow); box-shadow: 0 0 16px var(--glow), 0 0 32px var(--glow); }
.neon::before { top: 8px; } .neon::after { bottom: 8px; }
.neon .btn { background: #1C1C1C; color: #FFFFFF; border: 1px solid #333333; padding: 16px 32px; position: relative; z-index: 1; }
.neon .btn::after { content: ""; position: absolute; top: 12px; right: 12px; width: 6px; height: 6px; border-radius: 9999px; background: var(--glow); }
.made { margin-top: 80px; padding-top: 24px; border-top: 1px solid #262626; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; line-height: 20px; color: var(--night-muted); }
.made nav { display: flex; flex-wrap: wrap; gap: 16px; }
.made a { text-decoration: none; } .made a:hover { color: #FFFFFF; }

/* Слоган по словам */
.tagline { padding-block: var(--sec); }
.tagline p { font-size: 60px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); max-width: 880px; margin: 0 auto; text-align: center; text-wrap: balance; }
.tagline .w { opacity: 0.2; transition: opacity 600ms var(--ease); }
.tagline .w.on { opacity: 1; }

.rv { transition: transform 700ms var(--ease), opacity 700ms var(--ease); }
.rv.wait { opacity: 0; transform: translateY(32px); }

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .problem { grid-template-columns: minmax(0, 1fr); }
  .pdf { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 32px; }
}
@media (max-width: 640px) {
  :root { --sec: 64px; }
  .hero { padding-top: 48px; }
  .hero h1, .tagline p { font-size: 48px; }
  .s-head h2, .final h2, .formula p { font-size: 36px; line-height: 40px; }
  .s-head { margin-bottom: 32px; }
  .services, .cards { grid-template-columns: minmax(0, 1fr); }
  .offer-card { grid-template-columns: minmax(0, 1fr); border-radius: 24px; padding: 20px; }
  .svc, .problem div { padding: 20px; }
  .pdf { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; border-radius: 24px; }
  .pdf img { max-width: 200px; }
  .pdf h2 { font-size: 30px; line-height: 36px; }
  .deck { border-radius: 16px; }
  .prose h2 { font-size: 24px; line-height: 32px; margin-top: 40px; }
  .night { border-radius: 40px 40px 0 0; }
  .night .handle { margin-bottom: 48px; }
  .made { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv.wait { transform: none; }
  .panel a { transform: none; transition: opacity 300ms var(--ease); }
  .btn:hover, .btn:active, .svc:hover, .card:hover img { transform: none; }
}

/* C4: цвета из токенов, чтобы схема работала в обеих темах */
.c4 .person { fill: var(--accent); }
.c4 .pt1 { fill: #FFFFFF; font-size: 18px; font-weight: 700; }
.c4 .pt2 { fill: #FFFFFF; opacity: 0.85; font-size: 13px; }
.c4 .boundary { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 6; }
.c4 .bl { fill: var(--muted); font-size: 13px; font-weight: 600; }
.c4 .box { fill: var(--night); stroke: var(--night); stroke-width: 2; transition: stroke 300ms var(--ease); }
.c4 .t1 { fill: #FFFFFF; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.c4 .t2 { fill: var(--night-muted); font-size: 13px; }
.c4 .t3 { fill: var(--glow); font-size: 13px; font-weight: 600; }
.c4 .ext { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.c4 .et1 { fill: var(--ink); font-size: 15px; font-weight: 700; }
.c4 .et2 { fill: var(--muted); font-size: 13px; }
.c4 .edge { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.c4 .arrow { fill: var(--muted); }
.c4 .el { fill: var(--muted); font-size: 12px; }
.c4 .narrow-map .t1 { font-size: 20px; }
.c4 .narrow-map .t2 { font-size: 14px; }
.c4 .narrow-map .pt2, .c4 .narrow-map .et2 { font-size: 13px; }
.story .pull { margin: 40px 0; padding: 32px; border-radius: 24px; background: var(--night); color: #FFFFFF; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.03em; }
@media (max-width: 640px) { .story .pull { font-size: 24px; line-height: 32px; padding: 24px 20px; } }
.story .chapter { font-size: 24px; line-height: 32px; margin: 48px 0 16px; }
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sec-grid div { padding: 24px; border-radius: 24px; background: var(--chip); display: flex; flex-direction: column; gap: 8px; }
.sec-grid h3 { font-size: 20px; line-height: 28px; letter-spacing: -0.02em; }
.sec-grid p { color: var(--muted); }
@media (max-width: 640px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } .sec-grid div { padding: 20px; } }
