/**
 * Universal marketing/auth shell — neon glass (canonical theme).
 * Atmosphere, nav, outer frame, and section panels share one visual system.
 */

:root {
  --shell-ion: #36e5ff;
  --shell-ion-hot: #b8f4ff;
  --shell-violet: #7c8cff;
  --shell-bg-deep: #03070f;
  --shell-panel-bg: linear-gradient(165deg, rgba(8, 18, 36, 0.88) 0%, rgba(4, 10, 22, 0.92) 100%);
  --shell-panel-border: rgba(54, 229, 255, 0.28);
  --shell-nav-max: 1200px;
}

/* ── Background + atmosphere ── */
body:has(#particles) {
  background-color: var(--shell-bg-deep);
  background-image:
    radial-gradient(ellipse 40% 32% at 15% 18%, rgba(54, 229, 255, 0.1), transparent 68%),
    radial-gradient(ellipse 36% 28% at 88% 12%, rgba(124, 140, 255, 0.08), transparent 65%),
    radial-gradient(ellipse 50% 38% at 50% 92%, rgba(99, 102, 241, 0.06), transparent 70%),
    var(--gradient-bg);
}

.site-atmosphere,
.auth-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.site-atmosphere__aurora,
.auth-atmosphere__aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 40% 32% at 15% 18%, rgba(54, 229, 255, 0.18), transparent 68%),
    radial-gradient(ellipse 36% 28% at 88% 12%, rgba(124, 140, 255, 0.14), transparent 65%),
    radial-gradient(ellipse 50% 38% at 50% 92%, rgba(99, 102, 241, 0.12), transparent 70%);
  filter: blur(48px) saturate(1.35);
  animation: shell-aurora-drift 18s ease-in-out infinite alternate;
}

.site-atmosphere__grid,
.auth-atmosphere__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(54, 229, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 229, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 42%, black 12%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 42%, black 12%, transparent 72%);
  opacity: 0.75;
}

.site-atmosphere__beam,
.auth-atmosphere__beam {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 32%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(54, 229, 255, 0.12) 20%,
    rgba(184, 244, 255, 0.55) 50%,
    rgba(124, 140, 255, 0.2) 80%,
    transparent
  );
  box-shadow: 0 0 48px rgba(54, 229, 255, 0.22);
  animation: shell-beam-pulse 5s ease-in-out infinite;
}

@keyframes shell-aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -1.5%) scale(1.03); }
}

@keyframes shell-beam-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

body:has(#particles) #particles {
  z-index: 1;
  opacity: 0.82;
}

