﻿/* ── Custom properties ─────────────────────────────────────── */
:root {
  --ink:      #1f2d1f;
  --muted:    #5d6a58;
  --olive:    #253f20;
  --olive-2:  #4f6031;
  --cream:    #f3efe5;
  --card:     #fffdf8;
  --line:     #ddd2bf;
  --shadow:   0 16px 40px rgba(36, 35, 25, .12);
  --purple:   #8d46c1;
  --gold:     #d18700;
}

/* ── Reset ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, sans-serif;
  line-height: 1.5;
  max-width: 100vw;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: Arial, sans-serif;
  color: var(--ink);
  line-height: 1.05;
  margin: 0;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.tracker-page { min-height: 100vh; }

/* ── Top bar ──────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.site-back {
  color: var(--olive);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: color .15s;
}
.site-back:hover { color: var(--olive-2); }
.site-back span { display: flex; align-items: center; gap: 8px; }
.top-bar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-switcher {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--olive);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lang-switcher:hover { background: var(--olive); color: #fff; border-color: var(--olive); }
.soundscape-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.soundscape-toggle:hover { background: var(--olive); color: #fff; border-color: var(--olive); }
.soundscape-toggle.is-playing { background: var(--olive); color: #fff; border-color: var(--olive); }
.soundscape-toggle.is-muted .soundscape-toggle__off { display: inline; }

@media (max-width: 760px) {
  .top-bar { padding: 12px 16px; }
  .site-back { font-size: 13px; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(20, 30, 18, 0.72) 0%,
    rgba(20, 30, 18, 0.45) 60%,
    rgba(20, 30, 18, 0.25) 100%
  );
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 80px 60px;
  color: #fff;
}
.hero__logo {
  width: 240px;
  height: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.hero__content h1 {
  font-size: clamp(38px, 5.5vw, 72px);
  color: #fff;
  line-height: 1.08;
  margin-bottom: 24px;
}
.hero__desc {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: rgba(255,255,255,.88);
  margin: 0 0 36px;
  max-width: 600px;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.button--ghost {
  background: transparent;
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
}
.button--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

@media (max-width: 760px) {
  .hero { min-height: 70vh; }
  .hero__content { padding: 48px 24px; }
  .hero__logo { width: 180px; }
}

/* ── Header ────────────────────────────────────────────────── */
.top-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 22px 28px;
  background: rgba(255, 253, 248, .92);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  position: relative;
  z-index: 3;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 12px;
  font-weight: 800;
}
.brand-lockup img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-lockup span {
  display: block;
  font-size: 10px;
  letter-spacing: .04em;
}
.title-block { text-align: center; }
.title-block h1 { font-size: clamp(34px, 4vw, 58px); }
.title-block p  { margin: .2rem 0 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ───────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 20px;
  text-decoration: none;
  border: 1px solid var(--line);
  font-weight: 800;
  cursor: pointer;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}
