/* Apple devices use their built-in Avenir Next; everyone else gets Nunito Sans, its closest free match. */
@font-face {
  font-family: "Nunito Sans";
  src: url("/static/fonts/nunito-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FFFFFF;
  --paper-2: #F5F5F5;
  --white: #FFFFFF;
  --ink: #111111;
  --ink-2: #4A4A4A;
  --muted: #6B6B6B;
  --line: #E5E5E5;
  --accent: #2F5D50;
  --clay: #B4583E;
  --sans: "Avenir Next", Avenir, "Nunito Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
  --measure: 38rem;
  --radius: 14px;
  --header-h: 60px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.test-banner {
  background: var(--ink); color: var(--paper);
  font: 600 0.72rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center; padding: 8px 16px;
}
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; color: var(--ink);
}
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 3px var(--paper), 0 0 0 4.5px var(--clay); margin: 0 3px; }
.nav { display: flex; gap: 2px; font: 500 0.95rem/1 var(--sans); }
.nav a { text-decoration: none; color: var(--ink-2); padding: 10px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
@media (max-width: 400px) {
  .logo { font-size: 1.12rem; gap: 8px; }
  .nav a { padding: 10px 8px; font-size: 0.9rem; }
}

/* Type */
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font: 600 0.72rem/1.2 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin: 0;
}
.badge {
  font: 700 0.62rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--clay); color: var(--white); padding: 4px 6px; border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 0.95rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-quiet { border-color: var(--line); background: var(--white); }
.btn-quiet:hover { border-color: var(--ink); background: var(--white); color: var(--ink); }

