/* ============================================
   TradeAnalyticsAI - Design System
   ============================================ */

:root {
  /* Backgrounds - 3-tier depth system (blue-shifted darks) */
  --bg-deepest:    #070B14;
  --bg-surface:    #0F1629;
  --bg-elevated:   #1A2240;
  --bg-glass:      rgba(15, 22, 41, 0.7);

  /* Accents */
  --cyan:          #00D4FF;
  --cyan-glow:     rgba(0, 212, 255, 0.15);
  --blue:          #3B82F6;
  --emerald:       #10B981;
  --crimson:       #EF4444;
  --gold:          #F59E0B;
  --purple:        #8B5CF6;

  /* Text - 3-tier hierarchy */
  --text-primary:  #F0F4FF;
  --text-secondary:#94A3C4;
  --text-muted:    #5A6B8A;

  /* Gradients */
  --gradient-ai:   linear-gradient(135deg, #00D4FF 0%, #3B82F6 50%, #8B5CF6 100%);
  --gradient-cta:  linear-gradient(135deg, #00D4FF 0%, #3B82F6 100%);
  --gradient-hero: linear-gradient(160deg, #070B14 0%, #0F1629 40%, #1a1040 70%, #0d2847 100%);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 212, 255, 0.2);

  /* Spacing & Radius */
  --section-pad:   100px;
  --card-radius:   20px;
  --btn-radius:    12px;
}


/* ============================================
   Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--bg-deepest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: #38bdf8;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}


/* ============================================
   Utilities
   ============================================ */

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

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}


/* ============================================
   Scroll Progress Bar
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--gradient-cta);
  z-index: 1100;
  width: 0%;
  pointer-events: none;
}


/* ============================================
   Scroll Reveal Animations
   ============================================ */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger: feature cards */
.feature-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.feature-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.24s; }

/* Stagger: steps */
.steps-container .reveal-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.steps-container .reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }

/* Stagger: pricing cards */
.pricing-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ============================================
   Navigation
   ============================================ */

.navbar {
  background: rgba(15, 22, 41, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0.7rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: fixed;
  width: auto;
  max-width: 680px;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  max-width: none;
}

.navbar .logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.navbar .logo .gradient-text {
  font-weight: 800;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar .nav-links li {
  margin-left: 0;
}

.navbar .nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.navbar .nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.navbar .nav-links .nav-cta {
  margin-left: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--gradient-cta);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: box-shadow 0.3s, transform 0.2s;
}

.navbar .nav-links .nav-cta:hover {
  background: var(--gradient-cta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
  transform: translateY(-1px);
}


/* ============================================
   Hamburger Menu
   ============================================ */

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-secondary);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ============================================
   Mobile Menu
   ============================================ */

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 16px;
  right: 16px;
  width: auto;
  background: rgba(15, 22, 41, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  z-index: 999;
}

.mobile-menu a {
  display: block;
  text-align: center;
  padding: 0.9rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s;
  border-bottom: none;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu.active {
  display: block;
}


/* ============================================
   Hero Section
   ============================================ */

.hero {
  background: var(--gradient-hero);
  color: var(--text-primary);
  text-align: center;
  padding: 180px 0 120px;
  margin-top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Subtle grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Ambient glow orb */
.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, rgba(139,92,246,0.05) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.15); }
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero .social-proof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--emerald);
  font-weight: 500;
}

.hero .disclaimer {
  font-size: 0.72rem;
  margin-top: 3rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}


/* ============================================
   Buttons
   ============================================ */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--gradient-cta);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.2);
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 212, 255, 0.35);
  color: #fff;
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.2);
}

.cta-button.hero-cta {
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}

.cta-button.secondary-cta {
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--border-accent);
  box-shadow: none;
}

.cta-button.secondary-cta:hover {
  background: rgba(0, 212, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--cyan);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.1);
}

.cta-button.gold-cta {
  background: linear-gradient(135deg, var(--gold) 0%, #D97706 100%);
  color: #000;
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.25);
}

.cta-button.gold-cta:hover {
  box-shadow: 0 8px 40px rgba(245, 158, 11, 0.35);
  color: #000;
}


/* ============================================
   Features Section
   ============================================ */

