/* ==========================================================================
   WrongGPT — styles.css
   Dark, premium, glassmorphism design system.
   Structure:
     1. Tokens & reset
     2. Base typography
     3. Buttons & pills
     4. Navigation (desktop pill + mobile drawer)
     5. Landing page (hero, chat preview, features, examples, pricing)
     6. Chat page (sidebar, messages, composer, settings)
     7. About / Terms pages
     8. Footer
     9. Animations
    10. Responsive
   ========================================================================== */

/* ---------- 1. Tokens & reset ---------- */
:root {
  /* Surfaces */
  --bg: #06060b;                 /* near-black with a whisper of navy */
  --bg-2: #0a0a13;               /* alternating band */
  --bg-3: #0e0e1a;               /* raised surface */
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Ink */
  --ink: #f2f2f7;
  --ink-70: rgba(242, 242, 247, 0.7);
  --ink-55: rgba(242, 242, 247, 0.55);
  --ink-40: rgba(242, 242, 247, 0.4);

  /* Accent — electric purple into cyan */
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
  --accent-soft: rgba(139, 92, 246, 0.14);
  --danger: #f472b6;

  /* Buttons */
  --btn-dark-grad: linear-gradient(to bottom, #2b2b2b, #101010);

  /* Shape */
  --r-card: 28px;
  --r-pill: 980px;
  --r-input: 16px;

  /* Layout */
  --page-max: 1200px;
  --nav-h: 72px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* Ambient glow blobs behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(700px 500px at -10% 30%, rgba(34, 211, 238, 0.08), transparent 70%),
    radial-gradient(500px 400px at 50% 110%, rgba(139, 92, 246, 0.1), transparent 70%);
  pointer-events: none;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, 0.4); }

/* ---------- 2. Base typography ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.07; }

.display {
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.heading { font-size: clamp(1.8rem, 4vw, 2.75rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-grad);
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 40rem;
}

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.mono-stat {
  font-family: 'Silkscreen', cursive;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* ---------- 3. Buttons & pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}
.btn-primary:hover { opacity: 0.9; }

.btn-dark {
  background: var(--btn-dark-grad);
  color: #fff;
  border: 1px solid var(--line);
}
.btn-dark:hover { opacity: 0.9; }

.btn-ghost {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--glass-strong); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- 4. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
  padding: 0 20px;
  max-width: calc(var(--page-max) + 40px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand .logo-mark { flex-shrink: 0; }

/* Desktop pill cluster */
.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  border-radius: var(--r-pill);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  padding: 6px;
}
.nav-links a {
  border-radius: var(--r-pill);
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-70);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active { background: var(--glass-strong); color: var(--ink); }

.nav-cta { display: none; }

/* Hamburger */
.nav-burger {
  position: relative;
  z-index: 210;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.nav-burger svg {
  position: absolute;
  width: 20px; height: 20px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger .icon-menu { transform: rotate(0) scale(1); opacity: 1; }
.nav-burger .icon-close { transform: rotate(-90deg) scale(0); opacity: 0; }
body.menu-open .nav-burger .icon-menu { transform: rotate(90deg) scale(0); opacity: 0; }
body.menu-open .nav-burger .icon-close { transform: rotate(0) scale(1); opacity: 1; }

/* Mobile overlay + drawer */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.menu-open .menu-overlay { opacity: 1; pointer-events: auto; }

.menu-drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 200;
  height: 100%;
  width: min(300px, 85vw);
  background: rgba(6, 6, 14, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 96px 24px 40px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out-expo);
}
body.menu-open .menu-drawer { transform: translateX(0); }

.menu-drawer a {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-70);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease, color 0.2s ease;
}
.menu-drawer a:hover { background: var(--glass-strong); color: var(--ink); }
body.menu-open .menu-drawer a { opacity: 1; transform: translateX(0); }
body.menu-open .menu-drawer a:nth-child(1) { transition-delay: 0.06s; }
body.menu-open .menu-drawer a:nth-child(2) { transition-delay: 0.12s; }
body.menu-open .menu-drawer a:nth-child(3) { transition-delay: 0.18s; }
body.menu-open .menu-drawer a:nth-child(4) { transition-delay: 0.24s; }

