/* ═══════════════════════════════════════════
   AKELAPAN — Main Stylesheet
   Aesthetic: Luxury Dark · Organic · Intimate
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Outfit:wght@300;400;500&display=swap');

/* ─── Root Variables ─── */
:root {
  --bg:          #09080F;
  --bg1:         #0E0C18;
  --bg2:         #131020;
  --bg3:         #1A1730;
  --card:        #1E1A32;
  --card2:       #252140;
  --glass:       rgba(30,26,50,0.7);
  
  --purple:      #9B6DFF;
  --purple2:     #7C3AED;
  --purple3:     #C4A0FF;
  --rose:        #FF6B9D;
  --teal:        #4ECDC4;
  --amber:       #FFB347;
  --gold:        #F5C842;
  
  --text:        #F0EBF8;
  --text2:       #B0A8CC;
  --text3:       #6B6288;
  --text4:       #3D375A;
  
  --border:      rgba(155,109,255,0.18);
  --border2:     rgba(155,109,255,0.08);
  --border3:     rgba(155,109,255,0.04);
  
  --serif:       'Playfair Display', serif;
  --sans:        'Outfit', sans-serif;
  
  --r-sm:        10px;
  --r-md:        16px;
  --r-lg:        24px;
  --r-xl:        32px;
  
  --shadow:      0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:   0 24px 80px rgba(0,0,0,0.6);
  --glow:        0 0 40px rgba(155,109,255,0.15);
  --glow-sm:     0 0 20px rgba(155,109,255,0.1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
p { font-weight: 300; line-height: 1.7; }
a { text-decoration: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(155,109,255,0.3); }

/* ─── Page system ─── */
.page { display: none; }
.page.active { display: block; }
#chatPage.active { display: flex; }

/* ═══════════════════════════════════════════
   GRAIN OVERLAY (subtle texture)
   ═══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 999;
}

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(9,8,15,0.98), transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(155,109,255,0.06);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-logo .dot { color: var(--purple); }
.nav-logo .version {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--purple);
  background: rgba(155,109,255,0.12);
  padding: 2px 7px;
  border-radius: 50px;
  margin-left: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text2);
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-link:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn { cursor: pointer; font-family: var(--sans); transition: all 0.25s; border: none; }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 300;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(155,109,255,0.4); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,0.5); }
.btn-primary:active { transform: translateY(0); }

/* ═══════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 24px 80px;
  position: relative;
  overflow: hidden;
}

/* Orb backgrounds */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: -10%; left: 50%; transform: translateX(-50%);
  animation: orbPulse 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,107,157,0.1) 0%, transparent 70%);
  bottom: 10%; left: 10%;
  animation: orbPulse 10s ease-in-out infinite 2s;
}
.hero-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(78,205,196,0.08) 0%, transparent 70%);
  top: 20%; right: 5%;
  animation: orbPulse 9s ease-in-out infinite 4s;
}
@keyframes orbPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.15); opacity: 1; }
}
.hero-orb-2, .hero-orb-3 {
  animation: orbPulse2 10s ease-in-out infinite;
}
@keyframes orbPulse2 {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Bottom fade */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 300px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: rgba(155,109,255,0.07);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple3);
  margin-bottom: 32px;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero-badge .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  max-width: 860px;
  animation: fadeUp 0.7s ease 0.2s both;
}
.hero-title em { font-style: italic; color: var(--purple3); }
.hero-title .line2 { display: block; font-style: italic; color: var(--purple3); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text2);
  max-width: 520px;
  margin-bottom: 52px;
  animation: fadeUp 0.7s ease 0.35s both;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s ease 0.45s both;
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(124,58,237,0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(124,58,237,0.55); }

.btn-hero-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 16px 36px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 300;
}
.btn-hero-ghost:hover { color: var(--text); border-color: rgba(155,109,255,0.5); }

/* Floating chat previews */
.hero-floats {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.hero-float {
  position: absolute;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 20px;
  max-width: 260px;
  animation: floatCard 7s ease-in-out infinite;
}
.hero-float-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; margin-bottom: 10px;
}
.hero-float p {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.55;
  font-weight: 300;
}
.hero-float .name { font-size: 0.7rem; color: var(--text3); margin-bottom: 6px; font-weight: 400; }

