/* flyer.html — онлайн-листовка: слой canvas под полупрозрачным контентом */

/* Как у canvas (full viewport): сброс max-width: 1440px из style.css у body */
body.page-flyer {
  max-width: none;
  width: 100%;
  margin-inline: 0;
}

.page-flyer {
  --nf-purple: #5e20b0;
  --nf-purple-mid: #6a1b9a;
  /* Выше прозрачность — нижний слой (canvas) заметнее */
  --nf-surface: rgba(255, 255, 255, 0.48);
  --nf-surface-solid: rgba(245, 242, 252, 0.78);
  --nf-surface-border: rgba(106, 27, 154, 0.16);
  --nf-shadow-soft: 0 4px 24px rgba(74, 20, 140, 0.08);
  --nf-shadow-card: 0 12px 48px rgba(74, 20, 140, 0.12);
  /* Brand row: логотип + QR — легче тень, ближе к макету */
  --nf-brand-neo:
    3px 3px 8px rgba(74, 20, 140, 0.06),
    -3px -3px 8px rgba(255, 255, 255, 0.82),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -1px -1px 3px rgba(106, 27, 154, 0.04);
  --flyer-bg: #e4d8f1;
  overflow-x: hidden;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  /* Фон страницы — на .flyer-bg под canvas; здесь только запасной однотон */
  background-color: var(--flyer-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Герой: сетка и «стекло» поверх интерактивного фона */
.page-flyer .flyer-hero.flyer {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: min(100vh, 920px);
  min-height: min(100dvh, 920px);
  overflow: visible;
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  background-color: rgba(228, 216, 241, 0.38);
  background-image: radial-gradient(
      ellipse 90% 70% at 12% 8%,
      rgba(255, 255, 255, 0.45) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 75% 60% at 88% 28%,
      rgba(233, 213, 255, 0.38) 0%,
      transparent 50%
    ),
    linear-gradient(rgba(106, 27, 154, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 27, 154, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
}

.page-flyer .flyer__container {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: min(100%, 720px);
  margin-inline: auto;
}

/* На узком экране контент с верха — иначе вертикальное центрирование уводит блок вниз, список «пропадает» без скролла */
@media (max-width: 767px) {
  .page-flyer .flyer__container {
    justify-content: flex-start;
  }
}

.page-flyer .flyer__layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  gap: 0;
  align-items: stretch;
}

/* Колонка: блок бренда → зона гепарда/канваса → карточка контента */
.page-flyer .flyer-hero__stack {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  gap: 0;
}

/* Между двумя «стёклами»: пустой слой — виден canvas, здесь визуально «стоит» гепард */
.page-flyer .flyer-hero__cheetah-gap {
  flex: 0 0 auto;
  min-height: clamp(2rem, 10vw, 3.5rem);
  pointer-events: none;
}

@media (max-width: 767px) {
  .page-flyer .flyer-hero .flyer__container {
    margin-top: clamp(3.25rem, 18vw, 5.75rem);
  }

  .page-flyer .flyer-hero.flyer {
    padding-top: max(2.25rem, calc(env(safe-area-inset-top, 0px) + 1.75rem));
  }

  .page-flyer .flyer-hero__cheetah-gap {
    min-height: clamp(2.5rem, 14vw, 5rem);
  }
}

/* Карточка-листовка (бренд и тело — две отдельные панели) */
.page-flyer .flyer-hero__surface {
  /* Герой: логотип заметнее, чем clamp(..., 5rem); согласовано с .flyer-hero__logo-img */
  --nf-logo-ring: clamp(4.5rem, 11vw, 6.75rem);
  padding: clamp(1.5rem, 4.5vw, 2.25rem) clamp(1.25rem, 4vw, 2rem);
  max-width: 100%;
  min-width: 0;
  border-radius: clamp(14px, 3vw, 20px);
  /* Как на мобильном: одна и та же «стеклянная» плёнка на всех ширинах */
  background: var(--nf-surface);
  border: 1px solid var(--nf-surface-border);
  box-shadow: var(--nf-shadow-card);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
}

.page-flyer .flyer-hero__surface--brand .flyer-hero__brand-row {
  margin-bottom: 0;
}

/* На широких экранах blur часто даёт лишний «молочный» слой; ослабляем до ощущения мобильного стекла */
@media (min-width: 768px) {
  .page-flyer .flyer-hero__surface {
    background: var(--nf-surface);
    -webkit-backdrop-filter: blur(8px) saturate(1.05);
    backdrop-filter: blur(8px) saturate(1.05);
  }
}

/* Верхний ряд: одна линия — логотип слева, QR справа */
.page-flyer .flyer-hero__brand-row {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-bottom: clamp(1rem, 2.5vw, 1.35rem);
  gap: clamp(0.35rem, 2vw, 1rem);
}

.page-flyer .flyer-hero__brand-col--logo {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.page-flyer .flyer-hero__brand-col--qr {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  margin-left: auto;
}

.page-flyer .flyer-hero__brand-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.35rem, 1vw, 0.45rem);
  border-radius: clamp(10px, 2vw, 14px);
  background: var(--nf-surface-solid);
  box-shadow: var(--nf-brand-neo);
  box-sizing: border-box;
}

.page-flyer .flyer-hero__brand-qr-img {
  display: block;
  width: clamp(64px, 20vw, 120px);
  max-width: min(120px, 28vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

/* Логотип: над кикером, неоморфный круг под цвет карточки */
.page-flyer .flyer-hero__surface--brand .flyer-hero__logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--nf-logo-ring);
  height: var(--nf-logo-ring);
  max-width: 100%;
  margin-bottom: 0;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  box-sizing: border-box;
}

.page-flyer .flyer-hero__surface--brand .flyer-hero__logo-wrap:focus-visible {
  outline: none;
  border-radius: 50%;
}

.page-flyer .flyer-hero__surface--brand .flyer-hero__logo-wrap:focus-visible .flyer-hero__logo-ring {
  box-shadow:
    var(--nf-brand-neo),
    0 0 0 3px rgba(106, 27, 154, 0.35);
}

.page-flyer .flyer-hero__logo-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.35rem, 1.2vw, 0.55rem);
  background: var(--nf-surface-solid);
  box-shadow: var(--nf-brand-neo);
}

