/* =========================================================
   SYNASTRY AI — SEO-страницы совместимости
   Glassmorphism · Neon violet · JetBrains Mono · Dark
   ========================================================= */

:root {
  --bg-primary:    #0A0612;
  --bg-secondary:  #14091F;
  --accent-neon:   #C49AFF;
  --accent-glow:   rgba(196, 154, 255, 0.45);
  --accent-dim:    rgba(196, 154, 255, 0.15);
  --text-primary:  #F5F0FF;
  --text-secondary:#D8CCEE;
  --border-glass:  rgba(196, 154, 255, 0.18);
  --paywall-blur:  20px;

  --radius-card:   20px;
  --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font:          'JetBrains Mono', monospace;
}

/* ── Reset ────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* ── Фоновые блобы (нужны для glassmorphism) ─────────────── */

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.bg-blob--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(196, 154, 255, 0.22) 0%, transparent 70%);
  top: -180px;
  right: -200px;
  animation: blobDrift1 18s ease-in-out infinite alternate;
}

.bg-blob--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(100, 60, 180, 0.18) 0%, transparent 70%);
  bottom: 5%;
  left: -180px;
  animation: blobDrift2 22s ease-in-out infinite alternate;
}

.bg-blob--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(196, 154, 255, 0.12) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation: blobDrift3 15s ease-in-out infinite alternate;
}

@keyframes blobDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-40px, 60px) scale(1.08); }
}
@keyframes blobDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, -40px) scale(1.05); }
}
@keyframes blobDrift3 {
  from { transform: translateX(-50%) scale(1); }
  to   { transform: translateX(-50%) scale(1.1); }
}

/* ── Layout ───────────────────────────────────────────────── */

.container {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

@media (min-width: 640px) {
  .container {
    padding: 64px 40px 100px;
  }
}

/* ── Glassmorphism card ───────────────────────────────────── */

.glass-card {
  background: rgba(20, 9, 31, 0.55);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-card);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero__star {
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.hero__title {
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero__and {
  display: inline-block;
  margin: 0 12px;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 0.75em;
}

.accent {
  color: var(--accent-neon);
  text-shadow:
    0 0 20px rgba(196, 154, 255, 0.6),
    0 0 40px rgba(196, 154, 255, 0.25);
}

.hero__subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

/* ── Sphere ───────────────────────────────────────────────── */

.sphere-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  opacity: 1;
  transition: opacity 1s ease;
}

.sphere-wrap.sphere-wrap--fade {
  opacity: 0.25;
}

.sphere-wrap.sphere-wrap--hidden {
  opacity: 0;
  pointer-events: none;
}

.sphere {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sphere__inner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #6B2FD0,
    #9B59F5,
    #C49AFF,
    #7B3FE0,
    #4A1A9C,
    #6B2FD0
  );
  box-shadow:
    0 0 30px rgba(196, 154, 255, 0.5),
    0 0 60px rgba(196, 154, 255, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  animation: sphereSpin 8s linear infinite;
}

.sphere__ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--border-glass);
  animation: ringPulse 3s ease-in-out infinite;
}

.sphere__ring--1 {
  width: 108px;
  height: 108px;
  animation-delay: 0s;
}

.sphere__ring--2 {
  width: 124px;
  height: 124px;
  border-color: rgba(196, 154, 255, 0.08);
  animation-delay: 1.5s;
}

.sphere__glow {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 60px 20px rgba(196, 154, 255, 0.2);
  animation: glowPulse 2.5s ease-in-out infinite;
}

.sphere--active .sphere__inner {
  animation: sphereSpin 8s linear infinite, spherePulse 2.5s ease-in-out infinite;
}

@keyframes sphereSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes spherePulse {
  0%, 100% { transform: rotate(0deg)   scale(1); }
  50%       { transform: rotate(180deg) scale(1.08); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.9; transform: scale(1.05); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── Preloader ────────────────────────────────────────────── */

.preloader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 24px;
  margin-bottom: 24px;
  text-align: center;
}

.preloader__spinner {
  position: relative;
  width: 44px;
  height: 44px;
}

.preloader__arc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid var(--accent-dim);
  border-top-color: var(--accent-neon);
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 12px var(--accent-glow);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.preloader__phrase {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.preloader__phrase.phrase-fade {
  opacity: 0;
}

/* ── Results ──────────────────────────────────────────────── */

.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Compatibility points ─────────────────────────────────── */

.points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.point {
  display: flex;
  gap: 18px;
  padding: 22px 24px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.point--visible {
  opacity: 1;
  transform: translateY(0);
}

.point__number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-neon);
  text-shadow: 0 0 8px var(--accent-glow);
  margin-top: 2px;
}

.point__text {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  font-weight: 400;
}

/* ── Cliffhanger ──────────────────────────────────────────── */

.cliffhanger {
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--accent-neon), transparent) 1;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px var(--border-glass),
    0 4px 20px var(--accent-dim);
}

.cliffhanger--visible {
  opacity: 1;
  transform: scale(1);
}

.cliffhanger__icon {
  flex-shrink: 0;
  margin-top: 2px;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.cliffhanger__text {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent-neon);
  line-height: 1.6;
  text-shadow: 0 0 16px rgba(196, 154, 255, 0.35);
}

/* ── Paywall ──────────────────────────────────────────────── */

.paywall {
  position: relative;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out;
}

.paywall--visible {
  opacity: 1;
  transform: translateY(0);
}

.paywall__fade {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  z-index: 1;
  pointer-events: none;
}

.paywall__blurred {
  filter: blur(var(--paywall-blur));
  user-select: none;
  pointer-events: none;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
  max-height: 140px;
  overflow: hidden;
}

.paywall__blurred p + p {
  margin-top: 12px;
}

/* ── CTA ──────────────────────────────────────────────────── */

.cta-wrap {
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta-hint {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 14px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #7B3FE0 0%, #A066FF 50%, #C49AFF 100%);
  box-shadow:
    0 0 0 1px rgba(196, 154, 255, 0.35),
    0 8px 24px rgba(100, 40, 200, 0.45),
    0 0 40px rgba(196, 154, 255, 0.2);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s ease-out,
    transform 0.4s ease-out,
    box-shadow var(--transition),
    background var(--transition);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: none;
}

.cta-button--visible {
  opacity: 1;
  transform: translateY(0);
  animation: ctaPulse 2s ease-in-out infinite;
}

.cta-button:hover {
  box-shadow:
    0 0 0 1px rgba(196, 154, 255, 0.6),
    0 12px 32px rgba(100, 40, 200, 0.6),
    0 0 60px rgba(196, 154, 255, 0.35);
  background: linear-gradient(135deg, #8B4FEE 0%, #B076FF 50%, #D4AAFF 100%);
  animation: none;
  transform: translateY(-2px) !important;
}

.cta-button:focus-visible {
  outline: 2px solid var(--accent-neon);
  outline-offset: 4px;
  animation: none;
}

.cta-button__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(196, 154, 255, 0.35),
      0 8px 24px rgba(100, 40, 200, 0.45),
      0 0 40px rgba(196, 154, 255, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(196, 154, 255, 0.55),
      0 12px 32px rgba(100, 40, 200, 0.65),
      0 0 60px rgba(196, 154, 255, 0.4);
  }
}

/* ── Reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bg-blob {
    animation: none;
  }

  .sphere__inner {
    animation: none;
  }
}

/* ── Utilities ────────────────────────────────────────────── */

[hidden] {
  display: none !important;
}
