/* ============================================
   Datachimps.ai - Style Sheet
   Dark cosmic theme: purple + electric blue
   Based on Iron Tower Press design system
   ============================================ */

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

:root {
  /* Colors */
  --bg-dark: #0a0a1a;
  --bg-darker: #060612;
  --bg-card: #12122a;
  --bg-card-hover: #1a1a3a;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --glow: #a78bfa;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #f8fafc;
  --border: rgba(139, 92, 246, 0.2);
  --border-hover: rgba(139, 92, 246, 0.4);

  /* Typography */
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --nav-height: 70px;
  --section-padding: 100px 0;
  --container-width: 1200px;
  --gap: 24px;

  /* Effects */
  --glow-shadow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 60px rgba(139, 92, 246, 0.1);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--bg-darker);
}

.text-center { text-align: center; }
.text-glow { text-shadow: var(--glow-shadow); }

/* Scroll-triggered animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered card animations */
.card-grid .fade-in:nth-child(2) { transition-delay: 0.1s; }
.card-grid .fade-in:nth-child(3) { transition-delay: 0.2s; }
.card-grid .fade-in:nth-child(4) { transition-delay: 0.1s; }
.card-grid .fade-in:nth-child(5) { transition-delay: 0.2s; }
.card-grid .fade-in:nth-child(6) { transition-delay: 0.3s; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav.scrolled {
  background: rgba(10, 10, 26, 0.95);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  height: 42px;
  width: auto;
  border-radius: 4px;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-bright);
  background: rgba(139, 92, 246, 0.1);
}

/* Nav CTA button */
.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--text-bright) !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.btn-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  color: var(--text-bright) !important;
}

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

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

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-darker);
  padding-top: var(--nav-height);
}

.hero-parallax {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-layer {
  position: absolute;
  inset: -50px;
  transition: transform 0.1s ease-out;
}

/* Layer 1: Starfield canvas */
.hero-layer--bg {
  z-index: 1;
}

.hero-layer--bg canvas {
  width: 100%;
  height: 100%;
}

/* Layer 2: Character / midground */
.hero-layer--mid {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-character-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background:
    radial-gradient(ellipse 40% 55% at 50% 35%,
      rgba(139, 92, 246, 0.35) 0%,
      rgba(109, 40, 217, 0.2) 30%,
      transparent 70%
    ),
    radial-gradient(ellipse 25% 40% at 50% 70%,
      rgba(6, 182, 212, 0.2) 0%,
      rgba(139, 92, 246, 0.08) 40%,
      transparent 70%
    ),
    radial-gradient(ellipse 50% 30% at 45% 50%,
      rgba(139, 92, 246, 0.12) 0%,
      transparent 70%
    );
}

/* Layer 3: Foreground particles */
.hero-layer--fg {
  z-index: 3;
  pointer-events: none;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
}

/* Hero logo wrapper */
.hero-logo-wrapper {
  text-align: center;
  margin: 0 auto 24px;
}

/* Hero logo image */
.hero-logo {
  display: inline-block;
  width: clamp(220px, 30vw, 400px);
  height: auto;
  border-radius: 12px;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.4));
  animation: heroLogoGlow 3s ease-in-out infinite alternate;
}

@keyframes heroLogoGlow {
  0% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3)); }
  100% { filter: drop-shadow(0 0 50px rgba(6, 182, 212, 0.5)); }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--glow) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite alternate;
  margin-bottom: 16px;
}

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.4)); }
  100% { filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.6)); }
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 40px;
  font-weight: 300;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: var(--text-bright);
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
  color: var(--text-bright);
}

.btn-outline {
  background: transparent;
  color: var(--text-bright);
  border: 2px solid #ffffff;
}

.btn-outline:hover {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
  color: var(--text-bright);
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

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

.card-body {
  padding: 24px;
  text-align: center;
}

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

.card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Feature icon */
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple-dark), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}

/* Feature card padding */
.feature-card {
  padding: 40px 32px;
  text-align: center;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--glow);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.tag-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.tag-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-rose {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* --- Comparison Table --- */
.comparison-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.comparison-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child {
  border-bottom: none;
}

.comparison-row.comparison-header {
  background: rgba(139, 92, 246, 0.08);
}

.comparison-cell {
  padding: 16px 24px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.comparison-header .comparison-cell {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-bright);
}

.comparison-cell.feature-name {
  color: var(--text);
  font-weight: 500;
}

.comparison-cell.datachimps {
  color: #4ade80;
  font-weight: 600;
  gap: 8px;
}

.comparison-cell.cloud {
  color: var(--text-muted);
  gap: 8px;
}

.comparison-cell .check {
  color: #4ade80;
  font-weight: 700;
}

.comparison-cell .x-mark {
  color: #fb7185;
  font-weight: 700;
}

/* Mobile comparison labels (hidden on desktop) */
.comparison-cell .mobile-label {
  display: none;
}

/* --- Pricing Card --- */
.pricing-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--cyan));
}

.pricing-card h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.pricing-subtitle {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--glow);
  font-weight: 600;
  margin-bottom: 32px;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  color: var(--text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features .check-icon {
  color: #4ade80;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pricing-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover,
.faq-item.open {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-bright);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--transition);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--purple);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '\2212';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-darker);
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  width: 80px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 16px;
  opacity: 0.85;
  transition: opacity var(--transition);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-brand h4 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
}

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

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

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
    --gap: 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links a {
    padding: 12px 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: var(--nav-height);
  }

  .hero-logo {
    width: clamp(180px, 50vw, 300px);
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  /* Comparison table responsive */
  .comparison-header {
    display: none;
  }

  .comparison-row {
    grid-template-columns: 1fr;
    padding: 16px 0;
  }

  .comparison-row:not(.comparison-header) {
    display: block;
    padding: 16px 24px;
  }

  .comparison-cell {
    padding: 4px 0;
  }

  .comparison-cell.feature-name {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-bright);
    margin-bottom: 8px;
  }

  .comparison-cell .mobile-label {
    display: inline;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 4px;
  }

  /* Pricing card */
  .pricing-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 0.06em;
  }

  .hero-tagline {
    letter-spacing: 0.1em;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
    max-width: 280px;
  }
}
