/* ============================================
   ChurnShield Landing Page — Styles
   Dark theme, bento grid, premium aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg-body: #0a0a0f;
  --bg-tile: #111118;
  --bg-tile-hover: #16161f;
  --border-tile: #1e1e2e;
  --border-tile-hover: #2a2a3a;
  --accent: #00E5A0;
  --accent-glow: rgba(0, 229, 160, 0.15);
  --accent-glow-strong: rgba(0, 229, 160, 0.25);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --gap: 10px;
  --radius: 14px;
  --max-width: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.8; }

/* --- Layout --- */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* --- Navigation --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(17, 17, 24, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-tile);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  position: sticky;
  top: 12px;
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav-logo .shield-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), #00b882);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.nav-cta {
  background: var(--accent);
  color: #0a0a0f !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
  opacity: 1 !important;
}

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* --- Tile Base --- */
.tile {
  background: var(--bg-tile);
  border: 1px solid var(--border-tile);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;

  /* Scroll animation */
  opacity: 0;
  transform: translateY(30px);
}

.tile.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.tile:hover {
  border-color: var(--border-tile-hover);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.tile.is-visible:hover {
  transform: translateY(-2px);
}

/* --- Tile Sizes --- */
.tile-full    { grid-column: span 12; }
.tile-8       { grid-column: span 8; }
.tile-6       { grid-column: span 6; }
.tile-4       { grid-column: span 4; }
.tile-3       { grid-column: span 3; }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 64px 48px;
  min-height: 480px;
  background: var(--bg-tile);
  background-image:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 229, 160, 0.06), transparent),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(0, 100, 200, 0.03), transparent);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 160, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
}

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

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

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, #c8c8d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .highlight {
  -webkit-text-fill-color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 440px;
  border-radius: 12px;
  filter: drop-shadow(0 20px 60px rgba(0, 229, 160, 0.1));
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  box-shadow: 0 2px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow-strong);
  opacity: 1;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-tile-hover);
}
.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  opacity: 1;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.875rem;
}

/* ============================================
   PROBLEM + STATS
   ============================================ */
.problem-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.problem-tile .section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.problem-tile h2 {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.problem-tile p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 520px;
}

/* Stat tiles */
.stat-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 160px;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.step-tile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 160, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.step-tile h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step-tile p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* ============================================
   FEATURES
   ============================================ */
.feature-tile h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 229, 160, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
}

/* Retry timeline visual */
.retry-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 24px;
  padding: 16px 0;
}

.retry-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.retry-node .node-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-tile);
  box-shadow: 0 0 12px var(--accent-glow);
}

.retry-node .node-dot.failed {
  background: #ff4466;
  box-shadow: 0 0 12px rgba(255, 68, 102, 0.3);
}

.retry-node .node-dot.success {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

.retry-node .node-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  white-space: nowrap;
}

.retry-line {
  flex: 1;
  height: 2px;
  background: var(--border-tile-hover);
  min-width: 30px;
}

.retry-line.active {
  background: linear-gradient(90deg, var(--accent), rgba(0, 229, 160, 0.3));
}

/* ============================================
   PRICING
   ============================================ */
.pricing-section {
  padding: 48px 36px;
}

.pricing-section .section-header {
  text-align: center;
  margin-bottom: 40px;
}

.pricing-section .section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.pricing-section h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.pricing-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-tile);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.pricing-card:hover {
  border-color: var(--border-tile-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
  border-color: var(--accent);
  background: rgba(0, 229, 160, 0.04);
}

.popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #0a0a0f;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 0 0 8px 8px;
}

.pricing-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin: 20px 0;
  flex: 1;
}

.pricing-features li {
  font-size: 0.825rem;
  color: var(--text-secondary);
  padding: 6px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* ============================================
   SOCIAL PROOF
   ============================================ */
.testimonial-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonial-quote {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  position: relative;
}

.testimonial-quote::before {
  content: '"';
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: -20px;
  left: -8px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0088cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0a0a0f;
}

.author-info .name {
  font-weight: 600;
  font-size: 0.9rem;
}

.author-info .role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Trust badge tiles */
.trust-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
}

.trust-tile .trust-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.trust-tile h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.trust-tile p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Stripe-style logo */
.stripe-wordmark {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #635bff, #a259ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

/* ============================================
   FAQ
   ============================================ */
.faq-section {
  padding: 48px;
}

.faq-section .section-header {
  text-align: center;
  margin-bottom: 36px;
}

.faq-section .section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.faq-section h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-tile);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  padding: 20px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

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

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  padding-bottom: 20px;
}

/* ============================================
   FOOTER CTA
   ============================================ */
.footer-cta {
  text-align: center;
  padding: 64px 36px;
  background-image:
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(0, 229, 160, 0.07), transparent);
}

.footer-cta h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #c8c8d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-cta p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-tile);
  padding: 40px 0 20px;
  margin-top: 12px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.825rem;
  line-height: 1.6;
}

.footer-links-group {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

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

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

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid var(--border-tile);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   SECTION LABELS (shared)
   ============================================ */
.section-header .section-label {
  display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding: 48px 32px;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero h1 { font-size: 2.8rem; }
  .hero p { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-visual { max-width: 360px; }

  .tile-8, .tile-6, .tile-4, .tile-3 {
    grid-column: span 6;
  }

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

  .footer-links-group { gap: 40px; }
}

@media (max-width: 768px) {
  .page-wrapper { padding: 16px 12px 48px; }

  .nav { padding: 14px 20px; }
  .nav-links { display: none; }

  .hero { padding: 36px 24px; min-height: auto; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }

  .tile-8, .tile-6, .tile-4, .tile-3 {
    grid-column: span 12;
  }

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

  .pricing-section, .faq-section { padding: 32px 24px; }

  .footer-cta h2 { font-size: 1.8rem; }

  .footer-inner { flex-direction: column; }
  .footer-links-group { gap: 32px; }

  .retry-timeline { flex-wrap: wrap; justify-content: center; }

  .testimonial-quote { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .stat-number { font-size: 2.4rem; }
  .footer-links-group { flex-direction: column; gap: 24px; }
}

/* ============================================
   ANIMATION DELAY UTILITY
   ============================================ */
.tile:nth-child(1) { transition-delay: 0s; }
.tile:nth-child(2) { transition-delay: 0.08s; }
.tile:nth-child(3) { transition-delay: 0.16s; }
.tile:nth-child(4) { transition-delay: 0.24s; }

/* Section separators via grid row gaps */
.bento-grid .section-gap {
  grid-column: span 12;
  height: 24px;
}
