/* ============================================
   VoiceBoard Landing — Design System
   Palette: Teal + Orange CTA
   Font: Plus Jakarta Sans
   Style: Warm, comfortable, light SaaS
   ============================================ */

/* --- 1. CSS Custom Properties (Tokens) --- */
:root {
  /* Colors */
  --vb-primary: #0D9488;
  --vb-primary-light: #14B8A6;
  --vb-primary-dark: #0F766E;
  --vb-cta: #F97316;
  --vb-cta-hover: #EA580C;
  --vb-bg: #FAFAF9;
  --vb-bg-alt: #F0FDFA;
  --vb-surface: #FFFFFF;
  --vb-text: #134E4A;
  --vb-text-secondary: #5F6C72;
  --vb-text-tertiary: #9CA3AF;
  --vb-border: #E5E7EB;
  --vb-border-light: #F3F4F6;
  --vb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --vb-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --vb-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
  --vb-shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --vb-gradient-hero: linear-gradient(135deg, #E0F2FE 0%, #D1FAE5 50%, #FEF3C7 100%);
  --vb-gradient-cta: linear-gradient(135deg, #F97316, #FB923C);
  --vb-radius: 16px;
  --vb-radius-sm: 8px;
  --vb-radius-full: 9999px;

  /* Typography Scale */
  --vb-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --vb-fs-hero: clamp(2.25rem, 5vw, 3.5rem);
  --vb-fs-h2: clamp(1.75rem, 3.5vw, 2.25rem);
  --vb-fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --vb-fs-body: 1rem;
  --vb-fs-lg: 1.125rem;
  --vb-fs-sm: 0.875rem;
  --vb-fs-xs: 0.8125rem;

  /* Spacing */
  --vb-section-py: clamp(4rem, 8vw, 7rem);
  --vb-container: 1200px;
  --vb-gap: 1.5rem;
}

/* --- 2. Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--vb-font);
  font-size: var(--vb-fs-body);
  line-height: 1.6;
  color: var(--vb-text);
  background-color: var(--vb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--vb-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--vb-primary-dark);
}

ul {
  list-style: none;
}

/* --- 3. Typography --- */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--vb-text);
}

h1 {
  font-size: var(--vb-fs-hero);
  font-weight: 800;
}

h2 {
  font-size: var(--vb-fs-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--vb-fs-h3);
  font-weight: 600;
}

