/* Bygdekartan Järvsö – efter Fridas design (design/frida-oversikt.png). */
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("/vendor/fonts/instrument-serif-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("/vendor/fonts/instrument-serif-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/vendor/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/vendor/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 400; font-display: swap; src: url("/vendor/fonts/caveat-400.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap; src: url("/vendor/fonts/caveat-500.woff2") format("woff2"); }

:root {
  --paper: #f7f2e8;
  --paper-deep: #efe8da;
  --ink: #1d1a16;
  --muted: #6e6a63;
  --line: #d8d1c4;
  --line-strong: #1d1a16;
  --salmon: #f3a68f;
  --salmon-soft: #f8c9b8;
  --apricot: #f8cfa8;
  --green: #3f7d4f;
  --green-bg: #e4efe1;
  --red: #b7442f;
  --red-bg: #f7e2db;
  --grey-bg: #ebe6db;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --radius: 12px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
em { font-style: italic; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.hand { font-family: var(--hand); font-size: 20px; line-height: 1; color: var(--red); }
.hand.ink { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.doodle { display: block; overflow: visible; }
.blob { position: absolute; pointer-events: none; z-index: -1; filter: url(#frayed); }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.logo-text { font-family: var(--display); font-size: 21px; line-height: 1; }
.logo svg { width: 22px; height: 24px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 13px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover { text-decoration: underline; }
.for-businesses { position: relative; padding: 8px 16px; }
.for-businesses::before { content: ""; position: absolute; inset: 0 -4px; z-index: -1; border-radius: 50% 45% 55% 50% / 55% 50% 50% 45%;
  background: radial-gradient(ellipse at 45% 50%, var(--salmon) 0%, var(--salmon-soft) 55%, rgba(248,201,184,0) 80%); filter: url(#frayed); }
@media (max-width: 600px) { .nav .hide-mobile { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; padding: 22px 0 6px; }
.hero-date { display: block; margin-bottom: 8px; }
.hero h1 { font-size: clamp(44px, 6.2vw, 68px); max-width: 9.5em; }
.lede { font-size: 15px; color: var(--ink); max-width: 36em; margin: 14px 0 0; line-height: 1.5; }
.church { position: relative; justify-self: center; width: min(100%, 380px); text-align: right; margin: 0; }
.church svg { width: 100%; height: auto; }
.church figcaption { font-family: var(--hand); font-size: 18px; color: var(--muted); margin-top: -4px; }
@media (min-width: 780px) {
  .hero { grid-template-columns: 1.15fr 1fr; }
  .church { justify-self: end; }
}

/* Search */
.search { position: relative; margin: 18px 0 0; }
.search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 5px 5px 14px; max-width: 560px; }
.search-box svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 14px/1.3 var(--sans); color: var(--ink); }
.search-box input::placeholder { color: #8a857c; }
.search-box button { border: 0; border-radius: 999px; padding: 9px 16px; background: var(--salmon); color: var(--ink); font: 600 13px var(--sans); cursor: pointer; }
.search-box button:hover { background: #ef9a80; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; padding: 4px 11px; font: 500 12px var(--sans); color: var(--ink); cursor: pointer; line-height: 1.4; }
.chip:hover { background: var(--paper-deep); }
.chip-active, .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chip[aria-pressed="true"] .dot { background: #8fd3a0; }

/* Vine divider */
.vine { width: 100%; height: 36px; margin: 22px 0 6px; }

/* Results */
.results-head { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 22px; font-family: var(--display); }
.results-head h2 .hand { font-size: 22px; color: var(--muted); margin-left: 4px; }
.results-head .arrow { width: 26px; height: 20px; align-self: center; }
.distance-link { font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; background: none; border: 0; font-family: var(--sans); padding: 0; margin-left: auto; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.map-wrap { position: relative; order: -1; }
#map { height: 320px; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--paper-deep); }
.map-twig { position: absolute; top: -14px; left: 8px; width: 46px; height: 40px; pointer-events: none; z-index: 2; }
.map-caption { font-family: var(--hand); font-size: 16px; color: var(--muted); margin: 6px 0 0; }
.map-error { padding: 20px; color: var(--muted); }
.map-card { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; z-index: 3; }
.map-card[hidden] { display: none; }
.map-card .title { font-family: var(--display); font-size: 17px; line-height: 1.1; }
.map-card .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.map-card a { flex: none; background: var(--salmon); color: var(--ink); text-decoration: none; border-radius: 999px; padding: 8px 12px; font: 600 12px var(--sans); white-space: nowrap; }
.map-card .close { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; font: 12px var(--sans); cursor: pointer; line-height: 1; }
@media (min-width: 900px) {
  .results-layout { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; }
  .map-wrap { position: sticky; top: 12px; order: 0; }
  #map { height: min(70vh, 560px); }
}

/* Cards */
.cards { display: grid; gap: 12px; }
.card { background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 14px 12px; transition: box-shadow .12s; }
.card-active { box-shadow: 0 0 0 2px var(--salmon); }
.card-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.card-number { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font: 600 12px var(--sans); background: #fff; margin-top: 1px; }
.card-active .card-number { background: var(--salmon); }
.card-name { font-size: 20px; font-family: var(--display); }
.card-distance { font-family: var(--hand); font-size: 17px; color: var(--muted); white-space: nowrap; }
.card-category { grid-column: 2 / -1; font-size: 10.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.card-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font: 500 12px var(--sans); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-open { background: var(--green-bg); color: var(--green); } .pill-open .dot { background: var(--green); }
.pill-closed { background: var(--red-bg); color: var(--red); } .pill-closed .dot { background: var(--red); }
.pill-unknown { background: var(--grey-bg); color: var(--muted); } .pill-unknown .dot { background: #a9a39a; }
.card-hours { font-size: 12px; color: var(--muted); }
.card-description { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.card-note { margin: 6px 0 0; font-size: 13px; line-height: 1.5; }
.card-note .who { color: var(--muted); }
.card-greeting { margin: 6px 0 0; font-family: var(--hand); font-size: 19px; color: var(--muted); line-height: 1.1; }
.card-updated { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.button-outline { border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; padding: 6px 12px; font: 500 12px var(--sans); color: var(--ink); cursor: pointer; }
.button-outline:hover { background: var(--paper-deep); }
.link-arrow { font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.empty { color: var(--muted); padding: 10px 2px; font-size: 14px; }

/* Map pins */
.pin { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--salmon); color: var(--ink); font: 600 12px var(--sans); cursor: pointer; padding: 0; display: grid; place-items: center; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.pin-active { background: var(--ink); color: #fff; transform: scale(1.12); z-index: 2; }
.maplibregl-ctrl-attrib { font: 10px var(--sans); background: rgba(247,242,232,.85) !important; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-group { border: 1px solid var(--line-strong) !important; box-shadow: none !important; border-radius: 8px !important; }

/* Disclaimer bubble */
.bubble-row { display: flex; align-items: flex-end; gap: 6px; margin: 20px 0 0; max-width: 420px; }
.bubble-row svg { width: 26px; height: 40px; flex: none; margin-bottom: 10px; }
.bubble { position: relative; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; font-size: 12px; line-height: 1.5; }
.bubble .hand { font-size: 18px; margin-right: 4px; }
.bubble::after { content: ""; position: absolute; left: 12px; bottom: -8px; width: 13px; height: 13px; background: #fff; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transform: rotate(45deg); }

/* For businesses */
.for-section { position: relative; margin: 70px 0 40px; padding: 30px 0 20px; display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; }
.for-section .blob { left: -40px; top: -30px; width: min(620px, 110%); height: 240px; border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
  background: radial-gradient(ellipse at 45% 50%, var(--apricot) 0%, rgba(248,207,168,.8) 50%, rgba(248,207,168,0) 78%); }
.for-section h2 { font-size: clamp(32px, 4.4vw, 46px); max-width: 15em; }
.for-section .hand { display: block; margin-bottom: 8px; }
.for-section p { max-width: 36em; font-size: 14px; margin: 12px 0 0; }
.for-section .leaf { width: 120px; height: 180px; justify-self: end; }
.cta { display: inline-block; margin-top: 16px; padding: 11px 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 13px var(--sans); cursor: pointer; text-decoration: none; }
.for-section details { margin-top: 4px; }
.for-section summary { list-style: none; cursor: pointer; }
.for-section summary::-webkit-details-marker { display: none; }
.suggest { display: grid; gap: 10px; max-width: 460px; margin-top: 14px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px; }
.suggest label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.suggest input, .suggest textarea { font: 14px var(--sans); padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.suggest textarea { min-height: 80px; resize: vertical; }
.suggest button { justify-self: start; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 13px var(--sans); cursor: pointer; }
.hp { position: absolute; left: -9999px; }
#suggest-status { font-size: 13px; color: var(--muted); min-height: 1.4em; margin: 0; }
.fine { font-size: 11px; color: var(--muted); margin: 0; }
@media (min-width: 780px) { .for-section { grid-template-columns: 1fr auto; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 16px 0 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* Text pages */
.prose { max-width: 40em; padding-bottom: 40px; }
.prose h1 { font-size: 44px; margin: 18px 0 10px; }
.prose h2 { font-size: 26px; margin: 24px 0 6px; }
.prose p, .prose li { font-size: 15px; }
