/* ═══════════════════════════════════════════════════════
   SOLURIS — PREMIUM EDITORIAL DESIGN SYSTEM
   Navy + Gold · Serif Authority · Swiss Precision
   ═══════════════════════════════════════════════════════ */

:root {
  /* Navy Foundation */
  --navy-deep:    #06101F;
  --navy:         #0B1F3B;
  --navy-medium:  #122A4E;
  --navy-light:   #1A3660;
  --charcoal:     #1E2A3A;
  --slate:        #3A4A5C;

  /* Gold Accent */
  --gold:         #C6A75E;
  --gold-light:   #D4BA7A;
  --gold-dark:    #A8893E;
  --gold-glow:    rgba(198, 167, 94, 0.15);
  --gold-subtle:  rgba(198, 167, 94, 0.08);

  /* Neutral Tones */
  --cream:        #F5F0E8;
  --warm-white:   #FAFAF7;
  --pearl:        #E8E2D8;
  --text-primary: #E8E2D8;
  --text-secondary: #8A9AB5;
  --text-muted:   #5A6A80;

  /* Functional */
  --border:       rgba(198, 167, 94, 0.12);
  --border-strong: rgba(198, 167, 94, 0.25);
  --glass:        rgba(11, 31, 59, 0.6);
  --glass-strong: rgba(11, 31, 59, 0.85);

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad:  120px;
  --content-max:  1140px;
}

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--navy-deep);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: all 0.3s ease; }

/* ── Subtle Background ────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(198, 167, 94, 0.03) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(18, 42, 78, 0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(198, 167, 94, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 167, 94, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* ── Navigation ───────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 48px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.04em;
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 48px 80px;
  text-align: center;
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 48px;
  background: var(--gold-subtle);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  max-width: 800px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
  font-weight: 300;
}

/* ── Buttons ──────────────────────────────────── */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 80px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 24px rgba(198, 167, 94, 0.3);
  transition: all 0.3s ease;
}

.btn-gold:hover {
  box-shadow: 0 6px 32px rgba(198, 167, 94, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-ghost:hover {
  color: var(--cream);
  border-color: var(--text-secondary);
}

/* ── Demo Window ──────────────────────────────── */
.demo-window {
  width: 100%;
  max-width: 780px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--navy);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(198,167,94,0.08);
}

.demo-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.demo-dot { width: 10px; height: 10px; border-radius: 50%; }
.demo-dot.r { background: #E5534B; }
.demo-dot.y { background: #C6A75E; }
.demo-dot.g { background: #57AB5A; }

.demo-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.demo-msg.user-msg { justify-content: flex-end; }
.demo-msg.user-msg .demo-bubble {
  background: var(--navy-medium);
  border: 1px solid var(--border);
  border-radius: 12px 12px 2px 12px;
  order: -1;
}

.demo-avatar {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.demo-avatar.user {
  background: var(--navy-light);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.demo-avatar.ai {
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
}

.demo-bubble {
  padding: 16px 20px;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: rgba(198,167,94,0.04);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  max-width: 85%;
}

.demo-bubble strong {
  color: var(--gold-light);
  font-weight: 600;
}

.demo-sources {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.demo-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gold-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

/* ── Divider ──────────────────────────────────── */
.divider {
  position: relative; z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 48px;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.2;
}

/* ── Trust Bar ────────────────────────────────── */
.trust {
  position: relative; z-index: 1;
  padding: 60px 48px;
  text-align: center;
}

.trust p {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-logos span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--slate);
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.trust-logos span:hover { color: var(--gold); }

/* ── Sections ─────────────────────────────────── */
.section {
  position: relative; z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-pad) 48px;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-strong);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 20px;
  letter-spacing: -0.005em;
}

.section-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 560px;
  font-weight: 300;
}

.section-center { text-align: center; }
.section-center .section-desc { margin: 0 auto 60px; }

/* ── Features Grid ────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 60px;
}

.feature-card {
  padding: 48px 40px;
  background: var(--navy-deep);
  transition: background 0.3s ease;
}

.feature-card:hover { background: var(--navy); }

.feature-icon {
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 1.3rem;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  background: var(--gold-subtle);
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── Sources Grid ─────────────────────────────── */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.source-card {
  padding: 36px 32px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.source-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.source-header h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
}

.source-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid;
}

.source-badge.api {
  color: var(--gold);
  border-color: rgba(198,167,94,0.3);
  background: var(--gold-subtle);
}

.source-badge.scrape {
  color: #57AB5A;
  border-color: rgba(87,171,90,0.3);
  background: rgba(87,171,90,0.08);
}

.source-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 16px;
}

.source-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Steps ─────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-top: 60px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.2;
}

.step { text-align: center; position: relative; }

.step-num {
  width: 52px; height: 52px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--navy-deep);
  position: relative;
  z-index: 1;
}

