/**
 * CAPTURE / LANDING PAGE STYLES
 * Dark theme: showcases both Bid Wizard + AI Takeoff Wizard
 */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --cap-bg: #0b0d10;
  --cap-bg-alt: #111318;
  --cap-bg-card: #161920;
  --cap-bg-card-hover: #1c1f28;
  --cap-bg-elevated: #1e2230;
  --cap-text: #f0f0f0;
  --cap-text-dim: #a0a8b8;
  --cap-text-muted: #6b7280;
  --cap-border: rgba(255,255,255,0.08);
  --cap-border-light: rgba(255,255,255,0.12);
  --cap-accent: #4A90E2;
  --cap-accent-hover: #5DA0F0;
  --cap-accent-glow: rgba(74,144,226,0.25);
  --cap-orange: #E8873A;
  --cap-orange-glow: rgba(232,135,58,0.20);
  --cap-green: #34C759;
  --cap-gold: #F5B731;
  --cap-red: #e04040;
  --cap-font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --cap-radius: 12px;
  --cap-radius-lg: 20px;
  --cap-shadow: 0 4px 24px rgba(0,0,0,0.5);
  --cap-transition: 250ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--cap-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cap-text);
  background: var(--cap-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cap-accent); text-decoration: none; transition: color var(--cap-transition); }
a:hover { color: var(--cap-accent-hover); }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--cap-accent);
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 18px;
  color: var(--cap-text-dim);
  max-width: 680px;
  margin: 0 auto;
}
.accent { color: var(--cap-accent); }

/* ============================================
   CTA BRANDING LOGO
   ============================================ */
.cta-branding-logo {
  height: 60px;
  margin: 48px auto 0;
  display: block;
  object-fit: contain;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.25) saturate(0.6);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11,13,16,0.7) 0%,
    rgba(11,13,16,0.4) 40%,
    rgba(11,13,16,0.85) 100%
  );
}
.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
}
.hero-logo {
  width: min(480px, 85vw);
  margin: 0 auto 36px;
  display: block;
  border-radius: 16px;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.5));
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--cap-text-dim);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* AWeber form wrapper */
.hero-form {
  max-width: 520px;
  margin: 0 auto 48px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--cap-border-light);
  border-radius: var(--cap-radius-lg);
  padding: 32px 28px;
  backdrop-filter: blur(12px);
}
.hero-form h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-subtitle {
  font-size: 14px;
  color: var(--cap-text-muted);
  margin-bottom: 20px;
}

