@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  --ink: #173229;
  --muted: #61736b;
  --forest: #18392b;
  --leaf: #3f7956;
  --mint: #b9d8b8;
  --lime: #dce99e;
  --cream: #f5f0e4;
  --paper: #fffdf8;
  --orange: #ee7545;
  --orange-dark: #bd4e27;
  --line: rgba(24, 57, 43, .15);
  --shadow: 0 22px 55px rgba(25, 58, 43, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 300px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; border-radius: .5rem; padding: .7rem 1rem; background: #fff; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: .75rem clamp(1rem, 5vw, 4.5rem);
  border-bottom: 1px solid rgba(24, 57, 43, .08);
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--forest); font-family: Manrope, sans-serif; font-size: 1.1rem; font-weight: 700; text-decoration: none; }
.brand strong { color: var(--orange); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--forest); }
.brand-mark svg { width: 25px; fill: var(--lime); }
.brand-mark svg path + path { fill: var(--forest); }
.location-pill, .map-location-button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .65rem .9rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.location-pill:hover, .map-location-button:hover { border-color: var(--leaf); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(238, 117, 69, .14); }
.location-pill.is-active .pulse-dot { background: #4aa56c; box-shadow: 0 0 0 4px rgba(74, 165, 108, .16); }

.hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  align-items: center;
  min-height: min(690px, calc(100vh - 76px));
  overflow: hidden;
  background: var(--cream);
}
.hero-copy { max-width: 730px; padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 7rem); }
.eyebrow { margin: 0 0 .7rem; color: var(--leaf); font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { margin-top: 0; font-family: Manrope, sans-serif; letter-spacing: -.035em; line-height: 1.04; }
.hero-copy h1 { max-width: 680px; margin-bottom: 1.4rem; font-size: clamp(3rem, 7vw, 6.2rem); }
.hero-intro { max-width: 590px; margin: 0 0 2rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.primary-link { display: inline-flex; align-items: center; gap: .75rem; border-radius: 999px; padding: .9rem 1.2rem .9rem 1.35rem; background: var(--forest); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 28px rgba(24, 57, 43, .2); }
.primary-link span { font-size: 1.25rem; }
.hero-art { position: relative; min-height: 100%; overflow: hidden; background: var(--mint); }
.hero-art::after { content: ""; position: absolute; inset: 0; opacity: .28; background-image: radial-gradient(var(--forest) .7px, transparent .7px); background-size: 10px 10px; }
.hero-art svg { position: absolute; z-index: 2; right: -5%; bottom: 0; width: 110%; }
.sun { position: absolute; top: 14%; right: 11%; width: clamp(110px, 16vw, 210px); aspect-ratio: 1; border-radius: 50%; background: #f5bd65; }
.hill-back { fill: #659271; }
.hill-front { fill: var(--forest); }
.trail { fill: none; stroke: var(--cream); stroke-width: 24; stroke-linecap: round; stroke-dasharray: 2 8; }
.pin path { fill: var(--orange); }
.pin circle { fill: var(--cream); }
.pin-two path { fill: var(--lime); }
.pin-two circle { fill: var(--forest); }
.art-label { position: absolute; z-index: 4; border-radius: 999px; padding: .55rem .85rem; background: #fff; color: var(--forest); font-size: .72rem; font-weight: 800; box-shadow: 0 10px 30px rgba(24, 57, 43, .14); }
.label-one { left: 7%; top: 42%; transform: rotate(-5deg); }
.label-two { right: 8%; top: 26%; transform: rotate(4deg); }

.challenge-section, .how-it-works { padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 6vw, 6rem); }
.section-heading, .panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.section-heading { max-width: 1320px; margin: 0 auto 2rem; }
.section-heading h2, .how-it-works h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.6rem); }
.section-heading > p { color: var(--muted); }
.challenge-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 1.2rem; max-width: 1320px; margin: 0 auto; }
.challenge-card { position: relative; min-height: 360px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.featured-card { display: grid; grid-template-columns: minmax(280px, 46%) 1fr; }
.card-hit-area { position: absolute; z-index: 5; inset: 0; border-radius: inherit; }
.card-hit-area:focus-visible { outline: 4px solid var(--orange); outline-offset: -6px; }
.challenge-visual { position: relative; min-height: 360px; overflow: hidden; background-color: var(--leaf); background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 14px 14px; }
.challenge-visual::before, .challenge-visual::after { content: ""; position: absolute; border: 28px solid var(--mint); border-radius: 50%; opacity: .35; }
.challenge-visual::before { width: 320px; height: 320px; left: -130px; top: 100px; }
.challenge-visual::after { width: 250px; height: 250px; right: -130px; top: -120px; }
.route-line { position: absolute; left: 17%; top: 12%; width: 67%; height: 74%; border: 4px dashed rgba(255,255,255,.7); border-radius: 42% 58% 44% 56%; transform: rotate(-9deg); }
.mini-pin { position: absolute; z-index: 2; display: grid; width: 42px; height: 42px; place-items: center; border: 5px solid #fff; border-radius: 50% 50% 50% 0; background: var(--orange); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(0,0,0,.2); transform: rotate(-45deg); }
.mini-pin::first-letter { transform: rotate(45deg); }
.mini-pin { line-height: 1; }
.pin-a { left: 18%; top: 18%; }
.pin-b { left: 68%; top: 26%; }
.pin-c { left: 52%; top: 65%; }
.pin-d { left: 24%; top: 69%; }
.visual-place { position: absolute; left: 40%; top: 43%; color: rgba(255,255,255,.9); font-family: Manrope, sans-serif; font-size: clamp(2.2rem, 5vw, 4.8rem); font-weight: 800; letter-spacing: -.06em; transform: rotate(-8deg); }
.card-body { align-self: center; padding: clamp(2rem, 5vw, 4rem); }
.card-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1.4rem; color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; }
.live-tag { border-radius: 999px; padding: .4rem .65rem; background: var(--lime); color: var(--forest); }
.card-body h3, .coming-card h3 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.5rem); }
.card-body > p, .coming-card p { color: var(--muted); }
.card-meta { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; margin-top: 2rem; font-size: .85rem; }
.card-meta span { display: inline-flex; gap: .3rem; }
.card-progress { color: var(--leaf); font-weight: 800; }
.round-arrow { position: absolute; z-index: 2; right: 1.2rem; top: 1.2rem; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-size: 1.35rem; transition: transform .2s ease; }
.featured-card:hover .round-arrow { transform: rotate(45deg); }
.coming-card { display: grid; place-items: center; padding: clamp(2rem, 5vw, 3.5rem); background: var(--cream); box-shadow: none; }
.coming-icon { display: grid; width: 56px; height: 56px; margin-bottom: 2rem; place-items: center; border: 1px dashed var(--leaf); border-radius: 50%; color: var(--leaf); font-size: 1.7rem; }
.coming-card h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

