/* Эскиз 3 bloger.aventon.ru: мозаика блогеров, road map, стопка карточек, подвал с выезжающим логотипом.
   Палитра — со слайдов и логотипа Aventono, как в base.css. base.css не подключаем:
   его overflow:hidden на section ломает position:sticky у стопки. */
:root {
  --ink: #1B1535;
  --violet: #6A35BF;
  --electric: #6332F8;
  --yellow: #FCD06C;
  --cream: #FBF5E6;
  --paper: #FFFDF8;
  --muted: #575170;
  --line: rgba(27, 21, 53, .18);
  --cond: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --serif: 'Noto Serif Display', Georgia, serif;
  --text: 'Golos Text', system-ui, sans-serif;
  --head: 64px;
  --fold: 96px;
  --pad: clamp(16px, 2.8vw, 40px);
}
@media (max-width: 820px) {
  :root { --head: 56px; --fold: 76px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.5 var(--text); overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, ul, ol, h1, h2, h3, fieldset { margin: 0; padding: 0; border: 0; }
ul, ol { list-style: none; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: calc(var(--head) + 8px); }
:focus-visible { outline: 3px solid var(--electric); outline-offset: 3px; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn { display: inline-block; padding: 15px 28px; border: 0; border-radius: 99px; background: var(--yellow); color: var(--ink);
  font: 600 17px/1.2 var(--text); text-decoration: none; text-align: center; cursor: pointer; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn--full { width: 100%; }
.link { font-weight: 500; text-underline-offset: 4px; }

.h2 { font: 800 clamp(46px, 6.2vw, 92px)/.95 var(--cond); }
.h2 em { font: italic 400 .84em/1 var(--serif); font-stretch: 80%; color: var(--electric); }

/* Шапка */
.hd { position: sticky; top: 0; z-index: 20; height: var(--head); background: var(--cream); border-bottom: 1px solid var(--line); }
.hd__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.hd__logo img { width: 148px; height: auto; }
.hd__nav { display: flex; gap: 28px; margin-left: auto; font-weight: 500; font-size: 15px; }
.hd__nav a { text-decoration: none; }
.hd__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 820px) {
  .hd__nav { display: none; }
  .hd__logo img { width: 124px; }
}

/* Первый экран: заголовок слева, мозаика справа */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px);
  height: calc(100svh - var(--head)); min-height: 680px; max-height: 980px; padding-left: max(var(--pad), calc((100vw - 1360px) / 2 + var(--pad))); overflow: hidden; }
.hero__text { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-width: 0; min-height: 0; padding-block: 16px; }
.h1 { font: 800 clamp(56px, min(7.2vw, 11.2vh), 112px)/.88 var(--cond); text-transform: uppercase; }
.h1 span, .h1 em { display: block; }
.h1 em { margin: .06em 0 .02em; font: italic 400 .66em/1.08 var(--serif); font-stretch: 80%; text-transform: none; white-space: nowrap; color: var(--electric); }
.hero__lead { max-width: 54ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.45; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.facts { grid-area: 2 / 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
.facts b { display: block; font: 800 clamp(34px, 3.4vw, 50px)/1 var(--cond); }
.facts span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.3; color: var(--muted); }

.mosaic { --tile: clamp(110px, 15.4vw, 240px); --gap: 14px; grid-area: 1 / 2 / 3 / 2; display: flex; gap: 16px; min-height: 0; padding-right: clamp(16px, 2.2vw, 32px); }
.mosaic__col { flex: none; width: var(--tile); overflow: hidden; }
.mosaic__track { display: flex; flex-direction: column; gap: var(--gap); padding-bottom: var(--gap);
  animation: var(--dir) calc(var(--n) * 17.5s) linear infinite; animation-delay: var(--start); will-change: transform; }
.mosaic:hover .mosaic__track { animation-play-state: paused; }
@keyframes mos-up { to { transform: translateY(-50%); } }
@keyframes mos-down { from { transform: translateY(-50%); } to { transform: none; } }

.tile { position: relative; flex: none; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px; background: var(--ink); }
.tile video { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .hero { display: block; height: auto; min-height: 0; max-height: none; padding-left: 0; }
  .hero__text { padding: 24px var(--pad) 24px; gap: 18px; }
  .h1 { font-size: clamp(56px, 19vw, 132px); }
  .h1 em { font-size: .56em; }
  .facts { gap: 12px; margin: 24px var(--pad) 28px; }
  .mosaic { --tile: auto; --gap: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; height: 420px; padding: 0 8px; }
  .mosaic__col { width: auto; }
  .tile { border-radius: 10px; }
}

/* Road map: змейка на широком экране, вертикальная линия на узком */
.rm { padding-block: clamp(56px, 7vw, 112px); background: var(--paper); }
.rm__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 3.6vw, 52px); }
.legend { display: flex; align-items: center; gap: 12px; max-width: 280px; font-size: 15px; line-height: 1.3; }
.legend i { flex: none; width: 34px; height: 34px; border: 5px solid var(--electric); border-radius: 50%; background: var(--yellow); }
.rm__map { position: relative; }
.rm__line { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; pointer-events: none; }
.rm__line path { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.rm__list { position: relative; display: grid; gap: 22px; }
.rm__step { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.rm__node { display: grid; place-items: center; height: 76px; }
.rm__dot { display: grid; place-items: center; width: 50px; height: 50px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); font: 800 26px/1 var(--cond); }
.is-you .rm__dot { width: 76px; height: 76px; border: 7px solid var(--electric); background: var(--yellow); font-size: 36px; }
.rm__cap { min-width: 0; padding-top: 8px; }
.rm__phase { display: block; font-size: 12px; font-weight: 600; line-height: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet); }
.rm__phase:empty { display: none; }
.rm__cap h3 { font: 800 32px/1.05 var(--cond); }
.is-you h3 { color: var(--electric); }
.rm__cap p { margin-top: 3px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.rm__end { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; }
.rm__end .btn { grid-column: 1 / -1; justify-self: start; }
.rm__end .rm__node { display: contents; }

@media (min-width: 1000px) {
  .rm__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 0; }
  .rm__step, .rm__end { display: flex; flex-direction: column; align-items: center; grid-row: var(--r); grid-column: var(--c); text-align: center; }
  .rm__node { width: 100%; height: 88px; }
  .is-you .rm__dot { width: 88px; height: 88px; font-size: 40px; }
  .rm__dot { width: 56px; height: 56px; font-size: 28px; }
  .rm__cap { max-width: 216px; padding-top: 6px; }
  .rm__phase:empty { display: block; min-height: 18px; }
  .rm__end .rm__node { display: grid; }
  .rm__end .btn { justify-self: center; }
}

