/* ============================================================
   Lunate — сайт сервера
   Apple iOS Liquid Glass · монохром + блёклый лунный синий
   Скролл-концепт: одна ночь Lunate — от заката до рассвета
   ============================================================ */

:root {
  /* уголь с холодным подтоном */
  --bg-deep: #04050a;
  --bg: #08090c;
  --bg-elev: #0f1116;
  --fg: #f2f4f7;
  --fg-dim: rgba(242, 244, 247, 0.66);
  --fg-faint: rgba(242, 244, 247, 0.55);

  /* блёклый лунный синий — как подтон на логотипе */
  --lun: #a6c8e0;
  --lun-bright: #d3e5f2;
  --lun-deep: #6f93ad;
  --lun-dark: #3f5a72;
  --lun-glow: rgba(166, 200, 224, 0.35);

  /* стекло */
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028));
  --glass-bg-strong: linear-gradient(160deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 15px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-ui: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-brand: Georgia, "Times New Roman", serif;

  --container: 1160px;

  /* управляются из JS */
  --illum: 0.2;      /* освещённость луны 0..1 */
  --moonsign: 1;     /* сторона фазы: 1 растёт, -1 убывает */
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

img { display: block; }

::selection { background: var(--lun); color: #0a0c10; }

a { color: inherit; }

button { font-family: inherit; }

:focus-visible {
  outline: 2px solid rgba(211, 229, 242, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 12px;
  background: #fff;
  color: #0a0c10;
  font-weight: 600;
  text-decoration: none;
  transition: top 200ms var(--ease-out);
}
.skip-link:focus { top: 16px; }

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* ============================================================
   Небо: звёзды, слои ночи, луна, блобы, зерно
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 70% -10%, #12151c 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* слои времени ночи: прозрачность двигает JS по мере скролла */
.sky {
  position: absolute;
  inset: 0;
  transition: opacity 200ms linear;
}
.sky-dusk {
  background:
    linear-gradient(180deg, rgba(63, 90, 114, 0.22) 0%, rgba(63, 90, 114, 0.05) 34%, transparent 60%);
}
.sky-dawn {
  opacity: 0;
  background:
    linear-gradient(0deg, rgba(111, 147, 173, 0.16) 0%, rgba(111, 147, 173, 0.04) 30%, transparent 55%);
}

/* луна, плывущая по небу; фазу рисует .moon-shade */
.moon {
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 35%, #eef3f8 0%, #cfdde9 48%, #93adc1 100%);
  box-shadow:
    0 0 60px rgba(166, 200, 224, 0.28),
    0 0 140px rgba(166, 200, 224, 0.14),
    inset -8px -10px 26px rgba(63, 90, 114, 0.35);
  overflow: hidden;
  will-change: transform;
}
.moon::before {
  /* кратеры */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, rgba(90, 110, 128, 0.30) 0 7%, transparent 8%),
    radial-gradient(circle at 62% 60%, rgba(90, 110, 128, 0.24) 0 10%, transparent 11%),
    radial-gradient(circle at 74% 30%, rgba(90, 110, 128, 0.26) 0 5%, transparent 6%),
    radial-gradient(circle at 42% 74%, rgba(90, 110, 128, 0.2) 0 6%, transparent 7%);
}
.moon-shade {
  /* тёмный диск: сдвиг = фаза; % считается от собственной ширины */
  position: absolute;
  inset: -2%;
  border-radius: 50%;
  background: rgba(6, 8, 12, 0.94);
  transform: translateX(calc(var(--illum) * 104% * var(--moonsign)));
}

.blob {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.45;
  will-change: transform;
}
.blob-1 { background: #1e2733; top: -200px; left: -160px; animation: drift1 38s ease-in-out infinite alternate; }
.blob-2 { background: #171b22; bottom: -280px; right: -140px; animation: drift2 46s ease-in-out infinite alternate; }

@keyframes drift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(160px, 110px) scale(1.18); }
}
@keyframes drift2 {
  from { transform: translate(0, 0) scale(1.06) rotate(0deg); }
  to   { transform: translate(-140px, -90px) scale(0.94) rotate(30deg); }
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ============================================================
   Стекло
   ============================================================ */
.glass,
.glass-strong {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(1.4);
  -webkit-backdrop-filter: blur(26px) saturate(1.4);
}
.glass-strong {
  background: var(--glass-bg-strong);
  border-color: rgba(255, 255, 255, 0.16);
}

/* без backdrop-filter стекло стало бы прозрачным — даём плотную подложку */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .glass-strong {
    background: linear-gradient(160deg, rgba(23, 25, 31, 0.92), rgba(13, 14, 18, 0.94));
  }
}

/* блик по верхней кромке */
.glass::before,
.glass-strong::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.35;
  pointer-events: none;
}

/* свечение за курсором на карточках (координаты ставит JS) */
.glow-card { overflow: hidden; }
.glow-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(166, 200, 224, 0.13),
    rgba(255, 255, 255, 0.05) 40%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 350ms var(--ease-out);
  pointer-events: none;
}
.glow-card:hover::after { opacity: 1; }

