/* Kultingen. Färgerna är plockade ur det som redan finns: den röda
   logotypen, den blå grisen på kontaktsidan och den gula solen på gården. */

@font-face {
  font-family: "Jost";
  src: url("/fonts/jost.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #fffcf6;
  --ink: #3b2a27;
  --ink-soft: #6d5a55;
  --red: #d2232a;
  --blue: #1f2fd0;
  --sun: #ffd000;
  --sun-wash: #fff5d2;
  --line: #efe4d6;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- rubriker: versaler med luft, som på gamla sajten --- */

h1, h2, h3 {
  color: var(--red);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.2;
  margin: 0 0 1rem;
  text-wrap: balance;
  /* långa ord i versaler ("KLAGOMÅLSHANTERING") får inte spräcka en smal skärm */
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.15rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.55rem); }
h2.small, h3 {
  font-size: 1rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1em; }
.prose > * + h2 { margin-top: 2.6rem; }
.prose strong { font-weight: 600; color: var(--red); }

.prose ul, .prose ol { margin: 0 0 1.2em; padding: 0; }
.prose li { margin: 0 0 0.6em; }
.prose ul { list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 1.4rem;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.68em;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--red);
}
.prose ol { padding-left: 1.4rem; }
.prose ol li::marker { color: var(--red); font-weight: 600; }

/* --- sidhuvud: logotypen i mitten, menyn på båda sidor --- */

