/* stylemy.css — индивидуальные стили под конкретные задачи (хардкод).
   Всё, что не покрывается утилитами из utilities*.css, живёт здесь. */

/* ===== About: цветные градиенты карточек (kru__*) ===== */
#kru__site {
    background-color:#00a3880f;
    background-image: radial-gradient(at 38% 89%, hsla(104, 86%, 64%, 1) 0, hsla(104, 86%, 64%, 0) 50%),
    radial-gradient(at 51% 43%, hsla(36, 93%, 61%, 1) 0, hsla(36, 93%, 61%, 0) 50%);
}

#kru__tilda {
    background-color: #ffb4330d;
    background-image: radial-gradient(at 82% 42%, hsla(53, 92%, 61%, 1) 0, hsla(53, 92%, 61%, 0) 50%),
    radial-gradient(at 60% 4%, hsla(10, 88%, 65%, 1) 0, hsla(10, 88%, 65%, 0) 50%);
}

#kru__social {
    background-color:#4607bc0d;
    background-image: radial-gradient(at 33% 71%, hsla(124, 95%, 70%, 1) 0, hsla(124, 95%, 70%, 0) 50%),
    radial-gradient(at 53% 60%, hsla(142, 94%, 70%, 1) 0, hsla(142, 94%, 70%, 0) 50%);
}

#kru__poly {
    background-color: #bc005608;
    background-image: radial-gradient(at 59% 68%, hsla(213, 87%, 54%, 1) 0, hsla(213, 87%, 54%, 0) 50%),
    radial-gradient(at 95% 71%, hsla(133, 90%, 69%, 1) 0, hsla(133, 90%, 69%, 0) 50%);
}

#kru__merch {
    background-color: #e890380d;
    background-image: radial-gradient(at 91% 33%, hsla(158, 94%, 67%, 1) 0, hsla(158, 94%, 67%, 0) 50%),
    radial-gradient(at 43% 4%, hsla(7, 95%, 57%, 1) 0, hsla(7, 95%, 57%, 0) 50%);
}

#kru__app {
    background-color: #006ce00a;
    background-image: radial-gradient(at 44% 66%, hsl(0deg 79.45% 43.42%) 0, hsla(39, 86%, 63%, 0) 50%),
    radial-gradient(at 40% 19%, hsla(40, 92%, 65%, 1) 0, hsla(40, 92%, 65%, 0) 50%);
}

#kru__content {
    background-color: #e860170d;
    background-image: radial-gradient(at 98% 35%, hsla(109, 85%, 56%, 1) 0, hsla(109, 85%, 56%, 0) 50%),
    radial-gradient(at 78% 92%, hsla(288, 89%, 61%, 1) 0, hsla(288, 89%, 61%, 0) 50%);
}

#kru__identic {
    background-color:#e860170d;
    background-image: radial-gradient(at 48% 34%, hsla(280, 88%, 59%, 1) 0, hsl(338.4deg 88% 59% / 0%) 50%),
    radial-gradient(at 56% 95%, hsl(208.18deg 89% 52%) 0, hsla(263, 89%, 52%, 0) 50%);
}

#kru__messengers {
    background-color: #32c81e12;
    background-image: radial-gradient(at 89% 77%, hsla(357, 94%, 50%, 1) 0, hsla(357, 94%, 50%, 0) 50%),
    radial-gradient(at 74% 46%, hsla(35, 89%, 69%, 1) 0, hsla(35, 89%, 69%, 0) 50%);
}

.sticky {
  position: sticky;
  top: 3rem;
  height: fit-content;
}
@media (orientation: portrait) and (max-width: 767px),
       (orientation: landscape) and (max-width: 767px),
       (pointer: coarse) and (max-width: 767px) {
  .sticky { position: relative; top: auto; }
}

/* ===== главная: галерея ===== */

