/* ============================================================
   COSMIC ANIMATIONS + FUNNEL STYLES
   Подключается отдельно после style.css
   ============================================================ */

/* Sacred geometry — медленное вращение */
@keyframes sacredRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.sacred-geo {
  animation: sacredRotate 180s linear infinite;
  transform-origin: center center;
}

/* Орбитальные кольца — пульсация */
@keyframes orbitPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.015); }
}
.orrery-ring {
  animation: orbitPulse 8s ease-in-out infinite;
}
.orrery-ring.ring-2 { animation-duration: 10s; animation-delay: -2s; }
.orrery-ring.ring-3 { animation-duration: 12s; animation-delay: -4s; }

/* Солнце пульсирует */
@keyframes sunPulse {
  0%, 100% { box-shadow: 0 0 60px 20px rgba(198,169,107,0.3), 0 0 120px 40px rgba(32,60,139,0.15); }
  50%      { box-shadow: 0 0 80px 25px rgba(198,169,107,0.4), 0 0 160px 60px rgba(32,60,139,0.2); }
}
.orrery-sun-glow { animation: sunPulse 5s ease-in-out infinite; }

/* Nebula flow */
@keyframes nebulaFlow {
  0%, 100% { filter: blur(40px); transform: translate(0, 0) scale(1); }
  33%      { filter: blur(50px); transform: translate(10px, -15px) scale(1.03); }
  66%      { filter: blur(45px); transform: translate(-10px, 10px) scale(0.99); }
}
.hero-nebula {
  animation: nebulaFlow 20s ease-in-out infinite;
}

/* Планеты — покачивание при hover */
@keyframes planetFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(0.5deg); }
}
.planet-card:hover .planet-symbol {
  animation: planetFloat 3s ease-in-out infinite;
}

/* Орбитальные планеты вокруг солнца */
@keyframes planetOrbit1 {
  from { transform: rotate(0deg) translateX(110px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(110px) rotate(-360deg); }
}
@keyframes planetOrbit2 {
  from { transform: rotate(0deg) translateX(180px) rotate(0deg); }
  to   { transform: rotate(-360deg) translateX(180px) rotate(360deg); }
}
@keyframes planetOrbit3 {
  from { transform: rotate(0deg) translateX(260px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(260px) rotate(-360deg); }
}

.orbit-planet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  pointer-events: none;
}
.orbit-planet-1 {
  background: radial-gradient(circle, #E6CA8A, #C6A96B);
  box-shadow: 0 0 12px rgba(198,169,107,0.6);
  animation: planetOrbit1 18s linear infinite;
}
.orbit-planet-2 {
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: radial-gradient(circle, #9B8FFF, #6B5CD6);
  box-shadow: 0 0 10px rgba(155,143,255,0.5);
  animation: planetOrbit2 32s linear infinite;
}
.orbit-planet-3 {
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  background: radial-gradient(circle, #D4698E, #8B4A6E);
  box-shadow: 0 0 16px rgba(212,105,142,0.5);
  animation: planetOrbit3 48s linear infinite;
}

/* Aurora — fixed background. mix-blend-mode: screen makes it visible on dark
   sections (hero/footer) and invisible on light sections. No change needed. */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.38;
  mix-blend-mode: screen;
  overflow: hidden;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 80%;
  left: -10%;
  filter: blur(60px);
}
.aurora::before {
  top: -20%;
  background: radial-gradient(ellipse at 30% 50%, rgba(32,60,139,0.55), transparent 60%);
  animation: auroraFlow1 18s ease-in-out infinite;
}
.aurora::after {
  top: 10%;
  background: radial-gradient(ellipse at 70% 50%, rgba(58,12,163,0.40), transparent 60%);
  animation: auroraFlow2 24s ease-in-out infinite;
}
@keyframes auroraFlow1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(10%, 4%); }
}
@keyframes auroraFlow2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-8%, 6%); }
}

/* Cosmic breathe для em */
@keyframes cosmicBreathe {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
.hero-title em {
  animation: cosmicBreathe 4s ease-in-out infinite;
}

/* ============================================================
   FUNNEL: sticky CTA, lead magnet, trust signals
   ============================================================ */

/* Sticky bar — deliberately dark for contrast at bottom of any page */
.sticky-funnel-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11,19,43,0.85), rgba(32,60,139,0.95));
  backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid rgba(198,169,107,0.35);
  padding: 0.9rem 1rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.sticky-funnel-bar.visible { transform: translateY(0); }
