/* Home page (RU + EN). Hand-built, frame for frame with the 28.11 export.
   Measurements @1440 / 375 are in docs/SYSTEM.md section 8. Page-only classes: .h-* .home-* */

.container-pad { padding-inline: var(--pad); }

/* ---------- hero ---------- */
.hero--home { padding: 64px 0 47px; }
.hero--home .hero__title { font-size: 52px; line-height: 57.2px; letter-spacing: -2.08px; text-wrap: initial; }
.hero__line { display: block; }
.hero__line--role { margin-top: 13px; }
.hero--home .hero__avatar {
  display: inline-block; width: 58px; height: 58px; margin: 0 0 0 10px; vertical-align: top; border-radius: 50%;
  object-fit: cover; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .24)); cursor: pointer; -webkit-user-drag: none;
}
.hero--home .hero__sub { margin-top: 24px; font-size: 32px; line-height: 35.2px; letter-spacing: -1.28px; text-wrap: initial; }
.hero--home .has-popover { vertical-align: -6px; margin-left: 9px; }
.hero--home .hero__icon-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 8px; }
.hero--home .hero__icon { display: block; width: 33px; height: 33px; margin: 0; border-radius: 8px; transition: transform .3s var(--ease); }
/* 28.11: own hover effects (no Framer): smooth lift + scale, soft shadow; confetti on the avatar comes from home.js */
.hero--home .hero__icon { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.hero--home .hero__icon-btn:hover .hero__icon, .hero--home .hero__icon-btn:focus-visible .hero__icon { transform: translateY(-3px) scale(1.12); box-shadow: 0 6px 14px rgba(0, 0, 0, .16); }
.hero--home .hero__avatar { position: relative; z-index: 2; transition: transform .4s cubic-bezier(.2, .8, .2, 1), filter .4s; will-change: transform; }
.hero--home .hero__avatar:hover { transform: translateY(-6px) scale(1.15); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .22)); }
@media (prefers-reduced-motion: reduce) { .hero--home .hero__avatar, .hero--home .hero__icon { transition: none; } }
.hero__comma { margin-left: 1px; }
@media (max-width: 809.98px) {
  .hero--home { padding: 64px 0 48px; text-align: left; }
  .hero--home .hero__title { font-size: 44px; line-height: 48px; letter-spacing: -1.76px; }
  .hero--home .hero__title .hero__line--role { margin-top: 0; text-wrap: balance; }
  html[lang="ru"] .hero--home .hero__title { font-size: 36px; line-height: 40px; letter-spacing: -1.44px; }
  html[lang="ru"] .hero--home .hero__avatar { width: 34px; height: 34px; margin-left: 6px; }

  .hero--home .hero__avatar { width: 48px; height: 48px; margin-left: 10px; }
  .hero--home .hero__sub { margin-top: 24px; font-size: 24px; line-height: 26.4px; letter-spacing: -0.96px; }
  .hero--home .has-popover { margin-left: 7px; vertical-align: -8px; }
  .hero--home .hero__icon { width: 32px; height: 32px; }
}

