/* lerk.tech
   Палитра взята с аватара: крафт-фон, тушь контуров, бирюза волос.
   Форма: панели 22px, внутренние кадры 14px, поля 14px, кнопки и чипы - пилюли.
   Контур 2px и жёсткая тень - как линии комикса на аватаре. */

@font-face {
  font-family: "Dela Gothic One";
  src: url("../fonts/dela-gothic-one-cyrillic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Dela Gothic One";
  src: url("../fonts/dela-gothic-one-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  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 {
  --font-display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --bg: #d9c3a0;          /* крафт */
  --band: #cfb690;        /* крафт темнее, полоса раздела */
  --surface: #efe4d0;     /* бумага панелей */
  --surface-2: #e5d5b8;
  --input: #f7f0e3;
  --text: #1f1a15;        /* тушь */
  --text-2: #4a3e31;
  --muted: #5c4c3a;
  --line: #1f1a15;
  --shadow-c: #1f1a15;
  --accent: #2c6a5e;      /* бирюза */
  --accent-text: #f6efe2;
  --accent-soft: #a9c9bd;
  --link: #1f5249;
  --focus: #1f5249;
  --error: #8e2a1c;
  --avatar-bg: #7f5d3d;
  --grain: .07;
  --stamp-ink: #2b45a6;   /* синие чернила печати */
  --qr-ink: #2b45a6;
  --qr-bg: transparent;

  --r-panel: 22px;
  --r-inner: 14px;
  --r-pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 8vw, 104px);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18130f;
    --band: #1e1813;
    --surface: #251e17;
    --surface-2: #2e251c;
    --input: #1b1611;
    --text: #efe3cc;
    --text-2: #cdbb9e;
    --muted: #b3a083;
    --line: #d9c3a0;
    --shadow-c: #2c6a5e;
    --accent: #7cc1ae;
    --accent-text: #0f1f1b;
    --accent-soft: #24453e;
    --link: #8fd0bd;
    --focus: #8fd0bd;
    --error: #f0a08d;
    --avatar-bg: #7f5d3d;
    --grain: .05;
    --stamp-ink: #9db2ff;
    --qr-ink: #1f1a15;
    --qr-bg: #efe3cc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18130f;
  --band: #1e1813;
  --surface: #251e17;
  --surface-2: #2e251c;
  --input: #1b1611;
  --text: #efe3cc;
  --text-2: #cdbb9e;
  --muted: #b3a083;
  --line: #d9c3a0;
  --shadow-c: #2c6a5e;
  --accent: #7cc1ae;
  --accent-text: #0f1f1b;
  --accent-soft: #24453e;
  --link: #8fd0bd;
  --focus: #8fd0bd;
  --error: #f0a08d;
  --avatar-bg: #7f5d3d;
  --grain: .05;
  --stamp-ink: #9db2ff;
  --qr-ink: #1f1a15;
  --qr-bg: #efe3cc;
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Зерно крафт-бумаги: фиксированный слой поверх, клики проходят насквозь */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 2px; text-underline-offset: .18em; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -120px; z-index: 60;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.skip:focus { top: 16px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  font: 700 1.0625rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow-c);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow-c); transition-duration: .06s; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--ghost { background: var(--surface); color: var(--text); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; box-shadow: 3px 3px 0 var(--shadow-c); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--shadow-c); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-c); }
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow-c); transition-duration: .06s; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease);
}
.top.is-stuck { border-bottom-color: var(--line); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand__face { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; background: var(--avatar-bg); }
.brand__name { font: 400 1.625rem/1 var(--font-display); letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: var(--r-pill);
  color: var(--text); font-weight: 600; text-decoration: none;
  transition: background-color .15s var(--ease);
}
.nav a:hover { background: var(--surface); }

.top__actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

[data-theme-toggle] .icon--sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .icon--sun { display: block; }
:root[data-theme="dark"] [data-theme-toggle] .icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .icon--sun { display: block; }
  :root:not([data-theme="light"]) [data-theme-toggle] .icon--moon { display: none; }
}

/* ---------- Первый экран ---------- */
.hero { padding-block: clamp(32px, 6vw, 80px) clamp(8px, 2vw, 24px); overflow-x: clip; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
.hero__hello { font-weight: 600; font-size: 1.125rem; color: var(--text-2); margin-bottom: 20px; }
.hero__title {
  font: 400 clamp(2.75rem, 1.35rem + 4.6vw, 4.4rem)/1.04 var(--font-display);
  letter-spacing: -.012em;
}
.hero__lead { margin-top: 24px; max-width: 40ch; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--text-2); }
.hero__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px 16px; }