.hf1 { top: 18%; left: 4%; animation-delay: 0s; }
.hf2 { top: 30%; right: 4%; animation-delay: 2s; }
.hf3 { bottom: 22%; left: 6%; animation-delay: 4s; }
.hf4 { bottom: 18%; right: 5%; animation-delay: 1s; }

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

/* Stats row */
.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 80px;
  position: relative; z-index: 1;
  animation: fadeUp 0.7s ease 0.6s both;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--purple3);
  display: block;
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 300;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-sm { padding: 80px 48px; }

.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--purple);
  opacity: 0.6;
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--purple3); }

.section-sub {
  font-size: 1rem;
  color: var(--text2);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 60px;
}

/* ═══════════════════════════════════════════
   PROBLEM SECTION
   ═══════════════════════════════════════════ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border2);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 60px;
}
.problem-card {
  background: var(--bg1);
  padding: 44px 36px;
  transition: background 0.3s;
  position: relative;
  overflow: hidden;
}
.problem-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.problem-card:hover { background: var(--bg2); }
.problem-card:hover::after { opacity: 1; }
.problem-icon {
  width: 56px; height: 56px;
  background: rgba(155,109,255,0.08);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 24px;
}
.problem-card h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
}
.problem-card p {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.68;
}

/* ═══════════════════════════════════════════
   COMPANIONS SECTION
   ═══════════════════════════════════════════ */
.companions-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg1) 50%, var(--bg) 100%);
  padding: 120px 0;
}
.companions-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.companions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 60px;
}
.companion-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.companion-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(155,109,255,0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}
.companion-card:hover {
  border-color: rgba(155,109,255,0.35);
  transform: translateY(-6px);
  box-shadow: var(--glow), var(--shadow);
}
.companion-card:hover::before { opacity: 1; }

.companion-card.premium-locked {
  opacity: 0.85;
}
.companion-card.premium-locked:hover { opacity: 1; }

.companion-avatar-wrap {
  position: relative;
  width: 80px; height: 80px;
  margin-bottom: 24px;
}
.companion-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}
.companion-avatar-img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.companion-status-dot {
  position: absolute;
  bottom: 3px; right: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--teal);
  border: 2px solid var(--card);
}

.companion-tier {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 16px;
}
.tier-free { color: var(--teal); background: rgba(78,205,196,0.12); }
.tier-premium { color: var(--amber); background: rgba(255,179,71,0.12); }
.tier-lock { color: var(--text3); background: rgba(107,98,136,0.15); }

.companion-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 10px;
}
.companion-card .role {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 16px;
  font-weight: 300;
  letter-spacing: 0.04em;
}
.companion-card p {
  font-size: 0.87rem;
  color: var(--text2);
  line-height: 1.65;
}

.companion-cta {
  width: 100%;
  margin-top: 28px;
  padding: 11px 20px;
  border-radius: 50px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s;
}
.cta-free {
  background: rgba(155,109,255,0.1);
  color: var(--purple3);
  border: 1px solid rgba(155,109,255,0.2);
}
.cta-free:hover { background: rgba(155,109,255,0.2); border-color: rgba(155,109,255,0.4); }
.cta-premium {
  background: rgba(255,179,71,0.08);
  color: var(--amber);
  border: 1px solid rgba(255,179,71,0.2);
}
.cta-premium:hover { background: rgba(255,179,71,0.15); }

/* ═══════════════════════════════════════════
   DEMO SECTION
   ═══════════════════════════════════════════ */
.demo-section {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-top: 60px;
}
.demo-device {
  position: relative;
}
.demo-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.demo-phone {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-width: 380px;
  margin: 0 auto;
}
.demo-phone-bar {
  background: var(--bg2);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border2);
}
.demo-bot-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.demo-bot-name { font-size: 0.9rem; font-weight: 500; }
.demo-bot-status { font-size: 0.72rem; color: var(--teal); }
.demo-back-btn {
  margin-left: auto;
  background: none; border: none; color: var(--text3);
  font-size: 1rem; cursor: pointer;
}

