/* LAB412. Одна страница, одна нить.
   Роли по виду:
   - мысль: главный объект поля, заметно меньше главного вопроса;
   - доказательство: под мыслью кольцо-плюс, короткий ключ и мелкая подпись (вся пара открывает карточку);
   - линия: в поле тихий проводник, выразительная только на первом экране и в финале;
   - персиковый: приписки в карточках и подпись к фотографии. */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 100 900; 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: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; 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 {
  --bg: #191b19;
  --bg-up: #20231f;
  --ink: #efeee8;
  --ink-hi: #fbfaf5;
  --mute: rgba(239, 238, 232, .66);
  --dim: rgba(239, 238, 232, .5);
  --lime: #e4ed9a;
  --peach: #db9472;
  --paper: #f4f4f2;
  --thread: #8a9064;      /* лайм, смешанный с фоном: линии без прозрачности, чтобы не темнели на пересечениях */

  --m: clamp(20px, 5.6vw, 96px);            /* поле страницы */
  --fh: min(8.4vw, 124px);                  /* главный вопрос */
  --fq: min(9.4vw, 138px);                  /* слово-вопрос */
  --ft: clamp(28px, 3.3vw, 48px);           /* мысль */
  --fp: clamp(23px, 2.1vw, 31px);           /* ключ доказательства */
  --ring: 30px;                             /* кольцо-плюс */
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: none;                /* у кириллицы нет оптической оси: держим цифры и буквы в одном начертании */
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
body { margin: 0; font-size: 17px; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; }
b { font-weight: inherit; }
em, i { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--lime); color: var(--bg); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 3px; }
.nw { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------- Пространство и нити ---------- */

.space { position: relative; overflow: hidden; overflow: clip; }
.threads { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.hero, .q, .field { position: relative; z-index: 1; }
.hero, .q, .field, .cases { max-width: 1480px; margin-inline: auto; padding-inline: var(--m); padding-left: max(var(--m), env(safe-area-inset-left)); padding-right: max(var(--m), env(safe-area-inset-right)); }

.th { fill: none; stroke: var(--thread); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke .35s; }
.th.done { stroke-dasharray: none; }
.th--ghost { stroke: rgba(239, 238, 232, .07); stroke-dasharray: none; }
.th--side { stroke: #3d4033; }
/* Рисунок у мысли: тот же контур, что и линия. Штрихи проявляются по очереди один раз (задержки ставит скрипт) */
.sk path { fill: none; stroke: var(--thread); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.sk.on path { stroke-dashoffset: 0; opacity: 1; }
.sk.done path { transition: none !important; }
.nd { fill: var(--bg); stroke: var(--lime); stroke-width: 1.3; opacity: 0; transition: opacity .45s; }
.nd.on { opacity: 1; }
.measuring .nd { transition: none !important; }           /* при пересборке линии кружки не мигают */
.nd--dot { fill: var(--thread); stroke: none; }
.nd--end { fill: var(--lime); stroke: none; }

/* Появление вслед за нитью. Класс rv ставит скрипт, без него все видно сразу */
.rv { opacity: 0; transform: translateY(9px); transition: opacity .6s ease, transform .8s var(--ease); }
.rv.on { opacity: 1; transform: none; }
.measuring .rv { transform: none !important; transition: none !important; }



/* ---------- Первый экран ---------- */

.hero { min-height: 100vh; min-height: 100svh; padding-top: 22px; padding-bottom: 48px; }
.brand { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.brand__mark { margin: 0; font-size: 21px; font-weight: 680; letter-spacing: -.04em; line-height: 1.2; }
.brand__mark b { color: var(--lime); }
.brand__full { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--mute); text-align: right; }
.brand__full a { display: inline-block; padding-block: 12px; margin-block: -12px; color: inherit; text-decoration: none; transition: color .3s; }   /* область нажатия не меньше 44 px */
.brand__full a:hover, .brand__full a:focus-visible { color: var(--ink); }

.hero__main { margin-top: clamp(84px, 15.5vh, 172px); }
.hero__q { margin: 0 0 0 -.035em; font-size: var(--fh); line-height: .98; letter-spacing: -.052em; font-weight: 560; color: var(--ink-hi); }
.hero__q em { color: var(--lime); }
.hero__l2 { display: block; }
/* Слово-барабан в заголовке. Базовая линия держится на невидимом слове-мерке, остальные слова лежат поверх */
.swap { position: relative; display: inline-block; white-space: nowrap; }
.js .swap { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.js .swap { transition: width .6s var(--ease); clip-path: inset(-.1em -.08em -.24em -.08em); }
.js .swap__sizer { visibility: hidden; }
.swap__w { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(.62em); transition: transform .6s var(--ease), opacity .45s ease; }
.swap__w.is-on { opacity: 1; transform: none; }
.swap__w.is-out { opacity: 0; transform: translateY(-.62em); }
.hero__text { margin: clamp(26px, 4.6vh, 50px) 0 0; max-width: 36em; font-size: clamp(17px, 1.42vw, 20.5px); line-height: 1.5; color: var(--mute); }
.hero__text b { color: var(--ink); }
.nw { white-space: nowrap; }
.br-w { display: inline; }                                   /* перенос только на широком экране */
.hero__note { margin: clamp(20px, 3.4vh, 34px) 0 0; font-size: 15px; line-height: 1.5; color: var(--mute); }
.js .hero__note { animation: rise 1s var(--ease) both; animation-delay: .34s; }
.hero__go { margin: clamp(22px, 3.8vh, 40px) 0 0; font-size: 15px; }
.hero__go a { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--mute); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .42em; text-decoration-color: rgba(239, 238, 232, .28); transition: color .3s; }
.hero__go a::after { content: ""; width: 9px; height: 13px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 13' fill='none' stroke='%23e4ed9a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 1v11M1 8.5 4.5 12 8 8.5'/%3E%3C/svg%3E"); transition: transform .4s var(--ease); }
.hero__go a:hover { color: var(--ink); }
.hero__go a:hover::after { transform: translateY(4px); }

/* Путь идеи. Без скрипта это обычная строка, со скриптом подписи стоят вдоль нити */
.way { list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13.5px; color: var(--mute); }
.way__fail { color: var(--peach); }
.way__ok { color: var(--lime); }
.js .way { display: block; position: absolute; margin: 0; left: 50%; right: var(--m); top: 46%; bottom: 5%; }
.js .way li { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 0; height: 0; white-space: nowrap; line-height: 1; }
.js .way li span { position: absolute; left: var(--dx, 12px); top: var(--dy, -.5em); }
.js .way li.to-l span { left: auto; right: var(--dx, 12px); }
.js .way li:nth-child(1) { --x: 80; --y: 14;  --dx: 14px; }
.js .way li:nth-child(2) { --x: 58; --y: 37;  --dx: -6px; --dy: 14px; }
.js .way li:nth-child(3) { --x: 34; --y: 47;  --dx: -94px; --dy: -25px; }
.js .way li:nth-child(4) { --x: 9;  --y: 60;  --dx: -76px; --dy: -.5em; }
.js .way li:nth-child(5) { --x: 20; --y: 85;  --dx: -14px; --dy: 14px; }
.js .way li:nth-child(6) { --x: 52; --y: 86;  --dx: -30px; --dy: -24px; }
.js .way li:nth-child(7) { --x: 84; --y: 96;  --dx: 14px; }


/* ---------- Вопрос и то, что из него растет ---------- */

.q { padding-top: clamp(130px, 21vh, 230px); }
.q__word { margin: 0 0 0 -.04em; font-size: var(--fq); line-height: .94; letter-spacing: -.055em; font-weight: 520; color: var(--lime); }
.q__word b, .q__word em { color: var(--lime); }
.q__pre { display: block; margin: 0 0 .62em .2em; font-size: clamp(18px, 1.7vw, 25px); line-height: 1.2; letter-spacing: -.015em; font-weight: 400; color: var(--lime); opacity: .8; }
.q__line { display: block; }









/* Поле ходов мысли. Мысль - главный объект, под ней тихое доказательство: кольцо-плюс, короткий ключ, подпись.
   Кружок мысли и кольцо доказательства стоят на линии; на широком экране мысли разнесены по горизонтали. */
.field { padding-top: clamp(130px, 22vh, 240px); }
.moves { list-style: none; margin: 0; padding: 0; }
.move + .move { margin-top: clamp(200px, 33vh, 340px); }
.move__a { display: block; max-width: 44rem; text-decoration: none; border-radius: 8px; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .move__a:active, .index__list a:active, .all a:active { opacity: .7; } }   /* отклик на касание */
.move__when { display: block; padding-left: 29px; margin: 0 0 .85em; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.4; color: var(--mute); }
.move__t { display: block; padding-left: 29px; font-size: var(--ft); line-height: 1.08; letter-spacing: -.035em; font-weight: 500; color: rgba(239, 238, 232, .93); text-wrap: balance; transition: color .3s; }
.proof { display: grid; grid-template-columns: var(--ring) auto minmax(0, 1fr); column-gap: 13px; align-items: center; margin: clamp(16px, 2.4vh, 26px) 0 0 -13px; }
.proof__key { font-size: var(--fp); line-height: 1.1; letter-spacing: -.035em; font-weight: 560; color: var(--ink); white-space: nowrap; transition: color .3s; }
.proof__cap { font-size: 15px; line-height: 1.35; color: var(--mute); transition: color .3s; }
.proj__plus { position: relative; width: var(--ring); height: var(--ring); border: 1.3px solid var(--lime); border-radius: 50%; background: var(--bg); color: var(--lime); transition: background .3s, color .3s, transform .5s var(--ease); }
.proj__plus::before, .proj__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.3px; margin: -.65px 0 0 -5.5px; background: currentColor; border-radius: 1px; }
.proj__plus::after { transform: rotate(90deg); }
/* Наведение: спокойно подсвечивается вся пара */
.move__a:hover .move__t, .move__a:focus-visible .move__t { color: var(--ink-hi); }
.move__a:hover .proj__plus, .move__a:focus-visible .proj__plus { background: var(--lime); color: var(--bg); transform: rotate(90deg); }
.move__a:hover .proof__key, .move__a:focus-visible .proof__key { color: var(--lime); }
.move__a:hover .proof__cap, .move__a:focus-visible .proof__cap { color: var(--ink); }
.move__a:focus-visible { outline-offset: 12px; }
.js .move:nth-child(7n+1) { margin-left: 6%; }
.js .move:nth-child(7n+2) { margin-left: 44%; }
.js .move:nth-child(7n+3) { margin-left: 20%; }
.js .move:nth-child(7n+4) { margin-left: 48%; }
.js .move:nth-child(7n+5) { margin-left: 10%; }
.js .move:nth-child(7n+6) { margin-left: 40%; }
.js .move:nth-child(7n) { margin-left: 24%; }

.all { margin: clamp(170px, 28vh, 300px) 0 0; padding-left: 29px; font-size: 15.5px; }
.all a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mute); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .42em; text-decoration-color: rgba(239, 238, 232, .28); transition: color .3s; }
.all a:hover { color: var(--ink); }

.idea { margin: 0; }

/* Перечень всех проектов: справочный слой, не витрина */
.index { max-width: 43rem; margin: 0 0 88px; }
.index__title { margin: 0; font-size: 14px; font-weight: 400; color: var(--mute); }
.index__list { list-style: none; margin: 22px 0 0; padding: 0; }
.index__list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: baseline; padding: 13px 0; text-decoration: none; }
.index__name { grid-column: 1; font-size: 19px; line-height: 1.25; letter-spacing: -.02em; font-weight: 520; color: var(--ink-hi); transition: color .3s; }
.index__line { grid-column: 1; margin-top: 3px; font-size: 15px; line-height: 1.4; color: var(--mute); }
.index__year { grid-column: 2; grid-row: 1; font-size: 13.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.index__list a:hover .index__name, .index__list a:focus-visible .index__name { color: var(--lime); }
.card__in .index { margin: 0; max-width: none; }
.card__in .index__title { min-height: 44px; display: flex; align-items: center; padding-right: 60px; }
.card__in .index__list { margin-top: 18px; }
.card__in:focus { outline: none; }

/* ---------- Перечень и проекты: список без скрипта ---------- */
.cases { padding-top: 96px; }
.js .cases { display: none; }
.case { max-width: 43rem; margin: 0 0 88px; }
.case__meta { margin: 0; font-size: 14px; color: var(--mute); }
.case__title { margin: 14px 0 0 -.03em; font-size: clamp(30px, 3.1vw, 44px); line-height: 1.06; letter-spacing: -.04em; font-weight: 560; color: var(--ink-hi); text-wrap: balance; }
.case__text { margin: 24px 0 0; font-size: clamp(16.5px, 1.25vw, 18px); line-height: 1.56; color: rgba(239, 238, 232, .86); }
.case__text + .case__text { margin-top: .85em; }
.facts { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 26px 28px; }
.facts li { max-width: 15em; font-size: 14.5px; line-height: 1.35; color: var(--mute); }
.facts b { display: block; margin-bottom: 7px; font-size: clamp(26px, 2.3vw, 33px); line-height: 1.04; letter-spacing: -.04em; font-weight: 560; color: var(--ink-hi); }
.case__fig { margin: 38px 0 0; display: grid; gap: 12px; }
.case__fig img { width: 100%; border-radius: 6px; background: #2a2d29; }
.case__ps { margin: 30px 0 0; font-size: 14px; line-height: 1.45; color: var(--mute); }
.case__ps a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.case__more { margin: 34px 0 0; font-size: 14.5px; }
.case__more a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--mute); text-decoration: none; transition: color .3s; }
.case__more a::after { content: ""; width: 9px; height: 9px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' fill='none' stroke='%23e4ed9a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 8 8 1M2.5 1H8v5.5'/%3E%3C/svg%3E"); }
.case__more a:hover { color: var(--lime); }

/* ---------- Карточка проекта ---------- */

.card { position: fixed; inset: 0 0 0 auto; width: min(660px, 52vw); height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg-up); color: var(--ink); overflow: hidden; box-shadow: -1px 0 0 rgba(228, 237, 154, .14), -50px 0 90px rgba(0, 0, 0, .4); }
.card::backdrop { background: rgba(17, 19, 17, .66); }
.card[open] { animation: card-in .5s var(--ease) both; }
.card[open]::backdrop { animation: fade-in .4s ease both; }
.card.is-closing { animation: card-out .22s ease both; }
.card.is-closing::backdrop { animation: fade-out .22s ease both; }
.card__in { height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 30px clamp(26px, 4vw, 56px) 56px; }
.card__in .case { margin: 0; max-width: none; }
.card__in .case__meta { min-height: 44px; display: flex; align-items: center; padding-right: 60px; }
.card__in .case__title { margin-top: 30px; }
.card__x { position: absolute; z-index: 2; top: 30px; right: clamp(26px, 4vw, 56px); width: 44px; height: 44px; padding: 0; border: 1.3px solid var(--lime); border-radius: 50%; background: var(--bg-up); color: var(--lime); cursor: pointer; transition: background .3s, color .3s, transform .5s var(--ease); }
.card__x::before, .card__x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 1.3px; margin: -.65px 0 0 -7.5px; background: currentColor; transform: rotate(45deg); }
.card__x::after { transform: rotate(-45deg); }
.card__x:hover { background: var(--lime); color: var(--bg); transform: rotate(90deg); }
.card__x:focus-visible { outline-offset: 3px; border-radius: 50%; }
html.card-open { overflow: hidden; }
@keyframes card-in { from { transform: translateX(48px); opacity: 0; } }
@keyframes card-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- О лаборатории ---------- */

