:root {
  /* Nature-themed palette */
  --bg: #072a1f; /* deep forest green */
  --bg-alt: #0f3a2b; /* slightly lighter green-teal */
  --card: #123022; /* cards / panels */
  --accent: #9fe448; /* bright leaf green accent */
  --accent-soft: rgba(159, 228, 72, 0.12);
  --text: #f5f7fa;
  --muted: #9ba4b4;
  --border: #242a33;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --max-width: 1100px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, var(--bg-alt) 0%, var(--bg) 60%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(5, 6, 9, 0.94),
    rgba(5, 6, 9, 0.75),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.logo-main {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
}

.logo-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Nav */

.nav {
  position: relative;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Header ALE logo: keep display only; sizing and visual style handled by .brand-logo */
.header-ale-logo {
  display: block;
}

/* Header brand: ALE + HABITAT | BAC */
.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-ale {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-habitat-text {
  font-weight: 700;
  color: var(--muted);
}

.header-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

.header-bac {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* unified brand logo sizing */
.brand-logo {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.04);
  background: #fff;
}

.header-bac-logo {
  /* keep additional styling but size is controlled by .brand-logo */
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.04);
  background: #fff;
}

.brand-text, .header-bac-text {
  font-weight: 700;
  color: var(--muted);
}


/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 4vw, 3.3rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}

.hero-text p {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Center and contain hero image across breakpoints */
.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
}

.hero-image img {
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: cover;
  display: block;
}

/* On small screens keep some padding so image doesn't touch edges */
@media (max-width: 800px) {
  .hero-image img {
    width: 100%;
    padding: 0 6vw;
    box-sizing: border-box;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #041104;
  border-color: var(--accent);
}

.btn.primary:hover {
  background: #a5f252;
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}

.btn.secondary:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
}

/* Sections */

.section {
  padding: 3.5rem 0;
  background: transparent;
}

.section-alt {
  background: radial-gradient(circle at top, #11161f 0, #050609 60%);
}

.section h2 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 2rem;
}

/* Grid */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.key-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.key-list li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

/* Inline logo next to BAC line in contact */
.bac-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

.inline-logo {
  width: 64px;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.04);
}

/* ALE project line (used in header/footer) */
.ale-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
  color: var(--muted);
}

.ale-text {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* Footer brand area */
.footer-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.footer-logo {
  width: 72px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.04);
}

.footer-ale-text, .footer-bac-text {
  color: var(--muted);
}

.footer-sep {
  width: 1px;
  height: 42px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

/* Responsive tweaks for brand logos */
@media (max-width: 800px) {
  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .footer-logo {
    width: 56px;
  }

  .footer-sep, .header-sep {
    height: 28px;
  }
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  border-radius: var(--radius-sm);
}

.gallery-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* CSS-only lightbox (anchor + :target) overlay */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 3, 0.85);
  padding: 3vh 3vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-in-out;
  z-index: 2000;
}
.lightbox:target {
  opacity: 1;
  pointer-events: auto;
}
.lightbox .lightbox-inner {
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}
.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.06);
}
.lightbox .caption {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--text);
  background: rgba(0,0,0,0.35);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.04);
}

/* Downloads */

.downloads-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.download-card {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.2rem;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

.download-card:hover {
  border-color: var(--accent-soft);
}

.download-title {
  font-weight: 600;
}

.download-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Contact */

.contact-form {
  display: grid;
  gap: 0.65rem;
  background: var(--card);
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.contact-form label {
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #06080d;
  color: var(--text);
  font-size: 0.9rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
}

.form-note {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 0 2rem;
  background: #04060a;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-small {
  opacity: 0.8;
}

/* Responsive */

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    right: 0;
    top: 110%;
    flex-direction: column;
    background: #05070c;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55);
    min-width: 180px;
    display: none;
  }

  .nav-links.nav-open {
    display: flex;
  }
  .brand-logo {
    width: 48px;
  }
}
