:root {
  --ink: #173b36;
  --muted: #66837d;
  --paper: #fbfaf5;
  --cream: #f5f0e6;
  --line: #d7e4dc;
  --mint: #d8eee5;
  --teal: #167c70;
  --yellow: #f4cb58;
  --coral: #ed765f;
  --blue: #7fb7c2;
  --lavender: #aca6d9;
  --shadow: 0 18px 45px rgba(30, 78, 68, .10);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 0%, rgba(216, 238, 229, .62), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.site-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--coral);
  color: white;
  font-size: 1rem;
  transform: rotate(-8deg);
}

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.privacy-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .35rem;
  border-radius: 50%;
  background: #55a87c;
  box-shadow: 0 0 0 4px rgba(85, 168, 124, .13);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 3rem;
  align-items: end;
  padding: 7rem 0 5.5rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--teal);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  letter-spacing: -.055em;
  line-height: .98;
}

h1 {
  max-width: 700px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.7rem, 9vw, 7.2rem);
  font-weight: 900;
}

h1 em {
  color: var(--coral);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-lede {
  max-width: 490px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 44px;
  padding: .7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--ink); color: white; box-shadow: 0 7px 0 rgba(23, 59, 54, .12); }
.button-primary:hover { box-shadow: 0 9px 0 rgba(23, 59, 54, .12); }
.button-quiet { border-color: var(--line); background: transparent; color: var(--muted); }
.button-quiet:hover { background: white; }
.button-small { min-height: 36px; padding: .5rem .8rem; border-color: var(--line); background: white; color: var(--ink); font-size: .72rem; }
.button-small:hover { border-color: var(--teal); color: var(--teal); }

.button:focus-visible,
.brand:focus-visible,
.map-region:focus-visible,
.skip-link:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.hero-note {
  position: relative;
  padding: 1.35rem 1.35rem 1.2rem 1.4rem;
  border: 1px solid #eadbb3;
  border-radius: 20px;
  background: #fff6d9;
  box-shadow: 7px 7px 0 rgba(244, 203, 88, .22);
  transform: rotate(2deg);
}

.note-pin {
  display: block;
  margin-bottom: .8rem;
  color: #b98d1e;
  font-size: 1.45rem;
}