.site-header { padding: clamp(1.5rem, 4vw, 2.75rem) var(--gutter) 0; }

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
  max-width: 84rem;
  margin-inline: auto;
}
.brand { display: block; width: clamp(11rem, 18vw, 15.5rem); }
.brand img { mix-blend-mode: multiply; }

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem clamp(1rem, 2.2vw, 2.2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-left { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

.nav-list a {
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 0.4rem;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline wavy;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.55em;
}

@media (max-width: 60rem) {
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 1.1rem;
  }
  .nav-left, .nav-right { display: contents; }
  .brand {
    order: -1;
    flex-basis: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }
  .brand img { width: clamp(11rem, 50vw, 14rem); }
  .nav-list a { font-size: 0.75rem; letter-spacing: 0.13em; }
}

main { padding-top: clamp(3rem, 7vw, 5.5rem); }

/* --- layout --- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
/* Två spalter redan från surfplattebredd: i en spalt blir de höga fotona
   (4:5 och uppåt) runt 1000 px höga på en 768 px skärm. */
@media (max-width: 43.99rem) {
  .split { grid-template-columns: 1fr; }
  .split > figure {
    width: 100%;
    max-width: 30rem;
    margin-inline: auto;
  }
}
@media (min-width: 44rem) and (max-width: 64rem) {
  .split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .split.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
}
@media (max-width: 52rem) {
  .cols { grid-template-columns: 1fr; }
}

figure { margin: 0; }

/* bilden med solen och den böjda texten ritar utanför fotot, så den får
   ingen ram och inget eget hörn: den ska se ut som ett klistermärke */
.doodled { margin-top: -1.5rem; }
/* originalet har vit bakgrund runt solen; multiply låter papperet synas igenom */
.doodled img { mix-blend-mode: multiply; }

.photo img { border-radius: 3px; }

/* --- citatet --- */

.quote {
  padding-block: var(--space);
  text-align: center;
}
.quote blockquote { margin: 0 auto; max-width: 42rem; }
.quote p {
  margin: 0;
  color: var(--blue);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.45rem, 1rem + 1.8vw, 2.3rem);
  line-height: 1.35;
  text-wrap: balance;
}
.quote figcaption {
  margin-top: 1.5rem;
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --- såpbubblorna under citatet ---
   Handritade ringar (tools/bubblor.mjs) i logotypens röda, med en USP i varje.
   Mobile first: en sicksack som överlappar lite, två i bredd på surfplatta,
   sex som svävar på olika höjd på dator. */

.quote:has(+ .bubbles) { padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.bubbles {
  position: relative;
  padding-bottom: var(--space);
}
.bubbles-lead {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  text-wrap: balance;
}
.bubbles-lead a { color: var(--red); text-decoration: none; }
.bubbles-lead strong { color: var(--blue); font-weight: 600; }
.bubbles-lead a:hover { text-decoration: underline wavy; text-decoration-thickness: 1.5px; text-underline-offset: 0.45em; }

.bubbles ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.bubbles li {
  --d: min(66vw, 17rem);
  width: var(--d);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: calc(var(--d) * 0.17);
  background: center / contain no-repeat;
  text-align: center;
}
.bubbles li + li { margin-top: calc(var(--d) * -0.14); }
.bubbles li:nth-child(even) { align-self: flex-end; }
.bubbles li:nth-child(odd) { align-self: flex-start; }
.bubbles .b1 { background-image: url("/img/bubbla-1.svg"); }
.bubbles .b2 { background-image: url("/img/bubbla-2.svg"); }
.bubbles .b3 { background-image: url("/img/bubbla-3.svg"); --d: min(76vw, 19.5rem); }
.bubbles .b4 { background-image: url("/img/bubbla-4.svg"); --d: min(56vw, 14rem); }
.bubbles .b5 { background-image: url("/img/bubbla-5.svg"); }
.bubbles .b6 { background-image: url("/img/bubbla-6.svg"); --d: min(60vw, 15rem); }

.bubbles li a {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  text-wrap: balance;
}
.bubbles li a::first-letter { text-transform: uppercase; }
.bubbles li a:hover { color: var(--red); }

/* bubblor svävar, långsamt och var och en i sin egen takt */
@media (prefers-reduced-motion: no-preference) {
  .bubbles li { animation: sväva 7s ease-in-out infinite alternate; }
  .bubbles li:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
  .bubbles li:nth-child(3) { animation-duration: 9s; animation-delay: -4s; }
  .bubbles li:nth-child(4) { animation-duration: 7.5s; animation-delay: -1s; }
  .bubbles li:nth-child(5) { animation-duration: 8s; animation-delay: -3s; }
  .bubbles li:nth-child(6) { animation-duration: 9.5s; animation-delay: -5s; }
}
@keyframes sväva {
  from { transform: translateY(0); }
  to { transform: translateY(-0.6rem); }
}

.tiny {
  position: absolute;
  width: 2.2rem;
  aspect-ratio: 1;
  background: center / contain no-repeat;
  pointer-events: none;
}
/* små tomma bubblor i luckorna som sicksacken lämnar: höger om de udda,
   vänster om de jämna */
.tiny-1 { background-image: url("/img/bubbla-liten-1.svg"); top: 14%; right: 9%; width: 1.6rem; }
.tiny-2 { background-image: url("/img/bubbla-liten-2.svg"); top: 36%; left: 6%; }
.tiny-3 { background-image: url("/img/bubbla-liten-3.svg"); bottom: 12%; left: 12%; width: 1.3rem; }

@media (min-width: 40rem) {
  .bubbles ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.5rem;
    /* exakt två i bredd, annars krockar sicksacken med en tredje */
    max-width: 36rem;
    margin-inline: auto;
  }
  .bubbles li { --d: 15.5rem; }
  .bubbles li + li { margin-top: 0; }
  .bubbles li:nth-child(even) { translate: 0 2.5rem; }
  /* ute i marginalerna bredvid bubblorna */
  .tiny-1 { top: 16%; right: 2%; left: auto; }
  .tiny-2 { top: 50%; left: 2%; }
  .tiny-3 { bottom: 10%; right: 3%; left: auto; }
  .bubbles .b3 { --d: 17.5rem; }
  .bubbles .b4 { --d: 13.5rem; }
  .bubbles .b6 { --d: 14rem; }
}

@media (min-width: 56rem) {
  /* max tre i bredd: 3 + 3 i stället för 4 + 2 */
  .bubbles ul { gap: 0 0.75rem; max-width: 54rem; margin-inline: auto; }
  .bubbles li a { font-size: 1rem; }
  .bubbles li:nth-child(even) { translate: none; }
  .bubbles li.b1 { margin-top: 1.5rem; }
  .bubbles li.b2 { margin-top: 5rem; }
  .bubbles li.b3 { margin-top: -0.5rem; }
  .bubbles li.b4 { margin-top: -1.5rem; }
  .bubbles li.b5 { margin-top: 1rem; }
  .bubbles li.b6 { margin-top: -2rem; }
  /* precis utanför klungan (54rem bred och centrerad), inte ute vid kanten */
  .tiny-1 { top: 20%; right: max(0.5rem, calc(50% - 29.5rem)); }
  .tiny-2 { top: 54%; left: max(0.5rem, calc(50% - 30rem)); }
  .tiny-3 { bottom: 13%; right: max(0.75rem, calc(50% - 28.5rem)); }
}

/* --- förälderns väg: knapp, snabbfakta, vidare --- */

.actions { margin-top: 1.75rem; }
.button {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border-radius: 3px;
  background: var(--red);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}
.button:hover { background: var(--blue); color: #fff; }

.facts.facts-row { margin: 0; gap: 1.5rem 2rem; }
@media (min-width: 40rem) { .facts.facts-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .facts.facts-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.facts.facts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 0 0 1.4em;
}

.next {
  display: grid;
  gap: 2.25rem;
  padding-top: var(--space);
}
.next a {
  display: block;
  color: var(--red);
  text-decoration: none;
}
.next img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}
.next span {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.next a:hover span {
  color: var(--blue);
  text-decoration: underline wavy;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.45em;
}
@media (min-width: 40rem) { .next { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); } }

/* på mobil tar solbilden inte hela skärmen: knappen och bubblorna ska
   komma fram snabbt */
@media (max-width: 43.99rem) {
  .intro .doodled { max-width: 20rem; }
}

/* --- finstilt: hopfällt, bara rubriken syns (avsteget från öppenhetskravet) --- */

.fineprint {
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgb(59 42 39 / 0.14);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.fineprint summary {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  cursor: pointer;
  list-style: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}
.fineprint summary::-webkit-details-marker { display: none; }
/* tecknet ligger i CSS så att sidans text är exakt den gamla sajtens */
.fineprint summary::before { content: "+"; font-weight: 400; }
.fineprint[open] summary::before { content: "\2212"; }
.fineprint summary:hover { color: var(--red); }
.fineprint[open] summary { margin-bottom: 1rem; }
.fineprint ul li::before { background: var(--ink-soft); }

/* --- en lugn gul yta för det praktiska --- */

.band {
  background: var(--sun-wash);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

/* --- sidfot --- */

.site-footer {
  margin-top: var(--space);
  border-top: 1px solid var(--line);
  padding-block: 3rem 3.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.band + .site-footer, main:has(> .band:last-child) + .site-footer { margin-top: 0; border-top: 0; }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-gris { width: 4.5rem; mix-blend-mode: multiply; }
.site-footer address { font-style: normal; line-height: 1.65; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--red); }
.footer-inner { flex-wrap: wrap; }
.footer-links {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
@media (max-width: 39.99rem) { .footer-links { margin-left: 0; flex-basis: 100%; } }

/* --- sidor med två spalter --- */

.section-gap { margin-top: var(--space); }
.split.flip > figure { order: -1; }
@media (max-width: 43.99rem) { .split.flip > figure { order: 0; } }
@media (min-width: 44rem) { .sticky { position: sticky; top: 2rem; } }
.split > .photo { margin-top: 0.4rem; }

/* --- galleriet --- */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 4 13rem;
  column-gap: 1rem;
}
.gallery li { break-inside: avoid; margin-bottom: 1rem; }
@media (max-width: 40rem) {
  .gallery { columns: 2; column-gap: 0.6rem; }
  .gallery li { margin-bottom: 0.6rem; }
}
.gallery a { display: block; border-radius: 3px; overflow: hidden; }
.gallery img { width: 100%; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.03); }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgb(40 25 20 / .82); }
.lightbox img { max-width: 92vw; max-height: 92vh; width: auto; border-radius: 3px; cursor: zoom-out; }
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  border: 0;
  background: none;
  color: #fff;
  font: 300 2.5rem/1 "Jost", sans-serif;
  cursor: pointer;
}
/* tecknet ligger i CSS så att sidans text är exakt den gamla sajtens */
.lightbox-close::before { content: "\00d7"; }

/* --- smala textsidor --- */

.narrow { max-width: 44rem; }
.center-doodle { display: flex; justify-content: center; margin-top: 3rem; }
.center-doodle img { width: clamp(9rem, 30vw, 14rem); mix-blend-mode: multiply; }
.lost { display: flex; justify-content: center; padding-block: 2rem; }
.lost img { width: 12rem; mix-blend-mode: multiply; }

/* --- kontakt --- */

.facts { margin: 1.8rem 0 0; display: grid; gap: 1.1rem; }
.facts dt {
  color: var(--red);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.facts dd { margin: 0.15rem 0 0; }
/* inuti löptext (Anmälan, Klagomålshantering) behöver listan luft under sig */
.prose .facts { margin-bottom: 1.6rem; }
.prose .facts-inline { margin-top: 0; }
.map {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 8;
  min-height: 18rem;
  border: 0;
  border-radius: 3px;
  filter: saturate(.85);
}
.wide-photo figcaption {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-style: italic;
}
.wide-photo img { width: 100%; border-radius: 3px; }