.demo-messages {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 280px;
  max-height: 320px;
  overflow-y: auto;
}
.demo-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.87rem;
  line-height: 1.55;
  font-weight: 300;
}
.demo-msg.bot {
  background: var(--card2);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.demo-msg.user {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.demo-input-wrap {
  padding: 14px 16px;
  border-top: 1px solid var(--border2);
  display: flex;
  gap: 10px;
}
.demo-input-field {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.demo-input-field:focus { border-color: var(--border); }
.demo-send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--purple2);
  border: none;
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
}
.demo-send-btn:hover { background: var(--purple); }

.demo-text { }
.demo-text h3 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 20px;
  line-height: 1.3;
}
.demo-text h3 em { font-style: italic; color: var(--purple3); }
.demo-text p { color: var(--text2); margin-bottom: 16px; }
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text2);
}
.feature-list .feat-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(155,109,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ═══════════════════════════════════════════
   MOOD SECTION
   ═══════════════════════════════════════════ */
.mood-section {
  margin: 0 48px 80px;
  max-width: 1104px;
  margin-left: auto; margin-right: auto;
  background: var(--bg1);
  border-radius: var(--r-xl);
  border: 1px solid var(--border2);
  padding: 72px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mood-section::before {
  content: '';
  position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(155,109,255,0.06), transparent 60%);
  pointer-events: none;
}
.mood-chips {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}
.mood-chip {
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--text2);
  transition: all 0.25s;
  display: flex; align-items: center; gap: 8px;
}
.mood-chip:hover { color: var(--text); border-color: rgba(155,109,255,0.4); background: var(--card2); }
.mood-chip.active {
  background: rgba(155,109,255,0.12);
  border-color: var(--purple);
  color: var(--text);
}

/* ═══════════════════════════════════════════
   PRICING
   ═══════════════════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}
.plan {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 44px 36px;
  position: relative;
  transition: all 0.3s;
}
.plan:hover { border-color: var(--border); box-shadow: var(--glow-sm); }
.plan.featured {
  border-color: rgba(155,109,255,0.4);
  background: linear-gradient(180deg, rgba(155,109,255,0.07), var(--card));
  box-shadow: var(--glow);
}
.plan-badge {
  position: absolute;
  top: -15px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 50px;
  white-space: nowrap;
}
.plan-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 300; margin-bottom: 6px; }
.plan-price {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--purple3);
  line-height: 1.1;
  margin-bottom: 4px;
}
.plan-price-unit { font-size: 1rem; color: var(--text3); font-family: var(--sans); font-weight: 300; }
.plan-desc { font-size: 0.85rem; color: var(--text3); margin: 8px 0 30px; }
.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 36px;
}
.plan-features li {
  font-size: 0.87rem;
  color: var(--text2);
  display: flex; align-items: center; gap: 10px;
}
.plan-features li::before { content: '✓'; color: var(--teal); font-weight: 600; }
.plan-features li.locked { color: var(--text3); }
.plan-features li.locked::before { content: '—'; color: var(--text4); }
.btn-plan {
  width: 100%;
  padding: 15px;
  border-radius: 50px;
  font-family: var(--sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s;
  font-weight: 500;
}
.btn-plan-primary {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white; border: none;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}
.btn-plan-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,0.5); }
.btn-plan-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-plan-ghost:hover { color: var(--text); border-color: rgba(155,109,255,0.4); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border2);
  padding: 64px 48px 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand .logo { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; margin-bottom: 14px; }
.footer-brand .logo span { color: var(--purple); }
.footer-brand p { font-size: 0.88rem; color: var(--text3); line-height: 1.7; max-width: 240px; }
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.87rem;
  color: var(--text3);
  font-weight: 300;
  margin-bottom: 10px;
  transition: color 0.2s;
  cursor: pointer;
}
.footer-col a:hover { color: var(--text2); }
.footer-bottom {
  border-top: 1px solid var(--border2);
  padding: 24px 48px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text4);
  font-weight: 300;
  max-width: 1200px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(9,8,15,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 52px 44px;
  width: min(480px, 100%);
  position: relative;
  animation: modalIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute; top: 22px; right: 22px;
  background: var(--card); border: none;
  color: var(--text3); font-size: 1.1rem;
  cursor: pointer; width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--card2); color: var(--text); }
.modal-logo { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; margin-bottom: 6px; }
.modal-logo span { color: var(--purple); }
.modal-sub { font-size: 0.9rem; color: var(--text2); margin-bottom: 36px; }
.auth-tabs {
  display: flex;
  background: var(--card);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 32px;
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  border-radius: 50px; cursor: pointer;
  font-size: 0.88rem; color: var(--text3);
  transition: all 0.25s; border: none;
  background: transparent; font-family: var(--sans);
}
.auth-tab.active { background: var(--purple2); color: white; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.82rem; color: var(--text2); margin-bottom: 8px; font-weight: 300; }
.form-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--sans); font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--purple2); }
.form-input::placeholder { color: var(--text3); }
.form-error {
  color: #FF6B6B; font-size: 0.82rem;
  margin-top: 8px; display: none;
}
.form-error.show { display: block; }
.btn-form-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white; border: none;
  padding: 15px; border-radius: 50px;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
  cursor: pointer; transition: all 0.25s;
  margin-top: 6px;
  box-shadow: 0 4px 20px rgba(124,58,237,0.3);
}
.btn-form-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(124,58,237,0.45); }
.btn-form-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0;
  color: var(--text3); font-size: 0.82rem;
}
.form-divider::before, .form-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border2);
}
.btn-google {
  width: 100%; background: var(--card);
  border: 1px solid var(--border2); color: var(--text2);
  padding: 13px; border-radius: 50px;
  font-family: var(--sans); font-size: 0.9rem;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 10px; transition: all 0.2s;
}
.btn-google:hover { background: var(--card2); border-color: var(--border); color: var(--text); }

/* ═══════════════════════════════════════════
   CHAT APP
   ═══════════════════════════════════════════ */
