:root {
  --bg: #e8eaed;
  --bg-deep: #dfe3e8;
  --bg-elevated: #f5f6f8;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --border: rgba(15, 23, 42, 0.1);
  --border-subtle: rgba(15, 23, 42, 0.06);
  --text: #0c0d0e;
  --text-soft: #1a1c1f;
  --muted: #5c6370;
  --muted-light: #8b919d;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-dim: rgba(37, 99, 235, 0.12);
  --blue-ring: rgba(37, 99, 235, 0.22);
  --black-soft: #111318;
  --gradient-accent: linear-gradient(145deg, #1e3a5f 0%, #2563eb 55%, #3b6fb8 100%);
  --gradient-subtle: linear-gradient(160deg, #f0f1f4 0%, #e2e5ea 45%, #d8dce3 100%);
  --mesh-a: radial-gradient(ellipse 85% 70% at 15% 5%, rgba(37, 99, 235, 0.06), transparent 55%);
  --mesh-b: radial-gradient(ellipse 75% 55% at 90% 15%, rgba(17, 19, 24, 0.04), transparent 50%);
  --mesh-c: radial-gradient(ellipse 65% 50% at 50% 100%, rgba(92, 99, 112, 0.08), transparent 55%);
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --display: "Outfit", var(--font);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 36px -12px rgba(17, 19, 24, 0.12);
  --shadow-lg: 0 22px 56px -18px rgba(17, 19, 24, 0.16);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--mesh-a), var(--mesh-b), var(--mesh-c), var(--gradient-subtle);
  background-attachment: fixed;
  animation: meshShift 28s ease-in-out infinite alternate;
  position: relative;
  overflow-x: hidden;
}

@keyframes meshShift {
  0% {
    background-position: 0% 0%, 100% 0%, 50% 100%, 0 0;
  }
  100% {
    background-position: 100% 25%, 0% 50%, 50% 0%, 0 0;
  }
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.28;
  animation: blobFloat 18s ease-in-out infinite;
}

.site-bg__blob--1 {
  width: min(400px, 52vw);
  height: min(400px, 52vw);
  top: -10%;
  left: -8%;
  background: linear-gradient(145deg, #9ca3af, #6b7280);
}

.site-bg__blob--2 {
  width: min(360px, 48vw);
  height: min(360px, 48vw);
  top: 38%;
  right: -12%;
  background: linear-gradient(145deg, #64748b, #3b82f6);
  opacity: 0.2;
  animation-delay: -5s;
  animation-duration: 22s;
}

.site-bg__blob--3 {
  width: min(300px, 42vw);
  height: min(300px, 42vw);
  bottom: 0;
  left: 28%;
  background: linear-gradient(145deg, #d1d5db, #94a3b8);
  animation-delay: -9s;
}

@keyframes blobFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(2%, 3%) scale(1.03);
  }
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  text-align: center;
}

/* Фон-мастхед на всех страницах (контент main) */
main.site-main-masthead {
  position: relative;
  isolation: isolate;
  background-color: #0f172a;
  color: rgba(241, 245, 249, 0.92);
}
main.site-main-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: var(--site-masthead-img, none) center / cover no-repeat;
  z-index: 0;
}
main.site-main-masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: linear-gradient(
    125deg,
    rgba(15, 23, 42, 0.92) 0%,
    rgba(15, 23, 42, 0.84) 42%,
    rgba(30, 41, 59, 0.68) 100%
  );
  z-index: 1;
}
main.site-main-masthead > * {
  position: relative;
  z-index: 2;
}

main .form-card,
main .form-row,
main .filters,
main .card-grid,
main .detail-layout,
main .detail-main,
main .messages,
main .project-edit-with-preview {
  text-align: start;
}

main .section.container.detail-main {
  margin-inline: auto;
}

main .section.container > p {
  text-align: start;
}

a {
  color: var(--blue-dark);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
  color: var(--blue);
}

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

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease-out), border-color 0.35s ease;
}
.site-header:hover {
  box-shadow: 0 4px 24px -8px rgba(17, 19, 24, 0.1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0.65rem 0;
  min-width: 0;
}
.site-header__primary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(0.5rem, 2vw, 1rem);
  width: 100%;
  min-width: 0;
}
.site-header__nav.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem clamp(0.45rem, 1.2vw, 0.9rem);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  justify-content: flex-end;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
/* Чтобы ссылки не сжимались ниже текста — скроллится вся полоса, а не «теряются» пункты */
.site-header__nav.nav > * {
  flex-shrink: 0;
}
.site-header__nav.nav::-webkit-scrollbar {
  height: 0;
  width: 0;
}

