/* Citizen Science Learning Center — mobile-first stylesheet */
:root {
  --sky: #72cfea;
  --sky-light: #e6f6fb;
  --water: #0e6e8c;
  --deep: #0b3b4a;
  --leaf: #3f8f4e;
  --ink: #1d2a30;
  --muted: #55666e;
  --paper: #ffffff;
  --sand: #f6f8f7;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(11, 59, 74, .08);
  --tap: 48px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); }
h1, h2, h3 { line-height: 1.2; color: var(--deep); margin: 0 0 .5em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--deep); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--sky);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 14px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap;
}
.logo img { height: 38px; width: auto; }
.menu-btn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--deep); border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem; padding: 0 16px; cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }
.site-nav { display: none; background: #fff; border-top: 1px solid rgba(0,0,0,.06); flex: 0 0 calc(100% + 28px); margin: 8px -14px -8px; }
.site-nav.open { display: block; max-height: calc(100vh - 54px); overflow-y: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 6px 0 14px; }
.site-nav a {
  display: block; padding: 13px 20px; text-decoration: none; color: var(--ink);
  font-weight: 600; border-bottom: 1px solid #eef2f3;
}
.site-nav a[aria-current="page"] { color: var(--water); background: var(--sky-light); }
.site-nav .sub a { font-weight: 400; padding-left: 36px; font-size: .95rem; color: var(--muted); }
.nav-cta { display: flex; gap: 10px; padding: 14px 20px 4px; }
.nav-cta a { flex: 1; text-align: center; border: 0; border-radius: 999px; padding: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: 1rem; border: 2px solid transparent;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--water); color: #fff !important; }
.btn-light { background: #fff; color: var(--deep) !important; }
.btn-outline { background: transparent; color: var(--water) !important; border-color: var(--water); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-block { width: 100%; }

/* ---------- Layout ---------- */
main { display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 18px; }
.section { padding: 40px 0; }
.section.alt { background: var(--sand); }
.lead { font-size: 1.1rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--leaf); margin-bottom: .4em; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--deep); }
.hero img { width: 100%; height: 62vh; min-height: 360px; max-height: 620px; object-fit: cover; opacity: .55; }
.hero .hero-text { position: absolute; inset: auto 0 0 0; padding: 26px 18px 30px; background: linear-gradient(transparent, rgba(5,30,38,.85) 45%); }
.hero h1 { color: #fff; font-size: 2rem; }
.hero blockquote { margin: 0 0 18px; font-size: 1.08rem; font-style: italic; }
.page-hero { background: var(--sky-light); padding: 34px 0 26px; }
.page-hero h1 { margin-bottom: .2em; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 16px; }
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid #e8eef0;
}
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card .card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card .card-body p:last-child { margin-bottom: 0; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; padding-top: 6px; }
a.card { text-decoration: none; color: inherit; }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.stat-strip div { background: #fff; border-radius: 12px; padding: 14px 6px; box-shadow: var(--shadow); }
.stat-strip strong { display: block; font-size: 1.5rem; color: var(--water); }
.stat-strip span { font-size: .8rem; color: var(--muted); line-height: 1.3; display: block; }

/* ---------- Projects ---------- */
.project { scroll-margin-top: 70px; }
.project + .project { border-top: 1px solid #e3eaec; }
.project img { border-radius: var(--radius); margin-bottom: 18px; width: 100%; max-height: 380px; object-fit: cover; }
.callout { background: var(--sky-light); border-left: 4px solid var(--water); padding: 16px; border-radius: 10px; margin: 1em 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: 0 0 auto; padding: 9px 14px; background: #fff; border: 1px solid #cfe2e8; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }

/* ---------- People ---------- */
.people { display: grid; gap: 16px; }
.person { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid #e8eef0; }
.person img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: 0 0 84px; background: var(--sky-light); }
.person h3 { margin-bottom: .1em; }
.person .role { color: var(--leaf); font-weight: 700; font-size: .9rem; margin-bottom: .5em; }
.person p { font-size: .95rem; margin: 0; }

/* ---------- Lists ---------- */
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.link-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: #fff; border-radius: 12px; border: 1px solid #e3eaec;
  text-decoration: none; color: var(--ink); font-weight: 600; min-height: var(--tap);
}
.link-list a::after { content: "›"; font-size: 1.4rem; color: var(--water); line-height: 1; }
.link-list small { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 12px; right: 12px; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: #fff; font-size: 1.4rem; cursor: pointer; }

/* ---------- Forms ---------- */
form .field { margin-bottom: 16px; }
label, legend { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #b9cdd3;
  border-radius: 10px; background: #fff; min-height: var(--tap);
}
textarea { min-height: 110px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.checks { display: grid; gap: 4px; }
.checks label { display: flex; align-items: center; gap: 10px; font-weight: 400; min-height: 40px; margin: 0; }
.checks input { width: 22px; height: 22px; accent-color: var(--water); }
.req { color: #b3261e; }
.hidden { display: none; }

/* ---------- Donate ---------- */
.donate-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid #e3eaec; }
.address { font-style: normal; background: var(--sand); padding: 14px 16px; border-radius: 10px; }
.sponsor { text-align: center; }
.sponsor img { max-width: 240px; margin: 0 auto 12px; aspect-ratio: auto; object-fit: contain; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: #d7e7ec; padding: 36px 0 90px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.1rem; }
.footer-grid { display: grid; gap: 26px; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 40px; word-break: break-all; }
.contact-list svg, .social svg { width: 22px; height: 22px; flex: 0 0 22px; fill: currentColor; }
.social { display: flex; gap: 12px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 50%; background: rgba(255,255,255,.12); }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-links a { display: block; padding: 6px 0; text-decoration: none; }
.fine { margin-top: 26px; font-size: .82rem; color: #9fbcc5; }

/* Sticky action bar on phones */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: #fff; border-top: 1px solid #dbe5e8; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.action-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--deep); font-size: .75rem; font-weight: 700; min-height: var(--tap); }
.action-bar svg { width: 22px; height: 22px; fill: var(--water); }
.action-bar a.donate { color: #fff; background: var(--water); border-radius: 12px; }
.action-bar a.donate svg { fill: #fff; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .people { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  h1 { font-size: 2.4rem; }
  .hero h1 { font-size: 2.8rem; }
  .hero .hero-text { padding: 50px 40px; }
  .hero .hero-text > * { max-width: 760px; }
  .menu-btn { display: none; }
  .header-bar { padding: 10px 20px; }
  .logo img { height: 46px; }
  .site-nav { display: block !important; background: transparent; border: 0; flex: 1; margin: 0; }
  .site-nav ul { display: flex; justify-content: flex-end; flex-wrap: wrap; padding: 0; gap: 2px; }
  .site-nav li.sub { display: none; }
  .site-nav a { border: 0; padding: 10px 11px; border-radius: 999px; font-size: .9rem; }
  .site-nav a[aria-current="page"] { background: #fff; }
  .nav-cta { display: none; }
  .header-bar { flex-wrap: nowrap; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards.two { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: repeat(3, 1fr); }
  .person { flex-direction: column; align-items: center; text-align: center; }
  .person img { width: 120px; height: 120px; flex-basis: 120px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .site-footer { padding-bottom: 36px; }
  .action-bar { display: none; }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .project .split img { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery img { transition: none; } }