#chatPage {
  height: 100vh;
  flex-direction: column;
  background: var(--bg);
}

.app-topbar {
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border2);
  background: var(--bg1);
  flex-shrink: 0;
}
.app-logo { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; cursor: pointer; }
.app-logo span { color: var(--purple); }

.active-companion {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.active-comp-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.active-comp-name { font-size: 0.95rem; font-weight: 500; }
.active-comp-status { font-size: 0.72rem; color: var(--teal); }

.topbar-actions { display: flex; gap: 8px; }
.topbar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border2);
  cursor: pointer; color: var(--text2); font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.topbar-btn:hover { background: var(--card2); color: var(--text); }

.app-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ─── Sidebar ─── */
.chat-sidebar {
  width: 270px;
  border-right: 1px solid var(--border2);
  background: var(--bg1);
  display: flex; flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-mood {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border2);
}
.sidebar-mood h4 {
  font-family: var(--serif); font-size: 0.95rem; font-weight: 300;
  color: var(--text2); margin-bottom: 12px;
}
.sidebar-mood-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.sb-mood-btn {
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text3); font-size: 0.75rem;
  cursor: pointer; font-family: var(--sans);
  transition: all 0.2s;
}
.sb-mood-btn:hover, .sb-mood-btn.active {
  background: rgba(155,109,255,0.1);
  border-color: var(--purple); color: var(--purple3);
}

.sidebar-companions {
  flex: 1; overflow-y: auto; padding: 12px;
}
.sb-section-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 6px 8px 8px;
  font-weight: 500;
}
.sb-comp-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}
.sb-comp-item:hover { background: var(--card); }
.sb-comp-item.active { background: var(--card); border-left: 2px solid var(--purple2); }
.sb-comp-item.locked { opacity: 0.5; cursor: pointer; }
.sb-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem;
  overflow: hidden;
}
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sb-info { flex: 1; min-width: 0; }
.sb-name { font-size: 0.88rem; font-weight: 500; }
.sb-role { font-size: 0.74rem; color: var(--text3); font-weight: 300; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-lock { font-size: 0.75rem; color: var(--text3); }

/* ─── Chat Main ─── */
.chat-main {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.date-divider {
  text-align: center; font-size: 0.72rem; color: var(--text3);
  display: flex; align-items: center; gap: 12px; margin: 4px 0;
}
.date-divider::before, .date-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border2);
}
.msg-row {
  display: flex; gap: 10px;
  align-items: flex-end; max-width: 72%;
}
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.bot { align-self: flex-start; }
.msg-row-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 0.95rem;
  overflow: hidden;
}
.msg-row-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-content { }
.msg-bubble {
  padding: 13px 17px;
  border-radius: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 300;
}
.msg-row.bot .msg-bubble {
  background: var(--card);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, var(--purple2), #A855F7);
  color: white;
  border-bottom-right-radius: 5px;
}
.msg-time { font-size: 0.68rem; color: var(--text3); margin-top: 4px; padding: 0 3px; text-align: right; }