/* ===== Hero (главная): заголовок + mesh-пятна ===== */
.hero {
  position: relative;
  height: calc(100svh / 3);
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--borderRadius);
  margin-block: var(--distanceNormal);
  background: var(--bg);
  isolation: isolate;
  display: grid;
  align-items: end;
  justify-items: start;
}
.hero__title {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: var(--distanceNormal);
  font-size: var(--h1Size);
  line-height: 1.1;
  color: var(--fg);
  max-width: 80%;
  text-wrap: balance;
}
.hero__mesh {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  filter: blur(40px) saturate(1.15);
}
.hero__spot {
  position: absolute;
  border-radius: 50%;
}
.hero__spot:nth-child(1) {
  width: 55%;
  height: 65%;
  left: 0;
  top: 0;
  background: radial-gradient(circle, hsla(104, 86%, 64%, 0.95) 0%, hsla(104, 86%, 64%, 0) 65%);
  animation: mesh-fly-a 12s ease-in-out infinite alternate;
}
.hero__spot:nth-child(2) {
  width: 50%;
  height: 60%;
  right: 0;
  top: 10%;
  background: radial-gradient(circle, hsla(213, 87%, 54%, 0.9) 0%, hsla(213, 87%, 54%, 0) 65%);
  animation: mesh-fly-b 14s ease-in-out -3s infinite alternate;
}
.hero__spot:nth-child(3) {
  width: 45%;
  height: 55%;
  left: 25%;
  bottom: 0;
  background: radial-gradient(circle, hsla(36, 93%, 61%, 0.85) 0%, hsla(36, 93%, 61%, 0) 65%);
  animation: mesh-fly-c 16s ease-in-out -6s infinite alternate;
}
@keyframes mesh-fly-a {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60%, 40%) scale(1.15); }
}
@keyframes mesh-fly-b {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(-50%, 30%) scale(0.95); }
}
@keyframes mesh-fly-c {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40%, -50%) scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__spot { animation: none; }
}

/* =========================================================
   VIEWPORT SWITCH — хардкод проекта krudesign.
   Переключатель «Смартфон / ПК» в лонгрид-блоках (image_fullwidth, video_file).
   Использует .ui-toggle (базовый) — визуал стандартный ч/б, размер уменьшен.
   Подписи «Смартфон / ПК» — здесь, в обёртке.
   ========================================================= */
.viewport-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-block-end: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.viewport-switch__side {
  opacity: 0.5;
  transition: opacity 0.2s;
}
.viewport-switch:has(.screentoggle:not(:checked)) .viewport-switch__side--mobile,
.viewport-switch:has(.screentoggle:checked) .viewport-switch__side--desktop {
  opacity: 1;
}

/* device-shot: два варианта медиа под смартфон/ПК */
.viewport-gallery > .device-shot--mobile,
.viewport-gallery > .device-shot--desktop {
  display: none;
}
.viewport-switch:has(.screentoggle:not(:checked)) ~ .device-shot--mobile {
  display: block;
  max-width: 30rem;
  justify-self: center;
}
.viewport-switch:has(.screentoggle:checked) ~ .device-shot--desktop {
  display: block;
}
/* Расширение на потомков внутри .viewport-gallery (не соседи, а вложенные) */
.viewport-switch:has(.screentoggle:not(:checked)) ~ .viewport-gallery .device-shot--mobile {
  display: block;
  max-width: 30rem;
  margin-inline: auto;
}
.viewport-switch:has(.screentoggle:checked) ~ .viewport-gallery .device-shot--desktop {
  display: block;
}
.device-shot--solo {
  display: block !important;
}