/* ============================================================
   Кнопки
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 52px;
  padding: 0 26px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 240ms var(--ease-spring),
    box-shadow 260ms var(--ease-out),
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    color 220ms var(--ease-out);
}
.btn:active { transform: scale(0.965); }

.btn-primary {
  position: relative;
  color: #0a0c10;
  background: linear-gradient(165deg, #ffffff 0%, #d6dee6 100%);
  box-shadow:
    0 12px 34px rgba(166, 200, 224, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-18deg);
}
.btn-primary:hover::after {
  animation: sheen 900ms var(--ease-out);
}
@keyframes sheen {
  from { left: -80%; }
  to   { left: 140%; }
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 44px rgba(166, 200, 224, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.btn-primary:active { transform: translateY(0) scale(0.965); }

.btn-ghost {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(166, 200, 224, 0.32);
}

.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 13px; }
.btn-lg { height: 58px; padding: 0 32px; font-size: 16.5px; border-radius: 18px; }

.link-btn {
  display: inline;
  /* вертикальный padding у inline не двигает строку, но расширяет тач-зону */
  padding: 12px 4px;
  margin: 0 -4px;
  border: none;
  background: none;
  color: var(--fg-dim);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(166, 200, 224, 0.4);
  cursor: pointer;
  transition: color 180ms var(--ease-out);
}
.link-btn:hover { color: var(--fg); }

/* ============================================================
   Навигация
   ============================================================ */
.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 24px 0;
  display: flex;
  justify-content: center;
}

.nav {
  width: min(var(--container), 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 62px;
  padding: 0 12px 0 18px;
  border-radius: 20px;
  transition: box-shadow 300ms var(--ease-out), background 300ms var(--ease-out);
}
.nav-wrap.scrolled .nav {
  box-shadow: var(--glass-highlight), 0 18px 48px rgba(0, 0, 0, 0.65);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.nav-logo {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.nav-name {
  font-family: var(--font-brand);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--fg-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.07); }
.nav-links a.active { color: var(--fg); background: rgba(166, 200, 224, 0.14); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

/* мини-луна: прогресс ночи в шапке */
.nav-moon {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #eef3f8, #a9c3d7);
  box-shadow: 0 0 10px rgba(166, 200, 224, 0.45);
  overflow: hidden;
  flex: 0 0 auto;
}
.nav-moon i {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: rgba(8, 9, 12, 0.92);
  transform: translateX(calc(var(--illum) * 106% * var(--moonsign)));
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 180ms var(--ease-out);
}
.nav-burger:hover { background: rgba(255, 255, 255, 0.11); }
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform 260ms var(--ease-spring), opacity 200ms;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.4px) rotate(-45deg); }

/* ============================================================
   Hero · Закат
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lun-bright);
  box-shadow: 0 0 9px var(--lun-glow), 0 0 4px var(--lun-bright);
  animation: chipPulse 3s ease-out infinite;
}
@keyframes chipPulse {
  0% {
    box-shadow: 0 0 9px var(--lun-glow), 0 0 4px var(--lun-bright),
                0 0 0 0 rgba(166, 200, 224, 0.5);
  }
  70%, 100% {
    box-shadow: 0 0 9px var(--lun-glow), 0 0 4px var(--lun-bright),
                0 0 0 8px rgba(166, 200, 224, 0);
  }
}

.hero-title { display: flex; flex-direction: column; gap: 10px; }

.hero-brand {
  font-family: var(--font-brand);
  font-size: clamp(72px, 11vw, 132px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.01em;
  background: linear-gradient(175deg, #ffffff 30%, var(--lun-bright) 58%, #8ba4b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 44px rgba(166, 200, 224, 0.16));
}

.hero-sub {
  font-size: clamp(21px, 2.6vw, 30px);
  font-weight: 550;
  line-height: 1.28;
  color: var(--fg-dim);
  letter-spacing: -0.01em;
}

.hero-lead {
  max-width: 500px;
  margin-top: 22px;
  font-size: 17px;
  color: var(--fg-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.ip-text {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--fg-faint);
  letter-spacing: 0.01em;
}

/* --- Астролябия --- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.astro {
  position: relative;
  width: min(440px, 88vw);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 400ms var(--ease-out);
}

.astro-svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 18px 60px rgba(4, 5, 10, 0.6));
}

.astro-outer, .astro-gear { will-change: transform; }

.rune {
  cursor: pointer;
  pointer-events: all;
}
.rune path {
  stroke: rgba(226, 236, 244, 0.55);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 300ms var(--ease-out), filter 300ms var(--ease-out);
}
.rune circle {
  fill: transparent;
  stroke: transparent;
}
.rune:hover path { stroke: rgba(226, 236, 244, 0.8); }
.rune.lit path {
  stroke: var(--lun-bright);
  filter: drop-shadow(0 0 6px var(--lun-glow)) drop-shadow(0 0 14px rgba(166, 200, 224, 0.25));
}

.astro.ritual .astro-svg { animation: ritualPulse 1.6s var(--ease-out); }
@keyframes ritualPulse {
  0%   { filter: drop-shadow(0 18px 60px rgba(4, 5, 10, 0.6)); }
  30%  { filter: drop-shadow(0 0 80px rgba(166, 200, 224, 0.55)); }
  100% { filter: drop-shadow(0 18px 60px rgba(4, 5, 10, 0.6)); }
}

.astro-hint {
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12.5px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: opacity 400ms;
}

/* парящие сферы */
.orb {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.5), rgba(196, 219, 235, 0.1) 46%, rgba(255, 255, 255, 0.02) 70%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 16px 42px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  will-change: transform;
}
.orb-1 { width: 74px; height: 74px; top: -12px; right: 4%; }
.orb-2 { width: 40px; height: 40px; bottom: 6%; left: 0; }

