/* ============================================================
   НИТЬ — дизайн-система слёта «Мира-Единение»
   Авторский стиль: лес · костёр · лён · золотая нить
   Для mini-app страниц бота-Хранителя. Мобайл-first (375px).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,500;0,700;1,500&family=Manrope:wght@400;500;600;700&family=Caveat:wght@500;600&display=swap');

:root {
  /* — палитра «день на поляне» — */
  --len: #F5EFE3;            /* лён — фон (оттенок золотой нити, H85°) */
  --bumaga: #FFFDF7;         /* бумага — карточки */
  --hvoia: #253023;          /* ночная хвоя — текст (12.5:1 на льне) */
  --hvoia-mut: #5A6852;      /* хвоя приглушённая — вторичный текст (4.6:1) */
  --ogon: #B54F1D;           /* огонь — акцент/CTA (4.9:1 с белым) */
  --ogon-hover: #9C441A;
  --yantar: #E0A458;         /* янтарь — тёплый свет */
  --nit: #C9A227;            /* золотая нить — линии, узелки */
  --ozero: #33565C;          /* озеро — спокойный второй акцент */
  --lug: #3A7249;            /* луг — живое/успех (4.98:1) */
  --ryabina: #A6392E;        /* рябина — тревога/SOS (5.65:1) */
  --border: #E6DCC8;
  --shadow: 0 1px 2px rgba(37,48,35,.05), 0 8px 28px -12px rgba(37,48,35,.14);

  --r-card: 20px;
  --r-pill: 999px;
  --pad: clamp(18px, 5vw, 28px);
  --maxw: 640px;

  --f-head: 'Alegreya', 'PT Serif', Georgia, serif;
  --f-body: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  --f-hand: 'Caveat', cursive;
}

/* — ночь у костра — */
@media (prefers-color-scheme: dark) {
  :root {
    --len: #1C2119; --bumaga: #262D22;
    --hvoia: #F2EBDC; --hvoia-mut: #ADB79E;
    --ogon: #E58B4E; --ogon-hover: #EF9C63;
    --yantar: #D9B44A; --nit: #D9B44A; --ozero: #7FB0B8;
    --lug: #8CC49B; --ryabina: #E08273;
    --border: #3A4433;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --len: #1C2119; --bumaga: #262D22;
  --hvoia: #F2EBDC; --hvoia-mut: #ADB79E;
  --ogon: #E58B4E; --ogon-hover: #EF9C63;
  --yantar: #D9B44A; --nit: #D9B44A; --ozero: #7FB0B8;
  --lug: #8CC49B; --ryabina: #E08273;
  --border: #3A4433;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--len);
  color: var(--hvoia);
  font: 400 17px/1.65 var(--f-body);
  letter-spacing: .01em;
}
/* зерно бумаги — едва заметное */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad) 64px; }

/* — типографика — */
h1, h2, h3 { font-family: var(--f-head); color: var(--hvoia); margin: 0 0 .35em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.15; }
h2 { font-size: clamp(22px, 6vw, 27px); line-height: 1.25; margin-top: 1.6em; }
p  { margin: .65em 0; }
.lead { font-size: clamp(18px, 5vw, 20px); line-height: 1.55; color: var(--hvoia); }
.muted { color: var(--hvoia-mut); }
.hand { font-family: var(--f-hand); font-weight: 600; color: var(--ogon); font-size: 1.35em; line-height: 1.2; }
.eyebrow { font: 600 13px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--hvoia-mut); margin-bottom: 10px; }

/* — золотая нить (разделитель с узелком) — */
.thread { border: 0; margin: 34px auto; height: 14px; width: min(100%, 340px); position: relative; }
.thread::before {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 340 14'%3E%3Cpath d='M2 7 C 60 1, 110 13, 168 7 S 280 1, 338 7' fill='none' stroke='%23C9A227' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='170' cy='7' r='3.4' fill='%23C9A227'/%3E%3C/svg%3E");
}