/* theme-img: светлая/тёмная версия картинок */
.theme-img--dark { display: none; }
body:has(#darkmode:checked) .theme-img--light { display: none; }
body:has(#darkmode:checked) .theme-img--dark { display: block; }

/* .screentoggle: input внутри .ui-toggle уже скрыт через .ui-toggle > input.
   Класс оставлен как хук для JS (scripts.js: querySelectorAll('.screentoggle')). */

/* ===== Перенесено из base.css (20261111-215633) ===== */
footer {
  bottom: 0;
  background: var(--bg);
  color: var(--fg);
  padding: var(--distanceBig) 0;
  width: 100%;
}

article > a > img.img__color {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

article > a {
  display: block;
  position: relative;
}

article {
  border-radius: var(--borderRadius);
  transition: background 0.3s ease-out;
  overflow: hidden;
}

/* ===== Перенесено из base.css (20261111-215813) — хардкод портфолио/About ===== */
article .tile-box {
   position: absolute;
   width: 100%;
   display: flex;
   align-items: center;
   gap: calc(var(--distanceNormal) / 2);
   justify-content: start;
   flex: 0 1 auto;
   padding: var(--distanceLarge) var(--distanceNormal) var(--distanceNormal);
}


/* ===== CTA: кнопки вылетают ИЗ кнопки «Написать» вверх, по одной =====
   Открытие: по порядку (нижняя → верхняя), пружинистый вылет.
   Закрытие: зеркало (верхняя → нижняя), те же траектории в обратную сторону. */
.ui-fab__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + .2rem);
  width: max-content;
  height: 0;
  pointer-events: none;
}
.ui-fab.is-open .ui-fab__menu { pointer-events: auto; }

.ui-fab__menu a {
  --step: 3rem;
  position: absolute;
  right: 0;
  bottom: 0;
  min-height: 2.8rem;
  transform-origin: right bottom;
  transform: translateY(0) scale(0.15) rotate(-10deg);
  opacity: 0;
  filter: blur(3px);
  transition:
    transform .55s cubic-bezier(.2, 1.4, .35, 1),
    opacity .18s ease-out,
    filter .35s ease-out;
}

/* Открытие — нижняя (nth-child 1) стартует первой */
.ui-fab.is-open .ui-fab__menu a:nth-child(1) { transition-delay: 0s; }
.ui-fab.is-open .ui-fab__menu a:nth-child(2) { transition-delay: .06s; }
.ui-fab.is-open .ui-fab__menu a:nth-child(3) { transition-delay: .12s; }
.ui-fab.is-open .ui-fab__menu a:nth-child(4) { transition-delay: .18s; }
.ui-fab.is-open .ui-fab__menu a:nth-child(5) { transition-delay: .24s; }

/* Закрытие — ЗЕРКАЛО: верхняя (последняя) стартует первой */
.ui-fab:not(.is-open) .ui-fab__menu a:nth-child(1) { transition-delay: .18s; }
.ui-fab:not(.is-open) .ui-fab__menu a:nth-child(2) { transition-delay: .12s; }
.ui-fab:not(.is-open) .ui-fab__menu a:nth-child(3) { transition-delay: .06s; }
.ui-fab:not(.is-open) .ui-fab__menu a:nth-child(4) { transition-delay: 0s; }
.ui-fab:not(.is-open) .ui-fab__menu a:nth-child(5) { transition-delay: 0s; }

/* Раскрытое состояние: i=0 прижат к кнопке (0.2rem зазор), i=1..n растут вверх */
.ui-fab.is-open .ui-fab__menu a {
  transform: translateY(calc(var(--i) * var(--step) * -1)) scale(1) rotate(0);
  opacity: 1;
  filter: blur(0);
}

/* ===== Footer: контакты — ссылки, hover = бренд ===== */
.footer__link {
  transition: color 0.2s ease;
}
.footer__link:hover {
  color: var(--ui-color, currentColor);
}

/* Ряд: «Почта» + кнопка копирования в одну линию */
/* ===== Footer: кнопка копирования — state (скоуп на [data-copy], чтобы не задеть другие .ui--icon) ===== */
.ui--icon[data-copy] svg { pointer-events: none; }
.ui--icon[data-copy] svg:first-child { display: block; }
.ui--icon[data-copy] svg:last-child { display: none; }
.ui--icon[data-copy].is-copied svg:first-child { display: none; }
.ui--icon[data-copy].is-copied svg:last-child {
  display: block;
  color: var(--activeColor, #008f39);
}

/* ===== Case benefits: зелёный фон карточек + link-иконка ===== */
#benefit .card {
    --card-bg: #1bffe724;
}
#benefit .icon {
    width: 1rem;
    color: var(--linkColor);
}

#portfolio.grid__rows {
  --gr-row: min(80vh, 70vw);
  grid-auto-rows: var(--gr-row);
}



/* ===== About: вертикальные контентные блоки ===== */
:is(#kru__site, #kru__tilda, #kru__app, #kru__social, #kru__poly, #kru__content, #kru__identic, #kru__messengers, #kru__merch) {
  display: grid;
  padding: var(--distanceLarge);
  border-radius: var(--borderRadius);
}

