/* fagelsjo.com — hand-written, no framework.
   Palette from the place itself: spruce green, the grey-red of old timber,
   lake blue and the cream of hand-painted interiors. */

:root {
  --bg: #faf7f1;
  --bg-raised: #ffffff;
  --bg-sunk: #f1ece2;
  --border: #e5ded0;
  --border-strong: #cfc5b2;
  --text: #1f2420;
  --text-dim: #5f665f;
  --green: #1f4d3a;
  --green-deep: #143528;
  --green-soft: #e3ede6;
  --ochre: #b3541e;
  --lake: #2b5f8a;
  --link: #1f4d3a;
  --radius: 12px;
  --radius-sm: 6px;
  --max-width: 70rem;
  --prose-width: 44rem;
  --header-h: 3.75rem;
  --shadow: 0 1px 2px rgba(31, 36, 32, 0.05), 0 8px 24px rgba(31, 36, 32, 0.06);
  --shadow-hover: 0 2px 4px rgba(31, 36, 32, 0.07), 0 12px 32px rgba(31, 36, 32, 0.11);
  --serif: Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}
.container.wide { max-width: calc(var(--max-width) + 6rem); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ochre); }

h1, h2, h3 { font-family: var(--serif); letter-spacing: -0.01em; line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 0.4rem; }

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

.muted { color: var(--text-dim); }
.small { font-size: 0.85em; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */

.site-header {
  min-height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  max-width: calc(var(--max-width) + 6rem);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--green-deep);
  white-space: nowrap;
  margin-right: auto;
}
.brand:hover { color: var(--green); }
.brand-mark { width: 1.7rem; height: 1.7rem; color: var(--green); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}
.site-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-sunk); color: var(--text); }
.site-nav a[aria-current] { background: var(--green-soft); color: var(--green-deep); font-weight: 600; }
.site-nav .lang-switch {
  margin-left: 0.4rem;
  border: 1px solid var(--border-strong);
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (max-width: 900px) {
  .has-js .nav-toggle { display: inline-flex; }
  .has-js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 0.5rem 0 0.75rem; }
  .has-js .site-nav.open { display: flex; }
  .has-js .site-nav a { padding: 0.6rem 0.75rem; }
  .has-js .site-nav .lang-switch { margin: 0.5rem 0 0; align-self: flex-start; }
}

/* Page head + hero */

.page-head { padding: 2.5rem 1.25rem 1rem; max-width: var(--prose-width); }
.page-head .lead, .home-hero .lead, .lead {
  font-size: 1.2rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0.25rem 0 0;
}

.hero { margin: 0.5rem 0 1rem; }
.hero img {
  width: 100%;
  max-height: 34rem;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-credit { font-size: 0.78rem; color: var(--text-dim); margin: 0.4rem 0 0; text-align: right; }
.hero-credit a { color: inherit; }

/* Home */

.home-hero {
  position: relative;
  min-height: 28rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--green-deep);
}
.home-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 28, 22, 0.85) 0%, rgba(15, 28, 22, 0.35) 50%, rgba(15, 28, 22, 0.05) 100%);
}
.home-hero-text {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 6rem 1.25rem 2.5rem;
}
.home-hero-text h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 0.5rem; text-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.home-hero-text .lead { color: rgba(255,255,255,0.92); max-width: 40rem; font-size: 1.25rem; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e9d8b4;
  margin: 0 0 0.5rem;
}
.hero-credit.on-image {
  position: absolute;
  right: 0.75rem;
  bottom: 0.5rem;
  z-index: 2;
  color: rgba(255,255,255,0.75);
  text-align: right;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 3rem;
  padding-top: 2.5rem;
  align-items: start;
}
.home-intro .prose h2:first-child { margin-top: 0; }
@media (max-width: 900px) { .home-intro { grid-template-columns: 1fr; gap: 1.5rem; } }

.facts-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.facts-card h2 { margin: 0 0 0.75rem; font-size: 1.2rem; }

.facts { margin: 1rem 0; padding: 0; }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; padding: 0.45rem 0; border-top: 1px solid var(--border); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--text-dim); font-size: 0.9rem; }
.facts dd { margin: 0; }
.facts-card .facts div { grid-template-columns: 7rem 1fr; font-size: 0.95rem; }
@media (max-width: 500px) { .facts div { grid-template-columns: 1fr; gap: 0.1rem; } }

.section-title { display: flex; align-items: baseline; gap: 1rem; margin-top: 3rem; }
.section-title .more { font-family: var(--sans); font-size: 0.95rem; font-weight: 400; margin-left: auto; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--text); }
.card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.2rem; display: block; }
.card-title { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--green-deep); margin-bottom: 0.3rem; }
.card-text { display: block; font-size: 0.93rem; color: var(--text-dim); line-height: 1.5; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem 2rem;
}
.quick h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.quick p { margin: 0; font-size: 0.95rem; color: var(--text-dim); }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.strip-item img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: transform 0.15s ease; }
.strip-item:hover img { transform: scale(1.02); }