.hero-scrollhint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--fg-faint);
  animation: hintBob 2.4s ease-in-out infinite;
}
.scrollhint-label {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50%      { transform: translateX(-50%) translateY(7px); opacity: 1; }
}

/* ============================================================
   Секции — общее
   ============================================================ */
.section { padding: 110px 0; }

.chapter { position: relative; }

/* римская цифра-водяной знак; параллакс двигает JS */
.chapter-num {
  position: absolute;
  top: 30px;
  right: 4vw;
  z-index: -1;
  font-family: var(--font-brand);
  font-size: clamp(180px, 26vw, 340px);
  font-weight: 600;
  line-height: 1;
  color: transparent;
  background: linear-gradient(175deg, rgba(166, 200, 224, 0.1), rgba(255, 255, 255, 0.02) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}
.chapter:nth-of-type(even) .chapter-num { right: auto; left: 4vw; }

.section-head { max-width: 640px; margin-bottom: 54px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(166, 200, 224, 0.75);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.section-title em,
.download-title em {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(120deg, #ffffff 20%, var(--lun) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lead {
  margin-top: 18px;
  font-size: 17px;
  color: var(--fg-dim);
}

/* ============================================================
   Лента фактов
   ============================================================ */
.strip { padding: 10px 0 40px; }

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.strip-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
}
.strip-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #ffffff 30%, var(--lun) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.strip-label { font-size: 14px; color: var(--fg-dim); }

/* ============================================================
   Карточки глав
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-card {
  padding: 34px 30px;
  border-radius: var(--radius-lg);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out), border-color 320ms;
}
.about-card:hover {
  transform: translateY(-5px);
  border-color: rgba(166, 200, 224, 0.28);
  box-shadow: var(--glass-highlight), 0 30px 70px rgba(0, 0, 0, 0.6);
}

.about-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  border-radius: 18px;
  color: var(--lun-bright);
  background: linear-gradient(160deg, rgba(166, 200, 224, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(166, 200, 224, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 26px rgba(0, 0, 0, 0.35);
}

.about-card h3 {
  font-family: var(--font-brand);
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 10px;
}
.about-card p { font-size: 15.5px; color: var(--fg-dim); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  padding: 28px 26px;
  border-radius: var(--radius-lg);
  transition: transform 300ms var(--ease-out), border-color 300ms, background 300ms;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 200, 224, 0.28);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  color: var(--lun-bright);
  background: rgba(166, 200, 224, 0.09);
  border: 1px solid rgba(166, 200, 224, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.feature-card h3 {
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature-card p { font-size: 14.5px; color: var(--fg-dim); }

/* декоративные шестерни в главе механизмов; вращает JS от скролла */
.chapter-tech { overflow: hidden; }
.deco-gear {
  position: absolute;
  color: rgba(166, 200, 224, 0.1);
  will-change: transform;
  pointer-events: none;
}
.deco-gear-1 { width: 300px; height: 300px; top: 380px; right: -90px; }
.deco-gear-2 { width: 190px; height: 190px; top: 430px; right: 150px; color: rgba(166, 200, 224, 0.07); }

/* ============================================================
   Присоединиться
   ============================================================ */
.download { padding-bottom: 130px; }

.download-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 40px 60px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(166, 200, 224, 0.2), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

.download-logo {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 18px 48px rgba(0, 0, 0, 0.5);
  margin-bottom: 28px;
  animation: logoBreath 6s ease-in-out infinite alternate;
}
@keyframes logoBreath {
  from { box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 14px 40px rgba(0, 0, 0, 0.5); }
  to   { box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 18px 52px rgba(166, 200, 224, 0.2); }
}

.download-title {
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.download-lead {
  max-width: 540px;
  font-size: 16.5px;
  color: var(--fg-dim);
  margin-bottom: 38px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.download-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--fg-faint);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-container { max-width: 780px; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 240ms var(--ease-out), background 240ms;
}
.faq-item[open] { border-color: rgba(166, 200, 224, 0.28); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  list-style: none;
  transition: color 180ms;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #fff; }

.faq-chev {
  flex: 0 0 auto;
  color: var(--fg-faint);
  transition: transform 300ms var(--ease-spring);
}
.faq-item[open] .faq-chev { transform: rotate(180deg); }

.faq-answer { padding: 0 24px 22px; }
.faq-answer p { font-size: 15px; color: var(--fg-dim); }

/* ============================================================
   Футер
   ============================================================ */
.footer { padding: 0 0 34px; }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
}

.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo {
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-name {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 600;
}
.footer-tag { font-size: 12.5px; color: var(--fg-faint); }

.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--fg-dim);
  text-decoration: none;
  padding: 10px 8px;
  margin: -4px -8px;
  transition: color 180ms;
}
.footer-nav a:hover { color: var(--fg); }

.footer-legal {
  width: 100%;
  font-size: 12px;
  color: var(--fg-faint);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 18px;
}

/* ============================================================
   Тост
   ============================================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 90;
  padding: 13px 22px;
  border-radius: 15px;
  font-size: 14.5px;
  font-weight: 550;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(14px) scale(0.95);
  transition: opacity 300ms var(--ease-out), transform 340ms var(--ease-spring);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ============================================================
   Появление при скролле
   ============================================================ */
/* скрываем до появления только при работающем JS — без него контент виден сразу */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.99);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
.reveal[data-delay="1"] { --rd: 1; }
.reveal[data-delay="2"] { --rd: 2; }
.reveal[data-delay="3"] { --rd: 3; }
html.js .reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 70px; }
  .hero { min-height: auto; padding-top: 150px; }
  .hero-copy { text-align: center; }
  .hero-chips, .hero-actions { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .hero-visual { max-width: 440px; margin-inline: auto; }
  .section-head { margin-inline: auto; text-align: center; }
  .about-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  /* у трёхэлементных сеток третья карточка не остаётся «сиротой» */
  .about-grid .about-card:last-child,
  .feature-grid .feature-card:last-child { grid-column: 1 / -1; }
  .chapter-num { font-size: clamp(140px, 20vw, 220px); opacity: 0.8; }
  /* hero без 100vh — «листай вниз» посреди потока теряет смысл и налезает на хинт рун */
  .hero-scrollhint { display: none; }
}

