/* ═══════════════════════════════════════════════════════════════
   ChartMind — Global Styles
   Premium dark theme with purple/teal accents
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg-primary: #08080c;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --surface: #1e1e2a;
  --border: rgba(124, 77, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);
  
  --purple: #7C4DFF;
  --purple-light: #B388FF;
  --purple-dark: #5a2fd6;
  --teal: #00BFA5;
  --teal-light: #1DE9B6;
  --blue: #448AFF;
  --gold: #FFD54F;
  --red: #FF5252;
  --green: #69F0AE;
  
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-purple: 0 4px 32px rgba(124, 77, 255, 0.15);
  --shadow-teal: 0 4px 32px rgba(0, 191, 165, 0.15);
  
  --max-width: 1200px;
  --header-height: 72px;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--purple-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--purple);
}

img {
  max-width: 100%;
  height: auto;
}

/* ─── Typography ─── */
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { color: var(--text-secondary); font-size: 1rem; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* ─── Header / Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(8, 8, 12, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-purple);
}

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ─── Hero Section ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 191, 165, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(124, 77, 255, 0.12);
  border: 1px solid rgba(124, 77, 255, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple-light);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--purple-light), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
  color: white;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 77, 255, 0.3);
  color: white;
}

.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  width: 280px;
  height: 580px;
  background: var(--bg-card);
  border-radius: 40px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 80px rgba(124, 77, 255, 0.1);
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: var(--bg-primary);
  border-radius: 0 0 20px 20px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0d0d15 0%, #111118 50%, #0a0a12 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.phone-screen .chart-line {
  width: 100%;
  height: 120px;
  position: relative;
  margin: 20px 0;
}

.phone-screen .chart-line svg {
  width: 100%;
  height: 100%;
}

/* ─── Features Section ─── */
.features {
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header .overline {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
  box-shadow: var(--shadow-purple);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-icon.purple { background: rgba(124, 77, 255, 0.15); }
.feature-icon.teal { background: rgba(0, 191, 165, 0.15); }
.feature-icon.blue { background: rgba(68, 138, 255, 0.15); }
.feature-icon.gold { background: rgba(255, 213, 79, 0.15); }
.feature-icon.red { background: rgba(255, 82, 82, 0.15); }
.feature-icon.green { background: rgba(105, 240, 174, 0.15); }

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── Stats Section ─── */
.stats {
  background: var(--bg-secondary);
}

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

.stat-item {
  text-align: center;
  padding: 32px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ─── CTA Section ─── */
.cta-section {
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 77, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s;
}

.store-btn:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  color: white;
  transform: translateY(-2px);
}

.store-btn .store-icon {
  font-size: 1.6rem;
}

.store-btn .store-text {
  text-align: left;
}

.store-btn .store-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
}

.store-btn .store-text strong {
  font-size: 1rem;
}

/* ─── Footer ─── */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-subtle);
}

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

.footer-brand p {
  margin-top: 12px;
  font-size: 0.85rem;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

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

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

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

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

.footer-bottom-links a:hover {
  color: var(--text-secondary);
}

/* ─── Legal Pages ─── */
.legal-page {
  padding-top: calc(var(--header-height) + 60px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.legal-page .container {
  max-width: 800px;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-page h3 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-page p {
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.8;
}

.legal-page ul,
.legal-page ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-page li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-page .highlight-box {
  background: rgba(124, 77, 255, 0.08);
  border: 1px solid rgba(124, 77, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-page .highlight-box p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* ─── Support Page ─── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s;
}

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

.support-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.support-card h3 {
  margin-bottom: 8px;
}

.support-card p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.support-card a.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple-light);
}

/* ─── FAQ ─── */
.faq-list {
  max-width: 700px;
  margin: 40px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--purple);
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    display: none;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .support-grid {
    grid-template-columns: 1fr;
  }
  
  section {
    padding: 60px 0;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