/* =========================================================
   variables-add.css — ДОБАВИТЬ в :root в utilities.css
   (рядом с --h1Size, --distanceBig и остальными переменными).
   Утилит не добавляю — только токены.
   ========================================================= */

  /* ===== Mesh-палитра: те же оттенки, что в .hero и kru__* градиентах ===== */
  --meshGreen:  hsl(104 86% 64%);
  --meshYellow: hsl(53 92% 61%);
  --meshOrange: hsl(36 93% 61%);
  --meshRed:    hsl(7 95% 57%);
  --meshPurple: hsl(280 88% 59%);
  --meshBlue:   hsl(213 87% 54%);
  --meshLine:   linear-gradient(90deg, var(--meshLime), var(--meshCyan), var(--meshViolet), var(--meshMagenta), var(--meshCoral), var(--meshYellow));

  /* ===== Крупная типографика (резина от --u, верхний предел — от ширины экрана) ===== */
  --giantSize:     max(44px, min(calc(230 * var(--u)), 15vw));   /* имя в hero, «Начнем?» */
  --sectionSize:   max(32px, min(calc(120 * var(--u)), 11vw));   /* заголовки секций */
  --statementSize: max(28px, min(calc(88 * var(--u)), 8vw));     /* манифест */

  /* ===== Линии, обводка, схема метро ===== */
  --stroke:      max(2px, calc(3 * var(--u)));        /* обводка контурного текста / рамок */
  --lineWidth:   max(0.5rem, calc(18 * var(--u)));    /* толщина линии метро */
  --stationSize: max(3.2rem, calc(110 * var(--u)));   /* диаметр станции */


#about p { font-size: var(--lr-font-p); }
#about h1,
#about h2,
#about h3 {
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

#about .about__ribbon span {
font-size: var(--h1Size);
}

/* заголовок секции */
#about .about__label {
  font-size: var(--sectionSize);
  line-height: 0.95;
  text-wrap: balance;
}

/* ---------- мелкие общие приёмы ---------- */

/* градиентный текст (.about__grad на <em> или на самом заголовке) */
#about .about__grad {
  font-style: normal;
  background: var(--meshLine) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
@keyframes about-hue { to { background-position: 100% 0; } }
@media (prefers-reduced-motion: no-preference) {
  #about .about__grad { animation: about-hue 7s ease-in-out infinite alternate; }
}

/* гигантский заголовок (плита, CTA) */
#about .about__giant {
  font-size: calc(var(--giantSize) * 0.62);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
#about .about__cta .about__giant { font-size: var(--giantSize); }


/* =========================================================
   1. HERO
   ========================================================= */
#about .hero--about {
  height: auto;
  min-height: max(34rem, calc(100svh - 8rem));
  margin-block: 0;
  padding: var(--distanceLarge);
  align-items: stretch;
  justify-items: stretch;
}
body:has(#darkmode:checked) #about .hero--about .hero__mesh { opacity: 0.6; }

#about .about__hero {
  position: relative;
  z-index: 2;
}

#about .about__eyebrow {
  cursor: default;
  font-size: var(--smallSize);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#about .about__title {
  align-self: center;
  font-size: var(--giantSize);
  line-height: 0.86;
  letter-spacing: -0.035em;
}
#about .about__title > span { display: block; }
#about .about__title-pre {
  font-size: var(--h2Size);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  margin-block-end: 0.4em;
}
#about .about__title-name--outline {

  -webkit-text-stroke: max(var(--stroke), 0.022em) var(--fg);
}

#about .about__lede {
  font-size: var(--h3Size);
  font-weight: 500;
  line-height: 1.35;
  max-inline-size: 36rem;
  text-wrap: pretty;
}

#about .about__lede > a {
    font: inherit;
}

/* портрет: ч/б + mesh-тонировка, при наведении — «проявляется» */
#about .about__portrait {
  position: relative;
  inline-size: 100%;
  max-inline-size: 30rem;
  justify-self: end;
}
#about .about__photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--borderRadius);
  rotate: 3deg;
  box-shadow: 0.7rem 0.7rem 0 var(--fg);
  transition: rotate 0.5s var(--anim-ttf1), border-radius 0.35s ease, box-shadow 0.5s ease;
}
#about .about__photo img {
  display: block;
  aspect-ratio: var(--ratio, 3 / 4);
  filter: grayscale(1) contrast(1.15);
  transition: filter 0.5s ease;
}
#about .about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: color;
  background:
    radial-gradient(at 15% 20%, var(--meshLime) 0, transparent 55%),
    radial-gradient(at 85% 30%, var(--meshCyan) 0, transparent 55%),
    radial-gradient(at 55% 95%, var(--meshCoral) 0, transparent 60%),
    var(--meshViolet);
  transition: opacity 0.5s ease;
}
@media (hover: hover) {
  #about .about__portrait:hover .about__photo {
    rotate: 0deg;
    border-radius: calc(var(--borderRadius) * 3);
    box-shadow: 0 0 0 var(--fg);
  }
  #about .about__portrait:hover .about__photo img { filter: none; }
  #about .about__portrait:hover .about__photo::after { opacity: 0; }
}