.stack { position: relative; width: min(100%, 500px); aspect-ratio: 1; margin-inline: auto; }
.stack__shot {
  position: absolute; width: 60%;
  border: 2px solid var(--line); border-radius: var(--r-inner);
  box-shadow: 5px 5px 0 var(--shadow-c);
  background: var(--surface);
}
.stack__shot--back { top: 4%; right: -5%; rotate: 7deg; }
.stack__shot--front { bottom: 3%; left: -8%; rotate: -6deg; z-index: 1; }
.stack__avatar {
  position: absolute; left: 17%; top: 13%; z-index: 2;
  width: 68%; aspect-ratio: 1;
  border: 2px solid var(--line); border-radius: 28px; overflow: hidden;
  background: var(--avatar-bg);
  box-shadow: 8px 8px 0 var(--shadow-c);
  rotate: -2deg;
}
.stack__avatar img { width: 100%; height: 100%; object-fit: cover; }
.bubble {
  position: absolute; left: -4%; top: 1%; z-index: 3;
  max-width: 13.5em; padding: 14px 18px;
  background: var(--surface); color: var(--text);
  border: 2px solid var(--line); border-radius: 22px;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.3;
  box-shadow: 4px 4px 0 var(--shadow-c);
  rotate: -3deg;
}
.bubble::after {
  content: ""; position: absolute; right: 30px; bottom: -12px;
  width: 20px; height: 20px;
  background: inherit;
  border-right: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: rotate(45deg) skew(8deg, 8deg);
}

