/* =========================================================
   На слух. Лендинг ініціативи ПриватБанку
   Методологія: БЕМ (блок__елемент--модифікатор)
   ========================================================= */

/* ---------- Шрифти ---------- */
@font-face {
  font-family: "Pryvat Sans";
  src: url("../assets/fonts/PryvatSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pryvat Sans";
  src: url("../assets/fonts/PryvatSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Токени ---------- */
:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted-filter: none;

  --container: 75rem;           /* 1200px */
  --gutter: clamp(1rem, 8.33vw, 7.5rem);
  --gap: clamp(1rem, 1.67vw, 1.5rem);
  --section-y: clamp(3rem, 5.6vw, 5rem);

  /* масштаб тексту, змінюється в панелі доступності */
  --scale: 1;
  --scale-head: 1;

  --fs-display: clamp(5.5rem, 18.33vw, 16.5rem);  /* 264 */
  --fs-xl: clamp(2rem, 7.22vw, 6.5rem);            /* 104 */
  --fs-m: calc(clamp(1.75rem, 3.89vw, 3.5rem) * var(--scale-head));   /* 56 */
  --fs-s: calc(clamp(1.375rem, 2.78vw, 2.5rem) * var(--scale-head));  /* 40 */
  --fs-h4: calc(clamp(1.25rem, 2.22vw, 2rem) * var(--scale));         /* 32 */
  --fs-body: calc(clamp(1.125rem, 1.94vw, 1.75rem) * var(--scale));   /* 28 */
  --fs-small: calc(clamp(1rem, 1.67vw, 1.5rem) * var(--scale));       /* 24 */

  --lh-body: 1.43;
  --ls: normal;
  --ws: normal;

  color-scheme: light;
}

/* Розмір тексту */
:root[data-font-size="l"] { --scale: 1.25; --scale-head: 1.12; }
:root[data-font-size="xl"] { --scale: 1.5; --scale-head: 1.25; }
@media (max-width: 30em) {
  :root[data-font-size="l"],
  :root[data-font-size="xl"] { --scale-head: 1; }
}

/* Інтервали (WCAG 1.4.12) */
:root[data-spacing="wide"] { --lh-body: 1.8; --ls: 0.12em; --ws: 0.16em; }

/* Кольорові схеми */
:root[data-contrast="inverted"] { --bg: #000000; --fg: #ffffff; --muted-filter: invert(1); color-scheme: dark; }
:root[data-contrast="yellow"] { --bg: #000000; --fg: #ffd60a; --muted-filter: invert(1) sepia(1) saturate(6) hue-rotate(5deg); color-scheme: dark; }

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pryvat Sans", Arial, Helvetica, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls);
  word-spacing: var(--ws);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 4px;
  box-shadow: 0 0 0 8px var(--bg);
}
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

::selection { background: var(--fg); color: var(--bg); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Плавний скрол і «перелистування» розділів лише для тих, хто не вимкнув анімації */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 64em) and (hover: hover) {
  html { scroll-snap-type: y proximity; }
}

/* ---------- Skip link ---------- */
/* Видно лише при переході клавіатурою (Tab), дотик чи клік її не показують */
.skip-link {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  left: calc(env(safe-area-inset-left, 0px) + 1rem);
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:not(:focus-visible) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Сітка ---------- */
.container {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container > * { grid-column: 1 / -1; }

/* ---------- Секція ---------- */
.section {
  padding-block: var(--section-y);
  scroll-snap-align: start;
  background: var(--bg);
  color: var(--fg);
}
.section--dark {
  --bg: #000000;
  --fg: #ffffff;
  --muted-filter: invert(1);
}
:root[data-contrast="inverted"] .section--dark { --bg: #ffffff; --fg: #000000; --muted-filter: none; }
:root[data-contrast="yellow"] .section--dark { --bg: #ffd60a; --fg: #000000; --muted-filter: none; }

/* ---------- Типографіка ---------- */
.title {
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: break-word;
  hyphens: manual;
  text-wrap: balance;
}
.title--xl { font-size: var(--fs-xl); line-height: 1.154; }   /* 104/120 */
.title--m { font-size: var(--fs-m); line-height: 1.286; }     /* 56/72 */
.title--s { font-size: var(--fs-s); line-height: 1.2; text-transform: none; } /* 40/48 */

.title__line { display: block; }
.title__line--shift-3 { margin-inline-start: 21.5%; }
.title__line--shift-4 { margin-inline-start: 24%; }
.title__line--shift-7 { margin-inline-start: 50.5%; }

.text { font-size: var(--fs-body); line-height: var(--lh-body); }
.text--s { font-size: var(--fs-small); line-height: max(var(--lh-body), 1.33); }

/* ---------- Кнопки й теги ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--bg); color: var(--fg); }

.btn--pill {
  min-height: clamp(5rem, 10.56vw, 9.5rem);  /* 152 */
  padding: 1.5rem 2rem;
  border-radius: 100px;
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.btn--bar {
  min-height: 2.75rem;
  padding: 0.25rem 1.5rem;
  font-size: var(--fs-small);
  line-height: 1.33;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 1.5rem;
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--fg);
  font-size: var(--fs-small);
  line-height: 1.33;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tag:hover { background: var(--bg); color: var(--fg); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(2rem, 4.44vw, 4rem);
}
.hero .container { align-content: start; }

.hero__date {
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 1.2;
}
.hero__time {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}
.hero__date-part:nth-child(2) { justify-self: center; }
.hero__date-part:nth-child(3) { justify-self: end; }

.hero__title {
  margin-top: clamp(3rem, 4.44vw, 4rem);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 0.91;   /* 264/240 */
  text-transform: uppercase;
  letter-spacing: normal;
}
.hero__title-line { display: block; }

.hero__lead {
  margin-top: 1.5rem;
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.53;   /* 32/49 */
}

/* ---------- Intro ---------- */
.intro__text--lead { margin-top: clamp(2rem, 4.4vw, 4rem); }
.intro__text--shifted { margin-top: 2rem; }

.follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: clamp(2.5rem, 7.6vw, 6.875rem);
}
.follow__text { font-size: var(--fs-small); line-height: 1.83; }
.follow__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.intro__btn { margin-top: clamp(2rem, 7.6vw, 6.875rem); }

/* ---------- Problem ---------- */
.problem__phrases {
  list-style: none;
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.154;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.problem__phrase + .problem__phrase { margin-top: 0.23em; }

.problem__icon {
  width: clamp(7.5rem, 19.58vw, 17.625rem);
  height: auto;
  margin-top: 2rem;
  filter: var(--muted-filter);
}

.problem__text { margin-top: clamp(2rem, 4.4vw, 4rem); }

/* ---------- Alt-text ---------- */
.alt-text__aside {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}
.alt-text__note { max-width: 30rem; }

.example { margin-top: clamp(3rem, 8.75vw, 8rem); }
.example__text,
.example__list { font-size: var(--fs-body); line-height: var(--lh-body); }
.example__text { margin-top: 1.5rem; }
.example__row { display: flex; flex-wrap: wrap; column-gap: 0.3em; }
.example__term,
.example__def { margin: 0; }

/* ---------- How-to ---------- */
.howto__ref { display: inline-block; min-width: 1.5rem; padding-inline: 0.15em; text-align: center; text-decoration: none; }
.howto__ref:hover { text-decoration: underline; }
.howto__subtitle { margin-top: 1rem; font-weight: 700; }

.network {
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 2rem;
  margin-top: clamp(3rem, 4.4vw, 4rem);
}
.network + .network { margin-top: clamp(3rem, 6.7vw, 6rem); }
.network__title { grid-column: 1 / -1; font-weight: 700; }
.network__col { grid-column: 1 / -1; }
.network__subtitle {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.5;
}

.steps {
  margin-top: 1.5rem;
  padding-inline-start: 1.6em;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  list-style: decimal;
}
.steps__item { padding-inline-start: 0.3em; }
.steps__item::marker { font-weight: 400; }

.howto__note { margin-top: clamp(3rem, 6vw, 6rem); }

/* ---------- Video ---------- */
.video__text { margin-top: clamp(2rem, 4.4vw, 4rem); }
.video__text--shifted { margin-top: 2rem; }

/* ---------- Flashmob ---------- */
.flashmob__text { margin-top: clamp(2rem, 4.4vw, 4rem); }
.flashmob__text--shifted { margin-top: 2rem; }
.flashmob__subtitle { margin-top: clamp(3rem, 7.6vw, 7rem); }

.flashmob__figure { margin-top: 2.5rem; max-width: 24rem; }
.flashmob__image { width: 100%; }

.big-steps {
  margin-top: 2.5rem;
  list-style: none;
  counter-reset: big-step;
}
.big-steps__item {
  position: relative;
  min-height: 3rem;
  padding-inline-start: clamp(4rem, 7.85vw, 7.0625rem);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  counter-increment: big-step;
}
.big-steps__item + .big-steps__item { margin-top: clamp(1.5rem, 4.4vw, 4rem); }
.big-steps__item::before {
  content: counter(big-step) ".";
  position: absolute;
  top: 0;
  left: 0;
  font-size: clamp(3rem, 5.56vw, 5rem);
  font-weight: 700;
  line-height: 0.6;
  transform: translateY(0.35em);
}

.flashmob__btn {
  margin-top: clamp(2.5rem, 8.2vw, 7.4rem);
  border-color: var(--fg);
}

.flashmob__outro { margin-top: clamp(3rem, 6.5vw, 5.8rem); }
.flashmob__outro-line { display: block; }
.flashmob__outro-line + .flashmob__outro-line { margin-top: 0.85em; }

/* ---------- Share ---------- */
.share__text--shifted { margin-top: clamp(2rem, 4.4vw, 4rem); }
.share__text { margin-top: 2rem; }
.share__btn { margin-top: clamp(2.5rem, 5.5vw, 4.9rem); }

/* ---------- Footer ---------- */
.footer {
  padding-block: clamp(2rem, 5.5vw, 5rem) max(5.5rem, 6.9vw);
  background: var(--bg);
  color: var(--fg);
  scroll-snap-align: end;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.footer__logo {
  width: 0.85em;
  height: auto;
  transform: rotate(90deg);
  flex-shrink: 0;
}
.footer__caption {
  margin-top: 0.75rem;
  max-width: 29rem;
  font-size: var(--fs-small);
  line-height: 1.33;
}

/* ---------- Навігація по розділах ---------- */
.dots { display: none; }

@media (min-width: 64em) {
  .dots {
    display: block;
    position: fixed;
    top: 50%;
    right: clamp(0.5rem, 2.2vw, 2rem);
    z-index: 40;
    transform: translateY(-50%);
    color: #ffffff;
    mix-blend-mode: difference;
  }
  .dots__list { list-style: none; }
  .dots__link {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
  }
  .dots__link::before {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
  }
  .dots__link:hover::before { transform: scale(1.3); }
  .dots__link[aria-current="true"]::before { background: currentColor; transform: scale(1.3); }
  .dots__link:focus-visible { outline-color: currentColor; box-shadow: none; outline-offset: 0; }
  .dots__link { position: relative; text-decoration: none; }
  .dots__label {
    position: absolute;
    right: calc(100% + 0.5rem);
    top: 50%;
    padding: 0.25rem 0.625rem;
    background: #ffffff;
    color: #000000;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(0.5rem, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .dots__link:hover .dots__label,
  .dots__link:focus-visible .dots__label { opacity: 1; transform: translate(0, -50%); }
}

/* ---------- Панель доступності ---------- */
.a11y {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 1rem);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
  z-index: 50;
}

/* Око (і в кнопці, і в закритті) */
.eye { display: block; overflow: visible; }
.eye__lid { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.eye__pupil { fill: currentColor; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.eye__lid,
.eye__pupil { transform-box: fill-box; transform-origin: center; }
.eye--blink .eye__lid,
.eye--blink .eye__pupil { animation: eye-blink 0.36s ease-in-out; }
@keyframes eye-blink {
  0%, 100% { transform: scaleY(1); }
  45%, 55% { transform: scaleY(0.08); }
}

.a11y__toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.25s ease;
}
.a11y__toggle:hover { transform: scale(1.06); }
.a11y__toggle:hover .eye__pupil { transform: translateX(2.5px); }
.a11y__toggle[aria-expanded="true"] .eye__pupil { transform: translateY(-2.5px); }

.a11y__tooltip {
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  padding: 0.375rem 0.75rem;
  border-radius: 100px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(0.5rem, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .a11y__toggle:hover .a11y__tooltip,
  .a11y__toggle:focus-visible .a11y__tooltip { opacity: 1; transform: translate(0, -50%); }
}
.a11y__toggle[aria-expanded="true"] .a11y__tooltip { opacity: 0; }

.a11y__backdrop { display: none; }

.a11y__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(22rem, calc(100vw - 2rem));
  padding: 1.25rem;
  border: 2px solid var(--fg);
  border-radius: 1.25rem;
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.18);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: normal;
  word-spacing: normal;
  transform-origin: calc(100% - 1.75rem) calc(100% + 2.5rem);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.a11y__panel[hidden] { display: none; }
.a11y__panel.is-entering,
.a11y__panel.is-leaving { opacity: 0; transform: scale(0.6); }
.a11y__panel.is-leaving { transition-timing-function: cubic-bezier(0.7, 0, 0.84, 0); transition-duration: 0.3s; }

.a11y__handle { display: none; }

.a11y__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.a11y__title {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.a11y__reset {
  min-height: 2.75rem;
  padding: 0 0.5rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.a11y__close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--fg);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
}
/* на наведенні око "мружиться", ніби ось-ось заплющиться */
.a11y__close:hover .eye__lid,
.a11y__close:hover .eye__pupil { transform: scaleY(0.55); transition: transform 0.2s ease; }

.a11y__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 0.75rem;
  margin-top: 1rem;
}
.a11y__group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.a11y__legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
}
.a11y__options {
  display: flex;
  gap: 0.5rem;
}
.a11y__option { position: relative; display: block; }
.a11y__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.a11y__chip {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  border: 2px solid var(--fg);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--fg);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.a11y__option:hover .a11y__chip { transform: translateY(-2px); }
.a11y__input:checked + .a11y__chip { background: var(--fg); color: var(--bg); }
.a11y__input:checked + .a11y__chip,
.a11y__input:checked + .a11y__chip[class*="--scheme"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.a11y__input:focus-visible + .a11y__chip { outline: 3px dashed var(--fg); outline-offset: 5px; }

.a11y__chip--size-m { font-size: 1rem; }
.a11y__chip--size-l { font-size: 1.375rem; }
.a11y__chip--size-xl { font-size: 1.75rem; }

.a11y__chip--scheme-default,
.a11y__input:checked + .a11y__chip--scheme-default { background: #ffffff; color: #000000; border-color: #000000; }
.a11y__chip--scheme-inverted,
.a11y__input:checked + .a11y__chip--scheme-inverted { background: #000000; color: #ffffff; border-color: #000000; }
.a11y__chip--scheme-yellow,
.a11y__input:checked + .a11y__chip--scheme-yellow { background: #000000; color: #ffd60a; border-color: #000000; }
.a11y__chip[class*="--scheme"] { font-size: 1.125rem; }
:root[data-contrast="inverted"] .a11y__chip[class*="--scheme"],
:root[data-contrast="yellow"] .a11y__chip[class*="--scheme"] { border-color: var(--fg); }

.a11y__chip--spacing-default { font-size: 1.125rem; }
.a11y__chip--spacing-wide { font-size: 1rem; word-spacing: 0.2em; }

.a11y__bars { display: flex; align-items: center; gap: 3px; height: 1.25rem; }
.a11y__bars i { display: block; width: 3px; border-radius: 2px; background: currentColor; }
.a11y__bars i:nth-child(1) { height: 40%; }
.a11y__bars i:nth-child(2) { height: 100%; }
.a11y__bars i:nth-child(3) { height: 65%; }
.a11y__bars i:nth-child(4) { height: 30%; }
.a11y__bars--flat { gap: 0; }
.a11y__bars--flat i { width: 5px; height: 2px !important; border-radius: 0; }

/* Мобільні: панель як шторка знизу, без прокрутки */
@media (max-width: 47.99em) {
  .a11y__backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.5);
    transition: opacity 0.3s ease;
  }
  .a11y__backdrop[hidden] { display: none; }
  .a11y__backdrop.is-entering,
  .a11y__backdrop.is-leaving { opacity: 0; }

  .a11y__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    padding: 0.5rem calc(env(safe-area-inset-right, 0px) + 1rem) calc(env(safe-area-inset-bottom, 0px) + 1.25rem) calc(env(safe-area-inset-left, 0px) + 1rem);
    border-width: 2px 0 0;
    border-radius: 1.5rem 1.5rem 0 0;
    box-shadow: none;
    transform: translateY(var(--drag, 0px));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: none;
  }
  .a11y__panel.is-dragging { transition: none; }
  .a11y__panel.is-entering { opacity: 1; transform: translateY(100%); }
  .a11y__panel.is-leaving {
    opacity: 1;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.84, 0);
  }
  .a11y__handle {
    display: block;
    width: 2.75rem;
    height: 0.3125rem;
    margin: 0 auto 0.5rem;
    border-radius: 100px;
    background: var(--fg);
    opacity: 0.35;
  }
  .a11y__groups { margin-top: 0.75rem; gap: 0.875rem 0.75rem; }
  .a11y__chip { width: 2.75rem; height: 2.75rem; }
  .a11y__tooltip { display: none; }
}
/* Дуже вузькі телефони: одна колонка, підпис ліворуч, кнопки праворуч */
@media (max-width: 23.5em) {
  .a11y__groups { grid-template-columns: 1fr; gap: 0.625rem; }
  .a11y__legend { float: left; width: 6.5rem; margin: 0; line-height: 2.75rem; }
  .a11y__options { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .eye--blink .eye__lid,
  .eye--blink .eye__pupil { animation: none; }
}

/* =========================================================
   Планшет і десктоп: розкладка за сіткою 12 колонок з макета
   ========================================================= */
@media (min-width: 48em) {
  .hero__title { grid-column: 1 / 9; grid-row: 2; }
  .hero__lead { grid-column: 9 / -1; grid-row: 2; align-self: start; margin-top: clamp(3rem, 4.44vw, 4rem); margin-inline-start: calc(-1 * var(--gap)); max-width: 13em; }

  .intro__text--lead { grid-column: 1 / 9; }
  .intro__text--shifted { grid-column: 5 / -1; }

  .problem__phrases { grid-column: 1 / -1; grid-row: 1; }
  .problem__icon { grid-column: 10 / -1; grid-row: 1; align-self: end; justify-self: end; margin-top: 0; margin-bottom: 0.5rem; }
  .problem__text { grid-column: 1 / 7; grid-row: 2; }
  .problem__text--right { grid-column: 7 / -1; }

  .alt-text__title { grid-column: 1 / 8; grid-row: 1; }
  .alt-text__aside { grid-column: 8 / -1; grid-row: 1; margin-top: 0; padding-top: calc(var(--fs-xl) * 0.92); }
  .alt-text__example { grid-column: 1 / 11; }

  .howto__title,
  .howto__subtitle { grid-column: 5 / -1; }
  .network__col { grid-column: span 6; }

  .video__title { grid-column: 1 / 6; }
  .video__text { grid-column: 1 / 9; }
  .video__text--shifted { grid-column: 5 / -1; }

  .flashmob__text { grid-column: 1 / 7; }
  .flashmob__text--shifted { grid-column: 3 / -1; }
  .flashmob__figure { grid-column: 1 / 5; grid-row: span 1; }
  .flashmob__steps { grid-column: 6 / -1; align-self: start; }
  .flashmob__figure,
  .flashmob__steps { grid-row: 5; }
  .flashmob__outro-line--shifted { margin-inline-start: calc((100% + var(--gap)) / 6); }

  .share__title { grid-column: 1 / 12; }
  .share__text--shifted { grid-column: 5 / -1; }
  .share__text { grid-column: 1 / 9; }

  .footer__brand,
  .footer__caption { grid-column: 8 / -1; }
}

/* Великі заголовки на десктопі не переносяться всередині рядка */
@media (min-width: 64em) {
  :root:not([data-font-size="xl"]) .title--xl .title__line,
  :root:not([data-font-size="xl"]) .problem__phrase { white-space: nowrap; }
}

/* Мобільні: менші зсуви рядків заголовків, щоб нічого не вилазило */
@media (max-width: 47.99em) {
  .title__line--shift-3,
  .title__line--shift-4 { margin-inline-start: 12%; }
  .title__line--shift-7 { margin-inline-start: 24%; }
  .hero__date-part:nth-child(2) { justify-self: center; }
  .flashmob__figure { max-width: 16rem; }
  .hero { --fs-display: clamp(5.5rem, 26vw, 9rem); }
}

/* Великий текст: прибираємо зсуви, щоб рядки не переносилися дивно */
:root[data-font-size="xl"] .title__line[class*="--shift"],
:root[data-font-size="xl"] .flashmob__outro-line--shifted { margin-inline-start: 0; }

/* Вимкнення анімацій */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Режим примусових кольорів Windows */
@media (forced-colors: active) {
  .btn,
  .tag,
  .a11y__chip { border-color: ButtonText; }
  .dots { mix-blend-mode: normal; color: CanvasText; }
}

/* Друк */
@media print {
  .a11y, .dots, .skip-link { display: none; }
  .section--dark { --bg: #fff; --fg: #000; }
  .section { padding-block: 1.5rem; }
}

/* ---------- Сторінка 404 ---------- */
.notfound__title { margin-top: 2rem; }
.notfound__text { margin-top: 2rem; }
.notfound__btn { margin-top: 3rem; }