.how-it-works { background: var(--forest); color: #fff; }
.how-it-works > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.how-it-works .eyebrow { color: var(--lime); }
.how-it-works ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 3rem; padding: 0; list-style: none; background: rgba(255,255,255,.15); }
.how-it-works li { display: flex; gap: 1.2rem; padding: 2rem; background: var(--forest); }
.how-it-works li > span { color: var(--lime); font-family: Manrope, sans-serif; font-size: .75rem; font-weight: 800; }
.how-it-works strong { font-family: Manrope, sans-serif; font-size: 1.1rem; }
.how-it-works li p { margin: .6rem 0 0; color: rgba(255,255,255,.66); }

.challenge-view { padding-bottom: 5rem; background: var(--cream); }
.challenge-hero { padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 7vw, 7rem) clamp(2.4rem, 5vw, 4rem); background: var(--forest); color: #fff; }
.back-link { display: inline-flex; gap: .55rem; align-items: center; margin-bottom: clamp(2rem, 5vw, 4rem); color: rgba(255,255,255,.74); font-weight: 700; text-decoration: none; }
.challenge-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; max-width: 1300px; }
.challenge-title-row h1 { margin-bottom: .8rem; font-size: clamp(3.2rem, 9vw, 7.2rem); }
.challenge-title-row .eyebrow { color: var(--lime); }
.challenge-summary { max-width: 650px; margin: 0; color: rgba(255,255,255,.68); font-size: clamp(1rem, 2vw, 1.2rem); }
.progress-medallion { --progress: 0; flex: 0 0 auto; display: grid; width: clamp(110px, 14vw, 150px); aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--progress) * 1%), rgba(255,255,255,.12) 0); }
.progress-medallion::before { content: ""; grid-area: 1/1; width: calc(100% - 13px); aspect-ratio: 1; border-radius: 50%; background: var(--forest); }
.progress-medallion span { z-index: 1; grid-area: 1/1; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.progress-medallion strong { font-family: Manrope, sans-serif; font-size: 2.4rem; }
.progress-medallion small { margin-top: .4rem; color: rgba(255,255,255,.6); }
.challenge-facts { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 1300px; margin-top: 2.2rem; }
.challenge-facts span { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .55rem .8rem; color: rgba(255,255,255,.78); font-size: .85rem; }
.challenge-facts b { margin-right: .3rem; color: var(--lime); }

.challenge-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 1.25rem; max-width: 1440px; margin: -1px auto 0; padding: clamp(1rem, 3vw, 2rem); }
.field-map-card, .stops-panel { align-self: start; border: 1px solid var(--line); border-radius: 24px; padding: clamp(1rem, 3vw, 1.6rem); background: var(--paper); box-shadow: 0 14px 40px rgba(24, 57, 43, .08); }
.panel-heading { align-items: center; margin-bottom: 1.1rem; }
.panel-heading h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.map-location-button { color: #fff; background: var(--forest); }
.field-map { position: relative; overflow: hidden; min-height: 370px; border-radius: 18px; background: #dce7ce; }
.field-map::before { content: ""; position: absolute; inset: 0; opacity: .32; background-image: linear-gradient(30deg, transparent 48%, rgba(24,57,43,.13) 49%, rgba(24,57,43,.13) 51%, transparent 52%), linear-gradient(150deg, transparent 48%, rgba(24,57,43,.1) 49%, rgba(24,57,43,.1) 51%, transparent 52%); background-size: 80px 80px; }
#fieldMapSvg { position: relative; z-index: 2; display: block; width: 100%; min-height: 370px; }
.map-contour { fill: none; stroke: rgba(24,57,43,.12); stroke-width: 2; }
.map-route { fill: none; stroke: #fffdf8; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 15; }
.map-marker circle { fill: var(--orange); stroke: #fff; stroke-width: 5; filter: drop-shadow(0 5px 5px rgba(24,57,43,.22)); }
.map-marker text { fill: #fff; font-family: Manrope, sans-serif; font-size: 17px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.map-marker.is-visited circle { fill: var(--leaf); }
.map-label { fill: var(--forest); font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 800; paint-order: stroke; stroke: #dce7ce; stroke-width: 5px; stroke-linejoin: round; }
.user-marker .user-halo { fill: rgba(63,121,86,.2); stroke: rgba(63,121,86,.4); stroke-width: 1; }
.user-marker .user-dot { fill: #2468cc; stroke: #fff; stroke-width: 5; filter: drop-shadow(0 4px 7px rgba(22,65,130,.3)); }
.user-marker text { fill: #173b74; font-size: 12px; font-weight: 800; text-anchor: middle; paint-order: stroke; stroke: #dce7ce; stroke-width: 5px; }
.north-marker { position: absolute; z-index: 3; top: .85rem; right: .85rem; display: flex; flex-direction: column; align-items: center; border-radius: 999px; padding: .45rem .65rem; background: rgba(255,255,255,.86); color: var(--forest); font-size: .8rem; line-height: 1.05; box-shadow: 0 5px 18px rgba(24,57,43,.12); }
.map-scale { position: absolute; z-index: 3; left: .8rem; bottom: .7rem; margin: 0; border-radius: 999px; padding: .35rem .55rem; background: rgba(255,255,255,.82); color: var(--muted); font-size: .68rem; font-weight: 700; }
.location-readout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; margin-top: .85rem; border: 1px solid var(--line); border-radius: 16px; padding: .85rem; background: #fff; }
.readout-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--cream); color: var(--orange); font-size: 1.25rem; }
.location-readout strong { font-size: .88rem; }
.location-readout p { margin: .15rem 0 0; color: var(--muted); font-size: .78rem; }
.location-readout button { border: 0; border-radius: 999px; padding: .55rem .75rem; background: var(--lime); color: var(--forest); font-weight: 800; cursor: pointer; }
.location-readout.is-active .readout-icon { background: #dff1e5; color: var(--leaf); }
.map-note { margin: .8rem .2rem 0; color: var(--muted); font-size: .72rem; }

.stops-heading > span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.stop-list { display: grid; gap: .7rem; }
.stop-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .85rem; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; background: #fff; transition: border-color .2s, background .2s, opacity .2s; }
.stop-card.is-nearby { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(238,117,69,.1); }
.stop-card.is-visited { background: #edf3e9; }
.stop-card.is-locked { opacity: .56; }
.stop-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-family: Manrope, sans-serif; font-size: .82rem; font-weight: 800; }
.stop-card.is-visited .stop-number { background: var(--leaf); }
.stop-card h3 { margin: .1rem 0 .35rem; font-size: 1rem; letter-spacing: -.015em; }
.stop-card p { margin: 0; color: var(--muted); font-size: .78rem; }
.stop-distance { display: inline-flex; margin-top: .55rem; color: var(--leaf); font-size: .76rem; font-weight: 800; }
.stop-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.visit-button { border: 0; border-radius: 999px; padding: .55rem .72rem; background: var(--orange); color: #fff; font-size: .73rem; font-weight: 800; cursor: pointer; white-space: nowrap; }
.visit-button:hover { background: var(--orange-dark); }
.stop-card.is-visited .visit-button { background: var(--leaf); }
.directions-link { color: var(--muted); font-size: .7rem; font-weight: 700; }
.dwell-banner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .9rem; margin-bottom: .8rem; border-radius: 18px; padding: .8rem 1rem; background: #ffe4d8; color: var(--orange-dark); }
.dwell-banner p { margin: .15rem 0 0; font-size: .77rem; }
.dwell-ring { --dwell: 0; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--dwell) * 1%), rgba(255,255,255,.65) 0); }
.dwell-ring::before { content: ""; grid-area: 1/1; width: 37px; height: 37px; border-radius: 50%; background: #ffe4d8; }
.dwell-ring span { z-index: 1; grid-area: 1/1; font-size: .73rem; font-weight: 800; }
.reset-button { display: block; margin: 1.2rem auto .2rem; border: 0; background: transparent; color: var(--muted); font-size: .75rem; text-decoration: underline; cursor: pointer; }
.completion-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.2rem; max-width: 1380px; margin: 0 auto; border-radius: 24px; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--lime); }
.completion-mark { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; font-size: 1.8rem; }
.completion-card h2 { margin-bottom: .35rem; }
.completion-card p { margin-top: 0; margin-bottom: 0; }
.completion-card a { border-radius: 999px; padding: .8rem 1rem; background: var(--forest); color: #fff; font-weight: 700; text-decoration: none; }

footer { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1rem, 5vw, 4rem); background: #10271d; color: rgba(255,255,255,.58); font-size: .8rem; }
footer a { color: #fff; font-weight: 700; }
.confirm-dialog { width: min(92vw, 440px); border: 0; border-radius: 24px; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.confirm-dialog::backdrop { background: rgba(16,39,29,.68); backdrop-filter: blur(3px); }
.confirm-dialog form { padding: 2rem; text-align: center; }
.dialog-icon { display: grid; width: 52px; height: 52px; margin: 0 auto 1rem; place-items: center; border-radius: 50%; background: var(--cream); font-size: 1.4rem; }
.confirm-dialog h2 { margin-bottom: .6rem; }
.confirm-dialog p { color: var(--muted); }
.confirm-dialog form > div { display: flex; gap: .7rem; justify-content: center; margin-top: 1.4rem; }
.confirm-dialog button { border: 0; border-radius: 999px; padding: .75rem 1rem; font-weight: 800; cursor: pointer; }
.secondary-button { background: var(--cream); color: var(--ink); }
.danger-button { background: var(--orange); color: #fff; }

@media (max-width: 900px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 3rem; }
  .hero-art { min-height: 430px; }
  .challenge-grid, .challenge-layout { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr 1fr; }
  .how-it-works ol { grid-template-columns: 1fr; }
  .field-map-card, .stops-panel { align-self: auto; }
}

@media (max-width: 620px) {
  .site-header { min-height: 66px; padding: .6rem .8rem; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 34px; height: 34px; }
  .location-pill { padding: .6rem .7rem; font-size: .72rem; }
  .hero-wrap { min-height: auto; }
  .hero-copy { padding: 4rem 1.15rem 3rem; }
  .hero-copy h1 { font-size: clamp(3.1rem, 16vw, 4.8rem); }
  .hero-art { min-height: 330px; }
  .challenge-section, .how-it-works { padding: 4rem 1rem; }
  .section-heading { align-items: flex-start; }
  .section-heading > p { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .challenge-visual { min-height: 270px; }
  .card-body { padding: 1.5rem; }
  .card-body h3 { font-size: 2.4rem; }
  .round-arrow { top: 286px; }
  .challenge-title-row { align-items: center; }
  .challenge-title-row h1 { font-size: 3.6rem; }
  .progress-medallion { width: 94px; }
  .progress-medallion strong { font-size: 1.9rem; }
  .challenge-layout { padding: .75rem; }
  .field-map-card, .stops-panel { border-radius: 20px; }
  .field-map, #fieldMapSvg { min-height: 300px; }
  .map-label { display: none; }
  .location-readout { grid-template-columns: auto 1fr; }
  .location-readout button { grid-column: 1 / -1; width: 100%; }
  .stop-card { grid-template-columns: auto minmax(0, 1fr); }
  .stop-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; align-items: center; }
  .visit-button { flex: 1; }
  .completion-card { grid-template-columns: auto 1fr; margin: .75rem; }
  .completion-card a { grid-column: 1 / -1; text-align: center; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