@media (prefers-reduced-motion: no-preference) {
  .stack__avatar { animation: stamp .7s var(--spring) .1s both; }
  .stack__shot--back { animation: slide-r .8s var(--ease-out) .3s both; }
  .stack__shot--front { animation: slide-l .8s var(--ease-out) .4s both; }
  .bubble { animation: pop .5s var(--spring) .85s both; transform-origin: 80% 110%; }
}
@keyframes stamp { from { opacity: 0; transform: translateY(30px) rotate(-7deg) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes slide-r { from { opacity: 0; transform: translate(-30px, 18px); } to { opacity: 1; transform: none; } }
@keyframes slide-l { from { opacity: 0; transform: translate(30px, -18px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* ---------- Разделы ---------- */
.section { padding-block: var(--section); }
.section--ai { background: var(--band); border-block: 2px solid var(--line); }
.section__head { margin-bottom: clamp(32px, 4vw, 52px); max-width: 62ch; }
.section__title { font: 400 clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem)/1.06 var(--font-display); letter-spacing: -.01em; }
.section__lead { margin-top: 16px; max-width: 56ch; font-size: 1.125rem; color: var(--text-2); }

/* ---------- Работы: бенто ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}
.case {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-panel);
  box-shadow: 6px 6px 0 var(--shadow-c);
  overflow: hidden;
}
.case--metrika { grid-column: 1 / span 7; grid-row: 1; }
.case--gerbs { grid-column: 8 / span 5; grid-row: 1; }
.case--lodki { grid-column: 1 / span 5; grid-row: 2; }
.case--donnu { grid-column: 6 / span 3; grid-row: 2; }
.case--park { grid-column: 9 / span 4; grid-row: 2; }

.case__media { position: relative; flex: none; padding: 10px 10px 0; }
.case__shot {
  width: 100%; aspect-ratio: 16 / 10;
  object-fit: cover; object-position: top center;
  border: 2px solid var(--line); border-radius: var(--r-inner);
}

.case__fan { position: absolute; right: 26px; bottom: -8px; display: flex; }
.case__fan img {
  width: clamp(84px, 11vw, 136px);
  border: 2px solid var(--line); border-radius: 10px;
  box-shadow: 4px 4px 0 var(--shadow-c);
  background: var(--surface);
}
.case__fan img + img { margin-left: -26px; }
.case__fan img:nth-child(1) { rotate: -8deg; translate: 0 10px; }
.case__fan img:nth-child(2) { rotate: 2deg; z-index: 1; }
.case__fan img:nth-child(3) { rotate: 9deg; translate: 0 14px; }

.case__media--gerbs {
  flex: 1 1 auto;
  display: flex; justify-content: center; align-items: center;
  margin: 10px 10px 0; padding: 18px 12px 14px;
  background: var(--accent-soft);
  border: 2px solid var(--line); border-radius: var(--r-inner);
}
/* Гербы как наклейки: белый фон картинки становится бумагой карточки */
.case__media--gerbs img {
  width: 38%;
  background: #fff;
  border: 2px solid var(--line); border-radius: 16px;
  box-shadow: 4px 4px 0 var(--shadow-c);
}
.case__media--gerbs img + img { margin-left: -7%; }
.case__media--gerbs img:nth-child(1) { rotate: -7deg; translate: 0 8px; }
.case__media--gerbs img:nth-child(2) { width: 42%; z-index: 1; rotate: 2deg; translate: 0 -8px; }
.case__media--gerbs img:nth-child(3) { rotate: 8deg; translate: 0 12px; }

.case__media--phone {
  flex: none; height: 210px; overflow: hidden;
  margin: 10px 10px 0; padding: 22px 0 0;
  background: var(--band);
  border: 2px solid var(--line); border-radius: var(--r-inner);
}
.phone {
  border: 2px solid var(--line); border-radius: 30px;
  box-shadow: 5px 5px 0 var(--shadow-c);
  background: #fff;
}
.case__media--phone .phone { width: 62%; margin-inline: auto; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.case__body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 24px 24px; }
.case--gerbs .case__body { flex: none; }
.case__title { font: 400 clamp(1.4rem, 1.1rem + .9vw, 1.9rem)/1.12 var(--font-display); letter-spacing: -.005em; }
.case__text { color: var(--text-2); max-width: 60ch; }
.case__link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px;
  font-weight: 700; color: var(--link);
}
.case__link .icon { width: 1.05em; height: 1.05em; }

.role {
  display: inline-block; padding: 3px 12px;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  font-size: .8125rem; font-weight: 700; line-height: 1.5;
  background: var(--surface-2); color: var(--text);
}
.role--own { background: var(--accent-soft); }
.role--sm { margin-top: 10px; padding: 1px 10px; font-size: .75rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 2px 10px; border-radius: var(--r-pill);
  border: 1.5px solid color-mix(in srgb, var(--line) 45%, transparent);
  font-size: .8125rem; font-weight: 600; color: var(--text-2);
}

/* ---------- Работы: список ---------- */
.subhead { margin-top: clamp(56px, 7vw, 88px); margin-bottom: 26px; font: 400 clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem)/1.1 var(--font-display); }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 44px; }
.project { display: grid; grid-template-columns: 156px minmax(0, 1fr); gap: 20px; align-items: start; }
.project__thumb {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  border: 2px solid var(--line); border-radius: 12px;
  box-shadow: 3px 3px 0 var(--shadow-c);
  background: var(--surface);
}
.project__thumb--icon { display: grid; place-items: center; background: var(--accent-soft); color: var(--text); }
.project__thumb--icon .icon { width: 40px; height: 40px; }
.project__title { font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.project__title a { color: var(--text); text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.project__title a:hover { color: var(--link); }
.project__body > p:not(.role) { margin-top: 6px; color: var(--text-2); font-size: 1rem; }

.support {
  margin-top: clamp(40px, 5vw, 56px); padding: 22px 26px 24px;
  border: 2px dashed color-mix(in srgb, var(--line) 55%, transparent); border-radius: var(--r-panel);
}
.support__title { font-size: 1.125rem; font-weight: 700; }
.support__list { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; }
.support__list li { display: flex; flex-direction: column; }
.support__list a { font-weight: 700; }
.support__list span { font-size: .9375rem; color: var(--text-2); }

/* ---------- ИИ ---------- */
.ai { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(24px, 3vw, 36px); align-items: start; }
.ai__tabs { display: flex; flex-direction: column; gap: 12px; }
.ai__tab {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; text-align: left;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 1rem; line-height: 1.3;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.ai__tab:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shadow-c); }
.ai__tab[aria-selected="true"] {
  background: var(--accent); color: var(--accent-text);
  transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow-c);
}
.ai__panels { min-width: 0; }
.ai__panel {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 3vw, 40px); align-items: center;
  padding: clamp(22px, 3vw, 40px);
  background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-panel);
  box-shadow: 6px 6px 0 var(--shadow-c);
}
.ai__panel + .ai__panel { margin-top: 24px; }
.ai__panel[hidden] { display: none; }
.ai__panel.is-entering { animation: panel-in .45s var(--ease-out) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ai__text h3 { font: 400 clamp(1.45rem, 1.1rem + 1vw, 2rem)/1.12 var(--font-display); }
.ai__text > p { margin-top: 14px; color: var(--text-2); }
.ai__where { font-size: .9688rem; }

.checks { margin-top: 18px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--line);
}
.checks li::after {
  content: ""; position: absolute; left: 7px; top: calc(.2em + 4px);
  width: 6px; height: 10px;
  border-right: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text);
  rotate: 45deg;
}

