/* === Local Poppins font fallback (for file:// protocol) === */
@font-face { font-family: Poppins; font-weight: 300; font-style: normal; src: url("../assets/fonts/Poppins-Light.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 300; font-style: italic; src: url("../assets/fonts/Poppins-LightItalic.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 400; font-style: normal; src: url("../assets/fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 400; font-style: italic; src: url("../assets/fonts/Poppins-Italic.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 500; font-style: normal; src: url("../assets/fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 600; font-style: normal; src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 700; font-style: normal; src: url("../assets/fonts/Poppins-Bold.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 800; font-style: normal; src: url("../assets/fonts/Poppins-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: Poppins; font-weight: 900; font-style: normal; src: url("../assets/fonts/Poppins-Black.ttf") format("truetype"); }

/* === Design tokens === */
:root {
  --color-dark-green: #1F4C11;
  --color-fresh-green: #79A734;
  --color-fresh-green-light: #e8f2d6;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-overlay: rgba(31, 76, 17, 0.75);

  --font-family: "Poppins", sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --max-width: 1200px;
  --nav-height: 72px;
  --border-radius: 8px;
  --transition: 0.3s ease;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background: var(--color-white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  border: none;
  outline: none;
  background: none;
}
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--color-fresh-green);
  outline-offset: 2px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* === Typography === */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: var(--color-gray-900); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; }
p { margin-bottom: var(--space-md); }
.text-light { font-weight: 300; }
.text-medium { font-weight: 500; }

/* === Utilities === */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--color-fresh-green);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-dark-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(31, 76, 17, 0.3);
}
.btn-outline {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-dark-green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  border: 0;
}

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo img {
  height: 72px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-fresh-green);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Nav color states */
.site-nav:not(.scrolled) .nav-links a { color: var(--color-white); }
.site-nav:not(.scrolled) .nav-links a::after { background: var(--color-white); }
.site-nav.scrolled .nav-links a { color: var(--color-gray-700); }
.site-nav.scrolled .nav-links a:hover { color: var(--color-dark-green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  transition: all var(--transition);
}
.site-nav:not(.scrolled) .nav-toggle span { background: var(--color-white); }
.site-nav.scrolled .nav-toggle span { background: var(--color-gray-700); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Footer === */
.site-footer {
  background: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}
.footer-brand img { height: 72px; margin-bottom: var(--space-md); }
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 360px;
  color: var(--color-gray-500);
}
.footer-col h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--color-gray-500);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--color-fresh-green); }

.footer-bottom {
  border-top: 1px solid var(--color-gray-700);
  padding-top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-gray-500);
}

/* === Scroll reveal animation === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* === Cookie Consent Banner === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-lg) var(--space-xl);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}
.cookie-banner p {
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}
.cookie-banner p a {
  color: var(--color-fresh-green);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: var(--space-md);
  flex-shrink: 0;
}
.cookie-actions button {
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.cookie-accept {
  background: var(--color-fresh-green);
  color: var(--color-white);
}
.cookie-accept:hover { background: var(--color-dark-green); }
.cookie-decline {
  background: transparent;
  color: var(--color-gray-400);
  border: 1px solid var(--color-gray-600);
}
.cookie-decline:hover {
  border-color: var(--color-gray-400);
  color: var(--color-gray-200);
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right {
    opacity: 1;
    transform: none;
  }
  html { scroll-behavior: auto; }
}

/* === Responsive === */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .container { padding: 0 var(--space-md); }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--space-3xl);
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.25rem;
    color: var(--color-gray-800) !important;
  }
  .nav-links a::after { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }
}