/* Узкий экран и телефоны: две строки (лого + язык | меню с переносом), без обрезки пунктов.
   Раньше было max-width 640px — часть устройств/режимов даёт большую ширину в CSS px, правила не срабатывали. */
@media (max-width: 900px) {
  .site-header__inner {
    padding-block: 0.5rem;
  }
  .site-header__primary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    row-gap: 0.45rem;
    column-gap: 0.5rem;
  }
  .site-header__primary > .logo {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .site-header__primary > .site-header__nav.nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    overflow-x: visible;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    row-gap: 0.35rem;
    column-gap: 0.4rem 0.55rem;
    padding-bottom: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: auto;
  }
  .site-header__primary > .site-header__nav.nav::-webkit-scrollbar {
    height: 0;
    width: 0;
  }
  .site-header__primary > .lang-switch {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .site-header__nav.nav a:not(.btn) {
    font-size: 0.84rem;
    padding-bottom: 1px;
  }
  .site-header__nav.nav .btn--sm {
    padding: 0.38rem 0.65rem;
    font-size: 0.8rem;
  }
}

.site-header__logout {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
}
.site-header__logout button {
  flex-shrink: 0;
}
.lang-switch {
  flex: 0 0 auto;
  flex-shrink: 0;
}
.lang-switch--ru-en {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.site-header .lang-switch--ru-en .lang-switch__form {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  margin: 0;
  padding: 0;
  width: auto;
  min-width: 0;
  border: none;
  background: transparent;
  gap: 0;
}
.lang-switch__btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.4rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted-light);
  cursor: pointer;
  transition: color 0.18s ease;
  line-height: 1;
  white-space: nowrap;
}
.lang-switch--ru-en .lang-switch__btn:hover {
  color: var(--muted);
  background: transparent;
}
.lang-switch--ru-en .lang-switch__btn.is-active {
  background: transparent;
  color: var(--blue-dark);
  font-weight: 700;
}
.lang-switch--ru-en .lang-switch__btn.is-active:hover {
  color: var(--blue);
  background: transparent;
}
.lang-switch__sep {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 0 0.05rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.5;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.logo {
  flex-shrink: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--black-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.logo:hover {
  transform: translateY(-1px);
}
.logo span {
  color: var(--blue-dark);
  transition: color 0.25s ease;
}
.logo:hover span {
  color: var(--blue);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}
.nav a:not(.btn) {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding-bottom: 2px;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--blue-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
  border-radius: 2px;
  opacity: 0.85;
}
.nav a:not(.btn):hover::after,
.nav a:not(.btn).is-active::after {
  transform: scaleX(1);
}
.nav a:not(.btn):hover,
.nav a:not(.btn).is-active {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s var(--ease-out), background 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}
.btn:active {
  transform: scale(0.98) translateY(0);
}
a.btn--primary:hover,
a.btn--ghost:hover,
button.btn:hover {
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--gradient-accent);
  color: #f8fafc;
  box-shadow: 0 4px 18px -4px rgba(29, 78, 216, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 12px 32px -6px rgba(29, 78, 216, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  border-color: var(--blue-ring);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
}
a.btn--primary:active,
a.btn--ghost:active,
button.btn:active {
  transform: scale(0.97);
}
.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.hero {
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 2.5rem;
}
.hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
.hero__intro {
  min-width: 0;
  text-align: start;
}

/* Главная: заголовок и лид — одна вертикаль, по центру колонки (как секции ниже) */
.hero--home .hero__intro {
  text-align: center;
}
.hero--home .hero__intro h1,
.hero--home .hero__intro .hero__lead {
  max-width: min(36rem, 100%);
  margin-inline: auto;
}
.hero--home .hero__intro .hero__lead {
  margin-bottom: 1.75rem;
  text-align: center;
}
.hero--home .hero__intro h1 {
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--black-soft);
}

.hero__lead {
  color: var(--text-soft);
  font-size: clamp(1.22rem, 1.08rem + 0.55vw, 1.46rem);
  line-height: 1.56;
  max-width: 38ch;
  margin: 0 0 1.75rem;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  min-height: 280px;
  min-width: 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.hero--home .hero-visual:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 52px -20px rgba(17, 19, 24, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.hero-visual__art {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1.1rem 1rem;
  background: linear-gradient(165deg, #eef1f5 0%, #e4e7ed 48%, #dce0e8 100%);
}

.hero--home .hero-visual__art--masthead {
  padding: 0;
  min-height: min(260px, 38vw);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero--home .hero-visual__art--masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(245, 246, 248, 0.55) 100%);
  pointer-events: none;
}

.hero-visual__art img {
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: min(240px, 42vw);
  object-fit: contain;
  display: block;
}

.hero-visual__panel {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 0;
  padding: 1.35rem 1.35rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
  box-shadow: none;
}
.hero-visual__title {
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--black-soft);
  line-height: 1.2;
}
.hero-visual__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Главная: карусель в правом блоке героя */
.hero-visual--carousel {
  padding: 0;
  min-height: 0;
  align-self: start;
  max-height: min(520px, 88vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.hero-visual--carousel .hero-carousel {
  /* Высота только зоны изображения; подпись ниже — картинка визуально доминирует */
  --hero-carousel-media-h: clamp(200px, 44vw, 280px);
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
}
.hero-carousel__media-stage {
  position: relative;
  flex: 0 0 auto;
  height: var(--hero-carousel-media-h);
  max-height: 280px;
  overflow: hidden;
}
.hero-carousel__nav-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.35rem;
  pointer-events: none;
  z-index: 4;
}
.hero-carousel__nav-overlay .hero-carousel__btn {
  pointer-events: auto;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 19, 24, 0.12);
  color: var(--black-soft);
  box-shadow: 0 2px 14px rgba(17, 19, 24, 0.12);
  backdrop-filter: blur(6px);
}
.hero-carousel__nav-overlay .hero-carousel__btn:hover {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
}
.hero-carousel__track {
  display: flex;
  align-items: stretch;
  height: 100%;
  transition: transform 0.55s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel__track {
    transition: none;
  }
}
.hero-carousel__media-cell {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}
.hero-carousel__caption-stage {
  flex: 0 0 auto;
  overflow: hidden;
  min-width: 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}
.hero-carousel__caption-stage .hero-carousel__track {
  height: auto;
}
.hero-carousel__caption-cell {
  flex: 0 0 100%;
  min-width: 0;
}
.hero-carousel__media {
  position: relative;
  height: 100%;
  background: linear-gradient(165deg, #eef1f5 0%, #dce0e8 100%);
  overflow: hidden;
}
.hero-carousel__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(245, 246, 248, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-carousel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-carousel__caption {
  padding: 0.75rem 1.15rem 0.65rem;
  min-width: 0;
  text-align: start;
}
.hero-carousel__title {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
  color: var(--black-soft);
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-carousel__text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-carousel__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.hero-carousel__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hero-carousel__dots-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 1rem 0.55rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}
.hero-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-carousel__dot:hover {
  background: var(--muted);
}
.hero-carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.15);
}
.hero-carousel__dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #eef0f3;
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.section {
  padding: 2.75rem 0;
}
.section--tight {
  padding-top: 1.5rem;
}
.section__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--black-soft);
}
.section__lead {
  color: var(--text-soft);
  font-size: clamp(1.12rem, 1.02rem + 0.28vw, 1.24rem);
  line-height: 1.6;
  max-width: 56ch;
  margin: 0 auto 2rem;
  text-align: start;
}
.section--directions .section__lead,
.section--featured .section__lead {
  font-size: clamp(1.2rem, 1.06rem + 0.5vw, 1.42rem);
  line-height: 1.62;
  color: #f1f5f9;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.32);
}

.section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.card-grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card-grid > * {
  min-width: 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.4s var(--ease-out), border-color 0.35s ease, box-shadow 0.4s var(--ease-out);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 20px 48px -16px rgba(17, 19, 24, 0.18), 0 0 0 1px rgba(37, 99, 235, 0.08);
}
.project-card__visual {
  height: 160px;
  position: relative;
  background: var(--card-bg, linear-gradient(145deg, #cbd5e1, #64748b));
  overflow: hidden;
  min-width: 0;
}
.project-card__visual--img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(17, 19, 24, 0.12));
  z-index: 1;
  pointer-events: none;
}
.project-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.project-card:hover .project-card__visual img {
  transform: scale(1.04);
}

/* Главная и каталог: выше превью (~55–60% карточки при компактном тексте) */
.project-card--home > .project-card__visual,
.project-card--catalog .project-card__primary > .project-card__visual {
  height: 200px;
}

/* Блок "Направления": превью занимает ~2/3 карточки по вертикали */
.section--directions .project-card {
  min-height: 360px;
}
.section--directions .project-card .project-card__visual {
  height: 240px;
}
.section--directions .project-card .project-card__body {
  padding: 0.8rem 1rem 0.9rem;
  gap: 0.3rem;
}
.section--directions .project-card .project-card__body h3 {
  font-size: 1.02rem;
  line-height: 1.2;
}
.section--directions .project-card .project-card__body p {
  font-size: 0.84rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.project-card__body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
  min-width: 0;
}
.project-card__body h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text-soft);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
.project-card__body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}