.step h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 10px;
}

.step p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── Pricing ──────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.price-card {
  padding: 44px 36px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: left;
  transition: all 0.3s ease;
}

.price-card:hover { border-color: var(--border-strong); }

.price-card.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(198,167,94,0.06), var(--navy));
  position: relative;
}

.price-card.featured::before {
  content: 'Recommandé';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0 0 4px 4px;
}

.price-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 16px;
}

.price {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 4px;
}

.price span {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.price-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.price-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.price-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-features li::before {
  content: '—';
  color: var(--gold);
  font-weight: 600;
}

.price-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.price-btn.gold {
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  box-shadow: 0 4px 20px rgba(198,167,94,0.25);
}

.price-btn.gold:hover {
  box-shadow: 0 6px 28px rgba(198,167,94,0.4);
  transform: translateY(-1px);
}

.price-btn.outline {
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.price-btn.outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── CTA Section ──────────────────────────────── */
.cta-section {
  position: relative; z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto 80px;
  padding: 80px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-weight: 300;
}

/* ── Footer ───────────────────────────────────── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 80px 48px 40px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 16px;
  font-weight: 300;
}

.footer h4 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Animations ───────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ═══════════════════════════════════════════════
   APP — Chat Interface
   ═══════════════════════════════════════════════ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--navy);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sidebar-logo img { height: 28px; width: auto; }

.sidebar-logo span {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.new-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: var(--gold-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-chat-btn:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.conv-group-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 6px;
}

.conv-item {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item:hover { background: var(--gold-subtle); color: var(--cream); }
.conv-item.active { background: var(--gold-subtle); color: var(--gold); border: 1px solid var(--border); }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--navy-medium);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Chat Area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.welcome-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.welcome-screen img { height: 56px; margin-bottom: 24px; }

.welcome-screen h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 8px;
}

.welcome-screen p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.prompt-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 560px;
  width: 100%;
}

.prompt-card {
  padding: 16px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-card:hover {
  border-color: var(--border-strong);
  background: var(--navy-medium);
}

.prompt-card-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 4px;
}

.prompt-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Messages */
.message {
  display: flex;
  gap: 16px;
  max-width: 800px;
}

.message.user { justify-content: flex-end; }
.message.user .msg-avatar { order: 1; }

.msg-avatar {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.msg-avatar.ai-avatar {
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
}

.msg-avatar.user-avatar {
  background: var(--navy-medium);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.msg-content {
  flex: 1;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.message.ai .msg-content {
  background: rgba(198,167,94,0.04);
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 2px;
  color: var(--text-primary);
}

.message.user .msg-content {
  background: var(--navy-medium);
  border: 1px solid var(--border);
  border-radius: 12px 12px 2px 12px;
  color: var(--text-primary);
}

.msg-sources {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.msg-source {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--gold-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold);
  text-decoration: none;
  transition: all 0.2s ease;
}

.msg-source:hover {
  border-color: var(--gold);
  background: var(--gold-glow);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px;
}

.typing-indicator span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Input Area */
.chat-input-area {
  padding: 20px 48px 24px;
  border-top: 1px solid var(--border);
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 16px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.3s ease;
}

.chat-input-wrapper:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  border: none;
  color: var(--navy-deep);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover {
  box-shadow: 0 2px 12px rgba(198,167,94,0.4);
  transform: translateY(-1px);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.chat-disclaimer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════ */

.login-page {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 48px 40px;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.login-logo img { height: 44px; }
.login-logo span {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.login-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.login-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--navy-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.form-group input::placeholder { color: var(--text-muted); }

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(145deg, var(--gold), var(--gold-dark));
  color: var(--navy-deep);
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.login-btn:hover {
  box-shadow: 0 4px 20px rgba(198,167,94,0.35);
  transform: translateY(-1px);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.login-error {
  background: rgba(229,83,75,0.1);
  border: 1px solid rgba(229,83,75,0.3);
  color: #E5534B;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid, .sources-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .sidebar { width: 240px; }
}

@media (max-width: 768px) {
  :root { --section-pad: 80px; }
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .hero { padding: 120px 24px 60px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-gold, .btn-ghost { width: 100%; justify-content: center; }
  .section { padding: var(--section-pad) 24px; }
  .features-grid, .sources-grid, .pricing-grid, .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .trust-logos { gap: 24px; }
  .divider { padding: 0 24px; }
  .sidebar { display: none; }
  .chat-messages { padding: 16px; }
  .chat-input-area { padding: 16px; }
  .prompt-cards { grid-template-columns: 1fr; }
  .login-page { padding: 24px; }
  .login-card { padding: 32px 24px; }
}
