:root {
  color-scheme: light;
  --emerald-950: #064e3b;
  --emerald-900: #065f46;
  --emerald-800: #047857;
  --emerald-700: #059669;
  --emerald-600: #10b981;
  --emerald-500: #34d399;
  --emerald-200: #bbf7d0;
  --emerald-100: #d9f7e8;
  --emerald-50: #ecfdf5;
  --surface: #ffffff;
  --surface-soft: rgba(255,255,255,0.9);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #f0fdf4 0%, #e5fff3 100%);
  color: var(--emerald-950);
}

/* Accessibility: visible focus styles */
*:focus { outline: none; }
*:focus-visible { outline: 3px solid rgba(16,185,129,0.24); outline-offset: 3px; border-radius: 8px; }

.heading {
  font-family: 'Playfair Display', serif;
}

.site-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(16, 185, 129, 0.16);
  backdrop-filter: blur(16px);
}

.site-nav a {
  color: var(--emerald-900);
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--emerald-700);
  transform: translateY(-1px);
}

.site-nav .menu-button {
  color: var(--emerald-900);
}

.site-card,
.card {
  background: var(--surface);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 2rem;
  box-shadow: 0 30px 80px rgba(15, 118, 110, 0.08);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1.75rem;
  border: none;
  padding: 1.15rem 2rem;
  font-weight: 700;
  background: var(--emerald-700);
  color: white;
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.22);
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn-primary:hover {
  background: var(--emerald-900);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1.75rem;
  border: 1px solid rgba(16, 185, 129, 0.16);
  padding: 1.15rem 2rem;
  font-weight: 600;
  background: var(--surface-soft);
  color: var(--emerald-900);
  transition: transform 0.25s ease, background 0.25s ease;
}

.btn-secondary:hover {
  background: var(--surface);
  transform: translateY(-2px);
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.25), rgba(4, 120, 87, 0.9));
}

.feature-card,
.service-card,
.info-card {
  background: var(--surface);
  border-radius: 2rem;
  border: 1px solid rgba(16, 185, 129, 0.14);
  box-shadow: 0 20px 50px rgba(15, 118, 110, 0.08);
}

.btn-link {
  color: var(--emerald-700);
  text-decoration: none;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Improve keyboard focus for links and buttons */
a:focus-visible, button:focus-visible, input:focus-visible { box-shadow: 0 6px 20px rgba(5,150,105,0.12); }

footer {
  background: var(--emerald-950);
  color: rgba(255, 255, 255, 0.88);
}

footer a {
  color: rgba(255, 255, 255, 0.9);
}

footer a:hover {
  color: white;
}

footer .footer-note {
  color: rgba(255, 255, 255, 0.72);
}

input,
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--emerald-700);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* COW LOADING ANIMATION */
.cow-loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.cow-loading-spinner.hidden {
  display: none;
}

.cow-emoji {
  font-size: 120px;
  margin-bottom: 2rem;
  animation: cowBounce 1.5s ease-in-out infinite;
}

@keyframes cowBounce {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  25% {
    transform: translateY(-20px) scale(1.05);
  }
  50% {
    transform: translateY(0px) scale(1);
  }
  75% {
    transform: translateY(-10px) scale(1.02);
  }
}

.loading-text {
  color: white;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  animation: dotPulse 1.5s ease-in-out infinite;
  font-family: 'Inter', sans-serif;
}

@keyframes dotPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading-subtext {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
}

/* CAROUSEL IMAGE ENHANCEMENTS */
.carousel-image {
  filter: brightness(1.12) contrast(1.18) saturate(1.25) hue-rotate(2deg);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.15);
  animation: imageZoom 25s ease-in-out infinite;
}

@keyframes imageZoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* IMAGE ENHANCEMENTS */
img {
  filter: brightness(1.05) contrast(1.1) saturate(1.15);
  transition: filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Video element polish */
video { display: block; width: 100%; height: auto; border-radius: 1rem; background: #000; max-height: 60vh; }
video::cue { background: rgba(0,0,0,0.6); }

.video-fallback { min-height: 220px; background-size: cover; background-position: center; border-radius: 1rem; }
.video-fallback a { text-decoration: none; }

/* Simple loader used for video overlay */
.loader {
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  display: inline-block;
}

/* Cookie consent modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 100000;
}
.cookie-panel {
  background: var(--surface);
  padding: 24px;
  max-width: 760px;
  width: calc(100% - 48px);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(2,86,64,0.18);
  color: var(--emerald-950);
}
.cookie-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:12px; }

/* Install button (floating) */
.install-button {
  position: fixed;
  right: 6px;
  bottom: 6px;
  background: var(--emerald-700);
  color: #fff;
  width: 56px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(5,150,105,0.22);
  z-index: 99999;
  cursor: pointer;
}
.install-button i {
  font-size: 1.2rem;
}

/* Place WhatsApp above install button */
.floating-whatsapp {
  right: 6px;
  bottom: 84px;
  z-index: 99999;
}

#dropdown-menu {
  z-index: 99999;
  display: none;
}

#dropdown-menu.hidden {
  display: none !important;
}