/* Каталог проектов: без вложенных <a>, контент как на главной внутри основной ссылки */
.project-card--catalog {
  cursor: default;
}
.project-card__primary {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
/* Главная и каталог: компактнее блок с текстом */
.project-card--home > .project-card__body,
.project-card--catalog .project-card__primary .project-card__body {
  flex: 0 1 auto;
  padding: 0.55rem 1.1rem 0.7rem;
  gap: 0.28rem;
}
.project-card--home > .project-card__body h3,
.project-card--catalog .project-card__primary .project-card__body h3 {
  font-size: 1.02rem;
  line-height: 1.18;
}
.project-card--home > .project-card__body p,
.project-card--catalog .project-card__primary .project-card__body p {
  flex: 0 1 auto;
  font-size: 0.82rem;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.project-card--catalog .project-card__extras {
  padding: 0 1.1rem 0.85rem;
  gap: 0.35rem;
}
.project-card__extras {
  padding: 0 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.project-card__repo {
  margin: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.project-card__repo a {
  color: var(--accent);
  font-weight: 600;
}
.project-card__repo-note {
  font-size: 0.75rem;
}
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #eef0f3;
  color: var(--muted);
  border: 1px solid var(--border-subtle);
}

.page-hero {
  padding: 2.25rem 0 1rem;
}
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  align-items: center;
  justify-content: center;
}
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 0.5rem;
  color: var(--black-soft);
}
.page-hero p {
  color: var(--muted);
  margin-block: 0;
  margin-inline: auto;
  max-width: 52ch;
  text-align: start;
}
/* Весь текст блока — основной цвет чтения; «бледность» была из-за .page-hero p { muted } */
.page-hero--participation p,
.page-hero--development p,
.page-hero--clients p,
.page-hero--developers p {
  color: var(--text-soft);
}
.page-hero--participation p + p,
.page-hero--development p + p,
.page-hero--clients p + p,
.page-hero--developers p + p {
  margin-top: 0.85rem;
}
.page-hero--participation .participation-pitch__lead,
.page-hero--development .development-pitch__lead,
.page-hero--clients .clients-pitch__lead,
.page-hero--developers .developers-pitch__lead {
  font-size: 1.06rem;
  line-height: 1.55;
  max-width: 58ch;
}
.page-hero--participation p strong,
.page-hero--development p strong,
.page-hero--clients p strong,
.page-hero--developers p strong {
  color: var(--black-soft);
  font-weight: 600;
}
.participation-page-title,
.development-page-title,
.clients-page-title,
.developers-page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.participation-page-title__emoji,
.development-page-title__emoji,
.clients-page-title__emoji,
.developers-page-title__emoji {
  font-size: 1.35em;
  line-height: 1;
}
.participation-inline-emoji {
  margin-right: 0.2em;
}
.participation-highlights,
.development-highlights,
.clients-highlights,
.developers-highlights {
  list-style: none;
  margin: 1.25rem auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 42rem;
}
.participation-highlight,
.development-highlight,
.clients-highlight,
.developers-highlight {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.65), rgba(248, 249, 251, 0.9));
  box-shadow: var(--shadow-sm);
  text-align: start;
}
.participation-highlight__emoji,
.development-highlight__emoji,
.clients-highlight__emoji,
.developers-highlight__emoji {
  font-size: 1.4rem;
  line-height: 1.35;
  flex-shrink: 0;
}
.participation-highlight__text,
.development-highlight__text,
.clients-highlight__text,
.developers-highlight__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-soft);
  text-align: start;
}
.participation-highlight__title,
.development-highlight__title,
.clients-highlight__title,
.developers-highlight__title {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.participation-cta,
.development-cta,
.clients-cta,
.developers-cta,
.audience-cta {
  margin: 1.35rem auto 0;
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-soft);
  text-align: start;
}