/* — карточки — */
.card {
  background: var(--bumaga);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 22px 20px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.card.stitch { border: 1.6px dashed var(--nit); background: transparent; box-shadow: none; }

/* — кнопки: пилюли — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 28px;
  border-radius: var(--r-pill); border: none; cursor: pointer;
  font: 600 17px/1 var(--f-body); text-decoration: none;
  transition: transform .16s ease, background .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-fire { background: var(--ogon); color: #FFFDF7; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--ogon) 55%, transparent); }
.btn-fire:hover { background: var(--ogon-hover); }
.btn-ghost { background: transparent; color: var(--hvoia); border: 1.6px solid var(--border); }
.btn-ghost:hover { border-color: var(--nit); }
.btn:focus-visible { outline: 3px solid var(--yantar); outline-offset: 2px; }

/* — бейджи — */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--r-pill);
  font: 600 13.5px/1.3 var(--f-body);
  background: color-mix(in srgb, var(--yantar) 18%, transparent);
  color: var(--hvoia); border: 1px solid color-mix(in srgb, var(--nit) 45%, transparent);
}

/* — список с огоньками — */
.spark-list { list-style: none; padding: 0; margin: .6em 0; }
.spark-list li { position: relative; padding-left: 30px; margin: 12px 0; }
.spark-list li::before {
  content: ""; position: absolute; left: 2px; top: .38em; width: 16px; height: 16px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1c.6 2.6 1.6 4 3.4 5.2C9.6 7.4 8.6 8.9 8 11 7.4 8.9 6.4 7.4 4.6 6.2 6.4 5 7.4 3.6 8 1z' fill='%23E0A458'/%3E%3Ccircle cx='12.6' cy='12.4' r='1.6' fill='%23C9A227'/%3E%3C/svg%3E");
}

/* — манифестная цитата — */
blockquote.zov {
  margin: 26px 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--nit);
  font-family: var(--f-head); font-style: italic;
  font-size: clamp(19px, 5.4vw, 23px); line-height: 1.5;
}
blockquote.zov cite { display: block; margin-top: 10px; font: 500 14px/1.4 var(--f-body); font-style: normal; color: var(--hvoia-mut); }