.typing-row { align-self: flex-start; }
.typing-bubble {
  background: var(--card);
  border-radius: 20px; border-bottom-left-radius: 5px;
  padding: 14px 18px;
  display: flex; gap: 5px; align-items: center;
}
.t-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text3);
  animation: tPulse 1.4s ease-in-out infinite;
}
.t-dot:nth-child(2) { animation-delay: 0.2s; }
.t-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes tPulse {
  0%,60%,100% { opacity: 0.3; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}

.checkin-card {
  align-self: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  text-align: center;
  max-width: 340px;
}
.checkin-card p { font-size: 0.9rem; color: var(--text2); margin-bottom: 16px; }
.checkin-moods { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.checkin-mood-btn {
  padding: 8px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.82rem;
  cursor: pointer; color: var(--text2);
  font-family: var(--sans); transition: all 0.2s;
}
.checkin-mood-btn:hover { background: rgba(155,109,255,0.1); border-color: var(--purple); color: var(--text); }

/* ─── Input Area ─── */
.chat-input-area {
  padding: 14px 20px;
  border-top: 1px solid var(--border2);
  background: var(--bg);
  flex-shrink: 0;
}
.msg-quota-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,179,71,0.07);
  border: 1px solid rgba(255,179,71,0.15);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 10px;
  font-size: 0.8rem; color: var(--text2);
}
.msg-quota-bar strong { color: var(--amber); }
.msg-quota-bar button {
  background: var(--amber); color: var(--bg);
  border: none; padding: 4px 12px;
  border-radius: 50px; font-family: var(--sans);
  font-size: 0.75rem; cursor: pointer; font-weight: 500;
}
.input-box {
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 22px;
  padding: 10px 12px;
  transition: border-color 0.2s;
}
.input-box:focus-within { border-color: var(--purple2); }
#mainChatInput {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--sans);
  font-size: 0.92rem; font-weight: 300;
  resize: none; min-height: 22px; max-height: 120px;
  line-height: 1.5;
}
#mainChatInput::placeholder { color: var(--text3); }
.input-tools { display: flex; gap: 6px; align-items: center; }
.tool-btn {
  width: 32px; height: 32px;
  border-radius: 50%; border: none;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.9rem; transition: all 0.2s;
  background: transparent; color: var(--text3);
}
.tool-btn:hover { background: var(--card2); color: var(--text2); }
#mainSendBtn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--purple2);
  border: none; color: white;
  cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
#mainSendBtn:hover { background: var(--purple); }
#mainSendBtn:disabled { background: var(--card2); color: var(--text3); cursor: not-allowed; }

/* ─── Right Panel ─── */
.chat-right-panel {
  width: 270px;
  border-left: 1px solid var(--border2);
  background: var(--bg1);
  overflow-y: auto;
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 16px;
  flex-shrink: 0;
}
.panel-widget {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 18px 16px;
}
.panel-widget h4 {
  font-family: var(--serif);
  font-size: 0.95rem; font-weight: 400;
  color: var(--text); margin-bottom: 12px;
}
.journal-prompt-text {
  font-size: 0.83rem; color: var(--text2);
  line-height: 1.6; font-style: italic;
  margin-bottom: 12px;
}
.journal-area {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 12px; color: var(--text);
  font-family: var(--sans); font-size: 0.82rem;
  font-weight: 300; outline: none; resize: none;
  min-height: 80px; line-height: 1.5;
  transition: border-color 0.2s;
}
.journal-area:focus { border-color: var(--purple2); }
.btn-save-journal {
  width: 100%; margin-top: 8px; padding: 9px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2); border-radius: 10px;
  font-family: var(--sans); font-size: 0.82rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-save-journal:hover { background: rgba(155,109,255,0.08); border-color: var(--purple); color: var(--purple3); }
