:root {
  --bg: #f3e2c7;
  --ink: #234e3a;
  --brass: #b08d57;
  --clay: #8c4a2f;
  --paper: #f7ead3;
  --mute: #5a6e62;
  --line: rgba(35, 78, 58, 0.28);
  --wax: #7a3d26;
  --header-h: 4.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(176, 141, 87, 0.18), transparent 42%),
    radial-gradient(ellipse at 88% 8%, rgba(140, 74, 47, 0.08), transparent 36%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(35, 78, 58, 0.018) 3px,
      rgba(35, 78, 58, 0.018) 4px
    );
  font-family: "Cabin", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.58;
}

body.is-locked {
  overflow: hidden;
}

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

a {
  color: var(--clay);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-family: "Almendra", Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.35rem);
}

h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
}

p {
  margin: 0 0 0.85em;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 0.8rem;
  top: -4rem;
  z-index: 400;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border: 2px dashed var(--ink);
}

.skip:focus {
  top: 0.8rem;
}

.kicker {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.18rem 0.7rem;
  border: 1px dashed var(--brass);
  background: var(--paper);
  color: var(--clay);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.lede {
  font-size: 1.12rem;
  max-width: 38rem;
}

.muted {
  color: var(--mute);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--brass);
  box-shadow: 0 1px 0 var(--paper);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: var(--header-h);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand img {
  width: 2.7rem;
  height: 2.7rem;
}

.brand-name {
  font-family: "Almendra", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.route-chip {
  display: none;
  border: 1px solid var(--brass);
  color: var(--clay);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
}

@media (min-width: 1100px) {
  .route-chip {
    display: inline-block;
  }
}

.site-nav {
  display: flex;
  gap: 0.15rem 1.05rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px dashed transparent;
  padding-bottom: 0.1rem;
}

.site-nav a:hover,
.site-nav a.is-now {
  color: var(--clay);
  border-bottom-color: var(--brass);
}

#guest-actions,
#player-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px dashed var(--ink);
  background: var(--paper);
  padding: 0.28rem 0.7rem;
  font-weight: 700;
  font-size: 0.88rem;
}

.player-chip::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 55%, transparent);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px dashed var(--ink);
  background: var(--paper);
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  transition: 0.2s;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.45rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-brass {
  background: var(--brass);
  color: #1a3328;
  box-shadow: 0 2px 0 #8a6c3e;
}

.btn-brass:hover {
  color: #1a3328;
  filter: brightness(1.06);
}

.btn-clay {
  background: var(--clay);
  color: var(--paper);
  box-shadow: 0 2px 0 var(--wax);
}

.btn-clay:hover {
  color: var(--paper);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px dashed var(--ink);
}

.btn-ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.hero {
  padding: 2.4rem 0 2.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.2rem 0 1.4rem;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.3rem;
  font-size: 0.88rem;
  color: var(--mute);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dash,
.legend-pin,
.legend-wax {
  width: 1.1rem;
  height: 0.7rem;
  display: inline-block;
}

.legend-dash {
  border-top: 3px dashed var(--ink);
  height: 0;
  width: 1.4rem;
}

.legend-pin {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--clay);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 2px var(--brass);
}

.legend-wax {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #b05d3c, var(--clay) 62%, var(--wax));
}

.map-frame {
  position: relative;
}

.map-frame figure {
  margin: 0;
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 0.7rem;
  box-shadow:
    8px 10px 0 color-mix(in srgb, var(--brass) 35%, transparent),
    0 16px 28px rgba(35, 78, 58, 0.12);
}

.map-frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.compass-mark {
  position: absolute;
  right: -0.4rem;
  top: -0.7rem;
  width: 4.4rem;
  height: 4.4rem;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(35, 78, 58, 0.2));
}

.section {
  padding: 3.1rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.8rem;
}

.map-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem 1.6rem;
  padding: 1.4rem 0.2rem 0.4rem;
}

.map-trail {
  position: absolute;
  inset: 12% 3% 22%;
  width: auto;
  height: auto;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.stamp-card {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(var(--brass), var(--brass)) 0 0 / 15px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 0 / 2px 15px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 0 / 15px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 0 / 2px 15px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 100% / 15px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 0 100% / 2px 15px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 100% / 15px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) 100% 100% / 2px 15px no-repeat,
    var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.15rem 1.05rem 1.25rem;
  text-align: center;
  box-shadow: 0 10px 22px rgba(35, 78, 58, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stamp-card:hover {
  transform: translateY(-4px) rotate(-0.3deg);
  box-shadow: 0 16px 28px rgba(35, 78, 58, 0.12);
}

.stamp-card img {
  width: min(100%, 11.5rem);
  height: 8.4rem;
  object-fit: contain;
  margin: 0.35rem auto 0.75rem;
  background: color-mix(in srgb, var(--bg) 70%, white);
  border: 1px solid color-mix(in srgb, var(--brass) 55%, var(--paper));
  padding: 0.35rem;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: -0.85rem;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: -0.52rem;
  background: var(--clay);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 3px var(--brass);
  z-index: 2;
}

.wax-seal {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-family: "Almendra", Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  background:
    radial-gradient(circle at 32% 28%, #c26a48, var(--clay) 58%, var(--wax));
  box-shadow:
    inset 0 -3px 6px rgba(0, 0, 0, 0.25),
    0 2px 0 rgba(35, 78, 58, 0.18);
}

.stamp-card h3 {
  margin-bottom: 0.35em;
}

.stamp-card p {
  color: var(--mute);
  font-size: 0.95rem;
}

.feature-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: center;
}

.checks {
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.6rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.7rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50% 50% 50% 0;
  background: var(--brass);
  transform: rotate(-45deg);
}

.trail-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  position: relative;
}

.trail-steps::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 1.35rem;
  border-top: 3px dashed var(--ink);
  z-index: 0;
}