.ai__visual { position: relative; min-height: 420px; }
.ai__visual img { position: absolute; border: 2px solid var(--line); border-radius: 16px; box-shadow: 5px 5px 0 var(--shadow-c); background: var(--surface); }
.ai__visual--gerbs img:nth-child(1) { width: 52%; left: 0; top: 6%; rotate: -7deg; background: #fff; }
.ai__visual--gerbs img:nth-child(2) { width: 42%; left: 29%; top: 0; rotate: 2deg; z-index: 1; }
.ai__visual--gerbs img:nth-child(3) { width: 50%; right: 0; bottom: 4%; rotate: 8deg; background: #fff; }
.ai__visual--covers img { width: 58%; }
.ai__visual--covers img:nth-child(1) { left: 0; top: 0; rotate: -6deg; }
.ai__visual--covers img:nth-child(2) { right: 0; top: 14%; rotate: 5deg; z-index: 1; }
.ai__visual--covers img:nth-child(3) { left: 16%; bottom: 0; rotate: -1.5deg; z-index: 2; }
.ai__visual--phone { display: grid; place-items: center; min-height: 0; }
.ai__visual--phone .phone { position: static; width: min(260px, 70%); rotate: 2deg; border-radius: 34px; }

.agents { display: grid; gap: 14px; }
.agent {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 2px solid var(--line); border-radius: 16px;
}
.agent > .icon {
  width: 48px; height: 48px; padding: 11px;
  border: 2px solid var(--line); border-radius: 50%;
  background: var(--accent-soft); color: var(--text);
}
.agent h4 { font-size: 1.0625rem; font-weight: 700; }
.agent p { margin-top: 2px; color: var(--text-2); font-size: .9688rem; }

/* ---------- Услуги ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 64px); }
.service {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 20px; align-content: start;
  padding-block: 28px 30px;
  border-top: 2px solid var(--line);
}
.service__icon {
  grid-row: span 3;
  width: 58px; height: 58px; padding: 13px;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); color: var(--text);
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.service h3 { font-size: 1.3125rem; font-weight: 800; line-height: 1.25; padding-top: 2px; }
.service p { margin-top: 8px; color: var(--text-2); }
.service .service__where { margin-top: 12px; font-size: .9063rem; font-weight: 600; color: var(--muted); }

/* ---------- Как работаю ---------- */
.process { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.steps { counter-reset: step; }
.step { counter-increment: step; position: relative; padding: 0 0 30px 76px; }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: -6px;
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--text);
  font: 400 1.25rem/1 var(--font-display);
  box-shadow: 3px 3px 0 var(--shadow-c);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 25px; top: 52px; bottom: 0;
  border-left: 2px dashed color-mix(in srgb, var(--line) 55%, transparent);
}
.step h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.3; padding-top: 6px; }
.step p { margin-top: 4px; max-width: 48ch; color: var(--text-2); }

.process__side { position: sticky; top: 104px; display: grid; gap: 26px; }
.report { margin: 0; }
.report__bubble {
  position: relative;
  padding: 22px 24px;
  background: var(--surface);
  border: 2px solid var(--line); border-radius: 24px 24px 24px 6px;
  box-shadow: 6px 6px 0 var(--shadow-c);
  rotate: 1deg;
}
.report__tag { font-weight: 800; font-size: 1.125rem; color: var(--link); }
.report ul { margin-top: 10px; display: grid; gap: 6px; }
.report li { position: relative; padding-left: 18px; }
.report li::before { content: "•"; position: absolute; left: 2px; color: var(--link); font-weight: 800; }
.report figcaption { margin-top: 16px; padding-left: 6px; font-size: .9375rem; color: var(--text-2); }
.note {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px;
  padding: 18px 20px;
  background: var(--accent-soft); color: var(--text);
  border: 2px solid var(--line); border-radius: 18px;
}
.note .icon { width: 26px; height: 26px; margin-top: 1px; }

