/* ═════════════════════════════════════════════════════════════════
   Баннер «Натальная карта в 3D» — на странице /natalnaya-karta/.
   Показывается после построения результата. Для гостей CTA ведёт в
   auth-modal, для авторизованных открывает iframe-lightbox 3D-сцены
   (planetarium/index-natal.html).
   ═════════════════════════════════════════════════════════════════ */

.nk-3d-banner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 420px;
  padding: 40px;
  margin: 32px 0 24px;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background:
    radial-gradient(ellipse 65% 60% at 80% 50%, rgba(90,70,170,.32) 0%, transparent 60%),
    linear-gradient(135deg, #0c1130 0%, #161a40 55%, #1c1a4a 100%);
  box-shadow: 0 12px 40px -12px rgba(20,15,60,.5);
}
.nk-3d-banner::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:
    radial-gradient(1px 1px at 15% 22%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 78%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 48% 30%, rgba(255,238,192,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 65%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 8%  80%, rgba(207,213,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 12%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 6%  55%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 42% 12%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 45%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 60%, rgba(255,255,255,.5) 50%, transparent 51%);
}

.nk-3d-banner__body{ position:relative; z-index:2; max-width: 58%; }

/* высокая специфичность чтобы перебить .natal-section h3 из natal.css */
.nk-3d-banner .nk-3d-banner__title,
.natal-result .nk-3d-banner__title,
h3.nk-3d-banner__title{
  margin: 0 0 12px;
  font-family: Forum, Georgia, serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: .005em;
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: #ffffff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-shadow: none;
}
.nk-3d-banner__text{
  margin: 0 0 36px;
  color: #c5c2e0;
  font-size: 15px;
  max-width: 520px;
  line-height: 1.55;
}

/* «Бесплатно» — chip над заголовком */
.nk-3d-banner__chip{
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #f4ecd9;
  font: 600 11px/1 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nk-3d-banner__cta{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 15px/1 -apple-system, 'Segoe UI', sans-serif;
  color: #1a1645; background: #fff;
  transition: background .18s ease, box-shadow .18s ease, transform .12s ease;
}
.nk-3d-banner__cta:hover{
  box-shadow: 0 0 0 4px rgba(255,255,255,.15), 0 8px 24px -8px rgba(255,255,255,.35);
}
.nk-3d-banner__cta:active{ transform: translateY(1px); }
.nk-3d-banner__cta-arrow{ font-size: 18px; line-height: 1; }
.nk-3d-banner__hint{ margin: 12px 0 0; color: #9892b8; font-size: 12.5px; }

/* мини-натальная карта справа — выезжает за правый край */
.nk-3d-wheel{
  position: absolute;
  top: 50%; right: -70px;
  transform: translateY(-50%);
  width: 480px; height: 480px;
  z-index: 1; pointer-events: none;
}
.nk-3d-wheel__svg{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.nk-3d-wheel__svg .ring-out{ fill:none; stroke:rgba(204,158,74,.45); stroke-width:1; }
.nk-3d-wheel__svg .ring-mid{ fill:none; stroke:rgba(204,158,74,.28); stroke-width:1; }
.nk-3d-wheel__svg .ring-in { fill:none; stroke:rgba(255,255,255,.16); stroke-width:1; }
.nk-3d-wheel__svg .spoke   { stroke:rgba(255,255,255,.10); stroke-width:1; }
.nk-3d-wheel__svg .house-num{
  fill:rgba(255,255,255,.55); font:500 11px/1 -apple-system, sans-serif;
  text-anchor:middle; dominant-baseline:central;
}
.nk-3d-wheel__svg .zodiac-icons use{ color: rgba(255,225,170,.85); }

.house-fire { fill: #9E0E18; opacity: .10; }
.house-earth{ fill: #6B7B4E; opacity: .10; }
.house-air  { fill: #CC9E4A; opacity: .10; }
.house-water{ fill: #5A78B8; opacity: .10; }

.nk-3d-wheel__planet{
  position: absolute; left: 50%; top: 50%;
  width: 50px; height: 50px;
  margin: -25px 0 0 -25px;
  pointer-events: none;
}
.nk-3d-wheel__planet img{
  width: 100%; height: 100%; display: block; object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.55));
}
.nk-3d-wheel__planet::before{
  content:""; position:absolute; inset:-20%; border-radius:50%; z-index:-1;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
  opacity: .55; filter: blur(6px);
}
.pl-sun    { --glow: #FFD24A; }
.pl-moon   { --glow: #E1DDD0; }
.pl-mercury{ --glow: #B9967D; }
.pl-venus  { --glow: #F0B46A; }
.pl-mars   { --glow: #D24838; }
.pl-jupiter{ --glow: #D4AD7E; }
.pl-saturn { --glow: #D3B96F; }
.pl-uranus { --glow: #7EC9D2; }
.pl-neptune{ --glow: #6480C8; }
.pl-pluto  { --glow: #A48C9C; }

.nk-3d-wheel__planet--sun    { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
.nk-3d-wheel__planet--saturn { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
.nk-3d-wheel__planet--jupiter{ width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.nk-3d-wheel__planet--pluto  { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.nk-3d-wheel__planet--mercury{ width: 42px; height: 42px; margin: -21px 0 0 -21px; }
.nk-3d-wheel__planet--moon   { width: 46px; height: 46px; margin: -23px 0 0 -23px; }

.nk-3d-wheel__center{
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #cca656;
  box-shadow: 0 0 16px rgba(204,166,86,.75);
}

/* mobile */
@media (max-width: 760px){
  .nk-3d-banner{ padding: 28px 24px; text-align: left; min-height: auto; align-items: flex-start; }
  .nk-3d-banner__body{ max-width: none; width: 100%; }
  .nk-3d-banner__title{ font-size: 30px; }
  .nk-3d-banner__text{ margin-left: 0; margin-right: 0; }
  .nk-3d-banner__cta{ align-self: flex-start; }
}

/* На узких мобильных колесо мешает — прячем, текст занимает всю ширину */
@media (max-width: 580px){
  .nk-3d-wheel{ display: none; }
  .nk-3d-banner__body{ position: relative; z-index: 2; max-width: 100% !important; width: 100% !important; }
  .nk-3d-banner__text{ font-size: 14px; }
  .nk-3d-wheel{
    position: relative; top: auto; right: auto; left: 50%;
    transform: translateX(-50%);
    width: 320px; height: 320px;
    margin: 0 auto 12px;
    opacity: .85;
  }
  .nk-3d-wheel__planet{ width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .nk-3d-wheel__planet--sun   { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .nk-3d-wheel__planet--saturn{ width: 46px; height: 46px; margin: -23px 0 0 -23px; }
}

/* Когда карта построена (#natal-result без [hidden]) — прячем верхний
   промо-баннер, оставляем только тот, что внутри результата. */
body:has(#natal-result:not([hidden])) .nk-3d-banner-promo-wrap{ display: none; }

/* ═════════════════════════════════════════════════════════════════
   Lightbox с iframe 3D-сцены
   ═════════════════════════════════════════════════════════════════ */
.nk-3d-lightbox{
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(8, 8, 12, .96);
  display: flex; align-items: stretch; justify-content: stretch;
  animation: nk3dLightboxIn .2s ease;
}
@keyframes nk3dLightboxIn{ from{ opacity: 0 } to{ opacity: 1 } }
.nk-3d-lightbox iframe{
  width: 100%; height: 100%; border: 0; display: block; background: #000;
}
.nk-3d-lightbox__close{
  position: absolute; top: 14px; right: 14px; z-index: 10001;
  width: 42px; height: 42px; border-radius: 14px;
  background: rgba(14,14,18,.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.1);
  color: #f5f5f4; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .08s;
}
.nk-3d-lightbox__close:hover{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.nk-3d-lightbox__close:active{ transform: scale(.97); }
.nk-3d-lightbox__close svg{ width: 18px; height: 18px; }
body.nk-3d-lightbox-open{ overflow: hidden; }