/* вращающийся бейдж; крутится от скролла, а если не поддерживается — по таймеру */
#about .about__badge {
  --badgeSize: max(6rem, calc(170 * var(--u)));
  position: absolute;
  z-index: 3;
  inset-block-start: calc(var(--badgeSize) * -0.3);
  inset-inline-end: calc(var(--badgeSize) * -0.12);
  inline-size: var(--badgeSize);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--blackColor);
  background: conic-gradient(from 0deg,
  var(--meshCyan),
  var(--meshMagenta),
  var(--meshYellow),
  var(--meshCyan));
  pointer-events: none;
}
#about .about__badge svg { display: block; inline-size: 100%; block-size: 100%; }
#about .about__badge text {
  fill: currentColor;
  font-family: var(--fontFamily);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
}
#about .about__badge circle { fill: currentColor; }
@keyframes about-spin { to { rotate: 360deg; } }
@keyframes about-spin-scroll { to { rotate: 720deg; } }
@media (prefers-reduced-motion: no-preference) {
  #about .about__badge svg { animation: about-spin 26s linear infinite; }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    #about .about__badge svg {
      animation: about-spin-scroll linear both;
      animation-timeline: scroll(root);
    }
  }
}


/* =========================================================
   2. ЛЕНТА (.runline ×2)
   ========================================================= */
#about .about__ribbon {
  display: grid;
  row-gap: var(--distanceSmall);
  padding-block: var(--distanceNormal);
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--borderRadius);
  rotate: -1.2deg;
  overflow: hidden;
}
#about .about__ribbon .runline {
  --runline-width: 100%;
  --runline-duration: 55s;
  --gap: var(--distanceLarge);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
#about .about__ribbon .runline__group > span {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
}
#about .about__ribbon .runline__group > span::after {
  content: "";
  flex: none;
  inline-size: 0.36em;
  block-size: 0.36em;
  border-radius: 50%;
  background: var(--meshLine);
}
#about .about__ribbon .runline.about__runline--outline {
  --runline-direction: reverse;
  --runline-duration: 70s;
}


/* =========================================================
   3. МАНИФЕСТ
   ========================================================= */
#about .about__statement-text {
  font-size: var(--statementSize);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
#about mark {
  color: inherit;
  background: var(--meshLine) no-repeat 0 100% / 100% 0.2em;
  padding-inline: 0.05em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
#about .about__note {
  display: flex;
  align-items: baseline;
  gap: var(--distanceNormal);
  font-size: var(--h3Size);
  font-weight: 600;
  line-height: 1.3;
}
#about .about__note::before {
  content: "→";
  flex: none;
  font-size: 1.6em;
  line-height: 1;
}


/* =========================================================
   4. ЭТАПЫ — схема метро
   Раскладка переключается по ширине самой секции (container query),
   а не по устройству: ≥ 56rem — горизонтальная линия, меньше — вертикальная.
   ========================================================= */
#about .about__route { container-type: inline-size; }

#about .about__line {
  --line-gap: var(--distanceLarge);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--line-gap);
}

#about .about__station {
  --from: var(--meshLime);
  --to: var(--meshCyan);
  position: relative;
  overflow: visible;
  height: auto;
  min-block-size: var(--stationSize);
  border-radius: 0;
  background: none;
}
#about .about__station:nth-child(2) { --from: var(--meshCyan);   --to: var(--meshViolet); }
#about .about__station:nth-child(3) { --from: var(--meshViolet); --to: var(--meshCoral); }
#about .about__station:nth-child(4) { --from: var(--meshCoral); --to: transparent; }

