/* Bygdekartan Järvsö – botanisk stil efter Fridas design (se docs/PLAN.md). */
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: italic; font-display: swap; src: url("/vendor/fonts/cormorant-garamond-700-italic.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: #f6f1e6;
  --paper-deep: #efe7d6;
  --ink: #1f1b17;
  --ink-soft: #5a524a;
  --ink-line: #2a2521;
  --salmon: #f2a58f;
  --apricot: #f7c89a;
  --salmon-deep: #e8836c;
  --green: #6f8a5e;
  --green-soft: #b7c3a3;
  --open: #2f6f45;
  --open-bg: #e2eedf;
  --closed: #a4432f;
  --closed-bg: #f6e0d8;
  --unknown: #6b645c;
  --unknown-bg: #ebe5d8;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 var(--sans);
  background-image:
    radial-gradient(ellipse 45% 30% at 85% 8%, rgba(242,165,143,.22), transparent 70%),
    radial-gradient(ellipse 40% 25% at 10% 60%, rgba(247,200,154,.22), transparent 70%),
    radial-gradient(ellipse 35% 20% at 70% 95%, rgba(242,165,143,.16), transparent 70%);
  background-attachment: fixed;
}
a { color: var(--closed); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
h2 { font-size: 30px; }
em { font-style: italic; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.hand { font-family: var(--hand); font-size: 22px; color: var(--ink-soft); line-height: 1.1; }
.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; }
svg.doodle * { vector-effect: non-scaling-stroke; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 6px; }
.logo { display: inline-flex; align-items: flex-end; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-text { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: .01em; }
.logo-text em { font-weight: 500; }
.logo svg { width: 44px; height: 36px; }
.for-businesses { position: relative; display: inline-block; padding: 8px 16px; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.for-businesses::before {
  content: ""; position: absolute; inset: -2px -6px; z-index: -1; border-radius: 50% 45% 55% 50% / 55% 50% 50% 45%;
  background: radial-gradient(ellipse at 40% 50%, var(--salmon) 0%, rgba(242,165,143,.75) 55%, rgba(242,165,143,0) 78%);
  filter: url(#frayed);
}

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center; padding: 10px 0 8px; }
.hero h1 { font-size: clamp(40px, 7vw, 62px); font-weight: 500; }
.hero h1 em { font-weight: 400; }
.lede { font-family: var(--serif); font-size: clamp(21px, 2.6vw, 25px); font-style: italic; color: var(--ink-soft); max-width: 34em; margin: 10px 0 0; line-height: 1.35; }
.church { position: relative; justify-self: center; width: min(100%, 360px); text-align: center; }
.church svg { width: 100%; height: auto; }
.church figcaption { font-family: var(--hand); font-size: 20px; color: var(--ink-soft); margin-top: -6px; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.3fr 1fr; }
  .church { justify-self: end; }
}

/* Search */
.search { position: relative; margin: 14px 0 6px; }
.search-box { display: flex; gap: 8px; background: #fff; border: 1.5px solid var(--ink-line); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 3px 4px 0 rgba(31,27,23,.08); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 18px/1.3 var(--sans); color: var(--ink); }
.search-box input::placeholder { color: #8c847a; font-style: italic; }
.search-box button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--ink); color: var(--paper); font: 600 16px var(--sans); cursor: pointer; }
.search-box button:hover { background: #000; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.chip { border: 1px solid var(--ink-line); border-radius: 999px; background: transparent; padding: 5px 13px; font: 15px var(--sans); color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--paper-deep); }
.chip-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; cursor: pointer; user-select: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--open); }
.search-note { position: absolute; right: 6px; top: -22px; transform: rotate(-3deg); }
@media (max-width: 760px) { .search-note { display: none; } }

/* Divider vine */
.vine { width: 100%; height: 34px; margin: 10px 0 2px; }

/* Results + map */
.results-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.results-head h2 { font-size: 26px; font-weight: 500; }
.results-head .arrow { width: 70px; height: 40px; margin-top: 10px; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.map-wrap { position: relative; order: -1; margin-top: 14px; }
#map { height: 300px; border: 1.5px solid var(--ink-line); border-radius: var(--radius); overflow: hidden; background: var(--paper-deep); }
.map-twig { position: absolute; top: -18px; right: 10px; width: 70px; height: 44px; pointer-events: none; }
.map-error { padding: 20px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .results-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .map-wrap { position: sticky; top: 12px; order: 0; margin-top: 0; }
  #map { height: min(72vh, 640px); }
}

/* Cards */
.cards { display: grid; gap: 12px; }
.card { background: #fff; border: 1.5px solid var(--ink-line); border-radius: var(--radius); padding: 16px 16px 14px; box-shadow: 3px 4px 0 rgba(31,27,23,.07); cursor: pointer; transition: transform .12s; }
.card:hover { transform: translate(-1px, -1px); }
.card-active { box-shadow: 3px 4px 0 var(--salmon); border-color: var(--salmon-deep); }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.card-number { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink-line); display: grid; place-items: center; font: 600 15px var(--sans); background: var(--apricot); margin-top: 2px; }
.card-name { font-size: 24px; }
.card-category { font-size: 14px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; }
.card-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 4px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 13px var(--sans); white-space: nowrap; }
.badge-open { background: var(--open-bg); color: var(--open); }
.badge-closed { background: var(--closed-bg); color: var(--closed); }
.badge-unknown { background: var(--unknown-bg); color: var(--unknown); }
.card-hours { font-size: 15px; }
.card-next { font-size: 15px; color: var(--ink-soft); }
.card-description { margin: 6px 0 0; font-size: 16px; }
.card-greeting { margin: 8px 0 0; font-family: var(--hand); font-size: 22px; color: var(--ink-soft); line-height: 1.15; }
.card-meta { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); }
.card-updated { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); font-style: italic; }
.button-link { display: inline-block; margin-top: 10px; padding: 8px 14px; border: 1.5px solid var(--ink-line); border-radius: 999px; color: var(--ink); background: var(--paper); text-decoration: none; font: 600 15px var(--sans); }
.button-link:hover { background: var(--apricot); }
.empty { color: var(--ink-soft); padding: 16px 4px; font-style: italic; }