.q--about .q__word { font-size: calc(var(--fq) * .86); color: var(--ink-hi); }
.q--about .q__pre { color: var(--mute); opacity: 1; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 41%); column-gap: 9%; align-items: start; margin: clamp(44px, 7vh, 76px) 0 0 12%; }
.about__say .idea { max-width: 23em; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.42; letter-spacing: -.012em; color: rgba(239, 238, 232, .9); }
.about__say .idea + .idea { margin-top: 1.7em; }
.about__me { margin: 0; rotate: -3deg; }
.about__me img { width: 100%; border-radius: 0; background: #2a2d29; filter: saturate(.7); }
.about__me figcaption { margin-top: 15px; font-size: 12px; line-height: 1.5; letter-spacing: .01em; color: var(--mute); }

.why { margin-top: 2.4em; }
.why summary { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; list-style: none; cursor: pointer; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.why summary::-webkit-details-marker { display: none; }
.why__q { font-size: clamp(19px, 1.6vw, 23px); letter-spacing: -.02em; color: var(--lime); }
.why summary::after { content: ""; flex: none; width: 22px; height: 22px; border: 1.3px solid var(--lime); border-radius: 50%; background: no-repeat center/10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' stroke='%23e4ed9a' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M5 .5v9M.5 5h9'/%3E%3C/svg%3E"); transition: transform .5s var(--ease); }
.why[open] summary::after { transform: rotate(45deg); }
.js .why[open] .why__a { animation: fade-in .4s ease both; }
.why p { margin: 10px 0 0; max-width: 29em; font-size: 16.5px; line-height: 1.5; color: var(--mute); }
.why p + p { margin-top: .8em; }

/* ---------- Финал ---------- */

.q--end { padding-bottom: 28px; }
.q--end .q__word { font-size: calc(var(--fh) * .76); line-height: 1; color: var(--ink-hi); letter-spacing: -.05em; font-weight: 560; }
.q--end .q__pre { color: var(--mute); opacity: 1; }
.when { list-style: none; margin: clamp(44px, 7vh, 76px) 0 0 12%; padding: 0; }
.when .idea { max-width: 40em; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.42; letter-spacing: -.012em; color: rgba(239, 238, 232, .9); }
.when .idea + .idea { margin-top: 1.05em; }
.end { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin: clamp(44px, 7vh, 72px) 0 0 12%; }
.btn { display: inline-flex; align-items: center; gap: 16px; height: 64px; padding: 0 30px 0 34px; border-radius: 32px; background: var(--lime); color: #171917; font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; transition: background .3s, transform .5s var(--ease); }
.btn::after { content: ""; width: 12px; height: 12px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23171917' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 10.5 10.5 1.5M3.5 1.5h7v7'/%3E%3C/svg%3E"); transition: transform .4s var(--ease); }
.btn:hover { background: #eef5ae; }
.btn:hover::after { transform: translate(2px, -2px); }
.btn:focus-visible { outline-offset: 5px; border-radius: 32px; }
.end__or { margin: 0 0 0 34px; font-size: 15px; line-height: 1.5; color: var(--mute); }
.end__or a { display: inline-block; padding: 12px 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--dim); transition: color .3s; }
.end__or a:hover { color: var(--ink); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 28px; margin: clamp(120px, 24vh, 240px) 0 0; font-size: 13.5px; color: var(--mute); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: color .3s; }
.foot a:hover { color: var(--ink); }
.foot__me::after { content: ""; width: 9px; height: 9px; margin-left: 9px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='%23e4ed9a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 8.5 8.5 1.5M3 1.5h5.5V7'/%3E%3C/svg%3E"); }
.foot__up::after { content: ""; width: 9px; height: 13px; margin-left: 10px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 13' fill='none' stroke='%23e4ed9a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12V1M1 4.5 4.5 1 8 4.5'/%3E%3C/svg%3E"); }

/* Вход первого экрана */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.js .brand, .js .hero__q, .js .hero__text, .js .hero__go { animation: rise 1s var(--ease) both; }
/* Главный вопрос появляется без сдвига: от его вопросительного знака отсчитывается начало нити */
.js .hero__q { animation-name: fade-in; animation-delay: .08s; }
.js .hero__text { animation-delay: .22s; }
.js .hero__go { animation-delay: .34s; }

/* ---------- Узкий экран: одна колонка, нить идет по левому краю ---------- */

@media (max-width: 999px) {
  .br-w { display: none; }
  :root {
    --fh: clamp(36px, 10.5vw, 78px);
    --fq: clamp(50px, 16vw, 108px);
    --ft: clamp(25px, 6.9vw, 42px);
    --fp: 24px;
  }
  .hero { min-height: 0; padding-top: 18px; padding-bottom: 0; }
  .brand { align-items: center; }
  .brand__full { max-width: 15.5em; font-size: 11.5px; }
  .hero__main { margin-top: clamp(64px, 11.5vh, 120px); padding-right: 22px; }
  .hero__text { font-size: 17px; max-width: 27em; }

  .js .way { position: relative; left: auto; right: auto; top: auto; bottom: auto; height: 400px; max-width: 480px; margin: 18px 0 0; }
  .js .way li:nth-child(1) { --x: 40; --y: 19;  --dx: -8px; --dy: 13px; }
  .js .way li:nth-child(2) { --x: 24; --y: 33;  --dx: -76px; --dy: -.5em; }
  .js .way li:nth-child(3) { --x: 44; --y: 44;  --dx: -4px; --dy: -24px; }
  .js .way li:nth-child(4) { --x: 78; --y: 55;  --dx: 26px; --dy: -.5em; }
  .js .way li:nth-child(5) { --x: 62; --y: 71;  --dx: -60px; --dy: -1.3em; }
  .js .way li:nth-child(6) { --x: 30; --y: 81;  --dx: 12px; --dy: 10px; }
  .js .way li:nth-child(7) { --x: 0;  --y: 93;  --dx: 16px; --dy: -.5em; }
  .js .way li:nth-child(7) { left: 2px; }

  .q { padding-top: clamp(84px, 13vh, 130px); }
  .q__pre { margin-bottom: .5em; font-size: 18px; }
  .q--about .q__word { font-size: calc(var(--fq) * .8); }
  .field { padding-top: clamp(64px, 10vh, 110px); }
  .move + .move { margin-top: 104px; }
  .move[data-sketch] { padding-bottom: 176px; }               /* место под рисунок: на узком экране он стоит под парой */
  .js .move:nth-child(n) { margin-left: 0; }
  .proof { grid-template-columns: var(--ring) minmax(0, 1fr); column-gap: 12px; margin-top: 16px; }
  .proof__cap { grid-column: 2; margin-top: 4px; }
  .all { margin-top: 104px; }
  .idea { padding: 0 0 0 29px; max-width: 21em; }
  .q--end .q__word { font-size: var(--fh); }


  .about { display: block; margin: 36px 0 0; }
  .about__say .idea { font-size: 18px; max-width: 27em; }
  .why { padding-left: 29px; margin-top: 1.6em; }
  .about__me { margin: 34px 0 0 29px; max-width: 520px; rotate: -2deg; }

  .when { margin: 34px 0 0; }
  .when .idea { font-size: 18px; max-width: 27em; }
  .end { margin: 38px 0 0; padding-left: 29px; gap: 8px; }
  .end__or { margin-left: 4px; }
  .btn { height: 60px; font-size: 19px; }
  .foot { margin-top: 110px; font-size: 13px; }

  .cases { padding-top: 64px; }
  .card { width: 100%; inset: 0; box-shadow: none; }
  .card__in { padding: 14px 20px 48px; }
  .card__x { top: 14px; right: 16px; }
  .card__in .case__title { margin-top: 18px; }
  @keyframes card-in { from { transform: translateY(40px); opacity: 0; } }
  @keyframes card-out { to { transform: translateY(28px); opacity: 0; } }
}

/* Планшет и узкие окна: чуть больше воздуха слева */
@media (min-width: 600px) and (max-width: 999px) {
  :root { --m: 44px; }
  .about__say .idea, .hero__text { font-size: 19px; }
}

/* ---------- Без движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* На узком экране «до» уходит на вторую строку: первая строка не должна переноситься при смене слова */
@media (max-width: 999px) {
  .hero__do::before { content: "\A"; white-space: pre; }
  .hero__l2 { display: inline; }
  .move__when { font-size: 15px; margin-bottom: .7em; }
}

/* ---------- Телефон: своя компоновка, а не ужатый десктоп ----------
   Заголовки подогнаны по ширине экрана: число в делителе - ширина самой длинной строки в размерах шрифта (с запасом).
   Линия на первом экране входит из-за правого края под текстом и не идет рядом с ним (см. buildHero в js/lab.js). */
@media (max-width: 599px) {
  :root { --cw: calc(100vw - 2 * var(--m)); }                /* ширина колонки текста */

  .brand__full { font-size: 12px; }
  /* Первый экран: только заголовок и подзаголовок, чуть выше середины, и самое начало линии внизу справа.
     Нижний отступ - место под это начало: js/lab.js берет его величину и оттуда выводит линию */
  .hero { padding-top: 0; }
  .brand { position: absolute; top: 18px; left: var(--m); right: var(--m); z-index: 1; }
  .hero__main { box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; margin-top: 0; padding-right: 0;
    min-height: 100vh; min-height: 100svh; padding-top: 76px;
    padding-bottom: clamp(140px, 24vh, 200px); padding-bottom: clamp(140px, 24svh, 200px); }
  .hero__q { font-size: calc(var(--cw) / 8.9); line-height: 1.03; }      /* «работающей вещи.» ровно во всю ширину */
  .hero__do::before { content: none; }
  .hero__l2 { display: block; white-space: nowrap; }
  .hero__text { margin-top: 26px; max-width: none; font-size: calc(var(--cw) / 17.3); line-height: 1.45; text-wrap: pretty; }   /* около 20 px на экране 390 px, растет вместе с экраном: переносы везде одинаковые */
  /* Второй экран: путь линии. Вместе с отступом поля занимает экран целиком, первый кейс начинается после него */
  .js .way { height: clamp(430px, 80vh, 620px); height: clamp(430px, 80svh, 620px); margin-top: 0; font-size: 15px; }
  .field { padding-top: 20vh; padding-top: 20svh; }
  .js .way li:nth-child(1) { --x: 33; --y: 20; --dx: 14px; --dy: 12px; }   /* первая станция стоит на продолжении входящей линии */
  .js .way li:nth-child(2) { --dx: -90px; }                    /* подпись крупнее: отодвигаем от точки */

  .move__t { text-wrap: balance; }
  .move__when, .proof__cap { text-wrap: pretty; }

  .q--about .q__word { font-size: calc(var(--cw) / 7.85); white-space: nowrap; }   /* «Лаборатория 412» в одну строку */
  .about { display: flex; flex-direction: column; margin-top: 36px; }
  .about__me { order: -1; margin: 0 0 40px 29px; }                                 /* фото сразу под заголовком */

  .q--end .q__word { font-size: calc(var(--cw) / 9.25); line-height: 1.03; }       /* «Давайте поговорим» в одну строку */
  .q--end .q__line { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .js .swap, .swap__w { transition: none; }
}