/* Стопка: карточки наезжают друг на друга, от каждой остаётся полоска --fold */
.gr { padding-bottom: clamp(56px, 7vw, 112px); background: var(--paper); }
.gr__head { margin-bottom: clamp(24px, 3vw, 44px); }
.stack { --card: clamp(420px, calc(100svh - var(--head) - 3 * var(--fold) - 12px), 560px); }
.card { position: sticky; top: calc(var(--head) + var(--i) * var(--fold)); display: grid;
  grid-template-columns: 84px minmax(0, 1fr) clamp(200px, 20vw, 280px) 150px; grid-template-rows: var(--fold) auto minmax(0, 1fr);
  column-gap: 20px; height: var(--card); background: var(--paper); border-top: 2px solid var(--ink); }
.card__num { grid-area: 1 / 1; align-self: center; display: grid; place-items: center; width: 68px; height: 68px; background: var(--ink); color: var(--yellow); font: 800 40px/1 var(--cond); }
.card__title { grid-area: 1 / 2; align-self: center; min-width: 0; font: 800 clamp(34px, 3.75vw, 54px)/1 var(--cond); }
.card__text { grid-area: 2 / 2; max-width: 24em; font: 400 clamp(22px, 2.3vw, 32px)/1.22 var(--serif); font-stretch: 85%; }
.card__text::first-letter { text-transform: uppercase; }
.card__pic { grid-area: 1 / 3 / 4 / 3; min-height: 0; margin: 14px 0; overflow: hidden; border-radius: 10px; }
.card__pic img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.card__tag { grid-area: 1 / 4; padding-top: 16px; font-size: 13px; font-weight: 600; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase; }
.card__dots { grid-area: 3 / 2; align-self: end; height: 42px; margin-bottom: 14px; background: radial-gradient(circle, var(--yellow) 3.5px, transparent 4px) 0 0 / 14px 14px round; }