.sticky-funnel-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sticky-funnel-text { color: #F5EFDF; font-size: 0.95rem; line-height: 1.3; }
.sticky-funnel-text strong { color: #C6A96B; }
.sticky-funnel-close {
  background: transparent;
  border: 1px solid rgba(245,239,223,0.25);
  color: rgba(245,239,223,0.6);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sticky-funnel-close:hover {
  background: rgba(198,169,107,0.1);
  color: #C6A96B;
}
@media (max-width: 640px) {
  .sticky-funnel-inner { flex-wrap: wrap; }
  .sticky-funnel-text { font-size: 0.85rem; flex: 1; min-width: 150px; }
  .sticky-funnel-inner .btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
}

/* ── Lead Magnet секция ── */
.lead-magnet-section {
  padding: 5rem 0 6rem;
  text-align: center;
  position: relative;
  background: radial-gradient(ellipse at center, rgba(245,197,24,0.06), transparent 70%);
}
.lead-magnet-box {
  max-width: 580px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(245,197,24,0.22);
  border-radius: 24px;
  position: relative;
  box-shadow: 0 8px 48px rgba(30,64,175,0.10), 0 0 0 1px rgba(245,197,24,0.10);
}
.lead-magnet-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(245,197,24,0.10);
  color: #D4A017;
  border: 1px solid rgba(245,197,24,0.35);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.lead-magnet-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #1A1730;
  margin: 0 0 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}
.lead-magnet-box h2 em { color: #F5C518; font-style: italic; }
.lead-magnet-subtitle {
  color: #5A5272;
  margin-bottom: 2rem;
  font-size: 1rem;
}
.lead-magnet-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}
.lead-magnet-form label {
  color: #D4A017;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: -0.3rem;
}
.lead-magnet-form input {
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(245,197,24,0.25);
  border-radius: 12px;
  color: #1A1730;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s ease;
}
.lead-magnet-form input:focus {
  outline: none;
  border-color: rgba(245,197,24,0.60);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245,197,24,0.10);
}
.lead-magnet-form input::placeholder { color: #8C82A0; }
.lead-magnet-form button {
  margin-top: 0.8rem;
  width: 100%;
  padding: 1.1rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: linear-gradient(135deg, #F5C518, #FFE066);
  color: #1A1730;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}
.lead-magnet-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245,197,24,0.30);
}
.lead-magnet-result {
  margin-top: 0;
  padding: 0;
  background: rgba(247,243,236,0.95);
  border: 1px solid rgba(245,197,24,0.25);
  border-radius: 16px;
  text-align: left;
  color: #1A1730;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}
.lead-magnet-result.visible {
  padding: 1.75rem;
  opacity: 1;
  max-height: 1000px;
  margin-top: 1.5rem;
}
.lead-magnet-result h3 {
  font-family: 'Cormorant Garamond', serif;
  color: #F5C518;
  font-size: 1.6rem;
  margin: 0 0 1rem;
}
.lead-magnet-result p { margin: 0.5rem 0; line-height: 1.6; color: #5A5272; }
.lead-magnet-result .big-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem;
  color: #F5C518;
  font-weight: 600;
  display: block;
  margin: 0.5rem 0;
  line-height: 1;
}
.lead-magnet-result .unlock-btn {
  margin-top: 1.25rem;
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #F5C518, #FFE066);
  color: #1A1730;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.lead-magnet-result .unlock-btn:hover { transform: translateY(-2px); }

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  opacity: 0.85;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #8C82A0;
  font-size: 0.85rem;
}
.trust-badge .check { color: #F5C518; font-weight: 700; }

/* Process list (шаги) */
.process-list {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1rem 0 2rem;
}
.process-list li {
  counter-increment: step;
  padding: 1rem 1rem 1rem 3.5rem;
  position: relative;
  background: rgba(30,64,175,0.05);
  border-left: 2px solid rgba(245,197,24,0.35);
  margin-bottom: 0.75rem;
  border-radius: 0 10px 10px 0;
  color: #5A5272;
  line-height: 1.6;
}
.process-list li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.6rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F5C518, #FFE066);
  color: #1A1730;
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.9rem;
}

/* ============================================================
   SPACING COMPACT — убираем излишние пробелы между секциями
   ============================================================ */
.knowledge-section,
.articles-section,
.planets-section,
.insights-section,
.hub-section,
.blueprint-section,
.quote-section,
.newsletter-section,
.rashi-section {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

@media (min-width: 768px) {
  .knowledge-section,
  .articles-section,
  .planets-section,
  .insights-section,
  .blueprint-section,
  .rashi-section {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }
}

/* Section header margin reduce */
.section-header {
  margin-bottom: 3rem !important;
}

/* Article card — прозрачность + читаемый текст поверх SVG */
.article-card .article-img {
  height: 180px;
}
.article-card.featured .article-img {
  height: 100%;
  min-height: 280px;
}
.article-body {
  padding: 1.5rem !important;
}

/* Hub grid — плотнее */
.hub-grid {
  gap: 1rem !important;
}
.hub-card-img {
  height: 140px !important;
}

/* Advanced orrery — меньше отступ */
.advanced-orrery { margin: 2rem auto !important; }

/* Lead magnet — меньше padding */
.lead-magnet-section { padding: 3rem 0 4rem !important; }

/* ============================================================
   BLOG SECTION + BLOG CARDS — light theme
   ============================================================ */

.blog-section {
  padding: 4rem 0;
  position: relative;
  background: var(--surface-warm, #F7F3EC);
}

.blog-carousel-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(245,197,24,0.4) transparent;
  padding: 0.5rem 0 1.5rem;
  margin: 0 -1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.blog-carousel-wrapper::-webkit-scrollbar { height: 6px; }
.blog-carousel-wrapper::-webkit-scrollbar-thumb {
  background: rgba(245,197,24,0.4);
  border-radius: 999px;
}
.blog-carousel-wrapper::-webkit-scrollbar-track { background: transparent; }

.blog-carousel {
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem;
  width: max-content;
}

.blog-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(245,197,24,0.18);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  box-shadow: 0 2px 16px rgba(30,64,175,0.08), 0 0 0 1px rgba(245,197,24,0.10);
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245,197,24,0.45);
  box-shadow: 0 16px 40px rgba(30,64,175,0.12), 0 0 0 1px rgba(245,197,24,0.22);
}

.blog-card .blog-img {
  height: 180px;
  border-radius: 0;
}

.blog-card-body {
  padding: 1.35rem;
}
.blog-card-body .tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.blog-card-body .tag-astro     { background: rgba(245,197,24,0.10); color: #D4A017; border: 1px solid rgba(245,197,24,0.25); }
.blog-card-body .tag-moon      { background: rgba(60,90,200,0.07);  color: #4A6CB8; border: 1px solid rgba(60,90,200,0.20); }
.blog-card-body .tag-karma     { background: rgba(180,60,100,0.07); color: #B04070; border: 1px solid rgba(180,60,100,0.20); }
.blog-card-body .tag-spiritual { background: rgba(100,80,200,0.07); color: #6050C8; border: 1px solid rgba(100,80,200,0.20); }

.blog-card-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: #1A1730;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}
.blog-card-body p {
  color: #5A5272;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.blog-card-body .read-more {
  color: #F5C518;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: color 0.3s;
}
.blog-card:hover .read-more { color: #FFE066; }

@media (max-width: 640px) {
  .blog-card { flex: 0 0 280px; }
  .blog-card .blog-img { height: 160px; }
}

/* ── Знаменитые карты: 4 персонажа ── */
.blog-img-einstein {
  background:
    radial-gradient(ellipse at 35% 45%, rgba(60,100,200,0.55) 0%, transparent 65%),
    radial-gradient(ellipse at 72% 62%, rgba(20,40,120,0.4) 0%, transparent 55%),
    linear-gradient(160deg, #080B1A 0%, #0D1430 55%, #060A18 100%);
}
.blog-img-gandhi {
  background:
    radial-gradient(ellipse at 50% 55%, rgba(198,169,107,0.45) 0%, transparent 62%),
    radial-gradient(ellipse at 28% 30%, rgba(140,110,50,0.3) 0%, transparent 50%),
    linear-gradient(160deg, #100808 0%, #1A1005 55%, #0E0806 100%);
}
.blog-img-chaplin {
  background:
    radial-gradient(ellipse at 60% 40%, rgba(190,190,210,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 28% 65%, rgba(90,90,110,0.28) 0%, transparent 50%),
    linear-gradient(160deg, #080810 0%, #0F0F18 55%, #080810 100%);
}
.blog-img-bachchan {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(160,80,200,0.45) 0%, transparent 62%),
    radial-gradient(ellipse at 72% 28%, rgba(200,130,180,0.28) 0%, transparent 50%),
    linear-gradient(160deg, #100810 0%, #180D1A 55%, #0E080E 100%);
}

/* ============================================================
   ОПТИМИЗАЦИЯ РЕНДЕРА — снижаем redraws
   ============================================================ */

/* Защита от layout shift */
.article-img, .hub-card-img, .blog-img {
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

/* content-visibility для длинных секций — отложенный рендер */
.rashi-section,
.insights-section,
.hub-section,
.newsletter-section,
.blog-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}
