/* ============================================================================
   ATHERYX — главная страница (редизайн 2026-09). Зависит от ax.css.
   ========================================================================== */

/* ── Первый экран ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 72px) 0 128px;
  background: transparent;
}
.hero-inner {
  display: grid;
  justify-items: center;
  text-align: center;
  transform: translate3d(0, calc(var(--hp, 0) * -90px), 0);
  opacity: calc(1 - var(--hp, 0) * 1.25);
  will-change: transform, opacity;
}
.hero-title {
  margin-top: 8px;
  font-size: clamp(40px, 6.4vw, 92px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.98;
}
.hero-title .l1 { display: block; }
.hero-title .l2 {
  display: block;
  margin-top: 0.42em;
  font-size: 0.5em;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--fg-2);
}
.hero-title .acc {
  color: var(--accent);
  text-shadow: 0 0 36px rgba(var(--accent-rgb), 0.45);
}
:root[data-theme="light"] .hero-title .acc { color: var(--accent-text); text-shadow: none; }
.hero-title .l2 .w > span { --base: 260ms; }

.hero-sub {
  max-width: 600px;
  margin: 30px auto 0;
  color: var(--fg-2);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.62;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.hero-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 54px;
  color: var(--fg-3);
  font-size: 14px;
}
.hero-notes span { display: inline-flex; align-items: center; gap: 9px; }
.hero-notes i { color: var(--accent-text); font-size: 17px; }

.js .hero .hero-sub { --d: 0.55s; }
.js .hero .hero-actions { --d: 0.68s; }
.js .hero .hero-notes { --d: 0.82s; }
.js .hero .ax-eyebrow { --d: 0.05s; }


/* Низ первого экрана: «листайте» слева, «Живой фон» по центру. */
.hero-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  opacity: calc(1 - var(--hp, 0) * 3);
}
.hero-bottom .ax-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.hero-scroll {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-3);
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.hero-scroll:hover { color: var(--fg); }
.hero-scroll .circ {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  font-size: 16px;
  animation: hero-bob 2.4s var(--ease-io) infinite;
}
@keyframes hero-bob { 50% { transform: translateY(4px); } }
.live-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 15px 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--fg-2);
  font: 500 12.5px/1 var(--font-body);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.live-toggle i { font-size: 15px; }
.live-toggle:hover { color: var(--fg); border-color: var(--fg-4); }
.live-toggle.is-off i { color: var(--accent-text); }

/* ── Манифест ─────────────────────────────────────────────────────────── */
.manifesto { padding-block: clamp(80px, 12vw, 170px); }
.manifesto .ax-eyebrow { margin-bottom: clamp(28px, 4vw, 44px); }
.manifesto-text {
  max-width: 1120px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.7vw, 54px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.manifesto-text .w > span { opacity: 0.14; transition: opacity 0.12s linear; }
.manifesto-text .ax-accent { color: var(--accent); }
:root[data-theme="light"] .manifesto-text .ax-accent { color: var(--accent-text); }
.manifesto-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-top: clamp(36px, 5vw, 64px);
  padding-top: 28px;
  border-top: 1px dashed var(--dash);
}
.manifesto-foot p { max-width: 560px; color: var(--fg-2); font-size: 17px; line-height: 1.65; }

/* ── Модули (бенто) ───────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 290px;
  padding: 24px;
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.35s ease, transform 0.6s var(--ease), box-shadow 0.5s var(--ease);
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  display: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.feature:hover { border-color: var(--card-hover-line); transform: translateY(-3px); box-shadow: var(--shadow); }
.feature:hover::before { opacity: 1; }
.feature-num {
  position: absolute;
  top: 26px;
  right: 26px;
  color: var(--fg-4);
  font: 600 12px/1 var(--font-display);
  letter-spacing: 0.06em;
}
.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 23px;
}
.feature h3 {
  margin: auto 0 10px;
  padding-top: 36px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.feature p { color: var(--fg-3); font-size: 14.5px; line-height: 1.6; }
/* Пунктир над меткой — во всю ширину карточки (края срезает overflow). */
.feature .ax-tag { position: relative; align-self: flex-start; margin-top: 38px; }
.feature .ax-tag::before { content: ""; position: absolute; left: -24px; width: 2000px; top: -19px; border-top: 1px dashed var(--dash); pointer-events: none; }

