/* «Добро как искусство» — выставочная страница Science Art.
   Типографика: Hagrid (заголовки) + Hagrid Text (набор) + моноширинный слой данных */

@font-face {
  font-family: "Hagrid";
  src: url("assets/hagrid-font/Hagrid-Heavy.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid";
  src: url("assets/hagrid-font/Hagrid-Extrabold.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid";
  src: url("assets/hagrid-font/Hagrid-ExtraboldItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid";
  src: url("assets/hagrid-font/Hagrid-Thin.otf") format("opentype");
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid";
  src: url("assets/hagrid-font/Hagrid-ThinItalic.otf") format("opentype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid Text";
  src: url("assets/hagrid-font/HagridText-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid Text";
  src: url("assets/hagrid-font/HagridText-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hagrid Text";
  src: url("assets/hagrid-font/HagridText-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #202c52;            /* фирменный тёмно-синий выставки */
  --ink-deep: #141c38;
  --paper: #f3f1ec;
  --paper-dim: rgba(243, 241, 236, 0.72);
  --magenta: #e8537f;        /* неоновые линии паттерна */
  --blue: #5d7df0;
  --hairline: rgba(243, 241, 236, 0.2);
  --display: "Hagrid", "Arial Black", sans-serif;
  --text: "Hagrid Text", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--text);
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(22, 31, 61, 0.86), rgba(22, 31, 61, 0.86)),
    url("assets/pattern.jpg");
  background-size: auto, 900px auto;
  background-attachment: fixed;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; }

h2 em, h3 em {
  font-style: italic;
  background: linear-gradient(92deg, var(--magenta), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* моноширинный «слой данных» */
.data {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 241, 236, 0.6);
}

/* ---------- Переключатель языка ---------- */

.lang {
  /* absolute: остаётся в углу хиро и уезжает вместе со скроллом */
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 60;
  display: flex;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(243, 241, 236, 0.35);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(20, 28, 56, 0.65);
  backdrop-filter: blur(8px);
}

.lang__btn {
  padding: 0.5em 1em;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.lang__btn:hover:not(.is-active) { color: var(--paper); }

.lang__btn.is-active {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Появление при прокрутке ---------- */

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* картинки раскрываются из кадра */
.reveal .work__zoom img {
  clip-path: inset(12% 9%);
  transform: scale(1.07);
  transition: clip-path 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s, transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s;
}

.reveal.is-visible .work__zoom img {
  clip-path: inset(0);
  transform: scale(1);
}

/* ---------- Шторки-переходы между работами ---------- */

/* тёмная панель с градиентной «сканирующей» кромкой проезжает по работе,
   открывая её, — классический page-transition wipe.
   Активна только при JS (.reveal), иначе контент остаётся открытым */
.work.reveal::after {
  content: "";
  position: absolute;
  inset: -1rem -1.25rem;
  z-index: 3;
  background: var(--ink-deep);
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--magenta), var(--blue)) 1;
  transform: scaleX(1);
  transform-origin: right;
  pointer-events: none;
}

/* чётные работы открываются в другую сторону */
.work.reveal:nth-of-type(even):not(.work--diptych)::after {
  transform-origin: left;
  border-left: none;
  border-right: 2px solid;
  border-image: linear-gradient(180deg, var(--blue), var(--magenta)) 1;
}

/* диптих: шторка схлопывается к центру, открывая пару с краёв */
.work--diptych.reveal::after {
  transform-origin: center;
  border-left: 2px solid;
  border-right: 2px solid;
  border-image: linear-gradient(180deg, var(--magenta), var(--blue)) 1;
}

.work.reveal.is-visible::after {
  animation: curtain-wipe 1.05s cubic-bezier(0.65, 0, 0.35, 1) 0.1s forwards;
}

@keyframes curtain-wipe {
  to { transform: scaleX(0); }
}

/* цитаты проявляются из расфокуса — после того как шторка соседней работы ушла */
.interlude.reveal blockquote {
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.97);
  transition: opacity 1s ease 0.15s, filter 1s ease 0.15s, transform 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s;
}

.interlude.reveal.is-visible blockquote {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

/* лёгкая каскадность шагов процесса и карточек глоссария */
.process__steps li:nth-child(2), .glossary__card:nth-child(2) { transition-delay: 0.12s; }
.process__steps li:nth-child(3), .glossary__card:nth-child(3) { transition-delay: 0.24s; }
.process__steps li:nth-child(4) { transition-delay: 0.36s; }
.process__steps li:nth-child(5) { transition-delay: 0.48s; }

/* ЭЭГ-линия прорисовывается */
.eeg {
  display: block;
  width: min(1180px, calc(100% - 3rem));
  height: 56px;
  margin: 0 auto;
}

.eeg path {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
}

.eeg.is-visible path {
  animation: eeg-draw 2.6s cubic-bezier(0.3, 0, 0.2, 1) forwards;
}

@keyframes eeg-draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- Scroll-driven переходы между работами ----------
   по мотивам codepen.io/giana/pen/BabdgjB: мягкий скролл-снэп по работам,
   переход «вшит» в прокрутку — уходящая работа уменьшается и гаснет,
   входящая набирает масштаб. В браузерах без поддержки остаются IO-анимации */

@supports (animation-timeline: view()) {
  html {
    scroll-snap-type: y proximity;
  }

  .work {
    scroll-snap-align: center;
  }

  .work {
    animation:
      work-enter linear both,
      work-exit linear both;
    animation-timeline: view(), view();
    animation-range: entry 5% entry 95%, exit 5% exit 95%;
  }

  @keyframes work-enter {
    from {
      opacity: 0.1;
      transform: scale(0.88) translateY(9vh);
    }
  }

  @keyframes work-exit {
    to {
      opacity: 0.1;
      transform: scale(0.88) translateY(-9vh);
    }
  }

  /* масштабом и прозрачностью работ управляет скролл —
     одноразовый IO-сдвиг для них отключаем (шторка-вайп остаётся) */
  .work.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* цитаты тоже «прокручиваются» сквозь фокус */
  .interlude {
    animation:
      interlude-enter linear both,
      interlude-exit linear both;
    animation-timeline: view(), view();
    animation-range: entry 10% entry 90%, exit 10% exit 90%;
  }

  @keyframes interlude-enter {
    from { opacity: 0; transform: scale(0.95); }
  }

  @keyframes interlude-exit {
    to { opacity: 0; transform: scale(0.95); }
  }

  .interlude.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* фоновые номера медленно дрейфуют при прокрутке */
  .work::before {
    animation: num-drift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  @keyframes num-drift {
    from { translate: 0 70px; }
    to   { translate: 0 -70px; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .reveal, .reveal .work__zoom img { opacity: 1; transform: none; clip-path: none; transition: none; }
  .eeg path { stroke-dashoffset: 0; animation: none; }
  .ticker__track { animation: none; }
  .work, .interlude, .work::before { animation: none; }
  .work.reveal::after { display: none; }
  .interlude.reveal blockquote { opacity: 1; filter: none; transform: none; transition: none; }
}

/* ---------- Хиро ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(22, 31, 61, 0.42), rgba(32, 44, 82, 0.78)),
    url("assets/pattern.jpg");
  background-size: auto, 900px auto;
  background-attachment: fixed;
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 1.8rem;
}

.hero__meta { margin-bottom: 1.5rem; }

/* ряд: плашка ART&Science BRICS+ (с лого «Удобный город» внутри) + лого Десятилетия науки справа */
.hero__badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  align-self: flex-start;
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(40px);
  animation: hero-line 1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--display);
  font-weight: 100;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  letter-spacing: 0.04em;
  color: #fff;
  background: #d6175e;
  border-radius: 999px;
  padding: 0.4em 1.3em;
  box-shadow: 0 10px 30px rgba(214, 23, 94, 0.35);
}

.hero__badge-logo {
  width: auto;
  height: 1.7em;
}

.hero__badge-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.hero__badge-link:hover { opacity: 1; }

.hero__badge-mc {
  width: auto;
  height: clamp(1.65rem, 2.9vw, 2.25rem);
}

.hero__badge-10e {
  width: auto;
  height: clamp(1.65rem, 2.9vw, 2.25rem);
}

@media (prefers-reduced-motion: reduce) {
  .hero__badge-row { animation: none; opacity: 1; transform: none; }
}

.hero__title {
  line-height: 0.93;
  margin-bottom: 0.9rem;
  font-weight: 900;
}

.hero__line {
  display: block;
  font-size: clamp(2.9rem, 9.5vw, 7rem);
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(40px);
  animation: hero-line 1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero__line { animation-delay: 0.15s; }
.hero__line:nth-child(2) { animation-delay: 0.33s; }
.hero__line:nth-child(3) { animation-delay: 0.51s; }

@keyframes hero-line {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__line { animation: none; opacity: 1; transform: none; }
}

.hero__line--solid { color: var(--paper); }

.hero__line--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(243, 241, 236, 0.8);
  margin-left: 0.3em;
}

.hero__line--gradient {
  background: linear-gradient(92deg, var(--magenta) 12%, var(--blue) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* английская версия: третья строка длинная и малиновая */
.hero__line--crimson { color: var(--magenta); }

.hero__line--long {
  font-size: clamp(1.7rem, 4.6vw, 3.4rem);
  letter-spacing: 0.01em;
  margin-top: 0.2em;
}

.hero__subtitle {
  font-family: var(--display);
  font-weight: 100;
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: 0.05em;
  color: var(--paper-dim);
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(40px);
  animation: hero-line 1s cubic-bezier(0.22, 0.61, 0.36, 1) 0.65s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero__subtitle { animation: none; opacity: 1; transform: none; }
}

.hero__lead {
  max-width: 32em;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--paper-dim);
  margin-bottom: 1.2rem;
}

.hero__data { margin-bottom: 1.8rem; }

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.hero__note {
  max-width: 30em;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--paper-dim);
  border-left: 2px solid;
  border-image: linear-gradient(180deg, var(--magenta), var(--blue)) 1;
  padding-left: 1em;
}

.hero__cta {
  align-self: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  text-decoration: none;
  padding: 0.9em 2.1em;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.hero__cta:hover {
  background: var(--magenta);
  color: var(--paper);
  transform: translateY(-2px);
}

/* невысокие экраны (ноутбуки): хиро целиком в один экран вместе с бегущей строкой */
@media (max-height: 840px) and (min-width: 761px) {
  .hero__inner { padding-top: 1.4rem; padding-bottom: 1.1rem; }
  .hero__meta { margin-bottom: 1rem; }
  .hero__badge-row { margin-bottom: 0.9rem; }
  .hero__badge { font-size: 1rem; }
  .hero__badge-10e { height: 1.6rem; }
  .hero__title { margin-bottom: 0.7rem; }
  .hero__line { font-size: clamp(2.6rem, 7vw, 5.2rem); }
  .hero__subtitle { font-size: 1.15rem; margin-bottom: 1rem; }
  .hero__lead { font-size: 0.95rem; margin-bottom: 0.9rem; }
  .hero__data { margin-bottom: 1.2rem; }
}

/* бегущая строка данных */

.ticker {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
  background: rgba(20, 28, 56, 0.6);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 70s linear infinite;
}

.ticker__track span {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.9em 0;
  color: rgba(243, 241, 236, 0.55);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- О проекте ---------- */

.about {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
}

.about__inner { max-width: 1020px; margin: 0 auto; }

.about__quote {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  margin-bottom: 2.6rem;
  max-width: 26em;
}

.about__cols {
  columns: 2;
  column-gap: 3rem;
  font-size: 1.02rem;
}

.about__cols p { margin-bottom: 1.2em; break-inside: avoid; }

.about__stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.6rem;
}

.about .stamp {
  color: var(--ink);
  border: 1px solid rgba(32, 44, 82, 0.45);
  border-radius: 999px;
  padding: 0.55em 1.3em;
}

/* ---------- Процесс ---------- */

.process {
  border-top: 1px solid var(--hairline);
  padding: clamp(4rem, 9vw, 6.5rem) 1.5rem;
}

.process__inner { max-width: 1180px; margin: 0 auto; }

.process__title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  margin-bottom: 3rem;
}

.process__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem 1.6rem;
}

.process__steps li {
  border-top: 1px solid var(--hairline);
  padding-top: 1.1rem;
}

.process__num {
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--magenta);
  margin-bottom: 1rem;
}

.process__steps li:nth-child(even) .process__num { color: var(--blue); }

.process__steps h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.process__steps p {
  font-size: 0.88rem;
  color: var(--paper-dim);
}

/* ---------- Коллекция ---------- */

.collection {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem clamp(4rem, 9vw, 7rem);
  display: flex;
  flex-direction: column;
  gap: clamp(5rem, 11vw, 9rem);
}

.work {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

/* гигантский контурный номер за текстом */
.work::before {
  content: attr(data-num);
  position: absolute;
  z-index: 0;
  top: -0.15em;
  right: -0.04em;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(6rem, 15vw, 12rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(243, 241, 236, 0.13);
  pointer-events: none;
}

.work:nth-child(even)::before { right: auto; left: -0.04em; }

/* чередование сторон (interlude тоже child, поэтому правило по nth не годится —
   используем nth-of-type по article) */
.work:nth-of-type(even):not(.work--diptych) .work__frame { order: 2; }
.work:nth-of-type(even):not(.work--diptych) .work__text { order: 1; }
.work:nth-of-type(even)::before { right: auto; left: -0.04em; }
.work:nth-of-type(odd)::before { left: auto; right: -0.04em; }

.work__frame {
  margin: 0;
  position: relative;
  z-index: 1;
}

.work__zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(243, 241, 236, 0.25);
  background: none;
  cursor: zoom-in;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.work__zoom:hover {
  transform: translateY(-5px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}

/* метки-уголки как на лабораторном кадре */
.work__frame::before,
.work__frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.work__frame::before {
  top: -7px;
  left: -7px;
  border-top: 1.5px solid var(--magenta);
  border-left: 1.5px solid var(--magenta);
}

.work__frame::after {
  bottom: 16px;
  right: -7px;
  border-bottom: 1.5px solid var(--blue);
  border-right: 1.5px solid var(--blue);
}

.work__frame figcaption {
  margin-top: 0.8rem;
}

.work h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.08;
  margin-bottom: 1.3rem;
}

.work__text {
  position: relative;
  z-index: 1;
}

.work__text p {
  color: var(--paper-dim);
  margin-bottom: 1em;
  max-width: 36em;
}

/* ---------- Цитаты-интерлюдии ---------- */

.interlude { text-align: center; }

.interlude blockquote p {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem);
  line-height: 1.22;
  max-width: 24em;
  margin: 0 auto 1.2rem;
  color: var(--paper);
}

.interlude blockquote p::before,
.interlude blockquote p::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin: 1.4rem auto;
  background: linear-gradient(90deg, var(--magenta), var(--blue));
}

/* ---------- Диптих ---------- */

.work--diptych {
  display: block;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.work--diptych::before { top: 0.4em; }

.diptych__head {
  max-width: 640px;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.diptych__head h3 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-bottom: 1.2rem;
}

.diptych__head p { color: var(--paper-dim); }

.diptych__pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}

.diptych__plus {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.2rem);
  background: linear-gradient(135deg, var(--magenta), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  align-self: center;
}

.diptych__item h4 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 1.5rem 0 0.7rem;
}

.diptych__item p {
  color: var(--paper-dim);
  font-size: 0.95rem;
}

/* ---------- Глоссарий ---------- */

.glossary {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(4rem, 9vw, 6.5rem) 1.5rem;
}

.glossary__inner { max-width: 1020px; margin: 0 auto; }

.glossary h2 {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.12;
  max-width: 20em;
  margin-bottom: 2.8rem;
}

.glossary__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.glossary__card {
  border: 1px solid rgba(32, 44, 82, 0.35);
  border-top: 3px solid var(--magenta);
  padding: 1.6rem 1.4rem;
  background: var(--paper);
}

.glossary__card:nth-child(2) { border-top-color: var(--blue); }
.glossary__card:nth-child(3) { border-top-color: var(--ink); }

.glossary__card dt {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.glossary__card dd { font-size: 0.92rem; line-height: 1.55; }

/* ---------- Допблоки: майндтрекинг, научное волонтёрство, арт-сайнс ---------- */

.extras {
  padding: clamp(3.5rem, 8vw, 6rem) 1.5rem;
}

.extras__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 7vw, 4.5rem);
}

/* открытые блоки в духе остального лэйаута: волосяная линия,
   моно-киккер, заголовок, текст; каждый следующий зеркалит предыдущий */
.extras__item {
  width: min(100%, 800px);
  align-self: flex-start;
  border-top: 1px solid var(--hairline);
  padding-top: 1.2rem;
  scroll-margin-top: 2rem;
}

.extras__item:nth-child(even) { align-self: flex-end; }

.extras__kicker {
  color: var(--magenta);
  margin-bottom: 1.1rem;
}

.extras__item:nth-child(even) .extras__kicker { color: var(--blue); }

.extras__item h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
}

.extras__item p {
  color: var(--paper-dim);
  font-size: 0.97rem;
  max-width: 46em;
}

.extras__item p + p { margin-top: 1rem; }

/* фото майндтрекера: тонкая рамка как у работ коллекции */
.extras__eeg-wrap {
  float: right;
  position: relative;
  width: min(40%, 240px);
  margin: 0.3rem 0 1.2rem 1.8rem;
  border: 1px solid rgba(243, 241, 236, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  line-height: 0;
}

.extras__img {
  width: 100%;
  display: block;
}

.extras__eeg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.extras__text::after { content: ""; display: block; clear: both; }

@media (max-width: 600px) {
  .extras__eeg-wrap { float: none; width: min(100%, 260px); margin: 0 0 1.2rem; }
}

/* ссылки-определения из текста на допблоки */
.deflink {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--magenta);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 0.25s, text-decoration-color 0.25s;
}

.deflink:hover {
  color: #fff;
  text-decoration-style: solid;
  text-decoration-color: var(--blue);
}

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

.closing {
  background: var(--ink-deep);
  padding: clamp(2.2rem, 5vw, 4rem) 1.5rem;
  border-top: 1px solid rgba(243, 241, 236, 0.12);
}

.closing__inner { max-width: 880px; margin: 0 auto; text-align: center; }

.closing h2 {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1.6rem;
}

.closing p {
  color: var(--paper-dim);
  max-width: 44em;
  margin: 0 auto 1.8rem;
}

.closing__sign {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 1.4rem;
}

/* ---------- Плашка партнёров под футером ---------- */

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.8rem 3.2rem;
  background: var(--ink-deep);
  border-top: 1px solid var(--hairline);
  padding: 2.4rem 1.5rem 2.8rem;
}

.partners__link {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.partners__link:hover { opacity: 1; }

.partners__logo {
  width: auto;
  height: clamp(3rem, 5vw, 3.8rem);
  opacity: 0.9;
}

/* широкие горизонтальные логотипы — ниже, чтобы не доминировали */
.partners__logo--wide {
  height: clamp(2rem, 3.4vw, 2.6rem);
}

/* ---------- Лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 18, 36, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: lightbox-in 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--paper);
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Планшет и мобильные ---------- */

@media (max-width: 980px) {
  .process__steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .work { grid-template-columns: 1fr; }

  .work:nth-of-type(even):not(.work--diptych) .work__frame { order: 0; }
  .work:nth-of-type(even):not(.work--diptych) .work__text { order: 0; }

  .work::before,
  .work:nth-of-type(odd)::before,
  .work:nth-of-type(even)::before {
    font-size: 5rem;
    top: -0.75em;
    right: 0;
    left: auto;
  }

  .diptych__pair { grid-template-columns: 1fr; }
  .diptych__plus { text-align: center; }

  .about__cols { columns: 1; }

  .process__steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .process__steps li { transition-delay: 0s; }

  .glossary__cards { grid-template-columns: 1fr; }

  .hero { min-height: 88vh; }

  /* чтобы переключатель языка не перекрывал верхнюю мета-строку:
     прижимаем контент к верху (центрирование выталкивало его за край) */
  .hero__inner { justify-content: flex-start; padding-top: 4.6rem; }

  body, .hero { background-attachment: scroll; }
}