/* ---------- gray bands ---------- */
.home-band { --bp: var(--pad); background: var(--color-plate); border-radius: 32px; overflow: hidden; padding: 48px 0; }
.home-hint { display: none; }
.home-track {
  display: flex; gap: 24px; overflow-x: auto; padding-inline: var(--bp); scrollbar-width: none; overscroll-behavior-x: contain;
}
.home-track::-webkit-scrollbar { display: none; }
.home-track > * { flex: none; }
.home-track.is-dragging { cursor: grabbing; user-select: none; }
.home-track.is-dragging * { pointer-events: none; }
.home-phone { width: 300px; aspect-ratio: 300 / 650; border-radius: 24px; overflow: hidden; background: #fff; }
.home-phone img, .home-phone video, .home-slide img, .home-slide video { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-slide { border-radius: 24px; overflow: hidden; background: #fff; }
.home-slide--pulse { width: 960px; aspect-ratio: 16 / 9; }
.home-band--ds .home-track { gap: 48px; }
.home-slide--dsv { width: 948px; height: 540px; }
.home-slide--ds2 { width: 985px; height: 540px; }
.home-slide--ds3 { width: 839px; height: 540px; }
.home-slide--hotel { height: 650px; aspect-ratio: var(--ar); }
.home-slide--board { width: 1184px; aspect-ratio: 1184 / 720; border-radius: 0; background: transparent; }
.home-band--board { padding-bottom: 0; }
.home-band--collage, .home-band--video { margin-top: 48px; }

/* hero bento */
.home-bento { display: grid; grid-template-columns: 424fr 424fr 288fr; gap: 24px; }
.home-bento__col { display: contents; }
.home-cell { border-radius: 24px; overflow: hidden; background: #fff; min-width: 0; }
.home-cell img, .home-cell video { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-cell--a, .home-cell--b, .home-cell--c, .home-cell--v { aspect-ratio: 424 / 318; background: var(--color-plate); }
.home-cell--a { grid-column: 1; grid-row: 1; }
.home-cell--b { grid-column: 2; grid-row: 1; }
.home-cell--c { grid-column: 1; grid-row: 2; }
.home-cell--v { grid-column: 2; grid-row: 2; display: grid; align-content: center; background: #fff; }
.home-cell--v video { height: auto; aspect-ratio: 16 / 9; }
.home-cell--phone { grid-column: 3; grid-row: 1 / 3; }
.home-band--bento .home-track { display: block; overflow: visible; }

/* BackOffice collage */
.home-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.home-collage img { display: block; width: 100%; height: auto; }
.home-collage__col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.home-collage__pair { display: flex; gap: 24px; align-items: flex-start; }
.home-collage__pair > * { flex: 1 1 0; min-width: 0; }
.home-collage__stack { display: flex; flex-direction: column; gap: 24px; }
.home-video { border-radius: 24px; overflow: hidden; background: #1c1c1c; }
.home-video video { display: block; width: 100%; height: auto; aspect-ratio: 1184 / 715; object-fit: cover; }

/* ---------- sections ---------- */
.h-sec { padding: 96px 0 48px; }
.h-sec--spacer { margin-top: 48px; }
.h-title { text-wrap: initial; }
.h-idx { color: var(--color-text-muted); }
.h-sec > .container > .cv-row { margin-top: 48px; padding: 0; }
.h-sec .cv-row__meta--fields { gap: 0 10px; align-content: start; }
.h-sec .cv-row__meta--fields > div { display: grid; gap: 4px; align-content: start; }
.h-roles { gap: 16px; }
.cv-item { display: grid; gap: 4px; }
.cv-item__co { white-space: nowrap; }   /* the company never breaks away from its "·" (30.11) */
.cv-item__note { margin: 0; font-size: 15px; line-height: 22px; color: var(--color-text-muted); }   /* EN: what the company is, for readers who do not know it */
.h-block { display: grid; gap: 4px; align-content: start; }
.h-text { display: grid; gap: 24px; }
.h-text .cv-text + .cv-text { margin-top: 0; }
.h-list { display: grid; }
.h-btn { justify-self: start; min-height: 48px; padding: 0 24px; }

@media (min-width: 810px) {
  .h-cv .cv-row__meta { order: 0; }
}
@media (max-width: 809.98px) {
  .home-band { border-radius: 24px; padding: 32px 0 48px; }
  .home-hint { display: block; margin: 0 16px 24px; font-size: 16px; line-height: 19.2px; font-weight: 900; color: var(--color-text-muted); text-align: left; }
  .home-band--ds .home-hint { text-align: center; }
  .home-band--pics, .home-band--ds, .home-band--board, .home-band--collage, .home-band--video { --bp: 16px; }
  .home-band--pics, .home-band--ds { padding-bottom: 24px; }
  .home-band--board { padding-bottom: 16px; }
  .home-band--collage { margin-top: 16px; padding: 16px 0; }
  .home-band--video { margin-top: 16px; padding: 16px 0; }
  .home-phone { width: 304px; }
  .home-slide--pulse { width: 356px; }
  .home-band--ds .home-track { gap: 24px; }
  .home-slide--dsv { width: 632px; height: 360px; }
  .home-slide--ds2 { width: 657px; height: 360px; }
  .home-slide--ds3 { width: 559px; height: 360px; }
  .home-slide--hotel { height: 440px; }
  .home-slide--board { width: 658px; }
  .home-band--bento .home-track { display: flex; overflow-x: auto; }
  .home-bento { display: flex; gap: 24px; width: max-content; }
  .home-bento__col { display: flex; flex-direction: column; gap: 24px; width: 418px; }
  .home-cell--a, .home-cell--b { aspect-ratio: auto; height: 317px; }
  .home-cell--v { aspect-ratio: auto; display: block; }
  .home-cell--v video { aspect-ratio: 418 / 235; }
  .home-cell--c { aspect-ratio: auto; height: 400px; }
  .home-cell--phone { width: 304px; height: 659px; }
  .home-collage { grid-template-columns: 1fr; gap: 14px; }
  .home-collage__col { gap: 12px; }
  .home-collage__pair--top { gap: 24px; }
  .home-collage__pair--mid, .home-collage__stack { gap: 12px; }
  .home-video { border-radius: 16px; }

  .h-sec { padding: 48px 0; }
  .h-sec--spacer { margin-top: 0; }
  .h-sec > .container > .cv-row { margin-top: 24px; }
  .h-title--long { font-size: 36px; line-height: 43.2px; }
  .h-cv .cv-row__meta { order: 2; }
}

/* ---------- contacts (shared footer, home measurements) ---------- */

/* 28.11: keep a tag word together with its app icon */
.hero--home .hero__tag { white-space: nowrap; }
.hero--home .hero__tag .popover { white-space: normal; }

/* 28.11: CV block links to the CV page and the PDF */
.h-cv__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
@media (min-width: 810px) { .h-cv__actions { margin-left: calc(33.33% + 32px); } }

/* 28.11: every tag icon is an app tile; the medtech mark is transparent, so give it the same white tile */
.hero--home .hero__icon[src*="icon-medtech"] { background: #fff; padding: 5px; box-sizing: border-box; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.08); object-fit: contain; }

.hero__nw { white-space: nowrap; }

/* 28.11 final pass: on phones a bento column is one screen minus a peek of the next, never wider than the viewport */
@media (max-width: 809.98px) {
  .home-band--bento .home-track { scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); }
  .home-band--bento { --colw: min(418px, calc(100vw - 2 * var(--pad) - 32px)); }
  .home-band--bento .home-track { padding-bottom: 0; }
  .home-bento__col { width: var(--colw); scroll-snap-align: start; }
  .home-cell--a, .home-cell--b { height: auto; aspect-ratio: 418 / 317; }
  .home-cell--c { height: auto; aspect-ratio: 418 / 400; }
  /* the phone is as tall as a column of two cells, so the band has no empty strip under the pictures */
  .home-cell--phone { width: calc(var(--colw) * .7 + 11px); height: auto; aspect-ratio: 304 / 659; scroll-snap-align: start; }
}

/* avatar says hi (28.11) */
.hero--home .hero__line { position: relative; }
.hero--home .hero__avatar { transition: transform .5s cubic-bezier(.34, 1.4, .64, 1), translate .35s cubic-bezier(.16, 1, .3, 1), filter .4s; }
.hero--home .hero__avatar:hover { transform: scale(1.1); filter: none; }
.hero--home .hero__avatar.is-waving { animation: avatar-wave .9s cubic-bezier(.34, 1.4, .64, 1); transform-origin: 50% 90%; }
@keyframes avatar-wave { 0% { transform: scale(1); } 20% { transform: scale(1.12) rotate(-14deg); } 40% { transform: scale(1.12) rotate(12deg); } 60% { transform: scale(1.1) rotate(-8deg); } 80% { transform: scale(1.1) rotate(4deg); } 100% { transform: scale(1.1) rotate(0); } }
.hero__bubble { position: absolute; z-index: 3; transform: translate(0, -100%) scale(.6); transform-origin: 0 100%; opacity: 0; pointer-events: none;
  padding: 8px 14px; border-radius: 18px 18px 18px 4px; background: var(--color-text); color: #fff; font-size: 16px; line-height: 20px; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
  transition: opacity .2s ease-out, transform .45s cubic-bezier(.34, 1.4, .64, 1); }
.hero__bubble.is-on { opacity: 1; transform: translate(0, -100%) scale(1); pointer-events: auto; }
.hero__bubble:hover { background: #000; color: #fff; }
@media (prefers-reduced-motion: reduce) { .hero--home .hero__avatar.is-waving { animation: none; } .hero__bubble { transition: opacity .2s; transform: translate(0, -100%); } }
.hero--home .hero__avatar { transform-origin: 15% 60%; }
.hero--home .hero__avatar.is-waving { transform-origin: 25% 90%; }
/* hero logos at one mass (29.11): the medtech icon is a full app icon like the others, no inner padding;
   only a hairline keeps the white tile's edge on the white page */
.hero--home .hero__icon[src*="icon-medtech"] { padding: 0 !important; background: none !important; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) !important; }
/* optical gap (29.11): the white medtech tile reads closer to its word than the dark icons, so it gets 2 px more air */
.hero--home .hero__tag .has-popover:has(.hero__icon[src*="icon-medtech"]) { margin-left: 11px; }
@media (max-width: 809.98px) { .hero--home .hero__tag .has-popover:has(.hero__icon[src*="icon-medtech"]) { margin-left: 9px; } }
/* hero subline (29.11): lines tall enough for the 32 px icons, so icons on neighbouring lines never touch */
.hero--home .hero__sub { line-height: 44px; }
@media (max-width: 809.98px) { .hero--home .hero__sub { line-height: 38px; } }
/* hero icons as circles (29.11): one shape for four brands with different squircle radii */
.hero--home .hero__icon, .hero--home .hero__icon-btn { border-radius: 50% !important; }
.hero--home .hero__icon { object-fit: cover; clip-path: circle(50%); }
.hero--home .hero__icon[src*="icon-medtech"] { clip-path: none; }
.hero--home .popover__head > img { border-radius: 50%; }
/* the OneTwoTrip mark is wider than its circle: shrink it inside a disc of its own background */
.hero--home .hero__icon[src*="icon-ott"] { object-fit: contain; padding: 3px; box-sizing: border-box; background: #242424; }
.hero--home .popover__head > img[src*="icon-ott"] { object-fit: contain; padding: 2px; box-sizing: border-box; background: #242424; }

/* ---------------------------------------------------------------- hero v3 (29.11): one live line + a "now" status
   "5+ years designing for [logo + industry]" — the industry and its logo change like a split-flap board, the word in
   ink, the lead in grey. Under it a quiet status pill with a breathing green dot says where I am now. */
.hero__sub--live { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: .32em; row-gap: 4px; }
.hero__tick { position: relative; display: inline-block; height: 1.3em; overflow: clip; overflow-clip-margin: 6px; vertical-align: middle; transition: width .55s cubic-bezier(.16, 1, .3, 1); }
.hero__ti { position: absolute; left: 0; top: 0; height: 1.3em; display: inline-flex; align-items: center; gap: .28em; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; color: var(--color-text); white-space: nowrap; cursor: pointer;
  opacity: 0; transform: translateY(80%); filter: blur(6px); transition: transform .6s cubic-bezier(.16, 1, .3, 1), opacity .35s ease-out, filter .45s ease-out; }
.hero__ti img { width: 1em; height: 1em; border-radius: 50%; object-fit: cover; flex: none; transform: scale(.6) rotate(-20deg); transition: transform .6s cubic-bezier(.34, 1.4, .64, 1) .05s; }
.hero__ti img[src*="icon-ott"] { object-fit: contain; padding: .09em; box-sizing: border-box; background: #242424; }
.hero__ti img[src*="icon-medtech"] { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.hero__ti.is-on { opacity: 1; transform: none; filter: none; }
.hero__ti.is-on img { transform: none; }
.hero__ti.is-out { opacity: 0; transform: translateY(-80%); filter: blur(6px); }
.hero__now { display: flex; justify-content: center; margin: 28px 0 0; }
.hero__now { gap: 10px; align-items: center; width: max-content; max-width: 100%; margin-inline: auto; height: 40px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--color-plate); font-size: 15px; line-height: 20px; color: var(--color-text); }
.hero__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2fb45a; flex: none; }
.hero__dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: rgba(47, 180, 90, .35); animation: hero-breathe 2.4s ease-out infinite; }
@keyframes hero-breathe { 0% { transform: scale(.5); opacity: .9; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.js .hero__now { animation: rise-in .45s var(--ease-out) .3s backwards; }
@media (max-width: 809.98px) { .hero__now { margin-top: 20px; height: auto; min-height: 36px; padding: 8px 14px; font-size: 14px; text-align: left; } }
/* static: no motion or no JS — the four industries in a row, comma separated */
.hero__tick.is-static, html:not(.js) .hero__tick { height: auto; overflow: visible; width: auto !important; display: inline; }
.hero__tick.is-static .hero__ti, html:not(.js) .hero__ti { position: static; display: inline-flex; opacity: 1; transform: none; filter: none; }
.hero__tick.is-static .hero__ti img, html:not(.js) .hero__ti img { transform: none; }
.hero__tick.is-static .hero__ti:not(:last-child)::after, html:not(.js) .hero__ti:not(:last-child)::after { content: ","; color: var(--color-text-muted); margin: 0 .25em 0 -.28em; }   /* hug the word: cancel the flex gap (29.11) */
@media (prefers-reduced-motion: reduce) { .hero__dot::after { animation: none; opacity: 0; } }
@media (max-width: 809.98px) {
  .hero__sub--live { justify-content: flex-start; }
  .hero__now { margin-inline: 0; }
}

/* ticker tooltip (29.11): where the paused industry comes from. Hover on desktop; on phones the first tap pins it,
   a second tap on the same industry opens the work, a tap elsewhere lets the ticker run on. */
.hero__sub--live { position: relative; }
.hero__tip { position: absolute; z-index: 5; top: calc(100% + 12px); left: 0; width: max-content; max-width: min(320px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 20px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); text-align: left; letter-spacing: -0.01em; pointer-events: none; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left;
  transition: opacity .2s ease-out, transform .35s cubic-bezier(.16, 1, .3, 1); }
.hero__tip.is-on { opacity: 1; transform: none; }
.hero__tip-head { display: flex; align-items: center; gap: 10px; }
.hero__tip-head img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.hero__tip-head img[src*="icon-ott"] { object-fit: contain; padding: 2px; box-sizing: border-box; background: #242424; }
.hero__tip-head img[src*="icon-medtech"] { box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); }
.hero__tip b { display: block; font-weight: 500; font-size: 16px; line-height: 20px; color: var(--color-text); }
.hero__tip small { display: block; font-size: 13px; line-height: 18px; color: var(--color-text-muted); }
.hero__tip p { margin: 10px 0 0; font-size: 15px; line-height: 21px; color: var(--color-text); }
.hero__tick:not(.is-static) .hero__ti:not(.is-on) { pointer-events: none; }   /* only the shown industry takes taps */
/* the last two industries are joined with "&" instead of a comma (29.11) */
.hero__tick.is-static .hero__ti:nth-last-child(2)::after, html:not(.js) .hero__ti:nth-last-child(2)::after { content: "&"; margin: 0 .25em 0 0; }
html[lang="ru"] .hero__tick.is-static .hero__ti:nth-last-child(2)::after, html[lang="ru"]:not(.js) .hero__ti:nth-last-child(2)::after { content: "и"; }   /* RU: «…криптокошельков и телемедицины» */
/* a wrapped industry list never leaves one word alone on the last line (29.11) */
.hero__tick.is-static, html:not(.js) .hero__tick { text-wrap: balance; }