/* ── Тизер магазина конфигов ──────────────────────────────────────────── */
.teaser-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}
.teaser-copy { display: grid; gap: 20px; justify-items: start; }
.teaser-points { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 12px; }
.teaser-points li { display: flex; align-items: flex-start; gap: 12px; color: var(--fg-2); font-size: 15.5px; }
.teaser-points i {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 14px;
}
.teaser-visual { position: relative; aspect-ratio: 1 / 0.86; }
.teaser-card {
  position: absolute;
  width: 60%;
  border-radius: var(--r-card);
  border: 1px solid var(--line-2);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
  transition: transform 0.2s linear;
}
.teaser-card:nth-child(1) { top: 2%; left: 0; --rot: -5deg; z-index: 1; }
.teaser-card:nth-child(2) { top: 18%; right: 0; --rot: 4deg; z-index: 2; }
.teaser-card:nth-child(3) { bottom: 0; left: 17%; --rot: -1.5deg; z-index: 3; }
.teaser-ban {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--field) center / cover no-repeat;
}
.teaser-ban .ax-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(7, 7, 11, 0.36);
  color: #fff;
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}
.teaser-body { display: grid; gap: 9px; padding: 14px 16px 16px; }
.teaser-ln { height: 9px; border-radius: var(--r-pill); background: var(--line-2); }
.teaser-ln.w80 { width: 80%; }
.teaser-ln.w55 { width: 55%; background: var(--line); }
.teaser-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.teaser-dots { display: flex; gap: 5px; }
.teaser-dots span { width: 22px; height: 7px; border-radius: var(--r-pill); background: var(--accent-soft); }
.teaser-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 11.5px/1 var(--font-body);
}

/* ── Тарифы (витрина продуктов) ──────────────────────────────────────── */
.plans .ax-head { margin-bottom: 30px; }
.plans-tabs { margin-bottom: 18px; }
.plans-box { max-width: 1192px; margin: 0 auto; }
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 790px; margin: 0 auto; }
.plans-panel:not([hidden]) { animation: plan-in 0.55s var(--ease) both; }
@keyframes plan-in {
  from { opacity: 0; transform: translateY(10px); filter: blur(6px); }
}
.plans-trust { margin-top: 14px; }

/* ── Финальный призыв ─────────────────────────────────────────────────── */
.cta {
  overflow: hidden;
  text-align: center;
  padding-bottom: clamp(220px, 27vw, 380px);
}
.cta-inner { position: relative; display: grid; justify-items: center; gap: 24px; }
.cta-title {
  max-width: 1040px;
  font-size: clamp(32px, 5.2vw, 76px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}
.cta-title .acc { color: var(--accent); }
:root[data-theme="light"] .cta-title .acc { color: var(--accent-text); }
.cta-sub { max-width: 620px; color: var(--fg-2); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; }
.cta .ax-btn { margin-top: 12px; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(36px, 6vw, 96px);
}
.faq-info { position: sticky; top: 110px; display: grid; justify-items: start; gap: 18px; }
.faq-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--accent-text);
  font-weight: 600;
}
.faq-link i { transition: transform 0.35s var(--ease); }
.faq-link:hover i { transform: translateX(4px); }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  border-radius: var(--r-card);
  border: 1px solid var(--card-line);
  background: var(--card-glass);
  -webkit-backdrop-filter: var(--card-blur);
  backdrop-filter: var(--card-blur);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.faq-item:hover { border-color: var(--card-hover-line); }
.faq-item.open { border-color: var(--accent-line); }
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 0;
  background: none;
  color: var(--fg);
  text-align: left;
  font: 700 16px/1.4 var(--font-body);
}
.faq-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 18px;
  transition: transform 0.45s var(--ease), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.faq-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.faq-item.open .faq-content { grid-template-rows: 1fr; }