.button--primary { background: var(--olive); border-color: var(--olive); color: #fff; }
.button--primary:hover { background: #162911; }
.button--soft { background: #fffaf0; }

/* ── Dashboard layout ──────────────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 22px;
  padding: 22px;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}
.main-area {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.sidebar { display: flex; flex-direction: column; gap: 18px; }

/* ── Shared card shell ─────────────────────────────────────── */
.panel-card,
.bird-card,
.map-card,
.replay-card,
.content-shell,
.final-cta {
  background: rgba(255, 253, 248, .96);
  border: 1px solid rgba(94, 77, 48, .14);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.panel-card { padding: 22px; }

/* ── Form controls ─────────────────────────────────────────── */
.field-label { display: block; font-weight: 800; margin-bottom: 10px; }
.select-field {
  width: 100%;
  appearance: auto;
  border: 1px solid #d6c6ae;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: #111;
  font-size: 16px;
}
.select-field--small { min-width: 150px; padding: 9px 12px; font-size: 14px; }
.period-detail { margin-top: 16px; color: var(--muted); font-size: 15px; }

/* ── Bird card stack ───────────────────────────────────────── */
.bird-card-stack { display: flex; flex-direction: column; gap: 18px; }
.bird-card { padding: 24px; }
.bird-card--error {
  border-color: rgba(180, 40, 40, .3);
  background: rgba(255, 248, 248, .97);
}
.bird-card__top {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}
.bird-card__tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bird-card__share {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--olive);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.bird-card__share:hover {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
}
.bird-card img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}
.bird-card h3 { font-size: 28px; }
.bird-card p  { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.bird-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.bird-card__meta div    { display: grid; gap: 4px; }
.bird-card__meta span   { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bird-card__meta strong { font-size: 14px; }
.bird-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.bird-card__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--cream);
  border-radius: 8px;
  padding: 7px 10px;
}
.bird-card__stat span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bird-card__stat strong {
  font-size: 14px;
  color: var(--ink);
}
.bird-card__stat--wide {
  grid-column: 1 / -1;
}
.bird-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.bird-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 10px;
}


.bird-card__error {
  grid-column: 1 / -1;
  background: rgba(200, 40, 40, .08);
  border: 1px solid rgba(200, 40, 40, .2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #8b1a1a;
}
.bird-card__sponsor,
.stat-bird-card__sponsor {
  margin-top: 14px;
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.bird-card__sponsor:hover,
.stat-bird-card__sponsor:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
.bird-card__sponsor {
  width: 100%;
}
.endangered-badge {
  display: inline-block;
  vertical-align: middle;
  background: #dc2626;
  color: #fff !important;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  line-height: 1;
  margin-left: 6px;
}

/* ── Status dot ────────────────────────────────────────────── */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3cb371;
  margin-top: 4px;
  flex-shrink: 0;
}
.status-dot--error { background: #c0392b; }

/* ── Mode tabs ─────────────────────────────────────────────── */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}
.tab {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab.is-active { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ── Milestone timeline ───────────────────────────────────── */
.milestone-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  position: relative;
}
.milestone-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 18px;
  right: 18px;
  height: 4px;
  background: linear-gradient(90deg, var(--olive), var(--gold));
  border-radius: 2px;
  z-index: 0;
}
.milestone {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 10px;
}
.milestone::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background: var(--olive);
  border: 4px solid #fff;
  border-radius: 50%;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 2px var(--olive);
}
.milestone__date {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--olive);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 10px;
}
.milestone__title {
  font-size: 18px;
  margin-bottom: 8px;
}
.milestone__desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .milestone-timeline { grid-template-columns: 1fr; gap: 28px; }
  .milestone-timeline::before { display: none; }
  .milestone { text-align: left; padding-left: 34px; padding-top: 0; }
  .milestone::before { position: absolute; left: 0; top: 4px; margin: 0; }
  .milestone__date { margin-bottom: 6px; }
}

/* ── Map card ──────────────────────────────────────────────── */
.map-card { position: relative; overflow: hidden; border-radius: 18px; }
.map-canvas { height: 690px; min-height: 520px; background: #ccd7c0; }

/* ── Inset overview map ────────────────────────────────────── */
.inset-map {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 220px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 5;
  background: #ccd7c0;
}

@media (max-width: 760px) {
  .inset-map { display: none; }
}

/* ── Map loading overlay ───────────────────────────────────── */
.map-card > div[id^="map"] {
  width: 100% !important;
  max-width: 100% !important;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 239, 229, .75);
  backdrop-filter: blur(2px);
}
.map-loading[hidden] { display: none; }
.map-loading span {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  box-shadow: var(--shadow);
}