/* Map pins */
.pin { width: 30px; height: 36px; border: 0; padding: 0 0 6px; cursor: pointer; background: transparent; font: 600 14px var(--sans); color: var(--ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 36'><path d='M15 1.5c-7 0-12.5 5.5-12.5 12.3 0 9 12.5 20.7 12.5 20.7s12.5-11.7 12.5-20.7C27.5 7 22 1.5 15 1.5z' fill='%23f7c89a' stroke='%232a2521' stroke-width='1.6'/></svg>"); background-size: 30px 36px; }
.pin-active { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 36'><path d='M15 1.5c-7 0-12.5 5.5-12.5 12.3 0 9 12.5 20.7 12.5 20.7s12.5-11.7 12.5-20.7C27.5 7 22 1.5 15 1.5z' fill='%23f2a58f' stroke='%232a2521' stroke-width='1.6'/></svg>"); transform: scale(1.15); z-index: 2; }
.maplibregl-ctrl-attrib { font: 11px var(--sans); background: rgba(246,241,230,.85) !important; }
.maplibregl-ctrl-attrib a { color: var(--ink-soft); }

/* Disclaimer bubble */
.bubble { position: relative; margin: 26px 0 0; max-width: 560px; background: #fff; border: 1.5px solid var(--ink-line); border-radius: 18px; padding: 14px 18px; font-family: var(--serif); font-size: 19px; font-style: italic; line-height: 1.35; }
.bubble::after { content: ""; position: absolute; left: 34px; bottom: -11px; width: 18px; height: 18px; background: #fff; border-right: 1.5px solid var(--ink-line); border-bottom: 1.5px solid var(--ink-line); transform: rotate(45deg); }

/* For businesses */
.for-section { position: relative; margin: 56px 0 30px; padding: 26px 20px; border: 1.5px solid var(--ink-line); border-radius: var(--radius); background: rgba(255,255,255,.55); }
.for-section h2 { font-size: 32px; max-width: 16em; }
.for-section .hand { position: absolute; top: -18px; left: 22px; transform: rotate(-4deg); background: var(--paper); padding: 0 6px; }
.for-section .branch { position: absolute; right: 10px; top: -22px; width: 120px; height: 70px; }
.for-section p { max-width: 40em; }
.for-section .cta { display: inline-block; margin-top: 8px; padding: 10px 20px; border: 1.5px solid var(--ink-line); border-radius: 999px; background: var(--salmon); color: var(--ink); font: 600 16px var(--sans); cursor: pointer; }
.for-section details { margin-top: 12px; }
.for-section summary { list-style: none; cursor: pointer; }
.for-section summary::-webkit-details-marker { display: none; }
.suggest { display: grid; gap: 10px; max-width: 480px; margin-top: 14px; }
.suggest label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.suggest input, .suggest textarea { font: 16px var(--sans); padding: 8px 10px; border: 1.5px solid var(--ink-line); border-radius: 10px; background: #fff; color: var(--ink); }
.suggest textarea { min-height: 80px; resize: vertical; }
.suggest button { justify-self: start; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 15px var(--sans); cursor: pointer; }
.hp { position: absolute; left: -9999px; }
#suggest-status { font-size: 15px; color: var(--ink-soft); min-height: 1.4em; }

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

/* Privacy page */
.prose { max-width: 42em; padding-bottom: 40px; }
.prose h1 { font-size: 40px; font-weight: 500; margin: 18px 0 10px; }
.prose h2 { font-size: 24px; margin: 22px 0 6px; }
.prose p, .prose li { font-size: 17px; }