/* ---------- Обо мне ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.about__text p { margin-top: 20px; max-width: 52ch; font-size: 1.125rem; }
.about__text p:first-of-type { margin-top: 28px; }
.facts {
  margin: 0;
  background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-panel);
  box-shadow: 6px 6px 0 var(--shadow-c);
  overflow: hidden;
}
.facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 14px 20px; }
.facts > div + div { border-top: 2px solid color-mix(in srgb, var(--line) 22%, transparent); }
.facts dt { color: var(--text-2); font-weight: 600; }
.facts dd { margin: 0; font-weight: 700; }
.about__sub { margin: 30px 0 12px; font-size: 1rem; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 5px 13px;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); font-weight: 600; font-size: .9375rem;
}
.chips--accent li { background: var(--accent-soft); }
.repos { display: grid; gap: 10px; max-width: 52ch; }
.about__text .about__sub { margin-top: 36px; }
.repos li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.repos a { font-weight: 700; }
.repos span { color: var(--text-2); font-size: .9375rem; }

/* ---------- Контакты ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 80px); align-items: start; }
.channels { margin-top: 30px; display: grid; gap: 12px; }
.channel {
  display: grid; grid-template-columns: 26px 104px minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: 58px; padding: 10px 18px;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 2px solid var(--line); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--shadow-c);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.channel:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shadow-c); }
.channel:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow-c); }
.channel .icon { width: 24px; height: 24px; }
.channel__name { font-weight: 800; }
.channel__value { color: var(--text-2); overflow-wrap: anywhere; }
.channel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.channel-row .icon-btn { width: 58px; height: auto; border-radius: 16px; }
.copy .icon--done { display: none; }
.copy.is-done .icon--copy { display: none; }
.copy.is-done .icon--done { display: block; }

.brief {
  padding: clamp(22px, 3vw, 36px);
  background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-panel);
  box-shadow: 8px 8px 0 var(--shadow-c);
}
.brief__title { font: 400 1.6rem/1.15 var(--font-display); }
.field { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.field legend, .field > label { display: block; padding: 0; margin-bottom: 10px; font-weight: 800; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; cursor: pointer; }
/* z-index: у отмеченного чипа подпись сдвинута трансформом, клик всё равно должен попадать в сам чекбокс */
.pick input { position: absolute; inset: 0; z-index: 1; opacity: 0; margin: 0; cursor: pointer; }
.pick span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px;
  border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--input); color: var(--text);
  font-weight: 600; font-size: .9688rem;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.pick label:hover span { background: var(--surface-2); }
.pick input:checked + span {
  background: var(--accent); color: var(--accent-text);
  transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow-c);
}
.pick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.field textarea {
  display: block; width: 100%; min-height: 128px; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: var(--r-inner);
  background: var(--input); color: var(--text);
  font: inherit; line-height: 1.5; resize: vertical;
}
.field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 2px var(--error); }
.field__help { margin-top: 8px; font-size: .9375rem; color: var(--text-2); }
.field__error { margin-top: 8px; font-weight: 700; color: var(--error); }
.brief__actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 14px; }
.brief__status { margin-top: 16px; min-height: 1.6em; font-weight: 600; color: var(--link); }
.brief__status:empty { display: none; }

/* ---------- Реквизиты ---------- */
.section--rekv { padding-top: clamp(8px, 2vw, 24px); }
.rekv {
  display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: end;
  padding: 10px clamp(20px, 3vw, 36px) 10px;
  background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--r-panel);
  box-shadow: 6px 6px 0 var(--shadow-c);
}
.rekv__list { margin: 0; }
.rekv__list > div {
  display: grid; grid-template-columns: minmax(150px, .5fr) minmax(0, 1fr); gap: 8px 24px;
  padding: 18px 0;
}
.rekv__list > div + div { border-top: 2px solid color-mix(in srgb, var(--line) 18%, transparent); }
.rekv__list dt { color: var(--text-2); font-weight: 600; }
.rekv__list dd { margin: 0; font-weight: 700; }
.rekv__list dd a { font-weight: 600; }
.rekv__kinds { display: grid; gap: 4px; }

