html,
body {
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

:root {
  --primary: #1A4D2E;
  --primary-container: #2D6A4F;
  --on-primary: #FFFFFF;
  --surface: #FFFFFF;
  --surface-container-low: #F8F9FA;
  --on-surface: #212529;
  --on-surface-variant: #6C757D;
  --outline: #DEE2E6;
  --shadow: rgba(0, 0, 0, 0.08);
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--on-surface);
  background-color: var(--surface);
}

/* =========================================
       FIX: Prevent Flutter engine from locking landing page scroll
       ========================================= */

/* Override Flutter's injected body/html styles before launch */
html:not(.app-launched),
body:not(.app-launched) {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100% !important;
  position: static !important;
  touch-action: pan-y !important;
}

/* Ensure Flutter's glass pane doesn't block touches before launch */
body:not(.app-launched) flt-glass-pane,
body:not(.app-launched) flutter-view,
body:not(.app-launched) .flutter-view {
  pointer-events: none !important;
  touch-action: none !important;
}

/* Re-enable Flutter's native canvas handling after launch */
body.app-launched flt-glass-pane,
body.app-launched flutter-view,
body.app-launched .flutter-view {
  pointer-events: auto !important;
  touch-action: auto !important;
}

#landing-page {
  position: relative;
  z-index: 100;
  background-color: var(--surface);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#landing-page.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 100;
}

.bg-primary-custom {
  background-color: var(--primary) !important;
}

.text-primary-custom {
  color: var(--primary) !important;
}

.bg-surface-low {
  background-color: var(--surface-container-low) !important;
}

.font-serif {
  font-family: 'Merriweather', serif;
}

.btn-demo {
  background-color: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
  padding: 12px 32px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-demo:hover {
  background-color: var(--primary);
  color: var(--on-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 77, 46, 0.2);
}

.hero-section {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.geometric-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--on-primary) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
}

.floating-phone {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }
}

.footer-section {
  padding: 80px 0 40px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-link:hover {
  color: #fff;
  text-decoration: underline;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  color: white;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll.delay-1 {
  transition-delay: 0.1s;
}

.reveal-on-scroll.delay-2 {
  transition-delay: 0.2s;
}

.reveal-on-scroll.delay-3 {
  transition-delay: 0.3s;
}

/* =========================================
       ZIG-ZAG IMAGE CONSTRAINTS
       ========================================= */
.zigzag-img {
  max-height: 600px;
  width: 100%;
  object-fit: contain;
  background: var(--surface-container-low);
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.3s ease;
}

.zigzag-img:hover {
  transform: scale(1.02);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(26, 77, 46, 0.15);
}