.developers-tech-belt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin-top: 0.65rem;
  justify-content: flex-start;
}
.developers-tech-pill {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  letter-spacing: -0.02em;
}

/* Текст на мастхед-фоне: светлый; внутри светлых карточек/форм — обычная палитра */
main.site-main-masthead .section__title,
main.site-main-masthead .page-hero h1,
main.site-main-masthead .participation-page-title,
main.site-main-masthead .development-page-title,
main.site-main-masthead .clients-page-title,
main.site-main-masthead .developers-page-title,
main.site-main-masthead .participation-form-heading,
main.site-main-masthead .development-form-heading,
main.site-main-masthead .project-detail-features-title {
  color: #f8fafc;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
}

/* Заголовки на светлой карточке проекта — тёмный текст, не «ночные» цвета мастхеда */
main.site-main-masthead .detail-main .section__title,
main.site-main-masthead .detail-main .project-detail-features-title {
  color: var(--black-soft);
  text-shadow: none;
}

main.site-main-masthead .page-hero p {
  color: rgba(226, 232, 240, 0.94);
}
main.site-main-masthead .page-hero p strong {
  color: #fff;
}

main.site-main-masthead .page-hero--participation p,
main.site-main-masthead .page-hero--development p,
main.site-main-masthead .page-hero--clients p,
main.site-main-masthead .page-hero--developers p {
  color: rgba(241, 245, 249, 0.94);
}
main.site-main-masthead .page-hero--participation p strong,
main.site-main-masthead .page-hero--development p strong,
main.site-main-masthead .page-hero--clients p strong,
main.site-main-masthead .page-hero--developers p strong {
  color: #fff;
}

