/* Custom Styling for Let's Plant Web Platform */

/* Hide browser default native password reveal/clear buttons (Microsoft Edge & Chromium) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

@layer base {
  body {
    background-color: #f4f6f8;
    color: #1e293b;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  }
}

/* Glassmorphism Styles */
.glass-nav {
  background: rgba(244, 246, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.05);
}

.glass-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(16, 185, 129, 0.1), 0 8px 10px -6px rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.4);
}

/* Gradient Presets */
.gradient-eco {
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

.gradient-eco-subtle {
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 40%),
              radial-gradient(circle at bottom left, rgba(13, 148, 136, 0.1), transparent 40%);
}

/* Sensor Pulsing Animation */
@keyframes sensorPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.animate-sensor-pulse {
  animation: sensorPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Tab Management */
.tab-content {
  display: none !important;
}

.tab-content.active {
  display: block !important;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal Backdrops */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
}

/* CCTV Screen Effects */
.cctv-screen {
  position: relative;
  background-color: #000;
  overflow: hidden;
}

.cctv-scanlines {
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
  pointer-events: none;
}

.cctv-rec-dot {
  animation: recBlink 1.2s infinite;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Certificate Styles */
.certificate-container {
  background: #fdfbf7;
  border: 12px solid #e8dec8;
  outline: 2px solid #b39b6b;
  position: relative;
}

.certificate-border-inner {
  border: 2px dashed #b39b6b;
}

.certificate-seal {
  background: radial-gradient(circle, #f59e0b 0%, #b45309 100%);
  box-shadow: 0 4px 15px rgba(180, 83, 9, 0.4);
}

@media print {
  body * {
    visibility: hidden;
  }
  #certificate-print-area, #certificate-print-area * {
    visibility: visible;
  }
  #certificate-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}

/* ========================================================= */
/* LIVE FARM ACTIVITY ANIMATION SYSTEM                       */
/* ========================================================= */

.farm-scene-box {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Animated Clouds */
@keyframes cloudDrift {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.anim-cloud-1 {
  animation: cloudDrift 28s linear infinite;
}

.anim-cloud-2 {
  animation: cloudDrift 42s linear infinite;
  animation-delay: -14s;
}

/* Animated Sun & Atmospheric Lighting */
@keyframes sunGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.7)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 26px rgba(251, 191, 36, 0.95)); }
}

.anim-sun {
  animation: sunGlow 4s ease-in-out infinite;
}

/* Atmospheric Egret / Bird Flight */
@keyframes birdFlight {
  0% { transform: translate(-80px, 15px) scale(0.6); opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { transform: translate(750px, -20px) scale(0.7); opacity: 0; }
}

.anim-bird-flight {
  animation: birdFlight 18s linear infinite;
}

/* Dragonfly Fluttering */
@keyframes dragonflyHover {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(25px, -12px) rotate(8deg); }
  50% { transform: translate(10px, -20px) rotate(-6deg); }
  75% { transform: translate(-15px, -8px) rotate(4deg); }
}

.anim-dragonfly {
  animation: dragonflyHover 5s ease-in-out infinite;
}

/* Animated Rice Stalks Natural Wind Breeze */
@keyframes riceSwayNatural {
  0%, 100% { transform: rotate(0deg) skewX(0deg); }
  30% { transform: rotate(4deg) skewX(3deg); }
  65% { transform: rotate(-3.5deg) skewX(-2.5deg); }
}

@keyframes riceSwayAltNatural {
  0%, 100% { transform: rotate(0deg) skewX(0deg); }
  35% { transform: rotate(-4.5deg) skewX(-3deg); }
  70% { transform: rotate(3deg) skewX(2deg); }
}

.anim-rice-stalk {
  transform-origin: bottom center;
  animation: riceSwayNatural 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.anim-rice-stalk-alt {
  transform-origin: bottom center;
  animation: riceSwayAltNatural 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* Water Gleam & Specular Shimmer */
@keyframes waterGleam {
  0%, 100% { opacity: 0.3; transform: scaleX(0.95); }
  50% { opacity: 0.85; transform: scaleX(1.05); }
}

.anim-water-gleam {
  animation: waterGleam 2.5s ease-in-out infinite;
}

/* Water Wave Ripple */
@keyframes waterFlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.anim-water-ripple {
  animation: waterFlow 7s linear infinite;
}

/* Harvester Tractor Driving Smoothly Across Field */
@keyframes harvesterDrive {
  0% { transform: translateX(-120%); }
  46% { transform: translateX(15%); }
  50% { transform: translateX(15%) scaleX(1); }
  53% { transform: translateX(15%) scaleX(-1); }
  96% { transform: translateX(-120%) scaleX(-1); }
  100% { transform: translateX(-120%) scaleX(1); }
}

.anim-harvester {
  animation: harvesterDrive 16s ease-in-out infinite;
}

/* Rotating Harvester Blade */
@keyframes rotateBlade {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.anim-blade {
  transform-origin: center center;
  animation: rotateBlade 0.7s linear infinite;
}

/* Grain Flying Particles */
@keyframes grainFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(18px, -28px) scale(1.4); opacity: 0.9; }
  100% { transform: translate(36px, -6px) scale(0.5); opacity: 0; }
}

.anim-grain-1 { animation: grainFly 0.85s ease-out infinite; }
.anim-grain-2 { animation: grainFly 1.05s ease-out infinite 0.25s; }
.anim-grain-3 { animation: grainFly 0.95s ease-out infinite 0.5s; }

/* Drone Hovering with Smooth Micro-adjustments */
@keyframes droneFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -10px) rotate(2deg); }
  50% { transform: translate(30px, -4px) rotate(-1deg); }
  75% { transform: translate(12px, -8px) rotate(1.5deg); }
}