/* Печать как настоящий оттиск: наклон, чернила ложатся на бумагу */
.rekv__stamp { display: block; justify-self: center; margin-bottom: 8px; border-radius: 50%; }
.stamp { display: block; width: 240px; height: auto; rotate: -8deg; opacity: .92; mix-blend-mode: multiply; }
.stamp__ink { fill: var(--stamp-ink); stroke: var(--stamp-ink); }
.stamp__ink text { stroke: none; font-family: var(--font-body); font-weight: 800; }
.stamp__big { font-size: 14.5px; letter-spacing: .02em; }
.stamp__small { font-size: 8.6px; }
.stamp__qr { fill: var(--qr-ink); }
.stamp__qr-bg { fill: var(--qr-bg); }
:root[data-theme="dark"] .stamp { mix-blend-mode: normal; opacity: .96; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stamp { mix-blend-mode: normal; opacity: .96; } }

/* ---------- Подвал ---------- */
.foot { border-top: 2px solid var(--line); padding-block: 28px 44px; font-size: .9375rem; color: var(--text-2); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }

/* ---------- Появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .icon-btn, .channel, .ai__tab, .pick span { transition: none; }
  .ai__panel.is-entering { animation: none; }
}

/* ---------- Планшет ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case--metrika { grid-column: 1 / -1; grid-row: auto; }
  .case--gerbs, .case--donnu, .case--lodki, .case--park { grid-column: auto; grid-row: auto; }
  .ai { grid-template-columns: minmax(0, 1fr); }
  .ai__tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 8px 10px 2px; margin-inline: -2px; }
  .ai__tab { flex: none; scroll-snap-align: start; }
  .support__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .js .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 2px solid var(--line);
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding: 14px 6px; border-radius: 0; font-size: 1.125rem; border-bottom: 2px solid color-mix(in srgb, var(--line) 15%, transparent); }
  .js .nav a:last-child { border-bottom: 0; }
  .js .nav-toggle { display: inline-grid; }
  .top__tg span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .top__tg { width: 44px; padding: 0; }

  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { max-width: 460px; width: 100%; margin-inline: auto; }
  .process, .about, .contact { grid-template-columns: minmax(0, 1fr); }
  .rekv { grid-template-columns: minmax(0, 1fr) 230px; }
  .stamp { width: 220px; }
  .process__side { position: static; max-width: 560px; }
  .ai__panel { grid-template-columns: minmax(0, 1fr); }
  .ai__visual { min-height: 0; aspect-ratio: 5 / 4; max-width: 520px; width: 100%; margin-inline: auto; }
  .ai__visual--phone { aspect-ratio: auto; }
}

/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  body { font-size: 1rem; }
  .top__row { height: 64px; }
  .brand__name { font-size: 1.45rem; }
  .hero { padding-top: 28px; }
  .hero__hello { font-size: 1rem; margin-bottom: 14px; }
  .hero__lead { margin-top: 18px; }
  .hero__cta { margin-top: 26px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .stack { width: min(100% - 16px, 360px); }
  .stack__shot--back { right: 0; }
  .stack__shot--front { left: 0; }
  .bubble { font-size: .9688rem; padding: 11px 14px; left: 0; }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .case--metrika { grid-column: auto; }
  .case__body { padding: 18px 18px 20px; }
  .case__fan { right: 14px; }
  .case__fan img { width: 76px; }
  .projects { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .project { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .support__list { grid-template-columns: minmax(0, 1fr); }
  .services { grid-template-columns: minmax(0, 1fr); }
  .service { grid-template-columns: 50px minmax(0, 1fr); column-gap: 16px; padding-block: 22px 24px; }
  .service__icon { width: 50px; height: 50px; padding: 11px; }
  .step { padding-left: 64px; }
  .step::before { width: 46px; height: 46px; font-size: 1.1rem; }
  .step:not(:last-child)::after { left: 22px; top: 46px; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .channel { grid-template-columns: 24px minmax(0, 1fr); row-gap: 0; }
  .channel__value { grid-column: 2; }
  .brief__actions .btn { flex: 1 1 100%; }
  .rekv { grid-template-columns: minmax(0, 1fr); padding-bottom: 24px; }
  .rekv__list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .stamp { width: 210px; }
}