main.site-main-masthead .section__lead {
  color: rgba(203, 213, 225, 0.95);
}

main.site-main-masthead .hero h1 {
  color: #f8fafc;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
}
main.site-main-masthead .hero__lead {
  color: rgba(226, 232, 240, 0.94);
}

main.site-main-masthead .participation-cta,
main.site-main-masthead .development-cta,
main.site-main-masthead .clients-cta,
main.site-main-masthead .developers-cta,
main.site-main-masthead .audience-cta {
  color: rgba(226, 232, 240, 0.96);
}

main.site-main-masthead a:not(.btn):not(.project-card):not(.project-card__primary) {
  color: #93c5fd;
  font-weight: 500;
}
main.site-main-masthead a:not(.btn):not(.project-card):not(.project-card__primary):hover {
  color: #dbeafe;
}

main.site-main-masthead .text-muted {
  color: rgba(203, 213, 225, 0.88) !important;
}

main.site-main-masthead .feature-list li {
  color: rgba(203, 213, 225, 0.92);
}
main.site-main-masthead .detail-main .feature-list--chips li {
  color: var(--text-soft);
}

main.site-main-masthead .filters a {
  color: var(--muted);
  font-weight: 500;
}
main.site-main-masthead .filters a:hover,
main.site-main-masthead .filters a.is-active {
  color: var(--blue-dark);
}

main.site-main-masthead .form-card,
main.site-main-masthead .form-card .text-muted {
  color: var(--text-soft) !important;
}
main.site-main-masthead .form-card a:not(.btn) {
  color: var(--blue-dark);
  font-weight: 500;
}
main.site-main-masthead .form-card a:not(.btn):hover {
  color: var(--blue);
}

main.site-main-masthead .detail-main,
main.site-main-masthead .detail-aside {
  color: var(--text-soft);
}
main.site-main-masthead .detail-main .text-muted,
main.site-main-masthead .detail-aside .text-muted {
  color: var(--muted) !important;
}
main.site-main-masthead .detail-main a:not(.btn),
main.site-main-masthead .detail-aside a:not(.btn) {
  color: var(--blue-dark);
  font-weight: 500;
}
main.site-main-masthead .detail-main a:not(.btn):hover,
main.site-main-masthead .detail-aside a:not(.btn):hover {
  color: var(--blue);
}

main.site-main-masthead a.project-card,
main.site-main-masthead .project-card {
  color: var(--text-soft);
}
main.site-main-masthead .project-card h3 {
  color: var(--black-soft);
}
main.site-main-masthead .project-card .project-card__body p,
main.site-main-masthead .project-card p.text-muted {
  color: var(--muted);
}
main.site-main-masthead .project-card__repo a {
  color: var(--accent);
  font-weight: 600;
}

