/* =========================================================
   aquifers.in — Pure Custom CSS
   Solutions-First Design System
   ========================================================= */

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --blue-deep:    #0d2b45;
  --blue-mid:     #1a5276;
  --blue-soft:    #2e86c1;
  --blue-light:   #aed6f1;
  --teal:         #148f77;
  --teal-light:   #a9dfbf;
  --sand:         #fdf5e6;
  --sand-dark:    #f0e6d2;
  --amber:        #e67e22;
  --amber-light:  #fdebd0;
  --green:        #27ae60;
  --green-light:  #d5f5e3;
  --white:        #ffffff;
  --grey-100:     #f8f9fa;
  --grey-200:     #e9ecef;
  --grey-400:     #ced4da;
  --grey-600:     #6c757d;
  --grey-900:     #212529;

  /* Typography */
  --font-sans:    'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:    'Courier New', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.15);

  /* Transitions */
  --trans-fast: 160ms ease;
  --trans-med:  280ms ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--grey-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
h1, h2, h3, h4, h5 { line-height: 1.2; }

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--grey-100);
}

.section--dark {
  background: var(--blue-deep);
  color: var(--white);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__header .eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.section__header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.section__header p {
  font-size: 1.1rem;
  color: var(--grey-600);
  max-width: 640px;
  margin: 0 auto;
}

.section--dark .section__header p { color: var(--blue-light); }

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  box-shadow: var(--shadow-sm);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--blue-deep);
  text-decoration: none;
}

.nav__logo-icon { font-size: 1.4rem; }
.nav__logo-text .tagline { display: block; font-size: .65rem; font-weight: 500; color: var(--grey-600); letter-spacing: .04em; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__links a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--grey-600);
  transition: color var(--trans-fast);
}

.nav__links a:hover { color: var(--blue-soft); text-decoration: none; }

.nav__cta {
  background: var(--blue-soft);
  color: var(--white) !important;
  padding: .45rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: background var(--trans-fast) !important;
}

.nav__cta:hover { background: var(--blue-mid) !important; text-decoration: none !important; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--grey-900);
  border-radius: 2px;
  transition: var(--trans-fast);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 60%, var(--teal) 100%);
  color: var(--white);
  overflow: hidden;
  padding: var(--space-2xl) 0;
  min-height: 540px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='400' viewBox='0 0 800 400'%3E%3Cellipse cx='600' cy='200' rx='400' ry='300' fill='rgba(255,255,255,.04)'/%3E%3Cellipse cx='200' cy='350' rx='300' ry='200' fill='rgba(255,255,255,.03)'/%3E%3C/svg%3E") center/cover no-repeat;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px;
  padding: .35rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -.01em;
}

.hero__title .highlight {
  color: var(--teal-light);
}

.hero__sub {
  font-size: 1.15rem;
  opacity: .88;
  margin-bottom: var(--space-xl);
  max-width: 480px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.stat-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  backdrop-filter: blur(4px);
}

.stat-card__number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--teal-light);
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-card__label {
  font-size: .82rem;
  opacity: .8;
  line-height: 1.4;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: .75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 700;
  transition: all var(--trans-fast);
  border: 2px solid transparent;
  line-height: 1;
  text-decoration: none;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn--primary:hover { background: var(--teal-light); color: var(--blue-deep); border-color: var(--teal-light); text-decoration: none; }

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn--outline:hover { background: rgba(255,255,255,.15); text-decoration: none; }

.btn--blue {
  background: var(--blue-soft);
  color: var(--white);
  border-color: var(--blue-soft);
}
.btn--blue:hover { background: var(--blue-mid); border-color: var(--blue-mid); text-decoration: none; }

.btn--sm {
  padding: .45rem 1rem;
  font-size: .85rem;
}

/* =========================================================
   FEATURE STRIP
   ========================================================= */
.features {
  background: var(--sand);
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--sand-dark);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.feature-item__icon { font-size: 2rem; margin-bottom: var(--space-sm); }
.feature-item__title { font-weight: 700; font-size: 1rem; margin-bottom: .2rem; color: var(--blue-deep); }
.feature-item__desc { font-size: .88rem; color: var(--grey-600); }

/* =========================================================
   SUCCESS STORIES MAP
   ========================================================= */
.stories-section { background: var(--white); }

.map-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--grey-200);
}