/* перегон: от центра своей станции до центра следующей */
#about .about__station::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset-block-start: calc((var(--stationSize) - var(--lineWidth)) / 2);
  inset-inline-start: calc(var(--stationSize) / 2);
  inline-size: calc(100% + var(--line-gap));
  block-size: var(--lineWidth);
  border-radius: var(--lineWidth);
  background: linear-gradient(90deg, var(--from), var(--to));
}
#about .about__station:last-child::before {
  inline-size: calc(100% - var(--stationSize) / 2);
  background: linear-gradient(90deg, var(--from), transparent);
}

#about .about__station .card__body { gap: var(--distanceSmall); }

#about .about__station .card__badge {
  --card-badge-bg: var(--bg);
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: var(--stationSize);
  height: var(--stationSize);
  margin-block-end: var(--distanceNormal);
  border: var(--lineWidth) solid var(--fg);
  font-size: calc(var(--stationSize) * 0.42);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 calc(var(--lineWidth) * 0.5) var(--bg);   /* «вырез» в линии вокруг станции */
  transition: transform 0.4s cubic-bezier(0.2, 1.4, 0.35, 1), background 0.25s, color 0.25s;
}
#about .about__station:hover .card__badge {
  background: var(--fg);
  color: var(--bg);
  transform: scale(1.12) rotate(-6deg);
}
#about .about__station h3 { font-size: var(--h2Size); }
#about .about__station p { max-inline-size: 28rem; opacity: 0.85; }

/* последняя станция — «Я с вами»: залита и пульсирует */
#about .about__station:last-child .card__badge {
  background: var(--fg);
  color: var(--bg);
}
#about .about__station:last-child .card__badge::after {
  content: "";
  position: absolute;
  inset: calc(var(--lineWidth) * -1.5);
  border: var(--stroke) solid var(--fg);
  border-radius: 50%;
  opacity: 0;
}
@keyframes about-pulse {
  from { transform: scale(0.85); opacity: 0.9; }
  to   { transform: scale(1.6);  opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  #about .about__station:last-child .card__badge::after { animation: about-pulse 2.2s ease-out infinite; }
}

/* вертикальная линия */
@container (max-width: 56rem) {
  #about .about__line { grid-template-columns: minmax(0, 1fr); }
  #about .about__station { padding-inline-start: calc(var(--stationSize) + var(--distanceLarge)); }
  #about .about__station .card__badge {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    margin: 0;
  }
  #about .about__station::before {
    inset-block-start: calc(var(--stationSize) / 2);
    inset-inline-start: calc((var(--stationSize) - var(--lineWidth)) / 2);
    inline-size: var(--lineWidth);
    block-size: calc(100% + var(--line-gap));
    background: linear-gradient(180deg, var(--from), var(--to));
  }
  #about .about__station:last-child::before {
    inline-size: var(--lineWidth);
    block-size: calc(100% - var(--stationSize) / 2);
    background: linear-gradient(180deg, var(--from), transparent);
  }
}


/* =========================================================
   5. ПЛИТА «Ничего лишнего»
   ========================================================= */
#about .about__slab {
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--borderRadius);
}
#about .about__shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--borderRadius);
  background: var(--bg);
  rotate: -2deg;
  transition: rotate 0.5s var(--anim-ttf1), border-radius 0.35s ease;
}
#about .about__shot img { display: block; }
#about .about__shot:hover {
  rotate: 0deg;
  border-radius: calc(var(--borderRadius) * 3);
}
#about .about__slab-body p {
  font-size: var(--h3Size);
  line-height: 1.4;
}
#about .about__stack { margin-block-start: var(--distanceLarge); }
#about .about__chip {
  cursor: default;
  font-size: var(--h2Size);
  font-weight: 800;
  line-height: 1.1;
  padding: 0.12em 0.55em;
  border-radius: 999px;
}
#about .about__chip--on {
  --ui-bg: var(--bg);
  --ui-fg: var(--fg);
  background-image: var(--meshLine);
  color: var(--blackColor);
  border-color: transparent;
}
#about .about__chip--off {
  --ui-color: var(--bg);
  opacity: 0.65;
}
#about .about__chip--off s {
  text-decoration-thickness: 0.12em;
  text-decoration-color: var(--meshMagenta);
}


/* =========================================================
   6. КАРТОЧКИ-СТИКЕРЫ «Быстро и эффективно»
   ========================================================= */