/* мобильная навигация — до 800px, чтобы ландшафтные телефоны не ломали пилюлю */
@media (max-width: 800px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(22, 24, 29, 0.97), rgba(13, 14, 18, 0.98));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 260ms var(--ease-out), transform 300ms var(--ease-spring),
                visibility 0s linear 300ms;
  }
  .nav-links a { padding: 13px 16px; font-size: 15.5px; }
  .nav-wrap.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 260ms var(--ease-out), transform 300ms var(--ease-spring),
                visibility 0s;
  }
  .nav-burger { display: flex; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 78px 0; }
  .container { width: min(var(--container), 100% - 36px); }

  .strip-grid { grid-template-columns: 1fr; }
  .about-grid, .feature-grid { grid-template-columns: 1fr; }

  .download-panel { padding: 54px 24px 46px; }
  .download-actions { flex-direction: column; width: 100%; }
  .download-actions .btn { width: 100%; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .moon { width: 92px; height: 92px; }
  .astro-hint { bottom: -30px; }
  .deco-gear-1 { width: 200px; height: 200px; right: -70px; }
  .deco-gear-2 { display: none; }
  .chapter-num { opacity: 0.65; }
}

@media (max-width: 480px) {
  .nav-wrap { padding: 12px 16px 0; }
  .nav { gap: 10px; padding: 0 10px 0 14px; }
  .nav-cta { gap: 8px; }
  /* в шапке остаётся только иконка — CTA дублируется в hero и внизу */
  .nav-cta .btn-sm { padding: 0 13px; }
  .nav-cta .nav-cta-label { display: none; }
  .nav-moon { display: none; }
}

@media (max-width: 400px) {
  .hero-brand { font-size: 64px; }
  .btn { padding: 0 20px; }
  .btn-sm { padding: 0 16px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .chip-dot, .mock-progress i, .download-logo,
  .hero-scrollhint, .astro.ritual .astro-svg { animation: none !important; }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .astro { transition: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
