@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;800;900&display=swap');

:root {
  /* Typography */
  --font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;
  --line-height-tight: 1.2;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --radius: 12px;

  /* Color Palette (CD33 variant) */
  --color-bg: #091210;            /* dark forest backdrop */
  --color-bg-alt: #0a1b15;
  --color-bg-card: #0f1f18;
  --color-primary: #39D353;        /* emerald-green (lime family) as primary */
  --color-secondary: #39D3A5;      /* accent minty for depth */
  --color-accent: #FFA500;          /* electric amber */
  --color-text: #E8F0EC;            /* near-white for dark background */
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #1A1A1A;  /* contrast on dark primary (lime) */
  --color-border: rgba(255,255,255,0.22);
  --color-shadow: rgba(0,0,0,0.5);

  /* Layout helpers */
  --gap: 1.25rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto; /* required at every breakpoint */
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container { max-width: 960px; padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; }
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  min-height: 64px;
  overflow: visible;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
  justify-content: flex-start;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* Mobile navigation controls */
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: 0.2s ease;
}
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.nav-toggle-input:checked ~ .site-nav { display: block; }

/* Nav list and items */
.nav-list {
  display: flex;
  flex-direction: column; /* mobile default vertical stacking */
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-item { list-style: none; }

/* Desktop/Tablet: nav links styling (tablet/desktop override later) */
.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-xs);
  padding: 0.75rem 1rem;
  display: block;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.nav-link:hover { text-decoration: underline; color: #ffffff; }

/* Dropdown nav base */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; white-space: nowrap; padding: 0.75rem 1rem; display: block; color: var(--color-text); text-decoration: none; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--color-shadow);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
}
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* Mobile adjustments for dropdown */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  .nav-list { flex-direction: column; }
  .site-nav { display: block; }
  .site-header .container { align-items: center; }
  .nav-link { font-size: var(--font-size-xs); }
}

/* Tablet/Desktop adjustments (hamburger hidden, nav centralized) */
@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-centered */
  .site-header .container { justify-content: flex-start; }
  .site-nav { flex: 1; display: flex; align-items: center; justify-content: center; }
  .nav-list { flex-direction: row !important; justify-content: center; flex-wrap: nowrap; gap: 1.5rem; padding: 0; margin: 0; list-style: none; }
  .nav-toggle-label { display: none !important; }

  /* nav-link sizing on tablet/desktop */
  .nav-link { font-size: var(--font-size-sm); }

  /* ensure container centers on larger screens */
  .container { margin: 0 auto; }
  /* dropdown menu behavior on desktop stays as-is via hover/focus-within rules */
}

/* Hero section */
.hero {
  width: 100%;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.2)), var(--color-bg);
  color: #fff;
}
.hero-content { text-align: center; }
.hero h1 {
  font-size: var(--font-size-hero);
  line-height: var(--line-height-tight);
  margin: 0 0 1rem;
  color: #fff;
}
.hero p { color: #F2F7F2; opacity: 0.95; margin: 0 0 1.25rem; font-size: var(--font-size-md); }
.hero-cta { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; margin-top: 0.5rem; }
.hero-stat { text-align: center; min-width: 80px; }
.hero-stat strong { display: block; font-size: 2rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.hero-stat span { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Hero responsive tweaks */
@media (max-width: 767px) {
  .hero-stats { gap: 1.5rem; }
  .hero-stat strong { font-size: 1.5rem; }
  .hero h1 { font-size: calc(var(--font-size-hero) * 0.9); }
}

/* Card system */
.card {
  display: flex;
  flex-direction: column; /* MANDATORY per spec */
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile single column by default (base) */
  gap: var(--gap);
  align-items: stretch;
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* Section utilities */
.section { padding: 2rem 0; }
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(0.95); }
.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }

/* Site footer */
.site-footer {
  background: #0a1410;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* FAQ accordion (CSS-only) */
.faq-section { padding: 2rem 0; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item[open] { border-color: var(--color-primary); box-shadow: 0 2px 12px var(--color-shadow); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] > .faq-question::after { content: "−"; transform: rotate(0.25turn); }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p { margin: 0.75rem 0 0; color: var(--color-text-muted); line-height: var(--line-height-base); }

/* Form elements */
label { display: inline-block; margin-bottom: 0.25rem; color: var(--color-text); }
input,
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(57,211,83,0.25);
}
.field { margin-bottom: 1rem; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.5rem; border-bottom: 1px solid var(--color-border); }

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.hidden { display: none; }

/* Accessibility helpers for focus visibility (keyboard) */
:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Ensure container remains centered on all breakpoints (explicit requirement) */
@media (min-width: 0px) {
  .container { margin-left: auto; margin-right: auto; }
}

/* Ensure hero text remains high-contrast on dark backgrounds (per contrast mandate) */
.hero, .hero * { color: #fff; }

/* Ensure hero-specific responsive behavior for typography (mobile scales down) */
@media (max-width: 767px) {
  .hero { padding: 2.5rem 1rem; min-height: 48vh; }
  .hero h1 { font-size: calc(var(--font-size-hero) * 0.65); }
}