.faq-content > div { overflow: hidden; }
.faq-content p { padding: 0 22px 22px; color: var(--fg-2); font-size: 15.5px; line-height: 1.68; }

/* ── Окно оплаты ──────────────────────────────────────────────────────── */
.checkout-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.checkout-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 30px 28px;
  border-right: 1px solid var(--line);
  background: var(--field);
}
.checkout-summary h3 { font-size: 22px; letter-spacing: -0.02em; }
.checkout-price { display: flex; align-items: baseline; gap: 6px; }
.checkout-price strong { font: 700 46px/1 var(--font-display); letter-spacing: -0.05em; }
.checkout-price span { color: var(--fg-2); font: 600 22px/1 var(--font-display); }
.checkout-perk { display: flex; align-items: center; gap: 9px; color: var(--fg-2); font-size: 13.5px; }
.checkout-perk i { color: var(--accent-text); font-size: 16px; }
.checkout-summary .checkout-perk:last-child { margin-top: auto; color: var(--fg-3); }
.checkout-main { position: relative; display: grid; gap: 20px; padding: 30px 28px; }
.checkout-main h2 { font-size: 24px; letter-spacing: -0.02em; }
.pay-methods { display: grid; gap: 10px; }
.pay-method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: var(--field);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pay-method:hover { border-color: var(--line-2); }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pay-method.active { border-color: var(--accent); background: var(--accent-soft); }
.pay-ic {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--accent-text);
  font-size: 20px;
}
.pay-info { flex: 1; min-width: 0; }
.pay-info strong { display: block; font-size: 15px; }
.pay-info small { display: block; margin-top: 3px; color: var(--fg-3); font-size: 13px; line-height: 1.4; }
.pay-radio {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  transition: border 0.2s ease;
}
.pay-method.active .pay-radio { border: 6px solid var(--accent); }