main.site-main-masthead .hero-visual {
  color: var(--black-soft);
}
main.site-main-masthead .hero-visual .hero-carousel__title {
  color: var(--black-soft);
}
main.site-main-masthead .hero-visual .hero-carousel__text {
  color: var(--muted);
}

main.site-main-masthead .project-preview-panel__inner {
  color: var(--text-soft);
}
main.site-main-masthead .project-preview-panel__inner a:not(.btn) {
  color: var(--blue-dark);
}

main.site-main-masthead .participation-highlight,
main.site-main-masthead .development-highlight,
main.site-main-masthead .clients-highlight,
main.site-main-masthead .developers-highlight {
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.35), var(--shadow-sm);
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.94));
}

main.site-main-masthead .page-hero {
  padding-bottom: 2.5rem;
}

.section--participation-form,
.section--development-form {
  padding-top: 0.5rem;
}
.participation-form-heading,
.development-form-heading {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--black-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.form-card {
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--muted);
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-dim);
}
.form-row textarea {
  min-height: 120px;
  resize: vertical;
}
.form-row .errorlist {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  color: #b91c1c;
  font-size: 0.85rem;
}

/* django-simple-captcha */
.form-row img[src*="captcha"] {
  border-radius: 8px;
  border: 1px solid var(--border);
  display: inline-block;
  vertical-align: middle;
}
.form-row input[name="captcha_1"] {
  max-width: 11rem;
  margin-top: 0.35rem;
}
.form-row .captcha-audio {
  font-size: 0.85rem;
  margin-top: 0.35rem;
  display: inline-block;
}
.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.messages li {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.messages .success {
  background: rgba(22, 101, 52, 0.08);
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.2);
}
.messages .error {
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, #f0f1f4, #e4e6eb);
  color: var(--muted);
  font-size: 0.88rem;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--blue-dark);
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.detail-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .detail-layout--with-aside {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

/* Редактирование проекта: форма + предпросмотр карточки */
.project-edit-with-preview {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .project-edit-with-preview {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  }
  .project-preview-panel {
    position: sticky;
    top: 1rem;
  }
}
.project-preview-panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}
.project-preview-panel__inner {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  max-height: min(88vh, 920px);
  overflow: auto;
}
.project-preview-hero {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}
.project-preview-hero__title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--black-soft);
}
.project-preview-hero__lead {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}
.project-preview-empty {
  color: var(--muted-light) !important;
}
.project-preview-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.detail-layout--preview {
  gap: 1rem;
  grid-template-columns: 1fr;
}
.detail-layout--preview .detail-main,
.detail-layout--preview .detail-aside {
  padding: 1rem;
}
.detail-layout--preview .detail-main {
  box-shadow: none;
  border-color: var(--border-subtle);
}
.detail-layout--preview .detail-aside {
  box-shadow: none;
}
.detail-layout--preview .feature-list {
  margin-top: 0.65rem;
}
.detail-layout--preview .feature-list li {
  font-size: 0.85rem;
}
.project-preview-note {
  margin-bottom: 0;
}
.detail-main {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

/* Страница проекта: медиа над текстом (не .project-card__visual — там фикс. 160px) */
.project-detail__media {
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  overflow: hidden;
  min-height: 12rem;
  aspect-ratio: 16 / 9;
  background: rgba(15, 17, 22, 0.96);
}
.project-detail__cover {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  vertical-align: middle;
}
.project-detail__video {
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
  background: rgba(15, 17, 22, 0.96);
  object-fit: cover;
  vertical-align: middle;
}
/* Видео: фиксированная область по 16:9, кадр заполняет её (иначе object-fit:contain даёт полосы и градиент снизу). */
.project-detail__media--video {
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: 72vh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  line-height: 0;
}
.project-detail__media--video .project-detail__video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  display: block;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
}
@media (max-width: 768px) {
  /* Картинки/не-видео: как раньше, без фиксированного 16:9 */
  .project-detail__media:not(.project-detail__media--video) {
    aspect-ratio: auto;
    min-height: 0;
    max-height: 72vh;
  }
  .project-detail__video {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
  .project-detail__media--video {
    aspect-ratio: 16 / 9;
    max-height: 72vh;
    min-height: 0;
  }
  .project-detail__media--video .project-detail__video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
  }
  .detail-main {
    padding: 1rem;
    min-width: 0;
  }
}
.detail-aside {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, #fafafa, #eceff1);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.detail-aside h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text-soft);
}
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.link-list a {
  font-weight: 500;
}