.features {
  background: var(--bg-deepest);
  padding: var(--section-pad) 0;
  position: relative;
}

.features h2 {
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3.5rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

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

.feature-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 40px 28px;
  text-align: center;
  min-width: 0;
  max-width: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Gradient border on hover */
.feature-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--cyan) 100%);
  -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;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.feature-item:hover::before {
  opacity: 1;
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  background: var(--bg-elevated);
}

.feature-icon {
  font-size: 1.6rem;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,212,255,0.1) 0%, rgba(59,130,246,0.08) 100%);
  color: var(--cyan);
  margin-bottom: 24px;
  transition: all 0.3s;
}

.feature-item:hover .feature-icon {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.15);
}

.feature-item h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}


/* ============================================
   How It Works Section
   ============================================ */

.how-it-works {
  padding: var(--section-pad) 0;
  background: var(--bg-surface);
  position: relative;
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
}

.steps-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  position: relative;
}

/* Connecting line */
.steps-container::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 18%;
  right: 18%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--emerald));
  opacity: 0.2;
  z-index: 0;
}

.step {
  text-align: center;
  max-width: 260px;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--bg-deepest);
  border: 2px solid var(--cyan);
  color: var(--cyan);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 24px var(--cyan-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover .step-number {
  background: var(--cyan);
  color: var(--bg-deepest);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-weight: 600;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}


/* ============================================
   Pricing Section
   ============================================ */

.pricing {
  background: var(--bg-deepest);
  color: var(--text-primary);
  padding: var(--section-pad) 0;
  position: relative;
}

/* Ambient glow behind pricing */
.pricing::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.pricing h2 {
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
}

.pricing > .container > p {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.pricing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  align-items: stretch;
}

.price-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 40px 32px;
  text-align: center;
  min-width: 280px;
  max-width: 340px;
  flex: 1;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.price-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.price-card h3 {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.price-card .price {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.price-card .price span {
  font-size: 3.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.03em;
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.price-card ul {
  margin-bottom: 2rem;
  flex-grow: 1;
  text-align: left;
  padding-left: 0;
}

.price-card ul li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.price-card ul li::before {
  content: '\2713';
  color: var(--emerald);
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 0.85rem;
}

.price-card .cta-button {
  margin-top: auto;
  width: 100%;
}

/* Popular / Featured card */
.price-card.popular {
  border: 1px solid rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(245, 158, 11, 0.03) 100%);
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.06);
  transform: scale(1.02);
}

.price-card.popular::before {
  content: 'BEST VALUE';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  padding: 5px 18px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.price-card.popular .price span {
  color: var(--gold);
}

.price-card.popular:hover {
  transform: scale(1.02) translateY(-6px);
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.12);
}

.price-card.popular .cta-button {
  background: linear-gradient(135deg, var(--gold) 0%, #D97706 100%);
  color: #000;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.price-card.popular .cta-button:hover {
  box-shadow: 0 8px 36px rgba(245, 158, 11, 0.35);
  color: #000;
}


/* ============================================
   Example Report Section
   ============================================ */

.example-report {
  background: var(--bg-surface);
  padding: var(--section-pad) 0;
}

.example-report h2 {
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.example-report .section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.report-preview {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 36px 32px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3);
}

.report-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  margin-top: 28px;
}

.report-section-header:first-child {
  margin-top: 0;
}

.report-section-header i {
  font-size: 1.35rem;
}

.report-section-header i.fa-chart-bar { color: var(--cyan); }
.report-section-header i.fa-lightbulb { color: var(--gold); }
.report-section-header i.fa-arrow-up-right-dots { color: var(--emerald); }

.report-section-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Metrics row */
.report-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.report-metric {
  flex: 1 1 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 18px 12px;
  text-align: center;
}

.report-metric .value {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  display: block;
  margin-bottom: 4px;
}

.report-metric .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Color-coded metric values */
.report-metric .value.color-cyan    { color: var(--cyan); }
.report-metric .value.color-emerald { color: var(--emerald); }
.report-metric .value.color-gold    { color: var(--gold); }
.report-metric .value.color-blue    { color: var(--blue); }
.report-metric .value.color-crimson { color: var(--crimson); }

/* Report insight list */
.report-preview .insight-list {
  padding-left: 1.25rem;
  margin-bottom: 24px;
  list-style: disc;
  color: var(--text-secondary);
}

.report-preview .insight-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  list-style: disc;
}

.report-preview .insight-list li strong {
  color: var(--text-primary);
}

.report-preview .insight-list .highlight-green {
  color: var(--emerald);
  font-weight: 600;
}

/* Suggestion list */
.report-preview .suggestion-list {
  padding-left: 1.25rem;
  margin-bottom: 28px;
  list-style: disc;
  color: var(--text-secondary);
}

.report-preview .suggestion-list li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  list-style: disc;
}