.page-flyer .flyer-hero__logo-img {
  width: 86%;
  height: auto;
  max-height: 86%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(94, 32, 176, 0.05));
}

.page-flyer .flyer-hero__surface-main {
  min-width: 0;
}

@media (max-width: 420px) {
  .page-flyer .flyer-hero__surface {
    --nf-logo-ring: clamp(3.65rem, 22vw, 4.5rem);
  }
}

/* Список: декор слева — img/Ellipse 47.png (вертикальный акцент) */
.page-flyer .flyer__rail {
  position: relative;
  z-index: 1;
  padding-left: clamp(1.35rem, 4.5vw, 2rem);
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.page-flyer .flyer__rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(14px, 3.5vw, 22px);
  background-image: url("../img/Ellipse%2047.png");
  background-repeat: no-repeat;
  background-position: left top;
  background-size: auto 100%;
  pointer-events: none;
}

.page-flyer .flyer-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-family-heading, "Montserrat", system-ui, sans-serif);
  font-size: clamp(0.6875rem, 1.5vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(94, 32, 176, 0.72);
}

.page-flyer .flyer__headline {
  max-width: min(100%, 38ch);
  font-size: clamp(1.5rem, 4.2vw, 2.15rem);
  line-height: 1.18;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  overflow-wrap: anywhere;
  word-wrap: break-word;
  background: linear-gradient(
    135deg,
    var(--nf-purple) 0%,
    #4a148c 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .page-flyer .flyer__headline {
    color: var(--nf-purple);
    background: none;
  }
}

.page-flyer .flyer__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-flyer .flyer__list li {
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.page-flyer .flyer__list li:hover {
  background: rgba(106, 27, 154, 0.06);
}

.page-flyer .flyer__list .flyer__list-text {
  display: block;
  padding: 0.5rem 0.5rem 0.5rem 0.25rem;
  line-height: 1.45;
  border-radius: 6px;
  border-bottom: none;
  color: var(--color-text, #444444);
  transition: color 0.2s ease, transform 0.2s ease;
  overflow-wrap: anywhere;
}

.page-flyer .flyer__list li:hover .flyer__list-text {
  color: var(--nf-purple-mid);
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .page-flyer .flyer__list li:hover .flyer__list-text {
    transform: none;
  }
}

/* CTA: основная + вторичная */
.page-flyer .flyer-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.page-flyer .flyer-cta-row .flyer__cta {
  min-height: 48px;
  padding-inline: 1.5rem;
  box-shadow: 0 6px 20px rgba(74, 20, 140, 0.32);
}

.page-flyer .flyer-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-family-heading, "Montserrat", system-ui, sans-serif);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--nf-purple);
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid rgba(106, 27, 154, 0.35);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.page-flyer .flyer-cta-secondary:hover {
  border-color: rgba(106, 27, 154, 0.55);
  background: rgba(255, 255, 255, 0.85);
  color: var(--nf-purple-mid);
}