/* Capture form fields */
.capture-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.capture-form input[type="text"],
.capture-form input[type="email"] {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--cap-border-light);
  color: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  width: 100%;
  font-family: var(--cap-font);
  outline: none;
  transition: border-color var(--cap-transition), box-shadow var(--cap-transition);
}
.capture-form input[type="text"]:focus,
.capture-form input[type="email"]:focus {
  border-color: var(--cap-accent);
  box-shadow: 0 0 0 3px var(--cap-accent-glow);
}
.capture-form textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--cap-border-light);
  color: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  width: 100%;
  font-family: var(--cap-font);
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--cap-transition), box-shadow var(--cap-transition);
}
.capture-form textarea:focus {
  border-color: var(--cap-accent);
  box-shadow: 0 0 0 3px var(--cap-accent-glow);
}
.capture-form input[type="text"]::placeholder,
.capture-form input[type="email"]::placeholder,
.capture-form textarea::placeholder {
  color: var(--cap-text-muted);
}
.capture-form button[type="submit"] {
  background: var(--cap-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
  transition: all var(--cap-transition);
  font-family: var(--cap-font);
}
.capture-form button[type="submit"]:hover {
  background: var(--cap-accent-hover);
  box-shadow: 0 0 28px var(--cap-accent-glow);
  transform: translateY(-1px);
}

/* Hero stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--cap-accent);
  line-height: 1.1;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: var(--cap-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   THE PROBLEM
   ============================================ */
.problem-section {
  padding: 100px 0;
  background: var(--cap-bg-alt);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.problem-card {
  background: var(--cap-bg-card);
  border: 1px solid var(--cap-border);
  border-radius: var(--cap-radius);
  padding: 36px 28px;
  transition: all var(--cap-transition);
}
.problem-card:hover {
  background: var(--cap-bg-card-hover);
  border-color: var(--cap-border-light);
  transform: translateY(-4px);
  box-shadow: var(--cap-shadow);
}
.problem-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(224,64,64,0.12);
  border-radius: 12px;
  margin-bottom: 20px;
}
.problem-icon svg {
  width: 24px;
  height: 24px;
  color: var(--cap-red);
}
.problem-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.problem-card p {
  font-size: 15px;
  color: var(--cap-text-dim);
  line-height: 1.6;
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */
.products-section {
  padding: 100px 0;
  background: var(--cap-bg);
}
.products-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.product-card {
  flex: 1;
  background: var(--cap-bg-card);
  border: 1px solid var(--cap-border);
  border-radius: var(--cap-radius-lg);
  overflow: hidden;
  transition: all var(--cap-transition);
}
.product-card:hover {
  border-color: var(--cap-accent);
  box-shadow: 0 0 40px var(--cap-accent-glow);
  transform: translateY(-4px);
}
.product-header {
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.bw-header {
  background: linear-gradient(135deg, #0a1628 0%, #162040 100%);
}
.ai-header {
  background: linear-gradient(135deg, #0a1420 0%, #101830 100%);
}
.product-logo {
  max-height: 140px;
  max-width: 280px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.product-body {
  padding: 32px 28px 36px;
}
.product-body h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}
.product-tagline {
  font-size: 14px;
  color: var(--cap-text-muted);
  margin-bottom: 24px;
}
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--cap-text-dim);
  line-height: 1.4;
}
.feature-list li svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--cap-green);
  margin-top: 1px;
}

/* Product connector */
.product-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  min-width: 120px;
}
.connector-line {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(180deg, transparent, var(--cap-accent), transparent);
}
.connector-badge {
  background: var(--cap-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  border-radius: 24px;
  white-space: nowrap;
  box-shadow: 0 0 24px var(--cap-accent-glow);
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.workflow-section {
  padding: 100px 0;
  background: var(--cap-bg-alt);
}
.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
/* Vertical timeline line */
.steps-grid::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(180deg, var(--cap-accent), var(--cap-orange));
}
.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  position: relative;
}
.step-number {
  width: 56px;
  height: 56px;
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cap-bg-card);
  border: 2px solid var(--cap-accent);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  color: var(--cap-accent);
  z-index: 2;
}
.step:nth-child(3) .step-number { border-color: var(--cap-orange); color: var(--cap-orange); }
.step:nth-child(4) .step-number { border-color: var(--cap-orange); color: var(--cap-orange); }
.step:nth-child(5) .step-number { border-color: var(--cap-green); color: var(--cap-green); }
.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-top: 4px;
}
.step-content p {
  font-size: 15px;
  color: var(--cap-text-dim);
  line-height: 1.6;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-section {
  padding: 100px 0;
  background: var(--cap-bg);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
/* Last row: 2 cards centered */
.testimonials-grid .testimonial-card:nth-child(4) { grid-column: 1 / 2; }
.testimonials-grid .testimonial-card:nth-child(5) { grid-column: 2 / 3; }

.testimonial-card {
  background: var(--cap-bg-card);
  border: 1px solid var(--cap-border);
  border-radius: var(--cap-radius);
  padding: 28px 24px;
  transition: all var(--cap-transition);
  display: flex;
  flex-direction: column;
}
.testimonial-card:hover {
  border-color: var(--cap-border-light);
  transform: translateY(-2px);
  box-shadow: var(--cap-shadow);
}
.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}
.testimonial-stars svg {
  width: 18px;
  height: 18px;
  color: var(--cap-gold);
}
.testimonial-card blockquote {
  font-size: 15px;
  color: var(--cap-text-dim);
  line-height: 1.65;
  font-style: italic;
  flex: 1;
  margin-bottom: 20px;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
}
.testimonial-author strong {
  font-size: 15px;
  color: var(--cap-text);
}
.testimonial-author span {
  font-size: 13px;
  color: var(--cap-text-muted);
}

/* ============================================
   STORY
   ============================================ */
.story-section {
  padding: 100px 0;
  background: var(--cap-bg-alt);
}
.story-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.story-image {
  border-radius: var(--cap-radius-lg);
  overflow: hidden;
  box-shadow: var(--cap-shadow);
}
.story-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}
.story-content .section-label { margin-bottom: 8px; }
.story-content h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
}
.story-content p {
  font-size: 16px;
  color: var(--cap-text-dim);
  margin-bottom: 16px;
  line-height: 1.7;
}
.story-content strong { color: var(--cap-text); }
.story-signature {
  margin-top: 12px;
  font-size: 15px;
  color: var(--cap-text-muted);
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
  padding: 100px 0 80px;
  background: linear-gradient(180deg, var(--cap-bg) 0%, #0a1020 100%);
  text-align: center;
}
.cta-logo {
  width: min(360px, 70vw);
  margin: 0 auto 32px;
  display: block;
  border-radius: 12px;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,0.5));
}
.final-cta h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
}
.final-cta > .container > p {
  font-size: 18px;
  color: var(--cap-text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
}
.cta-form {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--cap-border-light);
  border-radius: var(--cap-radius-lg);
  padding: 28px 24px;
  backdrop-filter: blur(12px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 48px 0 32px;
  background: var(--cap-bg);
  border-top: 1px solid var(--cap-border);
  text-align: center;
}
.footer-tagline {
  font-size: 13px;
  color: var(--cap-text-muted);
  margin-bottom: 8px;
}
.footer-copy {
  font-size: 12px;
  color: var(--cap-text-muted);
  opacity: 0.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
  .problem-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .products-grid {
    flex-direction: column;
    gap: 24px;
  }
  .product-connector {
    flex-direction: row;
    padding: 12px 0;
    min-width: unset;
  }
  .connector-line {
    width: auto;
    height: 2px;
    flex: 1;
    min-height: unset;
    min-width: 40px;
    background: linear-gradient(90deg, transparent, var(--cap-accent), transparent);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid .testimonial-card:nth-child(4),
  .testimonials-grid .testimonial-card:nth-child(5) {
    grid-column: auto;
  }
  .story-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .story-image img {
    min-height: 240px;
  }
  .hero-stats {
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .hero { padding: 40px 0 60px; }
  .hero-logo { width: min(320px, 90vw); margin-bottom: 24px; }
  .hero-form { padding: 24px 18px; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .stat-number { font-size: 28px; }
  .problem-section,
  .products-section,
  .workflow-section,
  .testimonials-section,
  .story-section,
  .final-cta { padding: 64px 0; }
  .section-header { margin-bottom: 36px; }
  .steps-grid::before { left: 27px; }
  .cta-form { padding: 22px 16px; }
}

/* ============================================
   SCROLL ANIMATIONS & MOTION
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
  }
  .reveal-up     { transform: translateY(40px); }
  .reveal-left   { transform: translateX(-50px); }
  .reveal-right  { transform: translateX(50px); }
  .reveal-scale  { transform: scale(0.88); }
  .reveal-rotate { transform: rotate(-2deg) translateY(30px); }
  .reveal.visible { opacity: 1; transform: none; }

  .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
  .reveal-stagger > .reveal:nth-child(2) { transition-delay: 110ms; }
  .reveal-stagger > .reveal:nth-child(3) { transition-delay: 220ms; }
  .reveal-stagger > .reveal:nth-child(4) { transition-delay: 330ms; }
  .reveal-stagger > .reveal:nth-child(5) { transition-delay: 440ms; }
  .reveal-stagger > .reveal:nth-child(6) { transition-delay: 550ms; }

  .hero-bg {
    animation: kenBurns 28s ease-in-out infinite alternate;
    will-change: transform;
  }
  @keyframes kenBurns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.08) translate(-1.5%, -1.5%); }
  }

  .step-number { position: relative; }
  .step.visible .step-number {
    animation: stepPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  @keyframes stepPop {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
  }
  .step.visible .step-number::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    pointer-events: none;
    animation: stepRing 1.4s ease-out 0.3s both;
  }
  @keyframes stepRing {
    0%   { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1.7); opacity: 0; }
  }

  .steps-grid::before {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .steps-grid.visible::before { transform: scaleY(1); }

  .connector-badge {
    background: linear-gradient(270deg, var(--cap-accent), var(--cap-orange), var(--cap-accent));
    background-size: 200% 100%;
    animation: gradientShift 5s ease infinite;
  }
  .hero-form button,
  .cta-form button {
    background: linear-gradient(90deg, var(--cap-accent), var(--cap-orange), var(--cap-accent));
    background-size: 200% 100%;
    animation: gradientShift 6s ease infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .hero-form button:hover,
  .cta-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--cap-accent-glow);
  }
  @keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
  }

  .connector-line {
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.7s ease-out 0.1s;
  }
  .product-connector.visible .connector-line { transform: scaleY(1); }

  .testimonial-stars svg {
    transform: scale(0);
    opacity: 0;
  }
  .testimonial-card.visible .testimonial-stars svg {
    animation: starPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .testimonial-card.visible .testimonial-stars svg:nth-child(1) { animation-delay: 0.05s; }
  .testimonial-card.visible .testimonial-stars svg:nth-child(2) { animation-delay: 0.15s; }
  .testimonial-card.visible .testimonial-stars svg:nth-child(3) { animation-delay: 0.25s; }
  .testimonial-card.visible .testimonial-stars svg:nth-child(4) { animation-delay: 0.35s; }
  .testimonial-card.visible .testimonial-stars svg:nth-child(5) { animation-delay: 0.45s; }
  @keyframes starPop {
    0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
    80%  { transform: scale(1.2) rotate(0); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
  }

  .stat-number.counting { opacity: 1; }
}
