/* ============================================================
   WealthFlow Agents — Design System & Global Styles
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Palette */
  --bg-primary: #0a0f1c;
  --bg-surface: #111827;
  --bg-surface-hover: #1e293b;
  --bg-elevated: #1a2332;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.12);
  --accent-glow-strong: rgba(6, 182, 212, 0.25);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.08);
  --border-accent: rgba(6, 182, 212, 0.25);
  --success: #10b981;
  --white: #ffffff;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--accent-light);
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header p {
  margin: var(--space-md) auto 0;
  font-size: var(--text-lg);
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo svg {
  width: 40px;
  height: 20px;
  color: var(--accent);
}

.logo-text {
  font-size: var(--text-lg);
}

.logo-agents {
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  vertical-align: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-glow) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: var(--space-xl);
  font-weight: 500;
}

.hero h1 {
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
}

.hero-ctas {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-light);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  font-size: var(--text-sm);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- Steps / Timeline ---------- */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.steps::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.step {
  display: flex;
  gap: var(--space-xl);
  position: relative;
}

.step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--text-lg);
  z-index: 1;
}

.step-content h3 {
  margin-bottom: var(--space-sm);
}

.step-content p {
  font-size: var(--text-sm);
}

/* ---------- Page Header (inner pages) ---------- */
.page-header {
  padding: calc(72px + var(--space-4xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  margin-bottom: var(--space-md);
}

.page-header p {
  position: relative;
  margin: 0 auto;
  font-size: var(--text-lg);
}

/* ---------- Disclaimer Banner ---------- */
.disclaimer-banner {
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-xl);
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.disclaimer-banner p {
  font-size: var(--text-sm);
  color: var(--accent);
  margin: 0 auto;
}

/* ---------- Form ---------- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--duration) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form {
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Values Grid (About) ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
}

.value-item {
  padding: var(--space-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.value-item h3 {
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

/* ---------- Mission Block ---------- */
.mission-block {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-3xl);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  position: relative;
}

.mission-block::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mission-block blockquote {
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ---------- CTA Section ---------- */
.cta-section {
  text-align: center;
  padding: var(--space-4xl) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section p {
  margin: 0 auto var(--space-2xl);
}

.cta-section .hero-ctas {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
}

.footer-col h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  padding: var(--space-xs) 0;
  transition: color var(--duration) var(--ease);
}

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

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

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

.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  max-width: 100%;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2.25rem;
    --text-3xl: 1.5rem;
    --text-xl: 1.125rem;
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }

  h1 {
    font-size: var(--text-4xl);
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-xl);
  }

  .nav-toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    text-align: center;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .steps::before {
    left: 24px;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  h1 {
    font-size: var(--text-3xl);
  }

  .btn {
    padding: 12px 24px;
    width: 100%;
    justify-content: center;
  }
}