/* Article */

.article-body {
  display: grid;
  grid-template-columns: 15rem minmax(0, var(--prose-width));
  gap: 3rem;
  padding-top: 1rem;
  padding-bottom: 4rem;
}
.article-body > .prose:only-child { grid-column: 1 / -1; max-width: var(--prose-width); }
@media (max-width: 900px) {
  .article-body { grid-template-columns: 1fr; gap: 1rem; }
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
  font-size: 0.9rem;
}
.toc-title { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--text-dim); font-weight: 600; margin: 1rem 0 0.5rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc li a { display: block; padding: 0.3rem 0.75rem; text-decoration: none; color: var(--text-dim); }
.toc li a:hover { color: var(--green-deep); border-left: 2px solid var(--green); margin-left: -2px; }
@media (max-width: 900px) {
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 0.25rem; border: 0; }
  .toc li a { background: var(--bg-sunk); border-radius: 999px; padding: 0.25rem 0.7rem; }
  .toc li a:hover { margin: 0; border: 0; }
}

.prose { max-width: var(--prose-width); }
.prose p { margin: 0 0 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 1rem); }
.section:first-child h2 { margin-top: 1rem; }

.photo { margin: 0 0 1.25rem; }
.photo img { border-radius: var(--radius-sm); box-shadow: var(--shadow); width: 100%; }
.photo figcaption { font-size: 0.85rem; color: var(--text-dim); margin-top: 0.45rem; line-height: 1.45; }
.credit { display: block; font-size: 0.78rem; opacity: 0.85; }
.credit a { color: inherit; }
.photo-side { float: right; width: min(46%, 20rem); margin: 0.3rem 0 1rem 1.5rem; }
@media (max-width: 600px) { .photo-side { float: none; width: 100%; margin: 0 0 1.25rem; } }
.section::after { content: ""; display: block; clear: both; }

.note {
  background: var(--green-soft);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
  clear: both;
}

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.data-table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
.data-table th, .data-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { font-weight: 600; color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
  padding-top: 1rem;
}
.gallery-item { scroll-margin-top: calc(var(--header-h) + 1rem); }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Map */

.map {
  height: min(70vh, 38rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg-sunk);
  margin: 0.5rem 0 0.75rem;
}
.map-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; font-size: 0.9rem; margin: 0; }
.dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); vertical-align: -1px; margin-right: 0.25rem; background: var(--green); }
.dot.sight { background: #b3541e; }
.dot.nature { background: #2f7d4f; }
.dot.stay { background: #7a4ea6; }
.dot.service { background: #1d5fd1; }
.dot.village { background: #1f4d3a; }
.poi-list { list-style: none; padding: 0; }
.poi-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.poi-links { display: inline-flex; gap: 0.6rem; margin-left: 0.4rem; font-size: 0.85rem; white-space: nowrap; }
.maplibregl-popup-content { font: 14px/1.45 var(--sans); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }

/* Events */

.events { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.event { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--border); }
.event-when { font-weight: 600; color: var(--ochre); font-size: 0.95rem; padding-top: 0.2rem; }
.event-name { margin: 0 0 0.3rem; font-size: 1.25rem; }
.event p { margin: 0 0 0.4rem; }
@media (max-width: 500px) { .event { grid-template-columns: 1fr; gap: 0.2rem; } }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sunk);
  margin-top: 3rem;
  padding: 2.5rem 0 3rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-brand, .footer-heading { font-family: var(--serif); font-size: 1.15rem; color: var(--green-deep); margin: 0 0 0.5rem; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.3rem; }
.site-footer p { margin: 0 0 0.6rem; }

.notfound { padding: 4rem 1.25rem; }

/* Print: a visitor taking the practical pages along. Drop the chrome, keep
   the text, and spell out the links that are no longer clickable. */

@media print {
  .site-header, .site-footer, .skip-link, .toc, .nav-toggle, .map, .map-legend, .photo-strip, .cards { display: none !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .home-hero { min-height: 0; background: none; }
  .home-hero::after, .home-hero-img { display: none; }
  .home-hero-text { color: #000; padding: 0; }
  .home-hero-text h1, .home-hero-text .lead { color: #000; text-shadow: none; }
  .article-body { display: block; }
  .photo-side { float: none; width: 60%; }
  .hero img { max-height: 18rem; box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .facts-card { position: static; box-shadow: none; }
  .note { border-left-color: #000; background: none; }
}
