/* ============ «От ночи к утру» ============
   Подключается поверх style.css.
   Небо — одно на всю страницу: оно закреплено за экраном и меняется по мере прокрутки
   (цвета считает js/app.js). Блоки прозрачные, поэтому границ между ними нет. */

.v2 {
  --fog: rgba(232, 200, 150, .07);
  --hair: rgba(236, 222, 200, .16);
}
.v2 body { background: #03050b; }
.v2 body::before { display: none; }
.v2 .fog { filter: none; }

/* ---------- небо ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky-grad, .sky-night, .sky-night canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-grad { background: linear-gradient(#03050b, #080e20); }
.sky-night { will-change: opacity; }
.sky-night::before { /* глубина ночи: едва заметные туманности */
  content: ""; position: absolute; inset: 0;
  /* только круглые пятна с очень длинным затуханием: ни одного жёсткого края */
  background:
    radial-gradient(circle 95vmax at 78% 8%, rgba(52, 74, 160, .16), rgba(52, 74, 160, .09) 28%, rgba(52, 74, 160, .035) 55%, transparent 82%),
    radial-gradient(circle 85vmax at 8% 70%, rgba(92, 60, 150, .12), rgba(92, 60, 150, .06) 30%, rgba(92, 60, 150, .02) 58%, transparent 84%);
}
.sky-sun { /* свет встающего солнца */
  position: absolute; left: 50%; bottom: -96vmax; width: 170vmax; height: 170vmax; margin-left: -85vmax;
  opacity: 0; will-change: opacity, transform;
  background: radial-gradient(closest-side, rgba(255, 244, 222, .95), rgba(255, 214, 168, .55) 30%, rgba(255, 176, 140, .2) 52%, transparent 72%);
}
.v2 body::after { opacity: .085; mix-blend-mode: soft-light; } /* зерно против полос на градиенте */

/* ---------- первый экран ---------- */
.v2 .glass::before, .v2 .bokeh { display: none; }
.v2 .glass { display: none; }   /* луча и слоёв «стекла» здесь нет: только небо */
.v2 .halo { inset: -45% -60%; background: radial-gradient(closest-side, rgba(246, 204, 136, .42), rgba(232, 170, 100, .2) 34%, rgba(217, 143, 69, .07) 56%, transparent 78%); }
/* блоки не обрезают свечение: фон — одно непрерывное полотно */
.v2 section, .v2 .foot { overflow: visible; background: none; }
.v2 main, .v2 .foot { overflow-x: clip; }

.v2 .hero { flex-direction: column; justify-content: center; padding: 92px 0 26px; }
.v2 .hero-grid { gap: 34px; margin: auto 0; }
.v2 .hero-cover { width: min(40vw, 190px); }
.v2 .hero .kicker { display: none; }
.v2 .hero h1 { font-size: clamp(2.1rem, 8.4vw, 4.6rem); margin-bottom: .45em; }
.v2 .phrase { margin-bottom: 1.5em; }
.v2 .hero .btn { min-height: 52px; padding: 14px 28px; }

/* приглашение и стрелка */
.invite { position: relative; z-index: 1; width: 100%; max-width: 440px; margin: 34px auto 0; padding: 0 var(--pad); text-align: center; opacity: 0; animation: invite 3.2s var(--ease) 1.8s forwards; }
.invite p { margin: 0 0 18px; font-style: italic; font-weight: 400; font-size: 1.12rem; line-height: 1.42; letter-spacing: .012em; color: #dfe4f0; text-shadow: 0 0 22px rgba(3, 5, 11, .9), 0 0 6px rgba(3, 5, 11, .8); text-wrap: balance; }
.invite i { display: block; position: relative; width: 1px; height: 46px; margin: 0 auto; background: rgba(223, 228, 240, .2); overflow: hidden; }
.invite i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 46px; background: linear-gradient(180deg, transparent, var(--gold-2)); animation: fall 3.4s var(--ease) infinite; }
@keyframes invite { to { opacity: 1; } }
@keyframes fall { 0% { transform: translateY(-100%); } 70%, 100% { transform: translateY(100%); } }
.invite:empty, .invite p:empty { display: none; }