#about .about__feature {
  --tilt: -1.5deg;
  height: auto;
  padding: var(--distanceLarge);
  background: var(--bg);
  color: var(--fg);
  border: var(--stroke) solid var(--fg);
  box-shadow: 0.55rem 0.55rem 0 var(--fg);
  rotate: var(--tilt);
  transition:
    rotate 0.4s cubic-bezier(0.2, 1.4, 0.35, 1),
    translate 0.4s cubic-bezier(0.2, 1.4, 0.35, 1),
    box-shadow 0.4s ease,
    border-radius 0.35s ease;
}
#about .about__feature:nth-of-type(even) { --tilt: 1.2deg; }
#about .about__feature:hover {
  rotate: 0deg;
  translate: 0 -0.4rem;
  box-shadow: 0.9rem 0.9rem 0 var(--fg);
  border-radius: calc(var(--borderRadius) * 3);
}
#about .about__feature .card__body { gap: var(--distanceNormal); }
#about .about__feature .img__icon {
  height: calc(var(--distanceBig) * 1.6);
  object-position: left center;
}
#about .about__feature h3 { font-size: var(--h2Size); }


/* =========================================================
   7. BENTO «Возможно всё»
   Фоны-градиенты — из блока #kru__* (не трогаем); тут только раскладка и движение.
   ========================================================= */
#about .about__bento-lede {
  font-size: var(--h3Size);
  line-height: 1.4;
}
#about .about__tile {
  display: grid;
  grid-template-rows: 1fr auto auto;
  row-gap: var(--distanceSmall);
  min-block-size: calc(var(--distanceBig) * 3.2);
  padding: var(--distanceLarge);
  border-radius: var(--borderRadius);
  background-color: var(--whiteColor);   /* тайлы всегда «светлые стикеры» — читаемо и на тёмной теме */
  color: var(--blackColor);
  background-size: 120% 120%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  transition: background-position 1.4s var(--anim-ttf1), border-radius 0.35s ease;
}
#about .about__tile:hover {
  background-position: 0% 100%;
  border-radius: calc(var(--borderRadius) * 3);
}
#about .about__tile h3 {
  font-size: var(--h2Size);
  line-height: 1;
}
#about .about__num {
  justify-self: start;
  align-self: start;
  font-style: normal;
  font-size: var(--h1Size);
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: var(--stroke) var(--blackColor);
  transition: color 0.3s ease;
}
#about .about__tile:hover .about__num { color: var(--blackColor); }


/* =========================================================
   8. CTA
   ========================================================= */
#about .about__cta-btn {
  align-items: flex-end;
  justify-content: space-between;
  min-block-size: calc(var(--distanceBig) * 2.4);
  padding: var(--distanceNormal) var(--distanceLarge);
  font-size: calc(var(--h2Size) * 1.2);
  font-weight: 800;
  line-height: 1;
  border-radius: var(--borderRadius);
  transition:
    background 0.25s, color 0.25s, border-color 0.25s,
    border-radius 0.35s ease,
    translate 0.35s cubic-bezier(0.2, 1.4, 0.35, 1);
}
#about .about__cta-btn::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  inline-size: 1.35em;
  block-size: 1.35em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='6' y1='18' x2='18' y2='6'/%3E%3Cpolyline points='10 6 18 6 18 14'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter'%3E%3Cline x1='6' y1='18' x2='18' y2='6'/%3E%3Cpolyline points='10 6 18 6 18 14'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: translate 0.35s cubic-bezier(0.2, 1.4, 0.35, 1);
}
#about .about__cta-btn:hover {
  border-radius: calc(var(--borderRadius) * 4);
  translate: 0 -0.4rem;
}
#about .about__cta-btn:hover::after { translate: 0.15em -0.15em; }


/* =========================================================
   Появление при скролле: чистый CSS (scroll-driven animations).
   Где не поддерживается — блоки просто показываются сразу.
   Использует opacity + transform, чтобы не конфликтовать
   с hover-эффектами на rotate / translate.
   ========================================================= */
@keyframes about-rise {
  from { opacity: 0; transform: translateY(3rem) scale(0.96); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    #about .about__tile,
    #about .about__feature,
    #about .about__station,
    #about .about__cta-btn,
    #about .about__statement-text {
      animation: about-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
