@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url(fonts/Barlow-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(fonts/Barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(fonts/Barlow-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(fonts/BarlowCondensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(fonts/BarlowCondensed-700.woff2) format('woff2'); }
@font-face { font-family: 'Caveat'; font-weight: 500; font-display: swap; src: url(fonts/Caveat-500.woff2) format('woff2'); }

:root {
  --paper: #f7f3ec; --paper-2: #efe8db; --sand: #dfcbb4; --sand-2: #cdb597;
  --moss: #4a5535; --moss-2: #3a4329; --sage: #7b8b55; --bark: #6e5d50; --ink: #1f2218; --mute: #6b6a62;
  --red: #c8102e; --red-2: #a30d25; --line: rgba(31,34,24,.12);
  --r: 14px; --shadow: 0 18px 40px -24px rgba(31,34,24,.45);
  --font: 'Barlow', system-ui, sans-serif; --cond: 'Barlow Condensed', 'Barlow', system-ui, sans-serif; --hand: 'Caveat', cursive;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--cond); line-height: 1; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.small { font-size: .85rem; color: var(--mute); }
.ic { width: 1.05em; height: 1.05em; flex: none; vertical-align: -.15em; fill: currentColor; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.15rem; border-radius: 999px; font: 600 .92rem/1 var(--font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-2); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--moss-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: .55rem .9rem; font-size: .85rem; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem clamp(16px, 4vw, 40px); background: rgba(247,243,236,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand img { height: 46px; width: auto; }
.topnav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); }
.topnav > a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink); opacity: .8; }
.topnav > a:not(.btn):hover { opacity: 1; }
.only-mobile { display: none; }

main { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.crumbs { font-size: .82rem; color: var(--mute); margin-bottom: 1.2rem; }
.crumbs a { text-decoration: none; }
.crumbs span { margin: 0 .35rem; opacity: .5; }
.byline { font-size: .92rem; margin-bottom: 1rem; }
.byline img { display: inline-block; vertical-align: middle; border-radius: 50%; width: 28px; height: 28px; margin-right: .4rem; }
.byline a { color: var(--red); font-weight: 600; text-decoration: none; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; margin-bottom: 1.1rem; }
h1 .nz { color: var(--red); }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0; margin: 0 0 1.1rem; font-size: .95rem; color: var(--mute); }
.stats li { display: inline-flex; align-items: center; gap: .35rem; }
.stats b { color: var(--ink); font-weight: 600; }
.lede { font-size: 1.08rem; max-width: 34rem; }
.startline { display: flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--mute); margin-bottom: 1.4rem; }
.startline .ic { color: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cover { margin: 0; position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1.1rem .9rem; font-size: .82rem; color: #fff; background: linear-gradient(to top, rgba(31,34,24,.72), transparent); }

/* collection layout */
.collection { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 46%); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; padding-bottom: 4rem; }
.list-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.list-head h2 { font-size: 2rem; }
.tabs { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; }
.tab { border: 0; background: transparent; font: 600 .82rem/1 var(--font); padding: .5rem .85rem; border-radius: 999px; color: var(--mute); cursor: pointer; }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.routes { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.route { background: #fff; border-radius: var(--r); border: 1.5px solid transparent; box-shadow: 0 1px 2px rgba(31,34,24,.05), 0 10px 30px -22px rgba(31,34,24,.35); overflow: hidden; transition: border-color .18s, transform .18s, box-shadow .18s; scroll-margin-top: 90px; }
.route.is-active { border-color: var(--route-color, var(--red)); transform: translateY(-2px); box-shadow: 0 14px 34px -20px rgba(31,34,24,.45); }
.route-media { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); cursor: pointer; }
.route-media img { width: 100%; height: 100%; object-fit: cover; }
.route-media .nr { position: absolute; top: .8rem; left: .8rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--route-color, var(--red)); color: #fff; font: 700 1.05rem/2.1rem var(--cond); text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.route-media .lvl { position: absolute; top: .8rem; right: .8rem; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 999px; padding: .3rem .7rem; font: 600 .75rem/1 var(--font); }
.route-body { padding: 1rem 1.1rem 1.1rem; }
.route h3 { font-size: 1.55rem; font-weight: 700; margin-bottom: .15rem; }
.route h3 a { text-decoration: none; }
.route h3 a:hover { color: var(--red); }
.route .sub { color: var(--mute); font-size: .92rem; margin-bottom: .6rem; }
.route .meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; color: var(--mute); margin-bottom: .9rem; }
.route .meta span { display: inline-flex; align-items: center; gap: .3rem; }
.route .meta b { color: var(--ink); font-weight: 600; }
.route .acts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.route .acts .more { margin-left: auto; background: none; border: 0; font: 600 .85rem var(--font); color: var(--mute); cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; padding: .4rem .2rem; }
.route .acts .more .ic { transition: transform .2s; }
.route.is-open .acts .more .ic { transform: rotate(180deg); }
.route-detail { display: none; border-top: 1px solid var(--line); padding: 1rem 1.1rem 1.2rem; }
.route.is-open .route-detail { display: block; }
.route-detail p { font-size: .96rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem 1rem; margin: .8rem 0 1rem; font-size: .88rem; }
.facts dt { color: var(--mute); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; font-weight: 500; }
.profile { width: 100%; height: 96px; display: block; }
.profile-cap { display: flex; justify-content: space-between; font-size: .75rem; color: var(--mute); margin-top: .2rem; }

/* map */
.map-col { position: sticky; top: 76px; }
.map-frame { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: var(--paper-2); height: calc(100vh - 100px); min-height: 460px; max-height: 860px; }
.map-frame.is-full { position: fixed; inset: 0; z-index: 100; border-radius: 0; height: 100vh; max-height: none; }
#map { position: absolute; inset: 0; background: #e9e4d8; }
.map-ui { position: absolute; top: .8rem; left: .8rem; right: .8rem; z-index: 500; display: flex; gap: .5rem; align-items: center; pointer-events: none; }
.map-ui > * { pointer-events: auto; }
.layers { display: inline-flex; background: #fff; border-radius: 999px; padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.layers button { border: 0; background: transparent; font: 600 .8rem/1 var(--font); padding: .5rem .8rem; border-radius: 999px; color: var(--mute); cursor: pointer; }
.layers button.is-active { background: var(--ink); color: #fff; }
.map-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; display: inline-grid; place-items: center; }
.map-btn:first-of-type { margin-left: auto; }
.map-btn .ic { width: 18px; height: 18px; }
.map-legend { position: absolute; left: .8rem; bottom: 1.4rem; z-index: 500; display: flex; flex-direction: column; gap: .25rem; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-radius: 12px; padding: .55rem .7rem; font-size: .78rem; box-shadow: 0 2px 8px rgba(0,0,0,.12); max-width: 60%; }
.map-legend button { display: flex; align-items: center; gap: .45rem; border: 0; background: none; font: 500 .78rem var(--font); color: var(--ink); padding: .1rem 0; cursor: pointer; text-align: left; }
.map-legend button i { width: 18px; height: 4px; border-radius: 2px; background: var(--c); flex: none; }
.map-legend button.is-active { font-weight: 600; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.75) !important; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 2px 8px rgba(0,0,0,.15) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-control-zoom a { color: var(--ink) !important; border: 0 !important; }
.start-pin { width: 34px; height: 44px; }
.start-pin svg { width: 34px; height: 44px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.route-tip { background: var(--ink); color: #fff; border: 0; border-radius: 8px; font: 600 .82rem var(--font); padding: .35rem .6rem; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.route-tip::before { border-top-color: var(--ink) !important; }

/* stats block */
.stats-block { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.stats-block h2 { font-size: 1.9rem; margin-bottom: 1rem; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 0 0 1.6rem; }
.statgrid dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.statgrid dd { margin: 0; font: 700 1.6rem/1.1 var(--cond); }
.marit { display: grid; grid-template-columns: 56px 1fr; gap: 1rem; background: #fff; border-radius: var(--r); padding: 1.2rem; box-shadow: 0 1px 2px rgba(31,34,24,.05); }
.marit img { border-radius: 50%; }
.marit .hand { font: 500 1.5rem/1.1 var(--hand); color: var(--moss); margin-bottom: .5rem; }
.marit .tip { font-size: .88rem; color: var(--mute); margin: 0; }

/* footer */
.foot { background: var(--ink); color: rgba(247,243,236,.85); padding: 3rem clamp(16px, 4vw, 40px) 2.5rem; margin-top: 1rem; }
.foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: 2rem; }
.foot h3 { font-size: 1.2rem; color: #fff; margin-bottom: .6rem; }
.foot a { color: #fff; }
.foot .small { color: rgba(247,243,236,.6); }
.foot-logo { height: 52px; width: auto; margin-bottom: 1rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .collection { grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .cover { aspect-ratio: 16 / 10; }
  .collection { display: flex; flex-direction: column; }
  .map-col { position: static; order: -1; width: 100%; }
  .map-frame { height: 62vh; min-height: 380px; }
  .only-mobile { display: inline; }
  .foot-grid { grid-template-columns: 1fr; }
  .list-col { width: 100%; }
}
@media (max-width: 600px) {
  .topbar { padding-inline: 16px; }
  .brand img { height: 38px; }
  .topnav > a:not(.btn) { display: none; }
  h1 { font-size: 2.7rem; }
  .route .acts .btn { font-size: .8rem; padding: .5rem .75rem; }
  .map-legend { display: none; }
  .map-frame { height: 56vh; }
  .marit { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover, .route.is-active { transform: none; } }