body:has(#particles) .site-header,
body:has(#particles) #mainContent,
body:has(#particles) .site-footer {
  position: relative;
  z-index: 3;
}

/* ── Nav bar (slim floating capsule) ── */
body:has(#particles) .nav-bar {
  max-width: var(--shell-nav-max);
  width: min(var(--shell-nav-max), calc(100% - 2rem));
  margin: 1.5rem auto 0.75rem;
  padding: 6px 14px;
  border-radius: 14px;
  border-color: rgba(54, 229, 255, 0.24);
  background: linear-gradient(135deg, rgba(6, 16, 32, 0.82), rgba(4, 10, 22, 0.78));
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(54, 229, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body:has(#particles) .site-header {
  padding: 0 clamp(12px, 2vw, 20px);
  min-height: 0;
}

body:has(#particles) .nav-logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(54, 229, 255, 0.35);
}

body:has(#particles) .nav-primary__list {
  align-items: center;
  flex-wrap: nowrap;
  column-gap: clamp(8px, 1vw, 14px);
  padding: 4px 10px;
}

body:has(#particles) .nav-primary__list li {
  flex-shrink: 0;
}

body:has(#particles) .nav-primary__link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  padding: 6px 10px;
  font-size: 11px;
}

body:has(#particles) .nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 1.125rem;
}

body:has(#particles) .nav-actions__link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
  padding: 6px 11px;
}

body:has(#particles) .nav-actions__link--cta {
  opacity: 1;
  box-shadow: 0 0 18px rgba(54, 229, 255, 0.35);
}

/* ── Main frame ── */
body:has(#particles):not(.page-home) #mainContent {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 0 clamp(48px, 8vh, 96px);
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:has(#particles) .outer-card-container {
  width: 90%;
  max-width: var(--shell-nav-max);
  margin: 2rem auto 0;
  gap: clamp(20px, 3vw, 32px);
}

body:has(#particles) #mainContent.auth-shell {
  padding: var(--auth-pad-y, 12px) var(--auth-pad-x, 16px);
}

/* ── Glass panels (sections inside outer frame) ── */
body:has(#particles) .outer-card-container > .section,
body:has(#particles) .outer-card-container > .hero,
body:has(#particles) .outer-card-container > .sl-section,
body:has(#particles) .outer-card-container > .timeline-section,
body:has(#particles) .outer-card-container > .faq-section,
body:has(#particles) .outer-card-container > .contact-section,
body:has(#particles) .outer-card-container > .footer-cta,
body:has(#particles) .outer-card-container > .auth-section {
  width: 100%;
  margin: 0;
  padding: clamp(24px, 3.5vw, 40px) clamp(20px, 2.8vw, 32px);
  border-radius: 16px;
  border: 1px solid var(--shell-panel-border);
  background: var(--shell-panel-bg);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  box-shadow:
    0 0 0 1px rgba(184, 244, 255, 0.06),
    0 24px 56px rgba(0, 0, 0, 0.48),
    0 0 40px rgba(54, 229, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: visible;
}

body:has(#particles) .outer-card-container > .section::before,
body:has(#particles) .outer-card-container > .hero::before,
body:has(#particles) .outer-card-container > .sl-section::before,
body:has(#particles) .outer-card-container > .timeline-section::before,
body:has(#particles) .outer-card-container > .faq-section::before,
body:has(#particles) .outer-card-container > .contact-section::before,
body:has(#particles) .outer-card-container > .footer-cta::before,
body:has(#particles) .outer-card-container > .auth-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(232, 197, 106, 0.35) 0%,
    rgba(54, 229, 255, 0.3) 35%,
    rgba(124, 140, 255, 0.22) 65%,
    rgba(184, 244, 255, 0.35) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  z-index: -1;
}

body:has(#particles) .outer-card-container > .section::after,
body:has(#particles) .outer-card-container > .hero::after,
body:has(#particles) .outer-card-container > .sl-section::after,
body:has(#particles) .outer-card-container > .timeline-section::after,
body:has(#particles) .outer-card-container > .faq-section::after,
body:has(#particles) .outer-card-container > .contact-section::after,
body:has(#particles) .outer-card-container > .footer-cta::after,
body:has(#particles) .outer-card-container > .auth-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 244, 255, 0.5), transparent);
  pointer-events: none;
  z-index: 0;
  inset: auto 12% auto 12%;
  border-radius: 0;
}

body:has(#particles) .outer-card-container > .section > *,
body:has(#particles) .outer-card-container > .hero > *,
body:has(#particles) .outer-card-container > .sl-section > *,
body:has(#particles) .outer-card-container > .contact-section > * {
  position: relative;
  z-index: 1;
}

/* Nested cards inherit shell palette */
body:has(#particles) .card,
body:has(#particles) .plan-card,
body:has(#particles) .included-item,
body:has(#particles) .how-step,
body:has(#particles) .faq,
body:has(#particles) .sentinel-feature,
body:has(#particles) .sentinel-tier {
  border-color: rgba(54, 229, 255, 0.18);
  background: rgba(6, 14, 28, 0.62);
}

body:has(#particles) .section h1,
body:has(#particles) .section h2,
body:has(#particles) .hero h1 {
  color: var(--shell-ion-hot);
}

body:has(#particles) .eyebrow,
body:has(#particles) .section-lead {
  color: rgba(184, 244, 255, 0.78);
}

@media (prefers-reduced-motion: reduce) {
  .site-atmosphere__aurora,
  .site-atmosphere__beam,
  .auth-atmosphere__aurora,
  .auth-atmosphere__beam {
    animation: none !important;
  }
}
