/* Kit SOHMA - Apple & OpenAI Inspired Agronomic Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #090c0a;
  --bg-secondary: #101712;
  --bg-glass: rgba(16, 24, 18, 0.8);
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(34, 197, 94, 0.3);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent-green: #22c55e;
  --accent-emerald: #10b981;
  --accent-soil: #d97706;
  --accent-glow: rgba(34, 197, 94, 0.18);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism */
.glass-panel {
  background: rgba(16, 24, 18, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(34, 197, 94, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.6), 0 0 24px 0 rgba(34, 197, 94, 0.12);
}

.glass-nav {
  background: rgba(9, 12, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gradients & Glows */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #86efac 0%, #22c55e 50%, #15803d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-emerald {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-soil {
  background: radial-gradient(circle, rgba(217, 119, 6, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Custom Buttons */
.btn-apple-primary {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #ffffff;
  font-weight: 600;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35);
}

.btn-apple-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.5);
}

.btn-apple-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 500;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.btn-apple-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 3px;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  transition: all 0.2s ease;
  cursor: pointer;
}

.lang-btn.active {
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #090c0a;
}
::-webkit-scrollbar-thumb {
  background: #1e2923;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2d3f35;
}

/* Leaflet Custom Pins */
.custom-leaflet-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(34, 197, 94, 0.95);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.9);
  animation: pulse-marker 2.2s infinite;
}

.custom-leaflet-marker::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
}

@keyframes pulse-marker {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.leaflet-popup-content-wrapper {
  background: rgba(16, 24, 18, 0.95) !important;
  color: #f3f4f6 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 12px !important;
  backdrop-filter: blur(10px);
}

.leaflet-popup-tip {
  background: rgba(16, 24, 18, 0.95) !important;
}

/* Lightbox Modal */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
}

/* =========================================================
   LIGHT THEME OVERRIDES (ALTO CONTRASTE EM FUNDO CLARO)
   ========================================================= */
html.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-card: #ffffff;
  --border-glass: rgba(0, 0, 0, 0.1);
  --border-highlight: rgba(21, 128, 61, 0.4);
  --text-main: #0f172a;
  --text-muted: #334155;
}

html.light body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html.light h1, html.light h2, html.light h3, html.light h4, html.light h5, html.light h6 {
  color: #0f172a !important;
}

html.light p {
  color: #1e293b !important;
}

html.light .glass-nav {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

html.light .glass-panel {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08) !important;
}

html.light .glass-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06) !important;
}

html.light .glass-card:hover {
  background: #ffffff !important;
  border-color: #16a34a !important;
  box-shadow: 0 12px 28px -6px rgba(34, 197, 94, 0.22) !important;
}

html.light .hero-video-overlay {
  background: linear-gradient(to top, #f8fafc 0%, rgba(248, 250, 252, 0.92) 50%, rgba(248, 250, 252, 0.6) 100%) !important;
}

html.light .text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.light .text-white {
  color: #0f172a !important;
}

html.light .text-gray-100 {
  color: #0f172a !important;
}

html.light .text-gray-200 {
  color: #1e293b !important;
}

html.light .text-gray-300 {
  color: #334155 !important;
}

html.light .text-gray-400 {
  color: #475569 !important;
}

html.light .text-gray-500 {
  color: #64748b !important;
}

html.light .bg-\[\#090c0a\],
html.light .bg-\[\#101712\],
html.light .bg-\[\#0e1611\] {
  background-color: #f8fafc !important;
}

html.light .bg-black\/40,
html.light .bg-black\/60,
html.light .bg-black\/70,
html.light .bg-black\/80 {
  background-color: rgba(241, 245, 249, 0.95) !important;
}

html.light .bg-white\/5,
html.light .bg-white\/10,
html.light .bg-white\/\[0\.01\],
html.light .bg-white\/\[0\.02\] {
  background-color: #f1f5f9 !important;
}

html.light .border-white\/5,
html.light .border-white\/10,
html.light .border-white\/15,
html.light .border-white\/20 {
  border-color: #cbd5e1 !important;
}

html.light .btn-apple-secondary {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light .btn-apple-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
}

html.light .lang-switcher,
html.light .theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light footer {
  background-color: #f1f5f9 !important;
  border-top-color: #cbd5e1 !important;
  color: #334155 !important;
}

html.light footer .text-white {
  color: #0f172a !important;
}

html.light footer .text-gray-300,
html.light footer .text-gray-400 {
  color: #334155 !important;
}

html.light .leaflet-popup-content-wrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

html.light .leaflet-popup-tip {
  background: #ffffff !important;
}

/* Ensure background hero video has soft opacity in light mode while card video players remain 100% full opacity */
html.light .hero-bg-video video {
  opacity: 0.15 !important;
}

html.light .aspect-video video {
  opacity: 1 !important;
}

html.light input,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94a3b8 !important;
}

html.light ::-webkit-scrollbar-track {
  background: #f8fafc;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

/* Apoiadores: placa clara atrás dos logos (cores originais legíveis no tema escuro) */
.logo-plate {
  background: #f3f6f4;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.group:hover .logo-plate { transform: scale(1.02); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(34, 197, 94, 0.18); }
html.light .logo-plate { background: #ffffff; box-shadow: inset 0 0 0 1px #e2e8f0; }

/* Topo no celular: idioma vai para o menu em telas estreitas e os botões ficam mais compactos */
.lang-drawer { display: none; }
@media (max-width: 639px) {
  .lang-btn { padding: 4px 9px; }
  header .theme-toggle-btn { padding: 0.35rem 0.6rem; }
}
@media (max-width: 459px) {
  .lang-header { display: none; }
  .lang-drawer { display: flex; }
}
/* nada passa da largura da tela no celular (os brilhos decorativos de 600px alargavam a página para 520px) */
html, body { overflow-x: hidden; }
.glow-bg { max-width: 100vw; }