.menu-drawer .drawer-cta {
  margin-top: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}
body.menu-open .menu-drawer .drawer-cta { opacity: 1; transform: translateY(0); }

/* ---------- 5. Landing page ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-2); }
.section-head { margin-bottom: 48px; display: flex; flex-direction: column; gap: 16px; }

/* Hero */
.hero {
  padding: 64px 0 90px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.hero-copy { display: flex; flex-direction: column; gap: 24px; max-width: 44rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-tagline { font-size: 0.9rem; color: var(--ink-40); }

/* Glass card (shared) */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 28px;
}

/* Mock chat preview in hero */
.chat-preview {
  width: 100%;
  max-width: 620px;
  padding: 0;
  overflow: hidden;
}
.chat-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-55);
}
.chat-preview-bar .dots { display: flex; gap: 6px; }
.chat-preview-bar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--glass-strong);
}
.chat-preview-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
}

/* Message bubbles (shared: preview + examples + chat page) */
.msg { display: flex; max-width: 100%; }
.msg-bubble {
  border-radius: 20px;
  padding: 12px 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 85%;
}
.msg.user { justify-content: flex-end; }
.msg.user .msg-bubble {
  background: var(--accent-grad);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg.bot .msg-bubble {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

/* Feature grid */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--glass-strong);
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}
.feature-card h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.feature-card p { color: var(--ink-70); font-size: 0.95rem; line-height: 1.55; }

/* Example conversations */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.example-card { display: flex; flex-direction: column; gap: 14px; }
.example-card .who {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: -6px;
}

/* Stats band */
.stats-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  text-align: center;
}
.stat-card { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.stat-card .num { font-size: clamp(2rem, 5vw, 2.8rem); }
.stat-card .label { color: var(--ink-55); font-size: 0.9rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}
.price-card { display: flex; flex-direction: column; gap: 20px; }
.price-card.featured {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
  position: relative;
}
.price-card .plan-name { font-size: 1.1rem; font-weight: 600; }
.price-card .plan-price { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.03em; }
.price-card .plan-price small { font-size: 0.95rem; font-weight: 400; color: var(--ink-55); letter-spacing: 0; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--ink-70);
  font-size: 0.95rem;
  line-height: 1.4;
}
.price-card li::before {
  content: '✕';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}
.badge-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-grad);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Disclaimer strip */
.disclaimer-strip {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-card);
  padding: 28px;
  text-align: center;
  color: var(--ink-70);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 46rem;
  margin: 0 auto;
}

/* CTA band */
.cta-band { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }

/* ---------- 6. Chat page ---------- */
body.page-chat { overflow: hidden; }