/* Home */
.hero { padding-top: 48px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(2.4rem, 8.5vw, 4.8rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; max-width: 13ch; margin: 14px 0 0; }
.hero p.lede { font-size: clamp(1.15rem, 2.6vw, 1.4rem); color: var(--ink-2); max-width: 34rem; margin: 20px 0 28px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 720px) { .hero { padding-top: 96px; padding-bottom: 64px; } }

.map-preview { position: relative; height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.map-preview .map { position: absolute; inset: 0; }
.map-preview > .btn { position: absolute; right: 14px; top: 14px; z-index: 500; box-shadow: var(--shadow); }
@media (min-width: 720px) { .map-preview { height: 440px; } }

.section { padding: 56px 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.section-head a { font: 600 0.9rem var(--sans); color: var(--accent); white-space: nowrap; text-underline-offset: 3px; }

.about-teaser .wrap { display: grid; gap: 16px; }
.about-teaser p { max-width: var(--measure); margin: 0; color: var(--ink-2); font-size: 1.25rem; }
@media (min-width: 900px) { .about-teaser .wrap { grid-template-columns: 1fr 2fr; } }

/* Cards */
.grid { display: grid; gap: 40px 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { display: block; text-decoration: none; color: inherit; }
.card-img { aspect-ratio: 3 / 2; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); margin-bottom: 14px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card h3 { font-size: 1.3rem; margin: 8px 0 6px; }
.card p { margin: 0 0 10px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }

/* Quiet meter */
.quiet { display: inline-flex; align-items: center; gap: 8px; font: 500 0.82rem/1.2 var(--sans); color: var(--ink-2); }
.quiet-dots { display: inline-flex; gap: 3px; }
.quiet-dots i { width: 8px; height: 8px; border-radius: 50%; background: #D6D6D6; }
.quiet-dots i.on { background: var(--accent); }

/* Page heads */
.page-head { padding: 48px 0 28px; }
.page-head h1, .spot-head h1 { font-size: clamp(2.1rem, 6.5vw, 3.8rem); font-weight: 600; letter-spacing: -0.02em; max-width: 18ch; margin: 12px 0 14px; }
.dek { font-size: clamp(1.15rem, 2.4vw, 1.35rem); color: var(--ink-2); max-width: 36rem; margin: 0; line-height: 1.5; }

/* Spot page */
.spot-head { padding: 40px 0 24px; }
.spot-cover { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-2); }
.spot-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .spot-cover { aspect-ratio: 2 / 1; } }

.spot-layout { display: grid; gap: 40px; padding: 32px 0 16px; }
@media (min-width: 960px) {
  .spot-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; }
  .glance { order: 2; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
}
.glance { background: var(--paper-2); border: 1px solid var(--paper-2); border-radius: var(--radius); padding: 20px; }
.glance h2 { font: 600 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts div { display: grid; gap: 3px; }
.facts dt { font: 600 0.8rem var(--sans); color: var(--muted); }
.facts dd { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.mini-map-box { position: relative; margin: 18px 0 12px; }
.mini-map { height: 200px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.mini-map-hint {
  display: none; position: absolute; top: 10px; left: 10px; z-index: 500; pointer-events: none;
  background: rgba(255, 255, 255, 0.95); font: 600 0.75rem var(--sans); padding: 6px 10px; border-radius: 999px;
}
@media (pointer: coarse) { .mini-map-hint { display: block; } }
.map-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-buttons .btn { padding: 0 10px; font-size: 0.9rem; }
.big-map-link { display: block; text-align: center; margin-top: 10px; padding: 8px; font: 600 0.9rem var(--sans); color: var(--accent); text-underline-offset: 3px; }

/* Long form text */
.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose > p:first-of-type { font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.prose h2 { font-size: 1.45rem; margin: 1.8em 0 0.5em; }
.prose h3 { font-size: 1.3rem; margin: 1.5em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: 0.35em 0; padding-left: 0.2em; }
.prose li::marker { color: var(--clay); }
.prose figure { margin: 2em 0; }
.prose figure img { border-radius: var(--radius); width: 100%; }
.prose figcaption { font: 400 0.85rem/1.4 var(--sans); color: var(--muted); margin-top: 8px; }
.prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--clay); font-size: 1.3rem; color: var(--ink-2); }
.prose a { color: var(--accent); text-underline-offset: 3px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 40px 0 56px; font: 400 0.9rem/1.6 var(--sans); color: var(--muted); }
.footer-grid { display: grid; gap: 20px; }
.site-footer p { margin: 6px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--ink-2); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-small { font-size: 0.8rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } .footer-small { grid-column: 1 / -1; } }

/* Map page */
body.page-map { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-map .site-header { position: relative; }
.map-app { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .map-app { grid-template-columns: 360px 1fr; } }
.map-list { display: none; }
@media (min-width: 900px) { .map-list { display: block; overflow-y: auto; border-right: 1px solid var(--line); padding: 20px 14px; } }
.map-list-count { font: 600 0.72rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 6px 12px; }
.list-item {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center;
  width: 100%; padding: 10px; margin-bottom: 4px; border: 1px solid transparent; border-radius: 12px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.list-item:hover { background: var(--paper-2); }
.list-item.active { background: var(--paper-2); border-color: var(--paper-2); }
.list-item img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.list-item strong { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.25; margin: 5px 0 7px; }
.map-stage { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.map-hint {
  position: absolute; top: 12px; left: 12px; z-index: 500; pointer-events: none; margin: 0;
  background: rgba(255, 255, 255, 0.95); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  font: 600 0.8rem var(--sans); padding: 8px 12px; border-radius: 999px;
}
@media (min-width: 900px) { .map-hint { display: none; } }

/* Spot card: a bottom sheet on phones, a floating card on desktop */
.spot-card {
  position: absolute; z-index: 800; left: 10px; right: 10px; bottom: 10px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow);
  transform: translateY(calc(100% + 24px)); visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.3s;
}
.spot-card.open { transform: translateY(0); visibility: visible; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.card-close {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font: 400 1.7rem/1 var(--sans); cursor: pointer;
}
.card-close:hover { background: var(--paper-2); color: var(--ink); }
.spot-card-body { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding-right: 30px; margin-bottom: 14px; }
.spot-card-body img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--paper-2); }
.spot-card h2 { font-size: 1.15rem; margin: 6px 0 4px; line-height: 1.2; }
.spot-card p {
  margin: 0 0 8px; font-size: 1rem; line-height: 1.4; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-actions { display: grid; gap: 8px; }
@media (min-width: 900px) {
  .spot-card { left: 20px; right: auto; bottom: 20px; width: 390px; padding-top: 16px; }
  .sheet-handle { display: none; }
}

/* Map pins */
.pin-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer;
}
span.pin-wrap { cursor: default; }
.pin {
  width: 18px; height: 18px; border-radius: 50%; background: var(--clay);
  border: 3px solid var(--white); box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, background 0.2s;
}
.pin-wrap.selected .pin { transform: scale(1.45); background: var(--accent); }
.pin-wrap:hover .pin { transform: scale(1.2); }
.pin-wrap.selected:hover .pin { transform: scale(1.45); }

.maplibregl-map { font-family: var(--sans); background: #F2F3F0; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.map-preview .maplibregl-map { cursor: pointer; }