#story-map {
  width: 100%;
  height: 480px;
  background: var(--blue-light);
}

/* Leaflet popup customisation */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: 280px !important;
}
.leaflet-popup-tip { background: var(--white) !important; }

.story-popup {
  padding: var(--space-md) var(--space-lg);
}
.story-popup__emoji { font-size: 1.8rem; margin-bottom: var(--space-sm); }
.story-popup__name { font-size: 1rem; font-weight: 800; color: var(--blue-deep); margin-bottom: .2rem; }
.story-popup__state { font-size: .8rem; color: var(--grey-600); margin-bottom: var(--space-sm); }
.story-popup__tagline { font-size: .88rem; color: var(--grey-900); margin-bottom: var(--space-md); line-height: 1.5; }
.story-popup__meta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
}
.badge--teal { background: var(--teal-light); color: var(--teal); }
.badge--blue { background: var(--blue-light); color: var(--blue-mid); }

/* Story modal / drawer */
.story-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-med);
}

.story-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.story-modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-xl);
  transform: translateY(100%);
  transition: transform var(--trans-med);
}

.story-modal-overlay.is-open .story-modal {
  transform: translateY(0);
}

.story-modal__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--grey-600);
  transition: background var(--trans-fast);
}
.story-modal__close:hover { background: var(--grey-400); }

.story-modal__hero {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
}

.story-modal__title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--blue-deep);
  margin-bottom: .3rem;
}

.story-modal__meta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.story-modal__summary {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--grey-600);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--grey-200);
}

.story-steps__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: var(--space-lg);
}

.step-item {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  width: 2px;
  height: calc(100% - 12px);
  background: var(--grey-200);
}

.step-item__num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  position: relative;
  z-index: 1;
}

.step-item__body { padding-top: .5rem; }
.step-item__action { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; color: var(--blue-deep); }
.step-item__detail { font-size: .9rem; color: var(--grey-600); line-height: 1.6; }

.story-modal__outcome {
  margin-top: var(--space-xl);
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-md) var(--space-lg);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--grey-900);
}

.story-modal__outcome strong { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--green); margin-bottom: .4rem; }

/* =========================================================
   WHAT CAN I DO — QUIZ ENGINE
   ========================================================= */
.quiz-section { background: var(--sand); }

.quiz-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  max-width: 720px;
  margin: 0 auto;
}

.quiz-card__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.quiz-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--grey-600);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-group select {
  padding: .65rem var(--space-md);
  border: 2px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--grey-900);
  background: var(--grey-100);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236c757d' d='M8 11L2 5h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color var(--trans-fast);
}

.form-group select:focus {
  outline: none;
  border-color: var(--blue-soft);
  background-color: var(--white);
}

.quiz-submit-wrap { grid-column: 1 / -1; display: flex; justify-content: center; }

.quiz-results { display: none; }
.quiz-results.is-visible { display: block; }

.results__intro {
  font-size: .95rem;
  color: var(--grey-600);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.action-cards {
  display: grid;
  gap: var(--space-md);
}

.action-card {
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  transition: box-shadow var(--trans-fast);
}

.action-card:hover { box-shadow: var(--shadow-md); }

.action-card__number {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--amber-light);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  flex-shrink: 0;
}

.action-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: .3rem;
}

.action-card__desc {
  font-size: .9rem;
  color: var(--grey-600);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
}

.action-card__tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
}

.tag--effort-low { background: var(--green-light); color: var(--green); }
.tag--effort-medium { background: var(--amber-light); color: var(--amber); }
.tag--effort-high { background: #fde8e8; color: #c0392b; }
.tag--cost { background: var(--grey-100); color: var(--grey-600); }

/* =========================================================
   GUIDES — AI TRANSLATION LAYER
   ========================================================= */
.guides-section { background: var(--white); }

.guides-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.filter-btn {
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  border: 2px solid var(--grey-200);
  color: var(--grey-600);
  background: var(--white);
  transition: all var(--trans-fast);
}

.filter-btn:hover, .filter-btn.is-active {
  border-color: var(--blue-soft);
  background: var(--blue-soft);
  color: var(--white);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.guide-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--trans-med);
  position: relative;
  overflow: hidden;
}

.guide-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-soft), var(--teal));
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--blue-light);
  transform: translateY(-2px);
}

.guide-card:hover::before { opacity: 1; }