.anim-drone {
  animation: droneFloat 4.5s ease-in-out infinite;
}

/* Drone Propellers High Speed Spin */
@keyframes spinPropeller {
  0% { transform: scaleX(1) rotate(0deg); }
  50% { transform: scaleX(0.1) rotate(180deg); }
  100% { transform: scaleX(1) rotate(360deg); }
}

.anim-propeller {
  transform-origin: center;
  animation: spinPropeller 0.09s linear infinite;
}

/* Mist Spray Spraying */
@keyframes mistFalling {
  0% { opacity: 0; transform: translateY(0) scaleX(0.5); }
  25% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(65px) scaleX(2.2); }
}

.anim-mist {
  animation: mistFalling 1.2s ease-out infinite;
}

/* Farmer on Bund / Inspecting Animation */
@keyframes farmerInspect {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-1deg); }
}

.anim-farmer {
  animation: farmerInspect 2.2s ease-in-out infinite;
}

/* AWD Sensor Signal Radar Beacon */
@keyframes sensorBeacon {
  0% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.6); opacity: 0.3; }
  100% { transform: scale(2.2); opacity: 0; }
}

.anim-sensor-beacon {
  animation: sensorBeacon 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* ========================================================= */
/* APPLE IPHONE 17 PRO DESIGN SYSTEM STYLES (LIGHT & DARK)   */
/* ========================================================= */

.apple-light-canvas {
  background-color: #f4f6f8;
  color: #1d1d1f;
}

.apple-light-subnav {
  background: rgba(244, 246, 248, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.apple-light-headline {
  color: #1d1d1f;
  letter-spacing: -0.03em;
}

.apple-light-bento-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 2rem;
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-light-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.12);
}

.apple-light-section-alt {
  background-color: #ebf0f4;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-dark-canvas {
  background-color: #000000;
  color: #f5f5f7;
}

.apple-headline-gradient {
  background: linear-gradient(180deg, #1d1d1f 0%, #6e6e73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apple-emerald-gradient {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apple-gold-gradient {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.apple-subnav {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.apple-bento-card {
  background: rgba(18, 22, 20, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 20px 40px -15px rgba(16, 185, 129, 0.18), inset 0 0 20px rgba(16, 185, 129, 0.05);
}

.apple-pill-btn {
  border-radius: 9999px;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-pill-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.apple-pill-btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  transform: scale(1.02);
  box-shadow: 0 0 35px rgba(52, 211, 153, 0.6);
}

.apple-pill-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.apple-pill-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.02);
}

/* Realistic iPhone 17 Pro Hardware Mockup */
.iphone-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  background: #000000;
  border-radius: 54px;
  padding: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 
              0 0 0 2px rgba(255, 255, 255, 0.15),
              0 0 40px rgba(16, 185, 129, 0.15);
  border: 4px solid #2a2e2b;
}