.page-flyer .flyer-cta-secondary:focus-visible {
  outline: 3px solid var(--color-accent-gold, #d4af37);
  outline-offset: 3px;
}

/* Контакты внизу карточки (.flyer-hero__surface-main), под CTA */
.page-flyer .flyer-hero__surface-main .flyer__contact-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2.5vw, 1.35rem);
  margin-top: clamp(1.35rem, 3.5vw, 1.85rem);
  padding-top: clamp(1rem, 2.5vw, 1.35rem);
  border-top: 1px solid rgba(106, 27, 154, 0.12);
}

.page-flyer .flyer-hero__surface-main .flyer__contact-phone,
.page-flyer .flyer-hero__surface-main .flyer__contact-mail,
.page-flyer .flyer-hero__surface-main .flyer__contact-site {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-family-base, "Montserrat", system-ui, sans-serif);
  font-size: var(--font-size-sm, 0.875rem);
  font-weight: 600;
  color: var(--flyer-purple-deep, #5e20b0);
  text-decoration: none;
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
  max-width: 100%;
}

.page-flyer .flyer-hero__surface-main .flyer__contact-phone:hover,
.page-flyer .flyer-hero__surface-main .flyer__contact-mail:hover,
.page-flyer .flyer-hero__surface-main .flyer__contact-site:hover {
  color: var(--flyer-purple, #6a1b9a);
  text-decoration: underline;
}

.page-flyer .flyer-hero__surface-main .flyer__contact-phone:focus-visible,
.page-flyer .flyer-hero__surface-main .flyer__contact-mail:focus-visible,
.page-flyer .flyer-hero__surface-main .flyer__contact-site:focus-visible {
  outline: 2px solid var(--flyer-purple, #6a1b9a);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Мобильный тач: текст слева, гепард справа — «стартовая» точка до первого касания (flyer.js) */
.flyer-touch-intro {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 6;
  padding: max(0.75rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    0.5rem
    max(1rem, env(safe-area-inset-left));
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

body.flyer-touch-intro-active .flyer-touch-intro:not(.flyer-touch-intro--dismissed) {
  display: flex;
}

.flyer-touch-intro__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 4vw, 1.25rem);
  width: 100%;
  max-width: min(100%, 720px);
  margin-inline: auto;
  box-sizing: border-box;
}

.flyer-touch-intro__text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 58%;
  text-align: left;
  align-self: center;
  font-family: var(--font-family-heading, "Montserrat", system-ui, sans-serif);
  font-size: clamp(0.8125rem, 3.8vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: rgba(94, 32, 176, 0.92);
}

.flyer-touch-intro__img {
  display: block;
  flex: 0 0 auto;
  width: min(104px, 28vw);
  height: auto;
  object-fit: contain;
  object-position: right center;
  filter: drop-shadow(0 4px 14px rgba(74, 20, 140, 0.18));
  -webkit-user-select: none;
  user-select: none;
}

.flyer-touch-intro--dismissed {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .flyer-touch-intro__img,
  .flyer-touch-intro__text {
    transition: none;
  }
}

/* Кастомный гепард (flyer.js): плавный масштаб — не через cursor: url() */
.cheetah-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px;
  will-change: transform, opacity;
  contain: strict;
}

.cheetah-cursor__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  -webkit-user-select: none;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(74, 20, 140, 0.1));
}

.page-flyer.cheetah-cursor-active,
.page-flyer.cheetah-cursor-active * {
  cursor: none !important;
}

.page-flyer.cheetah-cursor-active .skip-link:focus-visible,
.page-flyer.cheetah-cursor-active a:focus-visible,
.page-flyer.cheetah-cursor-active button:focus-visible {
  cursor: pointer !important;
}

.page-flyer .flyer-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(
    165deg,
    #e8dff5 0%,
    var(--flyer-bg) 38%,
    #ddd2ef 100%
  );
  background-color: var(--flyer-bg);
}

.page-flyer .flyer-bg canvas#world {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.page-flyer .flyer-main {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  min-width: 0;
  padding-top: 0 !important;
}

@media (max-width: 575px) {
  .page-flyer .flyer-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-flyer .flyer-cta-row .flyer__cta,
  .page-flyer .flyer-cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-contrast: more) {
  .page-flyer .flyer-hero__surface {
    background: rgba(255, 255, 255, 0.95);
    border-width: 2px;
  }

  .page-flyer .flyer__headline {
    color: var(--nf-purple);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}
