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

body {
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-slate-900);
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--c-text-muted);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 640px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background-color: rgba(37, 99, 235, 0.7);
  color: var(--c-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  background-color: rgba(37, 99, 235, 0.9);
  color: var(--c-white);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(16, 185, 129, 0.7);
  color: var(--c-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(16, 185, 129, 0.9);
  color: var(--c-white);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.05);
  color: inherit;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--c-border);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--c-primary);
  transform: translateY(-2px);
}

/* Components */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  border: 1px solid var(--c-border);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--c-primary-light);
}

/* Feature Cards Upgrade */
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, transparent 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--c-blue-200);
}

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

.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-slate-50);
  color: var(--c-slate-600);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--c-border);
  transform-origin: center;
}

.feature-card:hover .feature-icon-wrapper {
  background: var(--c-blue-50);
  color: var(--c-primary);
  transform: scale(1.1);
  border-color: var(--c-blue-200);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  color: var(--c-slate-900);
  margin-bottom: 0.25rem;
}

.feature-card p {
  color: var(--c-slate-500);
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  position: relative;
  padding: 0.5rem;
  border-radius: 999px;
}

.nav-links a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 1.25rem;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--c-primary);
}

.nav-pill {
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* ========================================= */
/* MOBILE OPTIMIZATION OVERRIDES             */
/* ========================================= */

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--c-slate-900);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

@media (max-width: 900px) {

  /* Navigation Mobile Toggle */
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #book-demo-btn {
    display: none !important;
    /* Hide standard book button to fit hamburger cleanly */
  }

  .nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-xl);
    transform: translateY(-150%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    align-items: center;
    border-radius: 0;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  /* Reset Nav Pill for Mobile */
  .nav-pill {
    display: none !important;
  }

  /* Global Typography Formats */
  h1[style*="font-size"],
  .hero h1 {
    font-size: 2.5rem !important;
    line-height: 1.2 !important;
  }

  h2[style*="font-size: 2.75rem"],
  h2[style*="font-size: 2.5rem"],
  .section-title h2 {
    font-size: 2rem !important;
    line-height: 1.3 !important;
  }

  h2[style*="font-size: 2.25rem"],
  h2[style*="font-size: 2rem"] {
    font-size: 1.75rem !important;
  }

  h3[style*="font-size: 3.5rem"] {
    font-size: 2.5rem !important;
  }

  p[style*="font-size: 1.25rem"],
  p[style*="font-size: 1.125rem"],
  p[style*="font-size: 1.1875rem"] {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* Heavy Spacing Reductions */
  .hero[style*="padding"] {
    padding: 3.5rem 0 3rem !important;
  }

  section[style*="padding: 7rem"],
  section[style*="padding: 6rem"],
  section[style*="padding-bottom: 8rem"],
  section[style*="padding: 8rem"],
  div[style*="padding: 4rem"] {
    padding: 3rem 1.5rem !important;
  }

  .grid-2[style*="gap: 5rem"],
  .grid-2[style*="gap: 3rem"] {
    gap: 2rem !important;
  }

  .feature-card {
    padding: 2rem !important;
  }

  .pt-xs {
    padding-top: 60px;
  }
}

@media (max-width: 640px) {

  h1[style*="font-size"],
  .hero h1 {
    font-size: 2.125rem !important;
  }

  h3[style*="font-size: 3.5rem"] {
    font-size: 2rem !important;
  }

  .footer-bottom {
    margin-top: 2rem;
  }

  /* Fix hardcoded flexbox layout breakage on small screens */
  div[style*="flex: 0 0 160px"] {
    flex: 0 0 100px !important;
  }
}

/* Footer */
.footer {
  background-color: var(--c-slate-900);
  color: var(--c-slate-200);
  padding: 5rem 0 2rem;
}

.footer h3,
.footer h4 {
  color: var(--c-white);
  margin-bottom: 1.5rem;
}

.footer-col p {
  color: var(--c-slate-400);
}

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

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--c-slate-400);
}

.footer-col ul li a:hover {
  color: var(--c-white);
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-slate-800);
  color: var(--c-slate-500);
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
  color: white;
}

/* Utilities */
.text-primary {
  color: var(--c-primary);
}

.text-secondary {
  color: var(--c-secondary);
}

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

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.pt-xs {
  padding-top: 80px;
}

/* For content below fixed navbar */

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0.5rem;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  background: transparent;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-slate-900);
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
}

.faq-icon {
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--c-text-muted);
}

.faq-answer-inner {
  padding-bottom: 1.5rem;
  line-height: 1.6;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Lazy Loading */
.lazy-img {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.lazy-img.loaded {
  opacity: 1;
}

/* Optional: add a subtle scale-up effect */
.lazy-img-scale {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.lazy-img-scale.loaded {
  opacity: 1;
  transform: scale(1);
}