/* Report chart image */
.report-chart-area {
  text-align: center;
  margin-top: 8px;
}

.report-chart-area img {
  max-width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.report-chart-area .chart-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}


/* ============================================
   Analysis Tool Section
   ============================================ */

.analysis-tool {
  padding: var(--section-pad) 0;
  background-color: var(--bg-deepest);
}

.analysis-tool h2 {
  text-align: center;
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
}

.analysis-tool .section-subtitle {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Tool Tabs */
.tool-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
  border-bottom: none;
}

.tool-tab {
  padding: 0.65rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.tool-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.tool-tab.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.06);
  border-color: var(--cyan);
}

.tool-content {
  max-width: 700px;
  margin: 0 auto;
}

.tool-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tool-pane.active {
  display: block;
}

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

/* File upload */
.upload-area {
  text-align: center;
  margin-bottom: 24px;
}

input[type="file"] {
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: 12px;
  color: var(--text-secondary);
  padding: 20px;
  width: 100%;
  max-width: 400px;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: inherit;
}

input[type="file"]:hover {
  border-color: var(--border-accent);
}

.file-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Trade entry form */
.trade-entry {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.trade-entry input,
.trade-entry select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.trade-entry input:focus,
.trade-entry select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.trade-entry input[type="number"] { width: 110px; }
.trade-entry input[type="date"]   { width: 140px; }
.trade-entry input[type="text"]   { width: 110px; }

.trade-entry select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6B8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
}

.trade-entry select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}


/* ============================================
   Tab System (Reusable)
   ============================================ */

.tab-button {
  padding: 0.7rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.tab-button:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.tab-button.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.06);
  border-color: var(--cyan);
}

.tab-content {
  max-width: 800px;
  margin: 0 auto;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s;
}

.tab-pane.active {
  display: block;
}


/* ============================================
   Analysis Results Section
   ============================================ */

.analysis-results {
  padding: var(--section-pad) 0;
  background-color: var(--bg-surface);
}

.analysis-results.hidden {
  display: none;
}

.analysis-results h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--text-primary);
  font-weight: 700;
}

.results-navigation {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-button {
  padding: 0.65rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 0.9rem;
}

.nav-button:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.nav-button.active {
  background: rgba(0, 212, 255, 0.06);
  color: var(--cyan);
  border-color: var(--cyan);
}

.results-container {
  max-width: 900px;
  margin: 0 auto;
}

.result-section {
  display: none;
  animation: fadeIn 0.4s;
}

.result-section.active {
  display: block;
}

.result-section h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  text-align: center;
  font-weight: 600;
}

/* Summary Metrics */
.summary-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.4rem;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Chart Container */
.chart-container {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-placeholder {
  text-align: center;
  color: var(--text-muted);
}

/* Patterns */
.patterns-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.pattern-group {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
}

.pattern-group h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.pattern-list {
  padding-left: 0.5rem;
}

.pattern-list li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.pattern-item {
  margin-bottom: 0.6rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-surface);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Insights */
.insights-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.insight-card {
  background: var(--bg-deepest);
  border-left: 3px solid var(--cyan);
  border-radius: 8px;
  padding: 1.25rem;
  transition: transform 0.3s;
}

.insight-card:hover {
  transform: translateX(4px);
}

.insight-card h4 {
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 600;
}

.insight-card p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.insight-item {
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.insight-item h4 {
  margin-bottom: 0.4rem;
  color: var(--cyan);
  font-weight: 600;
}

.action-item {
  font-weight: 600;
  color: var(--emerald);
}

/* Risk Profile */
.risk-overview {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 2rem;
}

.risk-level {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.risk-level h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.risk-indicator {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #D97706);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.risk-indicator .risk-text {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.risk-metrics {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.risk-metric {
  text-align: center;
}

.risk-suggestions {
  background: var(--bg-deepest);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
}

.risk-suggestions h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.risk-suggestions ul {
  padding-left: 1.5rem;
  list-style-type: disc;
}

.risk-suggestions li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}


/* ============================================
   Why Not ChatGPT Section
   ============================================ */

.why-not-chatgpt {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-deepest) 100%);
  padding: var(--section-pad) 0;
}