.guide-card__icon { font-size: 2.5rem; margin-bottom: var(--space-md); }
.guide-card__tags { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-sm); }
.guide-tag {
  padding: .15rem .6rem;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--blue-light);
  color: var(--blue-mid);
}
.guide-card__title { font-size: 1rem; font-weight: 800; color: var(--blue-deep); margin-bottom: .4rem; line-height: 1.3; }
.guide-card__subtitle { font-size: .85rem; color: var(--grey-600); margin-bottom: var(--space-md); line-height: 1.5; }
.guide-card__meta { font-size: .8rem; color: var(--grey-400); }

/* Guide modal */
.guide-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-med);
}

.guide-modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.guide-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  padding: var(--space-xl);
  position: relative;
  transform: scale(.95);
  transition: transform var(--trans-med);
}

.guide-modal-overlay.is-open .guide-modal {
  transform: scale(1);
}

.guide-modal__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--grey-600);
  transition: background var(--trans-fast);
}
.guide-modal__close:hover { background: var(--grey-400); }

.guide-modal__icon { font-size: 3rem; margin-bottom: var(--space-md); }
.guide-modal__title { font-size: 1.4rem; font-weight: 900; color: var(--blue-deep); margin-bottom: .3rem; }
.guide-modal__subtitle { font-size: .95rem; color: var(--grey-600); margin-bottom: var(--space-md); }
.guide-modal__tags { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-xl); }
.guide-modal__reading { font-size: .8rem; color: var(--grey-400); margin-left: auto; align-self: center; }

.guide-section {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--grey-200);
}
.guide-section:last-child { border-bottom: none; }
.guide-section__heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.guide-section__heading::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--teal);
  border-radius: 2px;
  flex-shrink: 0;
}
.guide-section__body {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--grey-900);
  white-space: pre-line;
}

.guide-modal__source {
  margin-top: var(--space-xl);
  font-size: .8rem;
  color: var(--grey-400);
  font-style: italic;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--grey-200);
}

/* =========================================================
   CALL TO ACTION BAND
   ========================================================= */
.cta-band {
  background: linear-gradient(135deg, var(--teal) 0%, var(--blue-mid) 100%);
  color: var(--white);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  margin-bottom: var(--space-sm);
}

.cta-band p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: var(--space-xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-band__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--blue-deep);
  color: var(--blue-light);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__brand .nav__logo { color: var(--white); margin-bottom: var(--space-md); }
.footer__brand p { font-size: .88rem; opacity: .7; line-height: 1.7; max-width: 260px; }

.footer__col h4 { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin-bottom: var(--space-md); }
.footer__col ul { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer__col ul a { font-size: .88rem; color: var(--blue-light); opacity: .7; transition: opacity var(--trans-fast); }
.footer__col ul a:hover { opacity: 1; text-decoration: none; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  opacity: .5;
}

/* =========================================================
   LOADING STATES
   ========================================================= */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(4, 1fr); margin-top: var(--space-xl); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .features__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

@media (max-width: 640px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); padding: var(--space-lg); border-bottom: 1px solid var(--grey-200); box-shadow: var(--shadow-md); gap: var(--space-md); }
  .nav__links.is-open { display: flex; }
  .nav__hamburger { display: flex; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .quiz-form { grid-template-columns: 1fr; }
  .quiz-submit-wrap { grid-column: auto; }
  .footer__grid { grid-template-columns: 1fr; }
  .story-modal { padding: var(--space-lg); }
  .guide-modal { padding: var(--space-lg); }
}

/* =========================================================
   CUSTOM LEAFLET PIN
   ========================================================= */
.story-pin {
  background: var(--white);
  border: 3px solid var(--teal);
  border-radius: 50% 50% 50% 0;
  width: 36px;
  height: 36px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.story-pin:hover { border-color: var(--blue-soft); transform: rotate(-45deg) scale(1.1); }

.story-pin__emoji {
  transform: rotate(45deg);
  font-size: 1rem;
  line-height: 1;
}

/* Ensure map tiles have appropriate attribution */
.leaflet-control-attribution { font-size: .7rem !important; }

/* =========================================================
   ACCESSIBILITY / FOCUS
   ========================================================= */
:focus-visible {
  outline: 3px solid var(--blue-soft);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   SCROLL ANIMATION
   ========================================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