/* — шапка-герой — */
.hero { text-align: center; padding: 44px 0 8px; position: relative; }
.hero .hand { display: block; margin-bottom: 6px; }
.hero-dates { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* — САКРАЛЬНАЯ ГЕОМЕТРИЯ: соты вырезаны из решётки Цветка Жизни.
   Треугольная решётка шага r; 3-раскраска (i−j)mod3: цвет-0 → центры сот,
   цвета 1,2 → их вершины. Значит s соты = r круга (1:1), а вершины сот
   лежат ровно на центрах кругов цветка. Одна решётка, не две. — */
.hero::before {
  content: ""; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: 760px; height: 420px; z-index: -1; opacity: .22; pointer-events: none;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%20760%20420%27%20fill%3D%27none%27%3E%3Cg%20stroke%3D%27%23C9A227%27%20stroke-width%3D%271.5%27%20opacity%3D%27.85%27%3E%3Cpath%20d%3D%27M90.00%20410.92%20L61.00%20461.15%20L3.00%20461.15%20L-26.00%20410.92%20L3.00%20360.69%20L61.00%20360.69%20Z%20M90.00%20310.46%20L61.00%20360.69%20L3.00%20360.69%20L-26.00%20310.46%20L3.00%20260.23%20L61.00%20260.23%20Z%20M90.00%20210.00%20L61.00%20260.23%20L3.00%20260.23%20L-26.00%20210.00%20L3.00%20159.77%20L61.00%20159.77%20Z%20M177.00%20360.69%20L148.00%20410.92%20L90.00%20410.92%20L61.00%20360.69%20L90.00%20310.46%20L148.00%20310.46%20Z%20M90.00%20109.54%20L61.00%20159.77%20L3.00%20159.77%20L-26.00%20109.54%20L3.00%2059.31%20L61.00%2059.31%20Z%20M177.00%20260.23%20L148.00%20310.46%20L90.00%20310.46%20L61.00%20260.23%20L90.00%20210.00%20L148.00%20210.00%20Z%20M264.00%20410.92%20L235.00%20461.15%20L177.00%20461.15%20L148.00%20410.92%20L177.00%20360.69%20L235.00%20360.69%20Z%20M90.00%209.08%20L61.00%2059.31%20L3.00%2059.31%20L-26.00%209.08%20L3.00%20-41.15%20L61.00%20-41.15%20Z%20M177.00%20159.77%20L148.00%20210.00%20L90.00%20210.00%20L61.00%20159.77%20L90.00%20109.54%20L148.00%20109.54%20Z%20M264.00%20310.46%20L235.00%20360.69%20L177.00%20360.69%20L148.00%20310.46%20L177.00%20260.23%20L235.00%20260.23%20Z%20M177.00%2059.31%20L148.00%20109.54%20L90.00%20109.54%20L61.00%2059.31%20L90.00%209.08%20L148.00%209.08%20Z%20M264.00%20210.00%20L235.00%20260.23%20L177.00%20260.23%20L148.00%20210.00%20L177.00%20159.77%20L235.00%20159.77%20Z%20M351.00%20360.69%20L322.00%20410.92%20L264.00%20410.92%20L235.00%20360.69%20L264.00%20310.46%20L322.00%20310.46%20Z%20M264.00%20109.54%20L235.00%20159.77%20L177.00%20159.77%20L148.00%20109.54%20L177.00%2059.31%20L235.00%2059.31%20Z%20M351.00%20260.23%20L322.00%20310.46%20L264.00%20310.46%20L235.00%20260.23%20L264.00%20210.00%20L322.00%20210.00%20Z%20M438.00%20410.92%20L409.00%20461.15%20L351.00%20461.15%20L322.00%20410.92%20L351.00%20360.69%20L409.00%20360.69%20Z%20M264.00%209.08%20L235.00%2059.31%20L177.00%2059.31%20L148.00%209.08%20L177.00%20-41.15%20L235.00%20-41.15%20Z%20M351.00%20159.77%20L322.00%20210.00%20L264.00%20210.00%20L235.00%20159.77%20L264.00%20109.54%20L322.00%20109.54%20Z%20M438.00%20310.46%20L409.00%20360.69%20L351.00%20360.69%20L322.00%20310.46%20L351.00%20260.23%20L409.00%20260.23%20Z%20M351.00%2059.31%20L322.00%20109.54%20L264.00%20109.54%20L235.00%2059.31%20L264.00%209.08%20L322.00%209.08%20Z%20M438.00%20210.00%20L409.00%20260.23%20L351.00%20260.23%20L322.00%20210.00%20L351.00%20159.77%20L409.00%20159.77%20Z%20M525.00%20360.69%20L496.00%20410.92%20L438.00%20410.92%20L409.00%20360.69%20L438.00%20310.46%20L496.00%20310.46%20Z%20M438.00%20109.54%20L409.00%20159.77%20L351.00%20159.77%20L322.00%20109.54%20L351.00%2059.31%20L409.00%2059.31%20Z%20M525.00%20260.23%20L496.00%20310.46%20L438.00%20310.46%20L409.00%20260.23%20L438.00%20210.00%20L496.00%20210.00%20Z%20M612.00%20410.92%20L583.00%20461.15%20L525.00%20461.15%20L496.00%20410.92%20L525.00%20360.69%20L583.00%20360.69%20Z%20M438.00%209.08%20L409.00%2059.31%20L351.00%2059.31%20L322.00%209.08%20L351.00%20-41.15%20L409.00%20-41.15%20Z%20M525.00%20159.77%20L496.00%20210.00%20L438.00%20210.00%20L409.00%20159.77%20L438.00%20109.54%20L496.00%20109.54%20Z%20M612.00%20310.46%20L583.00%20360.69%20L525.00%20360.69%20L496.00%20310.46%20L525.00%20260.23%20L583.00%20260.23%20Z%20M525.00%2059.31%20L496.00%20109.54%20L438.00%20109.54%20L409.00%2059.31%20L438.00%209.08%20L496.00%209.08%20Z%20M612.00%20210.00%20L583.00%20260.23%20L525.00%20260.23%20L496.00%20210.00%20L525.00%20159.77%20L583.00%20159.77%20Z%20M699.00%20360.69%20L670.00%20410.92%20L612.00%20410.92%20L583.00%20360.69%20L612.00%20310.46%20L670.00%20310.46%20Z%20M612.00%20109.54%20L583.00%20159.77%20L525.00%20159.77%20L496.00%20109.54%20L525.00%2059.31%20L583.00%2059.31%20Z%20M699.00%20260.23%20L670.00%20310.46%20L612.00%20310.46%20L583.00%20260.23%20L612.00%20210.00%20L670.00%20210.00%20Z%20M786.00%20410.92%20L757.00%20461.15%20L699.00%20461.15%20L670.00%20410.92%20L699.00%20360.69%20L757.00%20360.69%20Z%20M612.00%209.08%20L583.00%2059.31%20L525.00%2059.31%20L496.00%209.08%20L525.00%20-41.15%20L583.00%20-41.15%20Z%20M699.00%20159.77%20L670.00%20210.00%20L612.00%20210.00%20L583.00%20159.77%20L612.00%20109.54%20L670.00%20109.54%20Z%20M786.00%20310.46%20L757.00%20360.69%20L699.00%20360.69%20L670.00%20310.46%20L699.00%20260.23%20L757.00%20260.23%20Z%20M699.00%2059.31%20L670.00%20109.54%20L612.00%20109.54%20L583.00%2059.31%20L612.00%209.08%20L670.00%209.08%20Z%20M786.00%20210.00%20L757.00%20260.23%20L699.00%20260.23%20L670.00%20210.00%20L699.00%20159.77%20L757.00%20159.77%20Z%20M786.00%20109.54%20L757.00%20159.77%20L699.00%20159.77%20L670.00%20109.54%20L699.00%2059.31%20L757.00%2059.31%20Z%20M786.00%209.08%20L757.00%2059.31%20L699.00%2059.31%20L670.00%209.08%20L699.00%20-41.15%20L757.00%20-41.15%20Z%27%2F%3E%3C%2Fg%3E%3Cg%20stroke%3D%27%23C9A227%27%20stroke-width%3D%271.7%27%3E%3Ccircle%20cx%3D%27380.00%27%20cy%3D%27210.00%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27438.00%27%20cy%3D%27210.00%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27409.00%27%20cy%3D%27260.23%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27351.00%27%20cy%3D%27260.23%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27322.00%27%20cy%3D%27210.00%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27351.00%27%20cy%3D%27159.77%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27409.00%27%20cy%3D%27159.77%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27496.00%27%20cy%3D%27210.00%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27438.00%27%20cy%3D%27310.46%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27322.00%27%20cy%3D%27310.46%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27264.00%27%20cy%3D%27210.00%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27322.00%27%20cy%3D%27109.54%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27438.00%27%20cy%3D%27109.54%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27467.00%27%20cy%3D%27260.23%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27380.00%27%20cy%3D%27310.46%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27293.00%27%20cy%3D%27260.23%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27293.00%27%20cy%3D%27159.77%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27380.00%27%20cy%3D%27109.54%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27467.00%27%20cy%3D%27159.77%27%20r%3D%2758.00%27%2F%3E%3Ccircle%20cx%3D%27380.0%27%20cy%3D%27210.0%27%20r%3D%27174.00%27%2F%3E%3Ccircle%20cx%3D%27380.0%27%20cy%3D%27210.0%27%20r%3D%27180.00%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}
:root[data-theme="dark"] .hero::before { opacity: .30; }
@media (prefers-color-scheme: dark) { .hero::before { opacity: .30; } }

/* — инфо-строки (факты) — */
.fact { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; }
.fact svg { flex: 0 0 22px; margin-top: 3px; }
.fact b { font-weight: 700; }

/* — подпись/футер: семя жизни над подписью — */
.footer { text-align: center; margin-top: 46px; color: var(--hvoia-mut); font-size: 14.5px; }
.footer::before {
  content: ""; display: block; width: 52px; height: 52px; margin: 0 auto 10px; opacity: .9;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2064%2064%27%20fill%3D%27none%27%20stroke%3D%27%23C9A227%27%20stroke-width%3D%271.3%27%3E%3Ccircle%20cx%3D%2732.0%27%20cy%3D%2732.0%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2739.8%27%20cy%3D%2736.5%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2732.0%27%20cy%3D%2741.0%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2724.2%27%20cy%3D%2736.5%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2724.2%27%20cy%3D%2727.5%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2732.0%27%20cy%3D%2723.0%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2739.8%27%20cy%3D%2727.5%27%20r%3D%279%27%2F%3E%3Ccircle%20cx%3D%2732%27%20cy%3D%2732%27%20r%3D%2722%27%2F%3E%3C%2Fsvg%3E");
}
.footer .hand { font-size: 1.5em; display: block; margin-bottom: 2px; }

/* — появление (уважая reduced-motion) — */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s ease-out both; }
  .rise:nth-child(2) { animation-delay: .06s; } .rise:nth-child(3) { animation-delay: .12s; }
  .rise:nth-child(4) { animation-delay: .18s; } .rise:nth-child(5) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