.streak-row { display: flex; gap: 5px; margin-top: 10px; }
.streak-pip {
  flex: 1; height: 5px; border-radius: 3px;
  background: var(--border2);
}
.streak-pip.done { background: var(--purple2); }
.streak-pip.today { background: var(--amber); }
.memory-items { display: flex; flex-direction: column; gap: 8px; }
.memory-item {
  display: flex; gap: 8px;
  font-size: 0.8rem; color: var(--text2); line-height: 1.4;
}
.memory-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--purple); flex-shrink: 0; margin-top: 6px;
}
.upgrade-widget {
  background: linear-gradient(135deg, rgba(155,109,255,0.15), rgba(124,58,237,0.08));
  border: 1px solid rgba(155,109,255,0.25);
  border-radius: var(--r-md);
  padding: 16px;
  text-align: center;
}
.upgrade-widget p { font-size: 0.82rem; color: var(--text2); margin-bottom: 12px; line-height: 1.55; }
.upgrade-widget button {
  background: linear-gradient(135deg, var(--purple2), var(--purple));
  color: white; border: none;
  padding: 9px 20px; border-radius: 50px;
  font-family: var(--sans); font-size: 0.82rem;
  cursor: pointer; font-weight: 500;
  width: 100%;
  transition: all 0.2s;
}
.upgrade-widget button:hover { box-shadow: 0 4px 16px rgba(124,58,237,0.4); }

/* ═══════════════════════════════════════════
   IMAGE GRID / SOCIAL PROOF SECTION
   ═══════════════════════════════════════════ */
.emotion-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 60px;
}
.emotion-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3/4;
}
.emotion-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: brightness(0.7);
}
.emotion-card:hover img { transform: scale(1.05); filter: brightness(0.85); }
.emotion-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 20px;
  background: linear-gradient(transparent, rgba(9,8,15,0.9));
}
.emotion-tag {
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--purple3); margin-bottom: 6px; font-weight: 500;
}
.emotion-quote {
  font-family: var(--serif);
  font-size: 1rem; font-weight: 300;
  line-height: 1.45;
  font-style: italic;
  color: var(--text);
}

/* ═══════════════════════════════════════════
   TESTIMONIALS
   ═══════════════════════════════════════════ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: all 0.3s;
}
.testimonial-card:hover { border-color: var(--border); box-shadow: var(--glow-sm); }
.testimonial-stars { color: var(--gold); font-size: 0.9rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text {
  font-family: var(--serif);
  font-size: 1rem; font-weight: 300;
  font-style: italic; line-height: 1.65;
  color: var(--text); margin-bottom: 20px;
}
.testimonial-author {
  display: flex; align-items: center; gap: 12px;
}
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  background: var(--card2); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-name { font-size: 0.88rem; font-weight: 500; }
.testimonial-meta { font-size: 0.76rem; color: var(--text3); font-weight: 300; }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 500; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 20px;
  font-size: 0.88rem; color: var(--text);
  box-shadow: var(--shadow);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 320px;
}
.toast.success { border-color: rgba(78,205,196,0.4); }
.toast.error { border-color: rgba(255,107,157,0.4); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .companions-grid { grid-template-columns: repeat(2, 1fr); }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav-links { display: none; }
  .chat-sidebar { display: none; }
  .chat-right-panel { display: none; }
  .demo-grid { grid-template-columns: 1fr; }
  .hero-floats .hf1, .hero-floats .hf2, .hero-floats .hf3, .hero-floats .hf4 { display: none; }
  .section { padding: 80px 24px; }
  .mood-section { margin: 0 24px 60px; padding: 48px 28px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .emotion-gallery { grid-template-columns: repeat(2, 1fr); }
  .footer { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2.6rem; }
  .hero-stats { gap: 28px; }
  .companions-grid { grid-template-columns: 1fr; }
  .emotion-gallery { grid-template-columns: 1fr; }
}

/* ─── Loading spinner ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
