:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --text: #2e3328;
  --muted: #6b6f62;
  --accent: #5f7a52;
  --line: #e2dccf;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}

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

a { color: var(--accent); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

/* Meny */

.sidhuvud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.logga {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.meny { display: flex; gap: 24px; }

.meny a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.meny a:hover { color: var(--text); }

.meny a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Stor bild överst */

.hero {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero img {
  width: 100%;
  height: min(72vh, 680px);
  object-fit: cover;
  border-radius: 6px;
}

.hero-text {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  padding: 48px 40px 36px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(to top, rgba(30, 34, 26, 0.55), transparent);
  color: #fffdf8;
}

.hero-text h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; }
.hero-text p { margin: 4px 0 0; font-size: 1.1rem; opacity: 0.95; }

/* Text */

.ingress {
  max-width: 640px;
  margin: 64px auto;
  padding: 0 24px;
  text-align: center;
  font-size: 1.15rem;
}

.ingress h2 { font-size: 1.8rem; }

.text {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.text h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-top: 48px; }
.text h2 { font-size: 1.5rem; margin-top: 48px; }

/* Bildgalleri */

.galleri {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 0 24px;
  columns: 3 300px;
  column-gap: 20px;
}

.galleri figure {
  margin: 0 0 20px;
  break-inside: avoid;
}

.galleri button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 6px;
  overflow: hidden;
}

.galleri img { width: 100%; transition: transform 0.4s ease; }
.galleri button:hover img { transform: scale(1.03); }
.galleri button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Bilder på om-sidan */

.bild-bred { margin: 32px 0; }
.bild-bred img { width: 100%; border-radius: 6px; }

.bild-hog { margin: 32px auto; max-width: 360px; }
.bild-hog img { width: 100%; border-radius: 6px; }

.bildpar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.bildpar figure { margin: 0; }
.bildpar img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }

/* Visa bild i stort format */

.visare {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(246, 243, 236, 0.97);
}

.visare[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.visare img {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  width: auto;
  border-radius: 4px;
}

.visare p { margin: 12px 16px 0; color: var(--muted); text-align: center; }

.visare button {
  position: absolute;
  border: 0;
  background: var(--surface);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.visare button:focus { outline: none; }
.visare button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.visare .stang { top: 16px; right: 16px; }
.visare .forra { left: 16px; top: 50%; transform: translateY(-50%); }
.visare .nasta { right: 16px; top: 50%; transform: translateY(-50%); }

/* Sidfot */

.sidfot {
  border-top: 1px solid var(--line);
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Mobil */

@media (max-width: 600px) {
  .sidhuvud, .hero, .galleri, .ingress, .text { padding-left: 16px; padding-right: 16px; }
  .hero img { height: 60vh; }
  .hero-text { left: 16px; right: 16px; padding: 32px 20px 20px; }
  .ingress { margin: 40px auto; }
  .meny { gap: 16px; }
  .visare .forra, .visare .nasta { top: auto; bottom: 16px; transform: none; }
  .visare img { max-height: calc(100vh - 160px); }
}
