/* SoulMate AI Landing Page */
:root {
  --bg: #0A0A0F;
  --surface: #13131A;
  --surface-2: #1A1A24;
  --primary: #A855F7;
  --accent: #EC4899;
  --text: #F1F1F3;
  --text-muted: #9CA3AF;
  --gradient: linear-gradient(135deg, #A855F7, #EC4899);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* --- NAV --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(168,85,247,.1);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; }
.nav-brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-muted); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 24px; }

/* Language Switcher */
.lang-dropdown { position: relative; }
.lang-toggle {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  font-family: inherit;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--text); }
.lang-toggle svg { flex-shrink: 0; }
.lang-arrow { transition: transform .2s; }
.lang-dropdown.open .lang-arrow { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 6px;
  min-width: 140px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 200;
}
.lang-dropdown.open .lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.lang-option {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .85rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.lang-option:hover { background: rgba(168,85,247,.1); color: var(--text); }
.lang-option.active { color: var(--primary); background: rgba(168,85,247,.08); }

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 24px 0;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(168,85,247,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(236,72,153,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 80% 55%, rgba(168,85,247,.1) 0%, transparent 60%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { opacity: .7; }
  100% { opacity: 1; }
}

.hero-content { position: relative; z-index: 3; max-width: 680px; margin-bottom: 48px; }
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.25);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 4px 40px rgba(168,85,247,.2);
}
.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
}
.hero-buttons { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* Cinematic character showcase */
.hero-showcase {
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding-bottom: 20px;
  z-index: 2;
}
.showcase-track {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 20px 40px;
}
.showcase-card {
  position: relative;
  flex: 0 0 200px;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
  mask-image: radial-gradient(circle, white 100%, black 100%);
  transition: transform .4s, filter .4s;
  animation: cardFloat 5s ease-in-out infinite;
  cursor: pointer;
}
.showcase-card:hover {
  transform: translateY(-12px) scale(1.04);
  filter: brightness(1.1);
  z-index: 10;
}
.showcase-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(1.05);
  transition: transform .4s;
}
.showcase-card:hover img {
  transform: scale(1.08);
}
.showcase-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 14px 14px;
  background: linear-gradient(transparent, rgba(10,10,15,.9));
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
/* Stagger float animation */
.sc-1 { animation-delay: 0s; }
.sc-2 { animation-delay: .8s; }
.sc-3 { animation-delay: 1.6s; }
.sc-4 { animation-delay: .4s; }
.sc-5 { animation-delay: 1.2s; }

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Chat bubbles on showcase cards */
.showcase-bubble {
  position: absolute;
  top: 14px; left: -10px;
  background: rgba(10,10,15,.85);
  border: 1px solid rgba(168,85,247,.3);
  border-radius: 12px 12px 12px 2px;
  padding: 8px 12px;
  font-size: .72rem;
  color: var(--text);
  max-width: 170px;
  line-height: 1.35;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  opacity: 0;
  animation: bubblePop .5s ease-out 1.5s forwards;
  z-index: 5;
}
.showcase-bubble-right {
  left: auto; right: -10px;
  border-radius: 12px 12px 2px 12px;
}

@keyframes bubblePop {
  from { opacity: 0; transform: translateY(8px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Edge fades */
.showcase-fade-l, .showcase-fade-r {
  position: absolute; top: 0; bottom: 0; width: 80px;
  pointer-events: none; z-index: 3;
}
.showcase-fade-l {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.showcase-fade-r {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

/* Glow pulse behind the center card */
.sc-3::before {
  content: '';
  position: absolute; inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,.2) 0%, transparent 70%);
  z-index: -1;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: .4; transform: scale(1); }
  50% { opacity: .8; transform: scale(1.15); }
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  border: none; cursor: pointer;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s, filter .3s;
  overflow: hidden;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(.97); transition: transform .1s; }

/* Primary: gradient flow + shimmer + pulse glow */
.btn-primary {
  background: linear-gradient(135deg, #A855F7, #EC4899, #A855F7, #EC4899);
  background-size: 300% 300%;
  animation: gradientFlow 4s ease infinite, btnPulse 2.5s ease-in-out infinite;
  color: #fff;
  box-shadow: 0 4px 24px rgba(168,85,247,.3), 0 0 0 0 rgba(168,85,247,0);
}
.btn-primary::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg);
  animation: shimmerSweep 3.5s ease-in-out infinite;
  pointer-events: none;
}
.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(168,85,247,.5), 0 0 20px rgba(236,72,153,.25);
  color: #fff;
  filter: brightness(1.1);
}
.btn-primary:active {
  box-shadow: 0 2px 12px rgba(168,85,247,.4);
  filter: brightness(.95);
}

/* Outline: border glow breathing + hover fill */
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,.15);
  animation: borderBreathe 3s ease-in-out infinite;
}
.btn-outline::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 12px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity .35s;
  z-index: -1;
}
.btn-outline:hover {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 32px rgba(168,85,247,.3);
}
.btn-outline:hover::before { opacity: 1; }

/* Icon bounce on hover */
.btn:hover svg {
  animation: iconBounce .5s ease;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmerSweep {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(168,85,247,.3), 0 0 0 0 rgba(168,85,247,.15); }
  50% { box-shadow: 0 4px 24px rgba(168,85,247,.3), 0 0 0 8px rgba(168,85,247,0); }
}
@keyframes borderBreathe {
  0%, 100% { border-color: rgba(255,255,255,.15); }
  50% { border-color: rgba(168,85,247,.35); }
}
@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-3px); }
  60% { transform: translateY(1px); }
}

/* --- CHARACTERS --- */
.characters { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.character-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .3s, box-shadow .3s;
}
.character-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(168,85,247,.15);
}
.character-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.character-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(10,10,15,.92));
}
.character-info h3 { font-size: 1.1rem; font-weight: 700; }
.character-info .tagline {
  font-size: .82rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 2px;
}
.character-info .desc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* --- FEATURES --- */
.features { padding: 100px 0; background: var(--surface); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.05);
  transition: border-color .3s;
}
.feature-card:hover { border-color: rgba(168,85,247,.25); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(168,85,247,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.6; }

/* --- CTA --- */
.cta {
  padding: 100px 0;
  text-align: center;
  position: relative;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(236,72,153,.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-content { position: relative; z-index: 2; }
.cta h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.cta p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 36px; max-width: 460px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* --- FOOTER --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; border-radius: 8px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: .85rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-muted); font-size: .8rem; width: 100%; text-align: center; margin-top: 16px; }

/* --- LEGAL PAGES --- */
.legal-page {
  padding: 120px 24px 80px;
  max-width: 800px;
  margin: 0 auto;
}
.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.legal-page .updated {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 40px;
}
.legal-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--primary);
}
.legal-page p, .legal-page li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-page ul { padding-left: 24px; }
.legal-page li { margin-bottom: 6px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .lang-current { display: none; }
  .lang-toggle { padding: 6px 8px; }
  .character-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 20px 60px; }
  .footer .container { justify-content: center; text-align: center; }
  .showcase-card { flex: 0 0 150px; height: 225px; }
  .showcase-track { gap: 14px; padding: 16px 24px; }
  .showcase-bubble { font-size: .65rem; max-width: 140px; }
  .sc-5 { display: none; }
}
@media (max-width: 480px) {
  .character-grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .showcase-card { flex: 0 0 120px; height: 180px; }
  .showcase-track { gap: 10px; padding: 12px 16px; }
  .sc-4, .sc-5 { display: none; }
  .showcase-bubble { display: none; }
}