/* Описание проекта: абзацы и акцент первого блока */
.project-detail-body {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-soft);
}
.project-detail-body > p {
  margin: 0 0 1.05rem;
}
.project-detail-body > p:last-child {
  margin-bottom: 0;
}
.project-detail-body > p:first-of-type {
  font-size: 1.04rem;
  color: var(--black-soft);
}
.project-detail-features-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.project-detail-features-title__icon {
  font-size: 1.1em;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem auto 0;
  display: grid;
  gap: 0.5rem;
  width: fit-content;
  max-width: min(42rem, 100%);
  text-align: start;
}

main .detail-layout .feature-list,
main .detail-layout--preview .feature-list {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
.feature-list li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-dark);
}
.feature-list--chips {
  gap: 0.45rem;
}
.feature-list--chips li {
  padding: 0.45rem 0.75rem;
  padding-left: 0.75rem;
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(37, 99, 235, 0.07), rgba(124, 58, 237, 0.05));
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  line-height: 1.45;
}
.feature-list--chips li::before {
  display: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}
.filters a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.filters a:hover,
.filters a.is-active {
  border-color: var(--blue-ring);
  color: var(--blue-dark);
  background: var(--blue-dim);
}

.text-muted {
  color: var(--muted);
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Главная: появление и скролл-раскрытие —— */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero--home .hero__intro > * {
  animation: fadeInUp 0.7s var(--ease-out) backwards;
}
.hero--home .hero__eyebrow {
  animation-delay: 0.05s;
}
.hero--home .hero__intro > h1 {
  animation-delay: 0.12s;
}
.hero--home .hero__intro > .hero__lead {
  animation-delay: 0.2s;
}
.hero--home .hero__intro > .hero__cta {
  animation: fadeInUp 0.7s var(--ease-out) 0.28s backwards;
}
.hero--home .hero-visual {
  animation: fadeInUp 0.85s var(--ease-out) 0.18s backwards;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out), filter 0.75s var(--ease-out);
  will-change: opacity, transform, filter;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: none;
  will-change: auto;
}

.section--directions .section__title.reveal {
  transition-delay: 0ms;
}
.section--directions .section__lead.reveal {
  transition-delay: 0.07s;
}
.section--directions .card-grid .reveal:nth-child(1) {
  transition-delay: 0.12s;
}
.section--directions .card-grid .reveal:nth-child(2) {
  transition-delay: 0.22s;
}
.section--directions .card-grid .reveal:nth-child(3) {
  transition-delay: 0.32s;
}

/* Главная: модальное приветственное видео */
.hero-carousel__media-cell,
.hero-carousel__caption-cell,
.hero-carousel__dot {
  cursor: pointer;
}
.kw7-intro-modal {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(90vw, 420px);
  width: 100%;
}
.kw7-intro-modal::backdrop {
  background: rgba(10, 12, 18, 0.38);
  backdrop-filter: blur(4px);
}
.kw7-intro-modal__panel {
  position: relative;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  background: var(--surface, #fff);
  box-shadow: 0 24px 80px rgba(10, 12, 18, 0.35);
  border: 1px solid var(--border-subtle, rgba(17, 19, 24, 0.08));
}
.kw7-intro-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(17, 19, 24, 0.12));
  background: rgba(255, 255, 255, 0.95);
  color: var(--black-soft, #111318);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.kw7-intro-modal__close:hover {
  background: #fff;
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent, #2563eb);
}
.kw7-intro-modal__close:focus-visible {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}
.kw7-intro-modal__video-wrap {
  position: relative;
  display: block;
  background: #0f1118;
  max-height: min(52vh, 320px);
}
.kw7-intro-modal__video {
  display: block;
  width: 100%;
  max-height: min(52vh, 320px);
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}
.kw7-intro-unmute {
  position: absolute;
  left: 50%;
  bottom: 3.25rem;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 17, 24, 0.88);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.kw7-intro-unmute:hover {
  background: rgba(37, 99, 235, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
}
.kw7-intro-unmute:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel__media-cell,
  .hero-carousel__caption-cell,
  .hero-carousel__dot {
    cursor: default;
  }
}
