:root {
  --ink: #172b38;
  --ink-soft: #40515b;
  --cream: #f6f0e4;
  --paper: #fffdf8;
  --red: #b82635;
  --red-dark: #8d1726;
  --gold: #d99920;
  --wine: #7d3048;
  --copper: #b75e32;
  --line: #d9d1c3;
  --water: #dcebef;
  --shadow: 0 18px 50px rgba(23,43,56,.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-160%); background: var(--ink); color: white; padding: .75rem 1rem; border-radius: .25rem; }
.skip-link:focus { transform: none; }

.site-header { height: 88px; padding: 0 clamp(1.25rem, 5vw, 5rem); display: flex; align-items: center; justify-content: space-between; background: var(--cream); border-bottom: 1px solid rgba(23,43,56,.12); }
.brand { display: flex; align-items: center; gap: .7rem; line-height: .9; }
.brand-mark { width: 45px; height: 45px; display: grid; place-items: center; background: var(--red); color: white; transform: rotate(3deg); }
.brand-mark svg { width: 38px; height: 38px; }
.brand-mark svg > path:first-child { fill: var(--red); stroke: #fff; stroke-width: 2; }
.brand-mark svg > path:not(:first-child) { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.brand strong, .brand em { display: block; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.4rem; }
.brand em { margin-top: .35rem; color: var(--red); font-size: .72rem; font-style: normal; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.header-link { text-underline-offset: .3rem; font-weight: 700; font-size: .9rem; }
.hero-ctas { display:flex; align-items:center; flex-wrap:wrap; gap:1.2rem; }
.passport-cta { color:var(--red); font-weight:850; text-underline-offset:.3rem; }

.hero { min-height: 585px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); align-items: stretch; background: var(--cream); }
.hero-copy { z-index: 1; padding: clamp(5rem, 8vw, 8.5rem) 4vw clamp(4rem, 7vw, 7rem) max(1.5rem, calc((100vw - 1440px)/2 + 5rem)); }
.eyebrow { margin: 0 0 1rem; color: var(--red); font-size: .76rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
h1, h2, h3, p { text-wrap: pretty; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.045em; }
h1 { margin: 0; font-size: clamp(3.35rem, 6vw, 6.8rem); line-height: .92; }
h1 span { color: var(--red); font-style: italic; }
.hero-intro { max-width: 610px; margin: 1.7rem 0 2.2rem; color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.65; }
.primary-cta, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; border: 0; border-radius: 3px; background: var(--red); color: white; padding: .95rem 1.2rem; font-weight: 800; text-decoration: none; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s, background .15s; }
.primary-cta:hover, .primary-button:hover { background: var(--red-dark); transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.hero-art { position: relative; min-height: 500px; background: #cbdfe2; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; inset: 0; opacity: .18; background-image: radial-gradient(var(--ink) .7px, transparent .7px); background-size: 8px 8px; }
.hero-art svg { position: absolute; bottom: 0; left: 0; width: 100%; height: auto; }
.sun { position: absolute; width: 215px; aspect-ratio: 1; top: 65px; right: 12%; border-radius: 50%; background: #f3c869; }
.land-back { fill: #87a977; }
.land-front { fill: #547659; }
.road { fill: none; stroke: #e7d1a7; stroke-width: 17; stroke-linecap: round; }
.glass path, .bottle path, .hop path { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.glass .drink { fill: var(--wine); stroke-width: 5; }
.bottle path:first-child { fill: #c1783b; }
.hop path { stroke: #254c35; }

.passport-intro { padding:clamp(4rem,7vw,7rem) clamp(1.5rem,7vw,7rem); display:grid; grid-template-columns:minmax(0,.8fr) minmax(520px,1.2fr); gap:clamp(3rem,7vw,7rem); align-items:center; background:#e9f0ed; }
.passport-intro-copy > p:not(.eyebrow) { max-width:620px; margin:1.35rem 0 1.8rem; color:var(--ink-soft); line-height:1.65; }
.passport-icon-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:.8rem; }
.passport-icon-grid article { min-height:210px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:1.2rem; border:1px solid rgba(23,43,56,.14); background:rgba(255,253,248,.78); text-align:center; }
.passport-icon-grid img { width:88px; height:88px; margin-bottom:.7rem; object-fit:contain; }
.passport-icon-grid strong { font-family:Georgia,serif; font-size:1.2rem; }
.passport-icon-grid span { margin-top:.35rem; color:var(--ink-soft); font-size:.75rem; }

.trail { padding: clamp(4rem, 7vw, 7rem) clamp(1rem, 5vw, 5rem); background: var(--paper); }
.trail-heading { max-width: 1440px; margin: 0 auto 2rem; display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
h2 { margin: 0; font-size: clamp(2.5rem, 4.5vw, 4.6rem); line-height: 1; }
.trail-summary { max-width: 390px; margin: 0; color: var(--ink-soft); line-height: 1.6; }
.trail-summary strong { color: var(--red); font-family: Georgia, serif; font-size: 1.8rem; }
.toolbar { max-width: 1440px; margin: 0 auto 1rem; display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: .8rem; align-items: center; }
.search-box { height: 48px; display: flex; align-items: center; gap: .65rem; padding: 0 .9rem; border: 1px solid var(--line); background: white; }
.search-box:focus-within { outline: 3px solid rgba(184,38,53,.15); border-color: var(--red); }
.search-box svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 2; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.filter-group { display: flex; gap: .35rem; }
.filter, .surprise { min-height: 48px; border: 1px solid var(--line); background: white; color: var(--ink); padding: .65rem .8rem; cursor: pointer; font-size: .83rem; font-weight: 800; }
.filter { display: inline-flex; gap: .43rem; align-items: center; }
.filter span { color: #71808a; font-size: .72rem; }
.filter.active { border-color: var(--ink); background: var(--ink); color: white; }
.filter.active span { color: #d9e0e4; }
.surprise { border-color: var(--red); color: var(--red); }
.surprise:hover { background: #fff2f1; }
.filter i, .map-key i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.all-dot { background: linear-gradient(90deg,var(--gold) 0 33%,var(--wine) 33% 66%,var(--copper) 66%); }
.brewery-dot { background: var(--gold); }
.winery-dot { background: var(--wine); }
.distillery-dot { background: var(--copper); }

.explorer { position: relative; max-width: 1440px; min-height: 650px; margin: 0 auto; display: grid; grid-template-columns: 340px minmax(0,1fr); border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.results-panel { min-width: 0; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; max-height: 680px; }
.results-heading { padding: 1.2rem 1.25rem 1rem; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); }
.results-heading h3 { margin: 0; font-family: Georgia,serif; font-size: 1.45rem; }
.results-heading span { color: var(--ink-soft); font-size: .8rem; }
.location-list { overflow: auto; overscroll-behavior: contain; }
.location-item { width: 100%; display: grid; grid-template-columns: 12px 1fr auto; gap: .8rem; align-items: start; padding: 1.05rem 1rem; border: 0; border-bottom: 1px solid #eee8de; background: white; text-align: left; cursor: pointer; }
.location-item:hover, .location-item:focus-visible, .location-item.selected { background: #f8f2e7; outline: 0; }
.location-item.selected { box-shadow: inset 4px 0 var(--red); }
.location-item .marker { width: 10px; height: 10px; margin-top: .35rem; border-radius: 50%; }
.location-item strong { display: block; margin-bottom: .3rem; font-family: Georgia,serif; font-size: 1rem; line-height: 1.25; }
.location-item small { color: var(--ink-soft); line-height: 1.35; }
.visited-label { display:inline-block; margin:0 0 .3rem; color:#2e6c45; font-size:.68rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.location-item .arrow { color: var(--red); font-size: 1.25rem; }
.empty-list { padding: 2rem 1.25rem; color: var(--ink-soft); line-height: 1.6; }
.map-panel { position: relative; min-width: 0; background: var(--water); }
.map-shell { min-height: 650px; position: relative; overflow: hidden; touch-action: none; background: var(--water); }
.map-canvas, .map-canvas svg { width: 100%; height: 100%; position: absolute; inset: 0; display: block; }
.map-canvas svg { cursor: grab; }
.map-canvas svg.dragging { cursor: grabbing; }
.map-message { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; padding: 2rem; color: var(--ink-soft); text-align: center; }
.maryland-counties use { stroke: #fffdf8; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.map-pin { cursor: pointer; outline: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.map-pin .pin-icon { pointer-events: none; }
.map-pin .pin-ring { fill: white; stroke: white; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.map-pin:hover .pin-ring, .map-pin:focus .pin-ring, .map-pin.selected .pin-ring { stroke: var(--ink); stroke-width: 3.2; }
.map-pin.selected { filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
.map-pin.visited .pin-ring { stroke:#2e6c45; stroke-width:4; }
.pin-check { fill:none; stroke:white; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; pointer-events:none; }
.map-controls { position: absolute; right: 1rem; top: 1rem; display: grid; gap: .35rem; }
.map-controls button { width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(255,253,248,.94); color: var(--ink); font-size: 1.25rem; font-weight: 800; cursor: pointer; box-shadow: 0 3px 12px rgba(23,43,56,.12); }
.map-controls button:hover { background: white; border-color: var(--ink); }
.map-key { position: absolute; left: 1rem; bottom: 1rem; display: flex; flex-wrap: wrap; gap: .8rem; padding: .65rem .8rem; border: 1px solid rgba(23,43,56,.15); background: rgba(255,253,248,.92); font-size: .74rem; font-weight: 800; }
.map-key span { display: flex; align-items: center; gap: .35rem; }
.place-card { position: absolute; z-index: 5; left: 50%; top: 50%; width: min(420px, calc(100% - 2rem)); padding: 1.35rem 1.45rem; border: 1px solid rgba(23,43,56,.14); border-top: 5px solid var(--red); background: var(--paper); box-shadow: 0 16px 45px rgba(23,43,56,.3); transform: translate(-50%,-50%); touch-action: auto; isolation: isolate; }
.place-card[hidden] { display: none; }
.close-card { position: absolute; right: .6rem; top: .55rem; width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink); font-size: 1.7rem; cursor: pointer; }
.place-category { margin: 0 2rem .45rem 0; color: var(--red); font-size: .7rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.place-card h3 { margin: 0 2rem .65rem 0; font-family: Georgia,serif; font-size: 1.65rem; line-height: 1.08; }
.place-address { margin: .4rem 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.place-pet { margin-top: .9rem; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; padding: .7rem .75rem; border: 1px solid #b8d5c0; background: #edf7ef; }
.place-pet[hidden] { display: none; }
.pet-badge { display: inline-flex; align-items: center; gap: .32rem; padding: .35rem .55rem; border-radius: 999px; background: #27623d; color: white; font-size: .72rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.pet-badge span { width: .95rem; height: .85rem; flex: 0 0 auto; font-size: 0; line-height: 1; color: white; background: radial-gradient(circle at 12% 31%, currentColor 0 .105rem, transparent .12rem), radial-gradient(circle at 37% 14%, currentColor 0 .11rem, transparent .125rem), radial-gradient(circle at 63% 14%, currentColor 0 .11rem, transparent .125rem), radial-gradient(circle at 88% 31%, currentColor 0 .105rem, transparent .12rem), radial-gradient(ellipse 42% 38% at 50% 69%, currentColor 0 95%, transparent 100%); background-repeat: no-repeat; }
.pet-restrictions { flex: 1 1 180px; color: #284a35; font-size: .75rem; font-weight: 700; line-height: 1.35; }
.pet-policy-link { color: #27623d; font-size: .72rem; font-weight: 900; text-underline-offset: .2rem; white-space: nowrap; }
.place-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.place-visited { width:100%; margin-top:1rem; }
.primary-button { padding: .7rem .9rem; font-size: .83rem; box-shadow: 3px 3px 0 var(--ink); }
.place-actions .primary-button + .primary-button { border: 1px solid var(--red); background: transparent; color: var(--red); box-shadow: none; }
.place-actions .primary-button + .primary-button:hover { background: #fff2f1; transform: none; }
.text-button { color: var(--red); font-size: .82rem; font-weight: 800; text-underline-offset: .25rem; }
.map-note { max-width: 1440px; margin: .8rem auto 0; color: #66747c; font-size: .76rem; }

.about { padding: clamp(4rem,7vw,7rem) clamp(1.5rem,8vw,8rem); display: grid; grid-template-columns: .7fr 1.3fr; gap: 5vw; background: var(--ink); color: white; }
.about .eyebrow { color: #f1bc57; }
.about-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2.2rem; }
.about-grid article { border-top: 1px solid rgba(255,255,255,.3); padding-top: 1.2rem; }
.about-grid .number { color: #f1bc57; font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.about-grid h3 { margin: .8rem 0 .6rem; font-family: Georgia,serif; font-size: 1.45rem; }
.about-grid p { margin: 0; color: #cbd4d9; line-height: 1.65; font-size: .9rem; }
footer { min-height: 110px; padding: 2rem clamp(1.5rem,5vw,5rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: #10212c; color: #dfe6e9; }
.footer-brand strong { color: white; }
footer p { margin: 0; color: #aebcc3; font-size: .83rem; }

@media (max-width: 1080px) {
  .toolbar { grid-template-columns: 1fr auto; }
  .filter-group { grid-column: 1/-1; grid-row: 2; overflow-x: auto; }
  .surprise { grid-column: 2; grid-row: 1; }
  .explorer { grid-template-columns: 300px 1fr; }
  .about { grid-template-columns: 1fr; }
  .passport-intro { grid-template-columns:1fr; }
}

@media (max-width: 760px) {
  .site-header { height: 76px; padding: 0 1rem; }
  .header-link { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { padding: 4.5rem 1.25rem 3.5rem; }
  .hero-art { min-height: 340px; }
  .passport-icon-grid { grid-template-columns:1fr; }
  .passport-icon-grid article { min-height:130px; }
  .trail { padding: 4rem .85rem; }
  .trail-heading { align-items: start; flex-direction: column; gap: 1rem; }
  .toolbar { grid-template-columns: 1fr; }
  .search-box, .surprise { grid-column: 1; }
  .surprise { grid-row: 3; }
  .filter-group { grid-row: 2; }
  .filter { flex: 0 0 auto; }
  .explorer { display: flex; flex-direction: column-reverse; min-height: 0; }
  .results-panel { max-height: 360px; border-right: 0; border-top: 1px solid var(--line); }
  .map-shell { min-height: 450px; }
  .place-card { left: .75rem; right: .75rem; top: auto; bottom: .75rem; width: auto; max-height: calc(100% - 1.5rem); overflow-y: auto; transform: none; background: #fffdf8; }
  .map-key { right: .75rem; left: .75rem; bottom: .75rem; justify-content: center; }
  .place-card:not([hidden]) ~ * { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; }
}

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