#dropdown-menu:not(.hidden) {
  display: block !important;
}

.site-nav {
  position: relative;
  z-index: 99998;
}

/* iOS install instructions modal */
.install-modal { position: fixed; inset:0; display:flex; align-items:center; justify-content:center; background: rgba(0,0,0,0.45); z-index:100000; }
.install-instructions { background:var(--surface); padding:20px; border-radius:12px; max-width:520px; width:calc(100% - 40px); }

img:hover {
  filter: brightness(1.15) contrast(1.2) saturate(1.3);
  transform: scale(1.02);
}

.bioflow-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 2rem;
  box-shadow: 0 24px 50px rgba(15, 118, 110, 0.08);
}

.bioflow-card .icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-900);
  font-size: 1.5rem;
}

.project-slider-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
}

.project-slider {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 0.25rem;
}

.project-card {
  flex: 0 0 280px;
  min-width: 280px;
  max-width: 320px;
  border-radius: 2rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: 0 24px 80px rgba(15, 118, 110, 0.08);
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-gallery-card {
  width: 100%;
  border-radius: 2rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: 0 24px 80px rgba(15, 118, 110, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.project-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 90px rgba(15, 118, 110, 0.12);
}

.project-card img,
.project-gallery-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.project-card-content,
.project-gallery-card-content {
  padding: 1.5rem;
}

.project-gallery-card {
  display: flex;
  flex-direction: column;
}

.project-gallery-card-content {
  background: rgba(255, 255, 255, 0.94);
}

.slider-button {
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--emerald-900);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.slider-button:hover {
  transform: translateY(-2px);
  background: white;
}

.project-slider-wrapper::-webkit-scrollbar {
  height: 10px;
}

.project-slider-wrapper::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.35);
  border-radius: 999px;
}

/* Promotional poster images */
.max-w-7xl img[alt*="Promotional"] {
  filter: brightness(1.08) contrast(1.12) saturate(1.25) drop-shadow(0 12px 32px rgba(5, 150, 105, 0.18));
  border-radius: 1.5rem;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.15);
}

.max-w-7xl img[alt*="Promotional"]:hover {
  filter: brightness(1.2) contrast(1.25) saturate(1.35) drop-shadow(0 16px 40px rgba(5, 150, 105, 0.25));
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(5, 150, 105, 0.25);
}

/* CEO and team member images */
img[alt*="CEO"],
img[alt*="Samuel"] {
  filter: brightness(1.1) contrast(1.15) saturate(1.2);
  box-shadow: 0 12px 36px rgba(5, 150, 105, 0.2);
}

img[alt*="CEO"]:hover,
img[alt*="Samuel"]:hover {
  filter: brightness(1.2) contrast(1.25) saturate(1.3);
  box-shadow: 0 16px 48px rgba(5, 150, 105, 0.3);
}

/* Project and construction images */
img[alt*="construction"],
img[alt*="Construction"],
img[alt*="project"],
img[alt*="Project"] {
  filter: brightness(1.06) contrast(1.12) saturate(1.18);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.12);
}

@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  img:hover {
    transform: scale(1.01);
  }

  .max-w-7xl img[alt*="Promotional"]:hover {
    transform: translateY(-4px);
  }
}

/* THEME PICKER */
.theme-picker {
  position: fixed;
  /* align with floating WhatsApp button on the right */
  right: 24px;
  /* place above the WhatsApp button so it's visible on load */
  bottom: 96px;
  z-index: 99998;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
}

.theme-toggle {
  background: var(--emerald-700);
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: 0 8px 26px rgba(5,150,105,0.18);
  cursor: pointer;
}

.theme-panel {
  width: 240px;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(15,118,110,0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.theme-panel .panel-header {
  font-weight: 700;
  color: var(--emerald-900);
}

.swatches { display:flex; gap:8px; flex-wrap:wrap; }
.swatch {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 20px rgba(5,150,105,0.08);
  cursor: pointer;
}

.mode-toggle { font-size: 14px; color: var(--emerald-900); }

.hidden { display: none !important; }

/* Dark theme overrides via attribute on root */
[data-theme="dark"] {
  --surface: #071412;
  --surface-soft: rgba(255,255,255,0.03);
  --emerald-950: #ecfdf5;
  --emerald-900: #bbf7d0;
  color-scheme: dark;
}

[data-theme="dark"] body {
  background: linear-gradient(180deg, #02110f 0%, #04221f 100%);
  color: var(--emerald-50);
}