.text-gradient {
  background: linear-gradient(135deg, var(--vb-primary), var(--vb-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- 4. Layout --- */
.container {
  max-width: var(--vb-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--vb-section-py) 0;
}

.section-alt {
  background-color: var(--vb-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header p {
  font-size: var(--vb-fs-lg);
  color: var(--vb-text-secondary);
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: var(--vb-fs-sm);
  font-weight: 600;
  color: var(--vb-primary);
  background-color: var(--vb-bg-alt);
  padding: 0.375rem 1rem;
  border-radius: var(--vb-radius-full);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

/* --- 5. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--vb-font);
  font-size: var(--vb-fs-body);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--vb-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--vb-gradient-cta);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.45);
  color: #FFFFFF;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--vb-text);
  border: 1.5px solid var(--vb-border);
}

.btn-ghost:hover {
  border-color: var(--vb-primary);
  color: var(--vb-primary);
  background-color: var(--vb-bg-alt);
}

.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--vb-fs-sm);
}

/* --- 6. Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(250, 250, 249, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  border-bottom-color: var(--vb-border);
  box-shadow: var(--vb-shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vb-text);
  text-decoration: none;
}

.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--vb-primary), var(--vb-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-nav a {
  font-size: var(--vb-fs-sm);
  font-weight: 500;
  color: var(--vb-text-secondary);
  transition: color 0.2s;
}

.navbar-nav a:hover {
  color: var(--vb-text);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--vb-text);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 249, 0.98);
  backdrop-filter: blur(16px);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: var(--vb-fs-lg);
  font-weight: 500;
  color: var(--vb-text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--vb-border-light);
}

/* --- 7. Hero --- */
.hero {
  padding-top: calc(72px + 4rem);
  padding-bottom: var(--vb-section-py);
  background: var(--vb-gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--vb-bg));
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: var(--vb-fs-lg);
  color: var(--vb-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-mockup {
  width: 100%;
  max-width: 520px;
  border-radius: var(--vb-radius);
  box-shadow: var(--vb-shadow-xl);
}

/* Floating badges in hero — animation driven by JS (requestAnimationFrame) */
.hero-badge {
  position: absolute;
  background: var(--vb-surface);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--vb-shadow-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--vb-fs-sm);
  font-weight: 500;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* --- 8. Story Section (Pain → Solution) --- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.story-grid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, #D1D5DB, var(--vb-primary-light), var(--vb-primary));
  z-index: 0;
}

.story-card {
  position: relative;
  z-index: 1;
  background: var(--vb-surface);
  border-radius: var(--vb-radius);
  overflow: hidden;
  box-shadow: var(--vb-shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--vb-shadow-lg);
}

.story-card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
}

.story-card-body {
  padding: 1.5rem;
}

.story-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 700;
  font-size: var(--vb-fs-sm);
  margin-bottom: 0.75rem;
}

.story-step-1 {
  background: #FEE2E2;
  color: #DC2626;
}

.story-step-2 {
  background: #FEF3C7;
  color: #D97706;
}

.story-step-3 {
  background: #D1FAE5;
  color: #059669;
}

.story-card h3 {
  margin-bottom: 0.5rem;
}

.story-card p {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  line-height: 1.6;
}

/* --- 9. Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vb-gap);
}

.feature-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border-light);
  border-radius: var(--vb-radius);
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--vb-shadow-md);
  border-color: var(--vb-primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}

.feature-icon-teal {
  background: #CCFBF1;
  color: #0D9488;
}

.feature-icon-blue {
  background: #DBEAFE;
  color: #3B82F6;
}

.feature-icon-purple {
  background: #EDE9FE;
  color: #7C3AED;
}

.feature-icon-orange {
  background: #FFEDD5;
  color: #EA580C;
}

.feature-icon-green {
  background: #DCFCE7;
  color: #16A34A;
}

.feature-icon-pink {
  background: #FCE7F3;
  color: #DB2777;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: var(--vb-fs-body);
}

.feature-card p {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  line-height: 1.6;
}

/* --- 10. How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--vb-gradient-hero);
  border: 3px solid var(--vb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--vb-primary);
  margin: 0 auto 1.25rem;
}

.step-card h3 {
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

/* Arrow connector between steps */
.step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 32px;
  right: -1rem;
  width: calc(2rem);
  height: 2px;
  background: var(--vb-border);
}

/* --- 11. Use Cases --- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vb-gap);
}

.case-card {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border-light);
  border-radius: var(--vb-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--vb-shadow-md);
}

.case-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.case-card h3 {
  font-size: var(--vb-fs-body);
  margin-bottom: 0.5rem;
}

.case-card p {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  line-height: 1.5;
}

/* --- 12. Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--vb-gap);
  align-items: start;
}

.pricing-card {
  background: var(--vb-surface);
  border: 1.5px solid var(--vb-border);
  border-radius: var(--vb-radius);
  padding: 2.5rem 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--vb-shadow-lg);
}

.pricing-card.popular {
  border-color: var(--vb-primary);
  box-shadow: var(--vb-shadow-lg);
  transform: scale(1.03);
}

.pricing-card.popular:hover {
  transform: scale(1.03) translateY(-4px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--vb-primary);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: var(--vb-radius-full);
  font-size: var(--vb-fs-xs);
  font-weight: 600;
  white-space: nowrap;
}

.pricing-name {
  font-size: var(--vb-fs-h3);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing-desc {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  margin-bottom: 1.5rem;
}

.pricing-price {
  margin-bottom: 1.5rem;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--vb-text);
}

.pricing-period {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-tertiary);
}

.pricing-features {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
}

.pricing-feature svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--vb-primary);
}

.pricing-card .btn {
  width: 100%;
}

/* --- 13. FAQ --- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--vb-surface);
  border: 1px solid var(--vb-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: var(--vb-primary);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--vb-fs-body);
  gap: 1rem;
  transition: color 0.2s;
  user-select: none;
}

.faq-question:hover {
  color: var(--vb-primary);
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--vb-text-tertiary);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  line-height: 1.7;
}

/* --- 14. CTA Final --- */
.cta-final {
  background: linear-gradient(135deg, var(--vb-primary), var(--vb-primary-light));
  color: #fff;
  text-align: center;
  border-radius: var(--vb-radius);
  padding: 4rem 2rem;
  margin: 0 1.5rem;
  max-width: var(--vb-container);
  margin-left: auto;
  margin-right: auto;
}

.cta-final h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-final p {
  font-size: var(--vb-fs-lg);
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-final .btn-primary {
  background: #FFFFFF;
  color: var(--vb-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-final .btn-primary:hover {
  background: #F0FDFA;
  color: var(--vb-primary-dark);
}

/* --- 15. Footer --- */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--vb-border-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: var(--vb-fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vb-text-tertiary);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: var(--vb-fs-sm);
  color: var(--vb-text-secondary);
  padding: 0.25rem 0;
}

.footer-col a:hover {
  color: var(--vb-primary);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--vb-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--vb-fs-xs);
  color: var(--vb-text-tertiary);
}

/* --- 16. Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger>*.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger>*:nth-child(1) {
  transition-delay: 0s;
}

.stagger>*:nth-child(2) {
  transition-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  transition-delay: 0.2s;
}

.stagger>*:nth-child(4) {
  transition-delay: 0.25s;
}

.stagger>*:nth-child(5) {
  transition-delay: 0.3s;
}

.stagger>*:nth-child(6) {
  transition-delay: 0.35s;
}

/* --- 17. Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-mockup {
    max-width: 420px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .navbar-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding-top: calc(72px + 2rem);
  }

  .story-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .story-grid::before {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .step-card:not(:last-child)::after {
    display: none;
  }

  .cases-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .pricing-card.popular {
    transform: none;
    order: -1;
  }

  .pricing-card.popular:hover {
    transform: translateY(-4px);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-final {
    margin: 0 0.75rem;
    padding: 3rem 1.5rem;
  }
}