/* ── Адаптив ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .teaser-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .pcards, .pcards--two { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-info { position: static; }
  .manifesto-foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-bottom: 110px; }
  /* Справа внизу висит кнопка поддержки — «Живой фон» ставим рядом со стрелкой. */
  .hero-bottom .ax-container { grid-template-columns: auto auto 1fr; }
  .hero-bottom .live-toggle { justify-self: start; }
  .hero-scroll span { display: none; }
  .hero-actions .ax-btn { flex: 1 1 auto; }
  .hero-notes { gap: 10px 18px; margin-top: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { min-height: 0; }
  .ax-trust { gap: 12px 22px; padding: 18px 20px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .checkout-summary .checkout-perk:last-child { margin-top: 0; }
}


/* Атмосферный фон первого экрана: живой фиолетовый кадр мягко растворяется в фоне
   сайта по ВСЕМ краям (а не только снизу) — без резких швов. Натуральный цвет кадра
   сохранён (без luminosity-обесцвечивания), затемнён вуалью под фон и подсвечен акцентом. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  bottom: -260px;
  z-index: -1;
  pointer-events: none;
  /* лёгкий зум-параллакс по мере ухода с первого экрана (под reduced-motion --hp=0 -> без движения) */
  transform: scale(calc(1 + var(--hp, 0) * 0.08)) translate3d(0, calc(var(--hp, 0) * -16px), 0);
  transform-origin: 50% 34%;
  will-change: transform;
  background:
    /* вуаль: читаемость текста + плавный переход тона в фон, крепче книзу */
    linear-gradient(180deg,
      rgba(var(--bg-rgb), 0.34) 0%,
      rgba(var(--bg-rgb), 0.30) 44%,
      rgba(var(--bg-rgb), 0.58) 72%,
      rgba(var(--bg-rgb), 0.90) 100%),
    /* мягкое лавандовое свечение вокруг тумана */
    radial-gradient(ellipse 74% 56% at 50% 34%, rgba(var(--accent-rgb), 0.20), transparent 70%),
    /* сам кадр */
    url('/assets/support-forest.jpg') center 46% / cover no-repeat;
  background-color: var(--bg);
  background-blend-mode: normal, screen, normal;
  /* перо по всем краям (радиал) ∩ более мягкое затухание снизу (линейный) */
  -webkit-mask-image:
    radial-gradient(118% 122% at 50% 33%, #000 52%, rgba(0, 0, 0, 0.35) 78%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 52%, rgba(0, 0, 0, 0.82) 68%, rgba(0, 0, 0, 0.42) 82%, rgba(0, 0, 0, 0.12) 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(118% 122% at 50% 33%, #000 52%, rgba(0, 0, 0, 0.35) 78%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 52%, rgba(0, 0, 0, 0.82) 68%, rgba(0, 0, 0, 0.42) 82%, rgba(0, 0, 0, 0.12) 92%, transparent 100%);
  mask-composite: intersect;
}

.hero-title { max-width: 1100px; font-size: clamp(38px, 6vw, 82px); letter-spacing: -0.055em; }
.hero-title .l2 { margin-top: 0.32em; color: var(--fg-3); }
.hero-title .acc { text-shadow: 0 0 44px rgba(var(--accent-rgb), 0.22); }
.hero-sub { max-width: 570px; margin-top: 26px; color: var(--fg-2); }
.hero-actions { margin-top: 32px; }
.hero-notes { gap: 10px 32px; margin-top: 46px; }
.hero-notes i { color: var(--accent-text); }
.manifesto { padding-block: clamp(100px, 14vw, 190px); }
.manifesto-text { max-width: 1040px; font-weight: 600; line-height: 1.24; }
.manifesto-text .w > span { opacity: 0.24; }
.feature { min-height: 278px; border-radius: 22px; }
.feature:hover { transform: translateY(-2px); }
.feature h3 { font-weight: 700; }
.teaser-card { border-radius: 22px; }
.pcard { border-radius: 22px; }
.pcard.is-hot { border-color: var(--accent-line); }
.faq-list { gap: 12px; }

@media (max-width: 640px) {
  .hero { padding-top: calc(var(--header-h) + 62px); }
  .hero-notes { justify-content: flex-start; max-width: 360px; margin-inline: auto; text-align: left; }
  .hero-notes span { flex: 1 1 100%; }
  .manifesto { padding-block: 88px; }
}

/* Мягкое перетекание цветов и свечения между разделами главной страницы.
   Центры свечений — ВНУТРИ полосы (50% 50% плитки 360px), на кромке секции яркость = 0:
   раньше центр стоял ровно на кромке (at 50% 0% / 100%) -> максимум яркости приходился
   на шов, и на стыке с hero (у него нижнего свечения нет) рисовалась светлая линия. */
.ax-home main > section:not(.hero) {
  position: relative;
  background-image:
    radial-gradient(ellipse 75% 50% at 50% 50%, rgba(var(--accent-rgb), 0.045), transparent 100%),
    radial-gradient(ellipse 75% 50% at 50% 50%, rgba(var(--accent-rgb), 0.035), transparent 100%);
  background-size: 100% 360px, 100% 360px;
  background-position: top center, bottom center;
  background-repeat: no-repeat;
  transition: background-color 1.2s var(--ease), color 0.8s ease;
}
.js .ax-home [data-reveal] { transition-duration: 1.15s; }
.js .ax-home [data-stagger] > * { transition-duration: 1.05s; }
.js .ax-home .ax-split .w > span {
  transition-timing-function: var(--ease);
  transition-duration: 1s, 1.2s, 1s;
}
.ax-home .feature,
.ax-home .pcard,
.ax-home .faq-item,
.ax-home .teaser-card,
.ax-home .ax-btn {
  transition-timing-function: var(--ease);
}
.ax-home .ax-btn,
.ax-home .feature,
.ax-home .pcard,
.ax-home .faq-item { transition-duration: 0.45s, 0.7s, 0.55s; }

@media (prefers-reduced-motion: reduce) {
  .ax-home main > section,
  .js .ax-home [data-reveal],
  .js .ax-home [data-stagger] > *,
  .js .ax-home .ax-split .w > span { transition-duration: 0.01ms !important; }
}

@media (max-width: 640px) {
  .ax-home main > section:not(.hero) {
    background-size: 100% 280px, 100% 320px, 100% 100%;
  }
}