@media (max-width: 820px) {
  .stack { --card: clamp(380px, calc(100svh - var(--head) - 3 * var(--fold) - 8px), 470px); }
  .card { grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: var(--fold) auto minmax(0, 1fr) auto; column-gap: 12px; }
  .card__num { width: 48px; height: 48px; font-size: 30px; }
  .card__title { font-size: 29px; line-height: 1; }
  .card__text { grid-area: 2 / 1 / 2 / -1; padding-bottom: 12px; font-size: 22px; }
  .card__pic { grid-area: 3 / 1 / 3 / -1; margin: 0 0 12px; }
  .card__pic img { object-position: center 18%; }
  .card__tag { display: none; }
  .card__dots { grid-area: 4 / 1 / 4 / -1; height: 14px; margin-bottom: 0; }
}

/* Заявка */
.cta { padding-block: clamp(56px, 7vw, 112px); background: var(--ink); color: var(--cream); }
.cta__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 6vw, 96px); }
.cta__h2 { font: 800 clamp(54px, 7.4vw, 112px)/.92 var(--cond); }
.cta__h2 em { display: block; margin-top: .08em; font: italic 400 .8em/1.05 var(--serif); font-stretch: 80%; color: var(--yellow); }
.cta__contacts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; font-weight: 500; }
.cta :focus-visible { outline-color: var(--yellow); }
.form { display: grid; gap: 18px; min-width: 0; }
.form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.role { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role label { position: relative; cursor: pointer; }
.role input { position: absolute; opacity: 0; }
.role span { display: block; padding: 11px 8px; border: 1.5px solid rgba(251, 245, 230, .45); border-radius: 99px; text-align: center; font-size: 15px; font-weight: 500; }
.role input:checked + span { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.role input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.field { display: block; min-width: 0; }
.field span { display: block; font-size: 13px; opacity: .75; }
.field input, .field select { width: 100%; padding: 8px 0 10px; border: 0; border-bottom: 1.5px solid rgba(251, 245, 230, .45); border-radius: 0; background: transparent; }
.field select option { color: var(--ink); }
.field input::placeholder { color: rgba(251, 245, 230, .5); }
.fn { font-size: 12px; line-height: 1.4; opacity: .7; }
.proto-msg { display: none; font-size: 14px; }
.proto-msg.is-on { display: block; }
@media (max-width: 820px) {
  .cta__in { grid-template-columns: minmax(0, 1fr); }
}

/* Подвал: логотип выезжает из-под линии — сдвиг считает v3.js */
.ft { background: var(--yellow); }
.ft__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 28px 24px; padding-block: clamp(36px, 4.6vw, 68px); }
.ft__cols h3 { margin-bottom: 8px; font: 800 26px/1.1 var(--cond); }
.ft__cols li { padding-block: 2px; font-size: 15px; line-height: 1.35; }
.ft__cols a { text-underline-offset: 3px; }
.ft__cols small { display: block; font-size: 13px; opacity: .72; }
.ft__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 32px; padding-block: 12px; border-top: 1.5px solid var(--ink); font-size: 13px; line-height: 1.35; }
.ft__giant { padding-bottom: var(--pad); overflow: hidden; border-top: 1.5px solid var(--ink); }
.ft__giant img { width: 100%; height: auto; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mosaic__track { animation: none; }
  .mosaic__col:nth-child(2) .mosaic__track { transform: translateY(-120px); }
  .btn { transition: none; }
}
