/* ============================================
   FinancialNews.com — Landing Page Styles
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a2e;
  --bg-chat: #0f0f18;
  --bg-input: #1a1a2e;
  --bg-hover: #22223a;
  --text-primary: #f0f0f5;
  --text-secondary: #9898b0;
  --text-muted: #6b6b82;
  --accent: #2563EB;
  --accent-hover: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #2563EB, #7C3AED);
  --border: #222240;
  --border-light: #2a2a48;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(37,99,235,0.15);
  --max-width: 1200px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---- Header ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-dot { color: var(--accent); }

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-signin {
  color: var(--text-primary) !important;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  margin-left: 8px;
}

.btn-signin:hover {
  background: var(--bg-hover) !important;
  border-color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
}

/* ---- Hero ---- */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 24px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Chat Container ---- */
.chat-container {
  width: 100%;
  max-width: 780px;
  height: 100%;
  max-height: 640px;
  display: flex;
  flex-direction: column;
}

.chat-window {
  background: var(--bg-chat);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

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

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

/* ---- Welcome State ---- */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  padding: 8px 20px;
  gap: 0;
}

.welcome-state.hidden { display: none; }

.welcome-icon {
  margin-bottom: 8px;
  animation: float 3s ease-in-out infinite;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-hover);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.welcome-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 30%, #9898b0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  max-width: 480px;
  line-height: 1.5;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 520px;
}

.chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.chip:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ---- Chat Messages ---- */
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

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

.message-avatar.assistant {
  background: var(--accent-gradient);
  color: #fff;
}

.message-body {
  flex: 1;
  min-width: 0;
}

.message-sender {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.message-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }

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

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  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(-4px); opacity: 1; }
}

/* ---- Chat Input ---- */
.chat-input-area {
  padding: 14px 18px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  padding: 2px 0;
}

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

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.input-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ---- Below the Fold ---- */
.below-fold {
  padding: 100px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.fold-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(37,99,235,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-hover);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand { margin-bottom: 32px; }
.footer-brand .logo-text { font-size: 20px; }

.footer-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 64px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-disclaimer {
  margin-top: 8px;
  font-size: 12px !important;
  opacity: 0.7;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }

  .hero { padding: 64px 16px 16px; }

  .chat-container { max-height: none; }

  .welcome-title { font-size: 24px; }
  .welcome-text { font-size: 13px; }

  .suggestion-chips { gap: 6px; }
  .chip { font-size: 12px; padding: 6px 12px; }

  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-links { flex-direction: column; gap: 32px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .chat-input-area { padding: 12px; }
  .chat-messages { padding: 16px; }
}