.hero-note p { margin: 0; color: #866d2c; font-size: .78rem; line-height: 1.6; }
.hero-note strong { color: #594918; font-size: .8rem; }

.atlas-section, .discoveries-section { padding-bottom: 6.5rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 900; }

.map-instructions {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  max-width: 300px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.5;
}

.map-instructions p { margin: 0; }
.map-instructions strong { color: var(--ink); }
.instruction-icon { color: var(--coral); font-size: 1.3rem; line-height: 1; }

.map-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: white;
  box-shadow: var(--shadow);
}

.map-toolbar, .map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.map-toolbar { border-bottom: 1px solid #edf2ed; }
.map-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.map-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.swatch-open { background: var(--teal); }
.swatch-locked { background: var(--yellow); }
.map-status { margin: 0; color: var(--teal); font-size: .72rem; font-weight: 750; text-align: right; }

.map-stage { padding: 0 .35rem; background: #e9f5ef; }
.map-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-water { fill: #e7f4ee; }
.map-current { fill: none; stroke: #c4e5da; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 12; }
.current-two { opacity: .8; }
.map-route { fill: none; stroke: #9bcfc1; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 9; opacity: .9; }
.map-route-dashed { stroke: #acd6c9; }
.map-speckles circle { fill: #baded3; }

.map-region { cursor: pointer; outline: none; }
.map-region .region-shape { stroke: white; stroke-width: 5; stroke-linejoin: round; transition: transform .2s ease, filter .2s ease; transform-box: fill-box; transform-origin: center; }
.map-region .region-highlight { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-dasharray: 1 7; stroke-linecap: round; pointer-events: none; }
.map-region:hover .region-shape, .map-region:focus-visible .region-shape { filter: brightness(1.04) drop-shadow(0 8px 5px rgba(23, 59, 54, .16)); transform: translateY(-4px) rotate(-1deg); }
.map-region.is-locked .region-shape { filter: saturate(.65); }
.map-region.is-locked:hover .region-shape, .map-region.is-locked:focus-visible .region-shape { filter: saturate(.75) brightness(1.04) drop-shadow(0 8px 5px rgba(23, 59, 54, .16)); }
.region-dunes .region-shape { fill: var(--yellow); }
.region-prairie .region-shape { fill: #b9d888; }
.region-keys .region-shape { fill: var(--lavender); }
.region-lagoon .region-shape { fill: var(--blue); }
.region-gulch .region-shape { fill: var(--coral); }
.region-borough .region-shape { fill: #8bc6b2; }
.region-label { fill: var(--ink); font-size: 16px; font-weight: 900; letter-spacing: -.04em; pointer-events: none; }
.region-category { fill: rgba(23, 59, 54, .68); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; pointer-events: none; }
.map-region.is-locked .region-label::after { content: ""; }
.map-compass circle { fill: rgba(255, 255, 255, .76); stroke: #9bcfc1; stroke-width: 2; }
.map-compass path { fill: var(--coral); }
.map-compass text { fill: var(--teal); font-size: 11px; font-weight: 900; }
.map-caption { fill: #7eb8a9; font-size: 10px; font-weight: 850; letter-spacing: .22em; }

.map-footer { border-top: 1px solid #edf2ed; color: var(--muted); font-size: .71rem; }
.map-footer strong { color: var(--ink); }
.map-footer-detail { font-style: italic; }

.discoveries-heading { align-items: center; }
.discovery-count { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 750; }
.discovery-count span { color: var(--coral); font-size: 1.1rem; }
.discoveries { display: grid; gap: 1rem; }

.empty-state {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 135px;
  padding: 1.5rem;
  border: 1px dashed #bfd6cb;
  border-radius: 20px;
  background: rgba(232, 244, 238, .45);
}

.empty-icon { color: var(--teal); font-size: 2rem; }
.empty-state h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.empty-state p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }

.discovery-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 30px rgba(30, 78, 68, .07);
  animation: card-in .45s ease both;
}

.discovery-card.is-arriving { animation: card-in .55s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

.discovery-card-topline { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem .8rem; border-bottom: 1px solid rgba(23, 59, 54, .08); }
.card-kicker { margin: 0; color: var(--teal); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.card-pin { margin-right: .3rem; color: var(--coral); }
.card-number { color: #a6bbb4; font-size: .68rem; font-weight: 800; }
.discovery-card-body { display: grid; grid-template-columns: .7fr 1.3fr; gap: 1rem; padding: 1.2rem 1.3rem; }
.discovery-copy h3 { margin-bottom: .55rem; font-size: 1.65rem; }
.discovery-copy p { max-width: 250px; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.joke-shell { align-self: stretch; }
.joke-block { display: flex; align-items: center; gap: .85rem; min-height: 128px; padding: 1.15rem 1.35rem; border-radius: 17px; background: #f4f8f3; }
.quote-mark { align-self: flex-start; color: var(--coral); font-family: Georgia, serif; font-size: 3.3rem; line-height: .7; }
.quote-mark-end { align-self: flex-end; color: #9fcdbf; }
.joke-copy { flex: 1; }
.joke-setup, .joke-punchline { margin: 0; line-height: 1.45; }
.joke-setup { color: var(--muted); font-size: .86rem; white-space: pre-line; }
.joke-punchline { margin-top: .45rem; color: var(--ink); font-size: 1.15rem; font-weight: 850; letter-spacing: -.03em; }
.discovery-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.3rem 1rem; border-top: 1px solid rgba(23, 59, 54, .08); }
.unlock-message { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.unlock-message strong { color: var(--teal); }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.site-footer p { margin: 0; }
.site-footer span { color: var(--coral); }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 28px, 620px); }
  .topbar { min-height: 66px; }
  .privacy-note { font-size: .61rem; letter-spacing: .01em; text-transform: none; }
  .privacy-dot { width: 6px; height: 6px; }
  .hero { display: block; padding: 4.6rem 0 4rem; }
  h1 { font-size: clamp(3.3rem, 17vw, 5.7rem); }
  .hero-note { max-width: 290px; margin: 3rem 0 0 auto; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .map-instructions { max-width: none; }
  .map-toolbar, .map-footer { align-items: flex-start; flex-direction: column; }
  .map-status { text-align: left; }
  .map-footer { flex-direction: row; align-items: center; }
  .map-footer-detail { text-align: right; }
  .region-label { font-size: 13px; }
  .region-category { font-size: 7px; }
  .discovery-card-body { grid-template-columns: 1fr; }
  .discovery-copy p { max-width: none; }
  .discovery-card-footer { align-items: flex-start; flex-direction: column; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