.checkpoint {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.5rem 1.1rem 1.2rem;
  text-align: center;
}

.checkpoint .wax-seal {
  position: relative;
  right: auto;
  top: auto;
  margin: 0 auto 0.85rem;
}

.field-notes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.note {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--brass) 50%, var(--ink));
  padding: 1.35rem 1.05rem 1.15rem;
  box-shadow: 3px 6px 0 color-mix(in srgb, var(--ink) 8%, transparent);
  transform: rotate(var(--tilt, 0deg));
  position: relative;
}

.note::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.45rem;
  width: 0.85rem;
  height: 0.85rem;
  margin-left: -0.42rem;
  background: var(--clay);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--brass);
}

.woods-banner {
  position: relative;
  overflow: hidden;
  border: 2px dashed var(--ink);
  min-height: 18rem;
  display: grid;
  align-items: end;
}

.woods-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.woods-veil {
  position: relative;
  z-index: 1;
  padding: 2.2rem 1.6rem 1.8rem;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--paper) 88%, transparent) 42%, var(--paper) 100%);
}

.woods-veil p:last-of-type {
  max-width: 38rem;
}

.safe-sheet {
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.5rem 1.3rem;
  box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--brass) 22%, transparent);
}

.page-hero {
  padding: 2.2rem 0 0.4rem;
}

.journal {
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.6rem 1.4rem 1.4rem;
  box-shadow: 10px 0 0 color-mix(in srgb, var(--brass) 28%, transparent);
}

.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: 1.4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.4rem;
}

.info-card,
.form-card {
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.3rem 1.2rem 1.4rem;
  position: relative;
}

.info-card::before,
.form-card::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  width: 0.85rem;
  height: 0.85rem;
  background: var(--clay);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 3px var(--brass);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.field input,
.field textarea {
  background: var(--bg);
  border: 1px dashed var(--ink);
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  font: inherit;
  border-radius: 2px;
}

.field textarea {
  min-height: 8.2rem;
  resize: vertical;
}

.form-ok {
  display: none;
  padding: 1.4rem 0.3rem;
  text-align: center;
}

.form-card.is-sent form {
  display: none;
}

.form-card.is-sent .form-ok {
  display: block;
}

.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--brass);
  background: color-mix(in srgb, var(--paper) 80%, var(--bg));
  padding: 2.4rem 0 1.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.9fr;
  gap: 1.4rem;
}

.footer-grid h4 {
  color: var(--clay);
  font-size: 1.05rem;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--mute);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--ink);
}

.brand-foot {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Almendra", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.brand-foot img {
  width: 2.2rem;
  height: 2.2rem;
}

.footer-bottom {
  margin-top: 1.6rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--mute);
  font-size: 0.88rem;
}

#age-overlay,
#auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(35, 78, 58, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.2s ease;
}

#age-overlay.is-open,
#auth-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.age-card,
.auth-card {
  width: min(28rem, 100%);
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 1.5rem 1.3rem 1.5rem;
  position: relative;
  box-shadow:
    0 0 0 7px var(--bg),
    12px 14px 0 color-mix(in srgb, var(--brass) 40%, transparent);
}

.age-card::before,
.auth-card::before,
.age-card::after,
.auth-card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--brass);
}

.age-card::before,
.auth-card::before {
  top: 6px;
  left: 6px;
  border-right: 0;
  border-bottom: 0;
}

.age-card::after,
.auth-card::after {
  bottom: 6px;
  right: 6px;
  border-left: 0;
  border-top: 0;
}

.age-actions,
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

#age-denied {
  margin-top: 0.9rem;
  color: var(--clay);
  font-weight: 700;
}

#auth-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px dashed var(--ink);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  z-index: 2;
  font-size: 1.2rem;
  line-height: 1;
}

.auth-tab {
  flex: 1;
  border: 1px dashed var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0.5rem;
  cursor: pointer;
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
}

.auth-tab.is-on {
  background: var(--ink);
  color: var(--paper);
  border-style: solid;
}

.auth-card form {
  margin-top: 1rem;
}

.auth-error {
  min-height: 1.15em;
  color: var(--clay);
  font-weight: 700;
  margin: 0.25rem 0 0.65rem;
}

#cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 160;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin-inline: auto;
  background: var(--paper);
  border: 2px dashed var(--ink);
  padding: 0.95rem 1.05rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.8rem);
  box-shadow: 0 10px 24px rgba(35, 78, 58, 0.16);
}

#cookie-banner.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

#cookie-banner p {
  margin: 0;
  flex: 1 1 18rem;
}

@media (max-width: 980px) {
  .header-row {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
    order: 2;
  }

  .header-actions {
    order: 3;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    padding: 0.4rem 0 0.9rem;
    border-top: 1px dashed var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-grid,
  .feature-split,
  .contact-grid,
  .map-board,
  .trail-steps,
  .field-notes,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .map-trail,
  .trail-steps::before {
    display: none;
  }

  .stamp-card:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2.05rem;
    width: 0;
    height: 1.7rem;
    border-left: 3px dashed var(--ink);
  }

  .field-notes .note {
    transform: none;
  }
}

@media (max-width: 640px) {
  .header-actions .btn {
    padding-inline: 0.7rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .stamp-card,
  #cookie-banner,
  #age-overlay,
  #auth-overlay {
    transition: none;
  }

  .stamp-card:hover {
    transform: none;
  }
}
