/* theme.css — Wealth Compass fintech design system (Stripe-inspired).
   Tailwind (CDN) handles utilities + the token colours configured in index.html;
   this file holds the base surfaces, component classes and animations that were
   inline in the wireframe. */

:root {
  --bg: #f6f9fc;
  --card: #ffffff;
  --card2: #f0f3f9;
  --card3: #e7ecf5;
  --primary: #5851e8;
  --primarybright: #635bff;
  --purple: #6c63e0;
  --purplelight: #8b85ff;
  --success: #0f9e73;
  --text: #0a2540;
  --muted: #5a6b85;
  --line: rgba(10, 37, 64, 0.12);
  --ink1: #111b34;
  --textdark: #eaf0fa;
  --muteddark: #8291ad;
  --linedark: rgba(107, 124, 153, 0.22);
}

body { background: #eef1f7; font-family: 'DM Sans', system-ui, sans-serif; color: var(--text); }

/* Phone frame — the whole app lives inside one of these on desktop; full-bleed on mobile. */
.phone {
  width: 390px; min-height: 800px; border-radius: 2.5rem; background: var(--bg);
  box-shadow: 0 16px 40px -18px rgba(10, 37, 64, 0.2), 0 0 0 1px rgba(10, 37, 64, 0.06);
  overflow: hidden; display: flex; flex-direction: column; position: relative; margin: 2.5rem auto;
}
@media (max-width: 480px) {
  .phone { width: 100vw; min-height: 100vh; border-radius: 0; margin: 0; box-shadow: none; }
  body { background: var(--bg); }
}

/* Clears the top bar below a device notch (viewport-fit=cover). Falls back to 1.25rem. */
.safe-top { padding-top: max(1.25rem, env(safe-area-inset-top)); }

.card-surface { background: var(--card); border: 1px solid rgba(10, 37, 64, 0.1); }
.soft-shadow { box-shadow: 0 2px 10px rgba(10, 37, 64, 0.06); }
.lift-shadow { box-shadow: 0 8px 28px rgba(10, 37, 64, 0.1); }
.gradient-app { background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 60%, #eef3fa 100%); }
.gradient-ink { background: linear-gradient(165deg, #0a0e1a 0%, #111b34 58%, #1c2a4c 100%); }

.answer-card {
  background: var(--card); box-shadow: 0 1px 4px rgba(10, 37, 64, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; cursor: pointer;
}
.answer-card:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(88, 81, 232, 0.14); border-color: var(--primary); }
.answer-card.selected { border-color: var(--primary); border-width: 2px; }

input[type='range'] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--card3); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 999px;
  background: var(--primary); box-shadow: 0 2px 10px rgba(88, 81, 232, 0.5); cursor: pointer;
}

/* Animations ported from the wireframe */
@keyframes waveShift { from { transform: translateX(0); } to { transform: translateX(-72px); } }
.wave-a { animation: waveShift 1.8s linear infinite; }
.wave-b { animation: waveShift 2.6s linear infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: floaty 4s ease-in-out infinite; }
.floaty2 { animation: floaty 5.4s ease-in-out infinite; }

/* Screen transition */
.screen { animation: fadeIn 0.28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.font-display { font-family: 'Sora', system-ui, sans-serif; }
.font-mono { font-family: 'DM Mono', ui-monospace, monospace; }

/* Respect users who ask for less motion — freeze the ambient animations. */
@media (prefers-reduced-motion: reduce) {
  .wave-a, .wave-b, .floaty, .floaty2, .screen { animation: none !important; }
}