.chat-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.sidebar .brand { padding: 8px 8px 16px; }
.sidebar-new {
  justify-content: flex-start;
  width: 100%;
  border-radius: 14px;
}
.sidebar-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
  padding: 16px 10px 6px;
}
.sidebar-chats { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.sidebar-chats button {
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--ink-70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-chats button:hover { background: var(--glass-strong); color: var(--ink); }
.sidebar-footer { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sidebar-footer .btn { width: 100%; justify-content: center; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--ink-70);
  width: 100%;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-link:hover { background: var(--glass-strong); color: var(--ink); }

/* Mobile: sidebar becomes a drawer */
.sidebar-toggle { display: none; }

/* Main chat column */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.chat-topbar .title { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; }
.chat-topbar .title .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-grad);
  animation: pulse-dot 2s ease-in-out infinite;
}
.chat-topbar .actions { display: flex; gap: 8px; }

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 20px;
  scroll-behavior: smooth;
}
.chat-thread {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Bot rows carry an avatar + action buttons */
.msg-row { display: flex; flex-direction: column; gap: 6px; animation: msg-in 0.35s var(--ease-out-expo); }
.msg-row.user { align-items: flex-end; }
.msg-row.bot { align-items: flex-start; }
.msg-row .bubble-wrap { display: flex; gap: 10px; align-items: flex-end; max-width: 100%; }
.bot-avatar {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.msg-actions {
  display: flex;
  gap: 4px;
  margin-left: 40px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.msg-row:hover .msg-actions { opacity: 1; }
.msg-actions button {
  font-size: 0.75rem;
  color: var(--ink-55);
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease, color 0.2s ease;
}
.msg-actions button:hover { background: var(--glass-strong); color: var(--ink); }

/* Typing indicator */
.typing-bubble {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 15px 18px;
}
.typing-bubble span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-55);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }

/* Suggestions */
.suggestions {
  max-width: 760px;
  margin: 0 auto 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px;
}
.suggestion-chip {
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--ink-70);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.suggestion-chip:hover { background: var(--glass-strong); color: var(--ink); border-color: var(--line-strong); }

/* Composer */
.composer-wrap { padding: 0 20px 10px; }
.composer {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 10px 10px 10px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.composer:focus-within {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}
.composer textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  resize: none;
  max-height: 140px;
  line-height: 1.5;
  font-size: 0.95rem;
  padding: 8px 0;
  color: var(--ink);
}
.composer textarea::placeholder { color: var(--ink-40); }
.composer .send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.composer .send-btn:hover { opacity: 0.9; }
.composer .send-btn:active { transform: scale(0.94); }
.composer .send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-footnote {
  max-width: 760px;
  margin: 8px auto 14px;
  padding: 0 20px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-40);
  line-height: 1.5;
}

/* Settings modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: 28px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s var(--ease-out-expo);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal h2 { font-size: 1.3rem; margin-bottom: 6px; }
.modal .modal-sub { color: var(--ink-55); font-size: 0.9rem; margin-bottom: 20px; }
.tone-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tone-chip {
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  padding: 9px 16px;
  font-size: 0.85rem;
  color: var(--ink-70);
  transition: all 0.2s ease;
}
.tone-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.tone-chip.selected {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
  font-weight: 500;
}
.modal-close { margin-top: 24px; width: 100%; justify-content: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 400;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-size: 0.85rem;
  transition: transform 0.35s var(--ease-out-expo);
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- 7. About / Terms pages ---------- */
.doc-page { padding: 60px 0 100px; }
.doc-page .doc-header { margin-bottom: 56px; display: flex; flex-direction: column; gap: 16px; max-width: 44rem; }
.doc-sections { display: flex; flex-direction: column; gap: 24px; max-width: 46rem; }
.doc-card h2 { font-size: 1.3rem; margin-bottom: 12px; letter-spacing: -0.01em; }
.doc-card p, .doc-card li { color: var(--ink-70); line-height: 1.65; font-size: 0.98rem; }
.doc-card p + p { margin-top: 12px; }
.doc-card ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ---------- 8. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  background: var(--bg-2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--ink-55); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--ink); }
.footer-fine { color: var(--ink-40); font-size: 0.8rem; line-height: 1.6; }

/* ---------- 9. Animations ---------- */
@keyframes msg-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal helper (applied by app.js via IntersectionObserver) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s var(--ease-out-expo); }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 10. Responsive ---------- */
@media (min-width: 640px) {
  .container { padding: 0 32px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .stats-band { grid-template-columns: repeat(3, 1fr); }
  .hero { padding-top: 80px; }
}

@media (min-width: 900px) {
  .nav-links { display: inline-flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger, .menu-overlay, .menu-drawer { display: none; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
  .hero {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }
  .hero-copy { flex: 1; }
}

/* Chat page mobile */
@media (max-width: 899px) {
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    z-index: 200;
    height: 100%;
    background: rgba(6, 6, 14, 0.94);
    transform: translateX(-100%);
    transition: transform 0.5s var(--ease-out-expo);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-toggle {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--line);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
}
@media (min-width: 900px) {
  .sidebar-overlay { display: none; }
}