/* ---------- блоки на небе ---------- */
.v2 .faq, .v2 .support { --muted: #cdc0cc; --soft: #ece2dc; }

/* трактат: без светлой карточки, свет идёт от самой обложки */
.v2 .island { background: none; color: var(--text); box-shadow: none; padding-left: 0; padding-right: 0; }
.v2 .island::after { display: none; }
.v2 .island .pic { position: relative; }
.v2 .island .pic::before { content: ""; position: absolute; inset: -34%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 196, .4), rgba(240, 200, 130, .12) 55%, transparent 80%); }
.v2 .island .cover { box-shadow: 0 40px 80px -34px rgba(0, 0, 0, .8), 0 0 70px -10px rgba(255, 232, 186, .45); }
.v2 .island .label { color: var(--gold); }
.v2 .island h2 { color: var(--text); }
.v2 .island .alt a { color: var(--muted); border-color: rgba(200, 200, 215, .3); }
.v2 .island .alt a:hover { color: var(--gold-2); border-color: var(--gold); }
.v2 .license { color: var(--muted); }
.v2 .btn.dark, .v2 .btn.dark-ghost { color: var(--gold-2); border-color: rgba(226, 187, 122, .6); }
.v2 .btn.dark::before, .v2 .btn.dark-ghost::before { background: radial-gradient(120% 160% at 50% 120%, rgba(232, 190, 124, .34), rgba(232, 190, 124, .04) 60%, transparent); }
.v2 .btn.dark:hover, .v2 .btn.dark-ghost:hover { color: #fff6e2; border-color: var(--gold); box-shadow: 0 0 44px -10px rgba(232, 190, 124, .6); }
.v2 .author .pic::before { background: radial-gradient(closest-side, rgba(255, 214, 160, .34), transparent 72%); }

/* ---------- финал: ангел поднимается вместе с рассветом ---------- */
.v2 .angel-pin { overflow: visible; }
.v2 .angel-glow { width: 120vmin; height: 120vmin; margin: -60vmin 0 0 -60vmin; top: 44%; background: radial-gradient(closest-side, rgba(255, 248, 228, .8), rgba(255, 232, 190, .34) 34%, rgba(255, 228, 180, .1) 54%, transparent 74%); }
.v2.dawn .layer { filter: brightness(.72) saturate(1.3) drop-shadow(0 0 22px rgba(255, 250, 235, .85)); }
.v2.dawn .step, .v2.dawn .wish { color: var(--ink); }

/* ---------- подвал: день ---------- */
.v2 .foot { border-top: 0; color: var(--ink); --fog: rgba(150, 100, 30, .08); padding-top: 150px; }
.v2 .foot .label { color: #8d6220; }
.v2 .foot a { color: #2b3550; }
.v2 .foot a:hover { color: #000a24; }
.v2 .copy { color: #77736c; }
.ending { position: relative; z-index: 1; max-width: 560px; margin: 120px auto 0; padding: 0 var(--pad); text-align: center; }
.ending img { width: 74px; height: 74px; margin: 0 auto 30px; filter: brightness(.74) saturate(1.3); }
.ending p { margin: 0; font-style: italic; font-weight: 400; font-size: clamp(1.4rem, 5.2vw, 1.9rem); line-height: 1.4; text-wrap: balance; }
.ending::after { content: ""; display: block; width: 1px; height: 70px; margin: 40px auto 0; background: linear-gradient(180deg, rgba(141, 98, 32, .55), transparent); }
.ending p:empty, .ending:has(p:empty) { display: none; }

/* ---------- шапка на светлом ---------- */
.v2 .top::before { background: linear-gradient(180deg, var(--sky-top, #03050b) 35%, transparent); }
.v2 .brand, .v2 .lang, .v2 .lang button { transition: color 1.6s var(--ease); }
.v2.day .brand { color: var(--ink); }
.v2.day .lang, .v2.day .lang button { color: #5d6478; }
.v2.day .lang button.on { color: #8d6220; }

@media (min-width: 820px) {
  .v2 .hero { padding-top: 110px; }
  .v2 .hero-grid { gap: 80px; }
  .v2 .hero-cover { width: min(26vw, 330px); }
  .v2 .phrase { margin-bottom: 2em; }
  .invite { max-width: 520px; }
  .invite p { font-size: 1.2rem; }
}
@media (max-height: 700px) and (max-width: 819px) {
  .v2 .hero-cover { width: min(32vw, 150px); }
}