.iphone-screen {
  background: #0a0e0c;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000000;
  border-radius: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.dynamic-island-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Ambient Radial Lighting */
.ambient-glow-emerald {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0) 70%);
  pointer-events: none;
  filter: blur(40px);
}

.ambient-glow-teal {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, rgba(20, 184, 166, 0) 70%);
  pointer-events: none;
  filter: blur(40px);
}

/* ========================================================= */
/* COOKIE CONSENT BANNER                                      */
/* ========================================================= */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
  opacity: 0;
}

.cookie-consent-banner.cookie-banner-visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-consent-inner {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 -8px 40px -10px rgba(0, 0, 0, 0.12);
}

/* ========================================================= */
/* RISK DISCLAIMER BANNER                                     */
/* ========================================================= */

.risk-disclaimer {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
  border: 1px solid #fbbf24;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.risk-disclaimer-text {
  color: #92400e;
  font-size: 0.6875rem;
  line-height: 1.6;
}

/* ========================================================= */
/* SCROLL ANIMATIONS                                          */
/* ========================================================= */

.scroll-hidden {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================================= */
/* FAQ ACCORDION                                               */
/* ========================================================= */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.35s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-answer.faq-open {
  max-height: 500px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-question.active .faq-chevron {
  transform: rotate(180deg);
}

/* ========================================================= */
/* LEGAL PAGES (Privacy, Terms)                                */
/* ========================================================= */

.legal-content h3 {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.legal-content h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p, .legal-content li {
  font-size: 0.8125rem;
  line-height: 1.8;
  color: #475569;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.legal-content ul li {
  margin-bottom: 0.25rem;
}

/* ========================================================= */
/* MOBILE RESPONSIVE IMPROVEMENTS                              */
/* ========================================================= */

/* Safe Area for iPhone notch / Dynamic Island */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .cookie-consent-inner {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  footer {
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
  }
}

/* Minimum touch targets (44x44px) for accessibility */
@media (max-width: 768px) {
  button, a, [role="button"], input[type="submit"] {
    min-height: 44px;
  }

  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Prevent horizontal overflow on mobile */
  body {
    overflow-x: hidden;
  }

  /* Better modal sizing on mobile */
  .modal-backdrop > div {
    max-height: 95vh;
    margin: 0.5rem;
  }

  /* Larger text on very small screens */
  .text-\[10px\], .text-\[11px\] {
    font-size: 0.75rem;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  .text-4xl {
    font-size: 1.75rem;
  }

  .text-3xl {
    font-size: 1.5rem;
  }
}

/* ========================================================= */
/* FIREFOX SCROLLBAR                                           */
/* ========================================================= */

* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ========================================================= */
/* ACCESSIBILITY: Focus Rings & Keyboard Navigation            */
/* ========================================================= */

*:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Skip to content (screen readers) */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 0;
  background: #059669;
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 0.75rem 0;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ========================================================= */
/* ENHANCED PRINT STYLES                                       */
/* ========================================================= */

@media print {
  .cookie-consent-banner,
  .glass-nav,
  #mobile-menu,
  #toast-container,
  .modal-backdrop,
  footer,
  button,
  .apple-light-subnav {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .tab-content {
    display: block !important;
    page-break-inside: avoid;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