/* ── Map toolbar ───────────────────────────────────────────── */
.map-toolbar {
  position: absolute;
  right: 20px;
  top: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  z-index: 2;
}
.map-toolbar label {
  display: grid;
  gap: 6px;
  background: rgba(255, 253, 248, .95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}
.weather-overlay-btn {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  color: var(--olive);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.weather-overlay-btn:hover, .weather-overlay-btn.is-active {
  background: var(--olive);
  color: #fff;
  border-color: var(--olive);
}
.weather-overlay {
  position: absolute;
  right: 20px;
  top: 120px;
  max-width: 260px;
  background: rgba(255, 253, 248, .96);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  z-index: 2;
  font-size: 14px;
  line-height: 1.5;
}
.weather-overlay code { background: rgba(0,0,0,.05); padding: 2px 4px; border-radius: 4px; }

@media (max-width: 760px) {
  .weather-overlay { position: static; margin: 12px; }
}

/* ── Speed overlay ─────────────────────────────────────────── */
.speed-overlay {
  position: absolute;
  right: 20px;
  bottom: 20px;
  background: rgba(255, 253, 248, .96);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  z-index: 2;
  display: grid;
  gap: 10px;
  min-width: 220px;
}
.speed-overlay span { display: flex; align-items: center; gap: 12px; }
.line { display: inline-block; width: 28px; height: 4px; border-radius: 20px; }
.line--rest { background: #496a3a; }
.line--move { background: #d49b37; }
.line--fast { background: #b83a32; }

/* ── Replay card ───────────────────────────────────────────── */
.replay-card    { margin-top: 14px; padding: 26px; }
.replay-copy h2 { font-size: 32px; }
.replay-copy p  { margin: 8px 0 20px; color: var(--muted); }
.replay-controls {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.speed-select { display: flex; gap: 10px; align-items: center; font-weight: 600; }
#timeSlider { width: 100%; accent-color: var(--olive); cursor: pointer; }
.timeline-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}
.timeline-labels strong          { text-align: center; color: var(--ink); }
.timeline-labels span:last-child { text-align: right; }

/* ── Content shells ────────────────────────────────────────── */
.content-shell { max-width: 1700px; margin: 28px auto; padding: 28px; }
.section-heading { margin-bottom: 32px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 900;
  color: var(--olive-2);
  font-size: 14px;
  margin: 0 0 10px;
}
.section-heading h2,
.final-cta h2 { font-size: clamp(32px, 4vw, 48px); }
.section-heading p { color: var(--muted); max-width: 820px; }

/* ── Stats section ─────────────────────────────────────────── */
.stats-combined {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card__icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card strong {
  display: block;
  font-size: 28px;
  color: var(--olive);
  font-family: Arial, sans-serif;
  line-height: 1.1;
}
.stat-card > span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.stats-birds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.stat-bird-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat-bird-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 14px;
  border-left: 4px solid var(--line);
  margin-bottom: 18px;
}
.stat-bird-card__header > div { min-width: 0; }
.stat-bird-card__header img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.stat-bird-card__header strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
}
.stat-bird-card__header span {
  font-size: 13px;
  color: var(--muted);
}
.stat-bird-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-bird-card__grid div {
  background: var(--cream);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-bird-card__grid div.span-full { grid-column: 1 / -1; }
.stat-bird-card__grid span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.stat-bird-card__grid strong {
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.stat-bird-card__nodata {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  padding: 12px 0;
}

/* ── Collapse toggle ───────────────────────────────────────── */
.collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  gap: 16px;
}
.collapse-toggle__label { flex: 1; }
.collapse-toggle__label .eyebrow { margin-bottom: 6px; }
.collapse-toggle__label h2 { margin: 0; }
.collapse-toggle__icon {
  font-size: 18px;
  color: var(--muted);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.collapse-toggle[aria-expanded="true"] .collapse-toggle__icon {
  transform: rotate(180deg);
}
.collapse-body { margin-top: 24px; }
.collapse-body__desc { color: var(--muted); margin: 0 0 20px; }

/* ── Comparison grid ───────────────────────────────────────── */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.comparison-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 18px; }
.comparison-card h3 { font-size: 26px; margin-bottom: 12px; }
.mini-map { height: 360px; border-radius: 14px; overflow: hidden; background: #ccd7c0; }

/* ── Project intro ─────────────────────────────────────────── */
.project-intro { margin-bottom: 40px; }
.project-intro__lead {
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.7;
  color: var(--ink);
  max-width: 900px;
  margin: 0;
}

/* ── Info grid ─────────────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.info-grid article { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.info-grid h3 { font-family: Arial, sans-serif; font-size: 18px; margin-bottom: 10px; }
.info-grid p  { margin: 0; color: #3f463d; }
.info-grid a  { color: var(--olive); text-decoration: underline; font-weight: 700; }
.info-grid a:hover { color: var(--olive-2); }

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-section { overflow: hidden; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: 100%;
  object-fit: cover;
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 30, 18, .92);
  padding: 40px;
  opacity: 1;
}
.lightbox[hidden] { display: none; }
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.lightbox__caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 16px;
  text-align: center;
  max-width: 700px;
  margin: 0;
  padding: 0 20px;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.3); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Carousel layout: show exactly 3 items at a time */
.gallery-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gallery-carousel__btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--olive);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
  z-index: 2;
}
.gallery-carousel__btn:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: #fff;
}
.gallery-grid--scroll {
  display: flex;
  gap: 18px;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8px 0;
}
.gallery-grid--scroll .gallery-item {
  flex: 0 0 calc((100% - 36px) / 3);
  width: calc((100% - 36px) / 3);
  scroll-snap-align: start;
}
@media (max-width: 760px) {
  .gallery-carousel__btn { display: none; }
  .gallery-grid--scroll {
    overflow-x: auto;
    padding-bottom: 12px;
  }
  .gallery-grid--scroll .gallery-item { width: 260px; flex: 0 0 260px; }
  .lightbox { padding: 12px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* ── Partners logo marquee ─────────────────────────────────── */
.partners { overflow: hidden; }
.logo-marquee {
  margin-top: 28px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.logo-marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.logo-marquee__item {
  flex-shrink: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
a.logo-marquee__item:hover {
  transform: translateY(-2px);
  border-color: var(--olive);
  box-shadow: 0 8px 20px rgba(36, 35, 25, .10);
}
.logo-marquee__item img {
  max-height: 60px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 760px) {
  .logo-marquee__item { height: 64px; }
  .logo-marquee__item img { max-height: 48px; max-width: 130px; }
}

/* ── Newsletter ──────────────────────────────────────────── */
.newsletter-section { text-align: center; }
.newsletter-section__desc {
  max-width: 600px;
  margin: 0 auto 22px;
  color: var(--muted);
}
.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.newsletter-form__input {
  min-width: 280px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
}
.newsletter-form__input:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(103, 125, 61, .15);
}
.newsletter-section__note {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.newsletter-section__message {
  max-width: 600px;
  margin: 0 auto 18px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
}
.newsletter-section__message--success {
  background: #e9f5e9;
  color: #2f5e2f;
}
.newsletter-section__message--error {
  background: #fde8e8;
  color: #9b1c1c;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .newsletter-form__input { min-width: 100%; }
  .newsletter-form .button { width: 100%; }
}

/* ── Final CTA ─────────────────────────────────────────────── */
.final-cta {
  max-width: 1700px;
  margin: 28px auto 60px;
  padding: 38px;
  text-align: center;
  background: linear-gradient(120deg, #efeadc, #fffdf8);
}
.final-cta p { max-width: 780px; margin: 12px auto 24px; color: var(--muted); }

/* ── Google Maps tweaks ────────────────────────────────────── */
.latest-marker-label { font-weight: 900; }
.gm-style .gm-style-iw-c { border-radius: 14px !important; }
.hidden-panel { display: none !important; }

/* ── Responsive: tablet ────────────────────────────────────── */
@media (max-width: 1200px) {
  .top-hero                { grid-template-columns: 1fr; text-align: center; }
  .brand-lockup,
  .hero-actions            { justify-content: center; }
  .dashboard               { grid-template-columns: 1fr; }
  .sidebar                 { display: flex; flex-direction: column; }
  .controls-card           { grid-column: auto; }
  .mode-tabs               { display: flex; overflow-x: auto; }
  .tab                     { flex: 1 0 auto; min-width: 120px; text-align: center; }
  .map-canvas              { height: 520px; }
  .stats-combined,
  .info-grid               { grid-template-columns: repeat(2, 1fr); }
  .stats-birds             { grid-template-columns: 1fr; }
}

/* ── Responsive: mobile ────────────────────────────────────── */
@media (max-width: 760px) {
  .hero { min-height: 60vh; }
  .hero__content { padding: 40px 20px; }
  .hero__content h1 { font-size: clamp(30px, 9vw, 42px); }
  .hero__desc { font-size: 16px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .button { width: 100%; text-align: center; }
  .top-hero              { padding: 18px; }
  .button                { width: 100%; min-height: 48px; }
  .dashboard {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
  }
  .main-area,
  .sidebar               { min-width: 0; width: 100%; }
  .bird-card,
  .panel-card,
  .map-card,
  .replay-card           { width: 100%; max-width: 100%; }
  .mode-tabs             { display: flex; overflow-x: auto; }
  .tab                   { min-width: 110px; flex: 1 0 auto; text-align: center; }
  .map-canvas            { height: 55vh; min-height: 280px; max-height: 420px; }
  .map-card { overflow: hidden; }
  .map-toolbar           { position: static; padding: 12px; display: grid; background: #fff; }
  .speed-overlay         { position: static; margin: 12px; }
  .replay-card           { padding: 18px; }
  .replay-controls       { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .replay-controls .button { width: 100%; }
  .speed-select { grid-column: 1 / -1; justify-content: space-between; }
  .timeline-labels       { font-size: 13px; }
  .stats-combined,
  .stats-birds,
  .comparison-grid,
  .info-grid             { grid-template-columns: 1fr; }
  .stat-card { padding: 18px; }
  .stat-card strong { font-size: 24px; }
  .stat-bird-card__grid { grid-template-columns: 1fr; }
  .content-shell,
  .final-cta             { margin: 16px 12px; padding: 20px; }
  .project-intro__lead { font-size: 16px; }
  .collapse-toggle { align-items: flex-start; gap: 10px; }
  .collapse-toggle__label h2 { font-size: 24px; }
  .bird-card__top        { grid-template-columns: 56px 1fr auto; }
  .bird-card img         { width: 52px; height: 52px; }
  .bird-card h3          { font-size: 20px; }
  .bird-card__stats { grid-template-columns: 1fr; }
  .bird-card__meta { grid-template-columns: 1fr; }
}
