/* ============================================================
   Find a Little Jesus — Design Tokens
   Palette: pulled from the brand mark (red robe, gold halo,
   navy wordmark, sandy shoreline, ocean teal)
   ============================================================ */
:root {
  --navy: #1b3a6b;
  --navy-deep: #122747;
  --red: #c23b3b;
  --red-deep: #9c2e2e;
  --gold: #e3a63a;
  --gold-light: #f4cf8a;
  --teal: #2e7d8c;
  --sand: #f2e8d3;
  --cream: #fffcf5;
  --ink: #2b2420;

  --font-display: "Playfair Display", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Figtree", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-stamp: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 18px;
  --shadow-soft: 0 12px 30px rgba(27, 58, 107, 0.14);
  --shadow-stamp: 0 3px 0 rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
  color: var(--navy-deep);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }

p { margin: 0 0 1em; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--cream);
  border-bottom: 1px solid rgba(27, 58, 107, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy-deep);
  text-decoration: none;
}
.site-nav .brand img {
  height: 44px;
  width: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--sand);
}
.site-nav .links {
  display: flex;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-nav .links a {
  text-decoration: none;
  color: var(--navy);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.2s ease;
}
.site-nav .links a:hover { border-color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: var(--cream); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 24px 90px;
  background:
    radial-gradient(circle at 15% 20%, rgba(227, 166, 58, 0.16), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(46, 125, 140, 0.14), transparent 45%),
    var(--sand);
  overflow: hidden;
}
.hero-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-stamp);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--teal);
  background: rgba(46, 125, 140, 0.1);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero .lede { font-size: 1.15rem; color: var(--navy); max-width: 46ch; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-logo {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: var(--cream);
  padding: 10px;
}

/* decorative section divider: gradient line with a centered ornament */
.flight-path {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 320px;
  margin: 0 auto 56px;
}
.flight-path::before, .flight-path::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.flight-path .divider-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--cream);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 40px 0 64px;
}
.step-card {
  background: var(--cream);
  border: 1px solid rgba(27, 58, 107, 0.1);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step-card .mark {
  font-family: var(--font-stamp);
  font-size: 0.8rem;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 999px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step-card p { font-size: 0.95rem; color: #5a5148; margin: 0; }

/* ---------- Passport stamp — the signature element ---------- */
.stamp {
  --stamp-color: var(--teal);
  border: 3px solid var(--stamp-color);
  border-radius: 50%;
  color: var(--stamp-color);
  font-family: var(--font-stamp);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-6deg);
  position: relative;
  filter: saturate(1.1);
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--stamp-color);
  border-radius: 50%;
  opacity: 0.6;
}
.stamp .stamp-id { font-size: 0.9em; font-weight: 700; letter-spacing: 0.05em; }
.stamp .stamp-place { font-size: 0.6em; letter-spacing: 0.08em; margin-top: 2px; }

/* ---------- Section wrapper ---------- */
.section { padding: 20px 24px 20px; }
.section-narrow { max-width: 720px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: #5a5148; max-width: 60ch; margin: 0 auto 40px; }

/* ---------- Cards / form shell used on found + map pages ---------- */
.card {
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(27, 58, 107, 0.08);
  padding: 32px;
}

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-deep);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.8rem; color: #7c7266; margin-top: 4px; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(27, 58, 107, 0.2);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 3px solid var(--gold-light);
  border-color: var(--teal);
}
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.checkbox-row input { margin-top: 4px; }

.locate-btn {
  background: var(--teal);
  color: var(--cream);
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.locate-btn:hover { background: #24616d; }

.status-msg { font-size: 0.9rem; margin-top: 10px; }
.status-msg.error { color: var(--red-deep); }
.status-msg.success { color: #2c7a4b; }

/* ---------- Map page ---------- */
#pin-map { height: 560px; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.map-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.map-stat {
  background: var(--cream);
  border: 1px solid rgba(27,58,107,0.1);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  min-width: 0;
}
.map-stat .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--red); font-weight: 700; }
.map-stat .lbl { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #7c7266; }

@media (max-width: 480px) {
  .map-stat { padding: 10px 4px; }
  .map-stat .num { font-size: 1.2rem; }
  .map-stat .lbl { font-size: 0.62rem; letter-spacing: 0.02em; }
}

.leaflet-popup-content { font-family: var(--font-body); }
.popup-photo {
  width: 100%;
  max-width: 220px;
  height: 140px;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  margin-bottom: 6px;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.popup-photo:hover { opacity: 0.85; }

/* ---------- Found page ---------- */
.found-hero {
  text-align: center;
  padding: 44px 24px 30px;
  background:
    radial-gradient(circle at 20% 10%, rgba(227, 166, 58, 0.18), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(46, 125, 140, 0.16), transparent 50%),
    var(--sand);
  border-bottom: 1px solid rgba(27, 58, 107, 0.08);
}
.found-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}
.figurine-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow-soft);
  background: #fff;
}
.found-hero .stamp {
  width: 92px;
  height: 92px;
  margin: 0;
  background: var(--cream);
  box-shadow: var(--shadow-soft);
}
.found-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 6px;
}
.journey-count {
  display: inline-block;
  font-family: var(--font-stamp);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--teal);
  background: rgba(46, 125, 140, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 6px;
}
.prayer-box {
  background: linear-gradient(135deg, rgba(227,166,58,0.14), rgba(46,125,140,0.08));
  border: 1px solid rgba(227, 166, 58, 0.4);
  border-radius: var(--radius);
  padding: 30px 32px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--navy-deep);
  max-width: 620px;
  margin: 8px auto 46px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.field-optional-tag {
  font-weight: 400;
  color: #7c7266;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0;
}
.photo-upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-upload-row label.upload-btn {
  background: var(--cream);
  border: 1.5px dashed var(--teal);
  color: var(--teal);
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.photo-upload-row input[type="file"] { display: none; }
#photo-preview {
  max-width: 220px;
  border-radius: 10px;
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
}

/* ---------- Sightings table ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(27, 58, 107, 0.08);
  margin-bottom: 40px;
}
.sightings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  font-size: 0.92rem;
}
.sightings-table thead th {
  text-align: left;
  padding: 14px 16px;
  background: var(--navy-deep);
  color: var(--sand);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.sightings-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid rgba(27, 58, 107, 0.08);
  vertical-align: middle;
}
.sightings-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.sightings-table tbody tr:hover {
  background: rgba(227, 166, 58, 0.12);
}
.sightings-table .fig-id {
  font-family: var(--font-stamp);
  font-weight: 700;
  color: var(--red);
}
.sightings-table .thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.sightings-table .no-photo {
  color: #b7ada1;
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
footer {
  background: var(--navy-deep);
  color: var(--sand);
  padding: 40px 24px;
  text-align: center;
  font-size: 0.9rem;
}
footer a { color: var(--gold-light); text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .site-nav .links { gap: 14px; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