.why-not-chatgpt h2 {
  text-align: center;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.why-not-chatgpt .section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.chatgpt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.chatgpt-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatgpt-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  border-color: var(--border-accent);
}

.chatgpt-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.chatgpt-card-header i {
  font-size: 1.2rem;
}

.chatgpt-card-header .fa-calculator    { color: var(--blue); }
.chatgpt-card-header .fa-chart-line    { color: var(--emerald); }
.chatgpt-card-header .fa-search        { color: var(--gold); }
.chatgpt-card-header .fa-file-pdf      { color: var(--crimson); }
.chatgpt-card-header .fa-clock-rotate-left { color: var(--purple); }
.chatgpt-card-header .fa-bolt          { color: var(--cyan); }

.chatgpt-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 600;
}

.chatgpt-card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
}

.chatgpt-closing {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2.5rem;
  font-size: 0.9rem;
}

/* Stagger chatgpt cards */
.chatgpt-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.chatgpt-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.chatgpt-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }
.chatgpt-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.32s; }
.chatgpt-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.4s; }


/* ============================================
   Call to Action Bottom
   ============================================ */

.call-to-action-bottom {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.call-to-action-bottom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.call-to-action-bottom h2 {
  color: var(--text-primary);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.call-to-action-bottom p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

.call-to-action-bottom .cta-button {
  position: relative;
  z-index: 1;
}


/* ============================================
   Footer
   ============================================ */

footer {
  background: var(--bg-deepest);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 40px 0 32px;
  margin-top: 0;
  text-align: center;
  font-size: 0.85rem;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

footer .footer-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  max-width: 700px;
  line-height: 1.5;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

footer .footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

footer .footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: color 0.2s;
}

footer .footer-links a:hover {
  color: var(--cyan);
}


/* ============================================
   Manual Entry / Broker (Legacy Support)
   ============================================ */

.upload-container,
.analysis-form,
.broker-connection {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  border-radius: 12px;
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.broker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.broker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-deepest);
  transition: all 0.3s;
}

.broker-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--border-accent);
}

.broker-item span {
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.connect-button {
  background: var(--emerald);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
}

.connect-button:hover {
  background: #0D9668;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}


/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  :root {
    --section-pad: 64px;
  }

  .navbar {
    width: calc(100% - 32px);
    max-width: none;
    top: 8px;
    border-radius: 14px;
    padding: 0.6rem 1rem;
  }

  .navbar .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero {
    padding: 140px 0 80px;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.5rem);
  }

  .hero p {
    font-size: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .steps-container::before {
    display: none;
  }

  .pricing-grid {
    flex-direction: column;
    align-items: center;
  }

  .price-card {
    max-width: 100%;
    width: 100%;
  }

  .price-card.popular {
    transform: scale(1);
  }

  .price-card.popular:hover {
    transform: translateY(-4px);
  }

  .report-metrics-row {
    gap: 10px;
  }

  .report-metric {
    flex: 1 1 calc(50% - 5px);
  }

  .risk-overview {
    grid-template-columns: 1fr;
  }

  .tool-tabs {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .tool-tab {
    width: 100%;
    text-align: center;
  }

  .trade-entry {
    flex-direction: column;
    gap: 8px;
  }

  .trade-entry input,
  .trade-entry select {
    width: 100% !important;
  }

  .results-navigation {
    flex-direction: column;
    align-items: center;
  }

  .nav-button {
    width: 100%;
    text-align: center;
  }

  footer .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad: 48px;
  }

  .navbar {
    width: calc(100% - 24px);
    top: 6px;
  }

  .report-preview {
    padding: 24px 18px;
  }

  .report-metric {
    flex: 1 1 100%;
  }

  .report-metric .value {
    font-size: 1.25rem;
  }
}
