/* ============================================================
   Variables & Reset
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --navy: #1a2744;
  --navy-dark: #111b30;
  --red: #c0392b;
  --red-dark: #922b21;
  --text: #2c3e50;
  --muted: #6c757d;
  --border: #dee2e6;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 {
  line-height: 1.2;
  color: var(--navy);
  margin-top: 0;
}

p {
  margin-top: 0;
}

a {
  color: var(--red);
}

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   Navigation
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-wordmark {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--red);
}

/* ============================================================
   Messages
   ============================================================ */

.messages-bar {
  background: #d4edda;
  border-bottom: 1px solid #c3e6cb;
}

.messages-bar .container {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.message {
  margin: 0;
  font-size: 0.95rem;
  color: #155724;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  background: var(--navy);
  color: #ffffff;
  padding: 5rem 0 4rem;
}

.hero-inner {
  max-width: 720px;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero-subhead {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.25rem;
  font-style: italic;
}

.hero-body {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  max-width: 640px;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-block;
  background: var(--red);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--red-dark);
  color: #ffffff;
}

/* ============================================================
   Sections
   ============================================================ */

.section {
  padding: 4rem 0;
}

.section--light {
  background: var(--bg);
}

.section--dark {
  background: var(--surface);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
}

/* ============================================================
   Callout box
   ============================================================ */

.callout {
  border-left: 4px solid var(--red);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

/* ============================================================
   Blockquotes
   ============================================================ */

blockquote {
  border-left: 4px solid var(--red);
  margin: 0 0 2rem;
  padding: 0.5rem 0 0.5rem 1.25rem;
}

blockquote p {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

blockquote cite {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: normal;
}

/* ============================================================
   Bill summary box
   ============================================================ */

.bill-box {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}

.bill-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin-bottom: 1rem;
}

.bill-box ol {
  margin: 0;
  padding-left: 1.5rem;
}

.bill-box li {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.bill-box li:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Petition form
   ============================================================ */

.petition-container {
  max-width: 560px;
}

.signature-count {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.petition-form {
  margin-bottom: 1rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.form-field input {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s ease;
}

.form-field input:focus {
  outline: none;
  border-color: var(--navy);
}

.field-errors {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--red);
}

.petition-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ============================================================
   Section label (small uppercase eyebrow text)
   ============================================================ */

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}

/* ============================================================
   Carousel
   ============================================================ */

.carousel-section {
  padding-bottom: 3rem;
}

.carousel-intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.carousel {
  position: relative;
  background: var(--navy-dark);
  border-radius: 6px;
  overflow: hidden;
}

.carousel-track {
  position: relative;
  height: 480px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1.5rem 1.25rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 0.9rem;
  font-style: italic;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.75rem 1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.15s ease;
  border-radius: 3px;
}

.carousel-btn:hover {
  background: rgba(255,255,255,0.3);
}

.carousel-btn--prev { left: 0.75rem; }
.carousel-btn--next { right: 0.75rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.carousel-dot--active,
.carousel-dot:hover {
  background: #fff;
}

.carousel-gallery-link {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: right;
}

/* ============================================================
   Gallery page
   ============================================================ */

.page-header {
  background: var(--navy);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.page-header-sub {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  max-width: 640px;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.gallery-item {
  margin: 0;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery-img-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--navy-dark);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-img-link:hover .gallery-img {
  transform: scale(1.03);
}

.gallery-item figcaption {
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.gallery-footer-note {
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.gallery-cta {
  text-align: center;
}

.gallery-cta h2 {
  margin-bottom: 0.75rem;
}

.gallery-cta p {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

/* ============================================================
   Map page
   ============================================================ */

.map-wrapper {
  height: 560px;
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
}

#map {
  width: 100%;
  height: 100%;
}

.map-explainer {
  max-width: 720px;
}

/* Leaflet popup overrides */
.map-popup {
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.5;
  min-width: 200px;
  max-width: 260px;
}

.map-popup-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
  margin: -14px -20px 10px;
  width: calc(100% + 40px);
  border-radius: 4px 4px 0 0;
}

.map-popup-address {
  margin: 0 0 0.4rem;
  color: var(--navy);
}

.map-popup-desc {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.map-popup-date {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Sighting submission form */
.sighting-form {
  max-width: 600px;
  margin-top: 1.5rem;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.2rem 0 0.5rem;
}

.field-required {
  color: var(--red);
  font-weight: 700;
}

.field-optional {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.location-status {
  display: inline-block;
  font-size: 0.85rem;
  font-family: monospace;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  margin-top: 0.25rem;
}

.location-status--empty {
  background: var(--surface);
  color: var(--muted);
  border: 1px dashed var(--border);
}

.location-status--set {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Map cursor hint when form is on page */
.map-wrapper {
  cursor: crosshair;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.875rem;
}

.site-footer p {
  margin-bottom: 0.25rem;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
