/* pluggomaten.se, startsidan och sidan för skolan.
 *
 * Värdena är designreferensens inline-stilar flyttade till klasser, oförändrade.
 * Referensen ligger i design/homepage/claude/design_handoff_pluggomaten_site/.
 *
 * Länkens grundregler står inom :where() och har därmed specificiteten noll.
 * I referensen var komponenternas värden inline-stilar, som vinner över a:hover
 * och a:focus-visible. Med noll specificitet vinner klasserna nedan på samma
 * sätt: en primärknapp behåller sin vita text vid hover och en knapp behåller
 * sin pillerform vid fokus.
 */

/* Typsnitten är egna kopior. Sajten gör inga anrop till någon annan värd. */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fredoka-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/nunito-latin-var.woff2') format('woff2');
}

/* Tokens ur design/tokens/. `node design/verktyg/ds-tokens.mjs --kontrollera`
 * fäller om ett värde här avviker från källan. */
:root {
  --petrol-900: #085868;
  --teal-700: #106B80;
  --ink-900: #12262B;
  --grass-700: #347F27;
  --font-display: 'Fredoka','Baloo 2',system-ui,sans-serif;
  --font-body: 'Nunito','Segoe UI',system-ui,sans-serif;
}

/* ── Grund ─────────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}
.sida-hem { background: #FBF7EE; }
.sida-skola { background: #FDF9EF; }

:where(a) {
  color: var(--petrol-900);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 3px;
}
:where(a:hover) { color: var(--teal-700); text-decoration: underline; }
:where(a:focus-visible) {
  outline: 3px solid #085868;
  outline-offset: 3px;
  border-radius: 8px;
}

:where(img) { display: block; }

/* Loggans filer är nedskalade och avrundade till hela pixlar. Originalets
 * proportioner hålls här så att den tar exakt samma plats som i referensen. */
.logga { aspect-ratio: 2081 / 429; }

.lista { list-style: none; margin: 0; padding: 0; }

.visuellt-dold {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ikon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Symbolerna som ikonerna hämtar med <use>. Arket självt ritas inte. */
.ikonark { position: absolute; width: 0; height: 0; overflow: hidden; }

.hopplank {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 10;
  background: #fff;
  border: 2px solid var(--petrol-900);
  border-radius: 999px;
  padding: 10px 20px;
}
.hopplank:focus { left: 16px; }

main { outline: none; }

/* ── Knappar ───────────────────────────────────────────────────────────── */

.knapp {
  display: flex;
  align-items: center;
  border-radius: 999px;
  min-height: 48px;
}
.knapp-primar,
.knapp-primar:hover { background: var(--petrol-900); color: #fff; }
.knapp-sekundar { border: 2px solid var(--petrol-900); background: #fff; }
.knapp-start { align-self: flex-start; }
.knapp-hel { white-space: nowrap; }

/* ── Sidhuvud ──────────────────────────────────────────────────────────── */

.sidhuvud {
  background: #FDFBF8;
  padding: 10px max(24px, calc((100vw - 1120px)/2 + 24px));
  display: flex;
  align-items: center;
  gap: 8px 20px;
  flex-wrap: wrap;
}
.sidhuvud-logga { display: block; flex: 0 1 240px; min-width: 90px; }
.sidhuvud-logga img {
  height: auto;
  max-height: 50px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.sidhuvud-hoger {
  flex: 1 1 40rem;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
}
.huvudmeny { flex: 1 1 0; min-width: 0; }
.huvudmeny ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 4px;
  font-size: 0.9375rem;
}
.menylank {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
}
.huvudmeny .menylank[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.sidhuvud-logga-in { padding: 0 24px; font-size: 1rem; }

/* ── Gemensamt för sektionerna ─────────────────────────────────────────── */

.rubrik {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--petrol-900);
  margin: 0;
}

/* Två kolumner som staplas när en kolumn blir smalare än 29rem. */
.tvaspalt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 29rem), 1fr));
  align-items: center;
  overflow: hidden;
}
.tvaspalt-bild {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ingress { font-size: 1.1875rem; line-height: 1.5; margin: 0; max-width: 30em; text-wrap: pretty; }
.brodtext { margin: 0; font-size: 1.0625rem; line-height: 1.5; max-width: 30em; text-wrap: pretty; }

/* ── Startsidan: hjälten ───────────────────────────────────────────────── */

.hjalte-text {
  padding: 32px 24px 40px max(24px, calc((100vw - 1120px)/2 + 24px));
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.hjalte-rubrik { font-size: clamp(2.125rem, 4.6vw, 3.25rem); line-height: 1.1; text-wrap: balance; }
.hjalte-knappar { display: flex; gap: 14px; flex-wrap: wrap; }
.hjalte-knappar .knapp { min-height: 52px; font-size: 1.125rem; }
.hjalte-borja { padding: 0 56px; }
.hjalte-logga-in { padding: 0 34px; }
.hjalte-loften {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
}
.hjalte-loften li { display: flex; align-items: center; gap: 7px; }
.bock { width: 20px; height: 20px; color: #fff; }
.bock-gras { fill: var(--grass-700); }
.bock-petrol { fill: var(--petrol-900); }
.hjalte-bild {
  min-height: 300px;
  object-position: 8% center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%);
}

/* ── Startsidan: så fungerar det ───────────────────────────────────────── */

.steg-sektion {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 26px;
  text-align: center;
}
.steg-rubrik { font-size: 2.25rem; line-height: 1.2; }
.steg-underrad { margin: 4px 0 22px; font-size: 1.0625rem; }
.steg-lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 28px;
}
.steg-lista li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.steg-bild { width: 100%; max-width: 320px; height: auto; }
.steg-bild-2 { width: 88%; max-width: 282px; margin-top: 14px; }
.steg-namn { font-size: 1.375rem; line-height: 1.3; margin: 4px 0 0; }
.steg-text { margin: 0; font-size: 1rem; max-width: 13.75rem; }
.steg-text-bred { max-width: 16.25rem; }

/* ── Startsidan: mer tid tillsammans ───────────────────────────────────── */

.tid { background: #DEF1F8; }
.tid-text {
  padding: 28px 24px 28px max(24px, calc((100vw - 1120px)/2 + 24px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tid-rubrik { font-size: clamp(1.75rem, 3.4vw, 2.375rem); line-height: 1.15; }
.tid-mer { display: flex; flex-direction: column; gap: 4px; }
.tid-mellanrubrik {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink-900);
}
.tid-borja { padding: 0 46px; font-size: 1.0625rem; }
.tid-bild {
  min-height: 240px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%);
  mask-image: linear-gradient(90deg, transparent 0, #000 12%);
}

/* ── Startsidan: familjen och klassrummet ──────────────────────────────── */

.rutor { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 34rem), 1fr)); }
.familj {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  align-items: end;
  padding-left: max(24px, calc((100vw - 1120px)/2 + 24px));
  border-right: 2px solid #fff;
}
.familj-text { display: flex; flex-direction: column; gap: 14px; padding: 22px 16px 18px 0; }
.ruta-rubrik { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.familj-rubrik { line-height: 1.2; text-wrap: balance; }
.familj-lista { display: flex; flex-direction: column; gap: 6px; font-size: 1rem; }
.familj-lista li { display: flex; gap: 10px; align-items: center; }
.familj-lista .ikon { flex: none; }
.familj-prova { padding: 0 34px; font-size: 1.0625rem; }
.familj-bild { position: relative; padding-top: 12px; container-type: inline-size; }
.familj-bild img { width: 100%; height: auto; }
/* Priscirkeln täcker en cirkel som är inbakad i bilden. Den ska inte flyttas. */
.pris {
  position: absolute;
  left: 11%;
  top: -5%;
  width: 61%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #F9CDCC;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  margin: 0;
}
.pris-rad { font-size: clamp(0.8125rem, 6.5cqi, 1.5rem); }
.pris-belopp {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 13cqi, 3rem);
  color: var(--petrol-900);
}

.skolruta {
  background: #EEF3EC;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  align-items: center;
  padding-right: max(0px, calc((100vw - 1120px)/2));
}
.skolruta-text { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 22px 32px; }
.skolruta-rubrik { line-height: 1.1; }
.ihop { white-space: nowrap; }
.skolruta-stycke { margin: 0; font-size: 1rem; line-height: 1.5; max-width: 16.25rem; }
.skolruta-las { padding: 0 28px; font-size: 1rem; }
.skolruta-bild {
  min-height: 200px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%);
}

/* ── Startsidan: fördelarna ────────────────────────────────────────────── */

.fordelar {
  background: #DEF1F8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-around;
  gap: 16px 8px;
  padding: 0;
}
.fordelar-blommor { width: 90px; height: auto; align-self: flex-end; }
.fordelar-fagel { width: 110px; height: auto; }
.fordelar-lista {
  padding: 16px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  flex: 1 1 520px;
  font-size: 1rem;
  text-align: center;
}
.fordelar-lista li { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fordel-ikon { width: 40px; height: 40px; color: var(--petrol-900); stroke-width: 1.5; }

/* ── Skolsidan ─────────────────────────────────────────────────────────── */

.skola-hjalte {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px max(24px, calc((100vw - 1120px)/2 + 24px)) min(22rem, 48vw);
}
.skola-bakgrund {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
}
.skola-toning {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #FDF9EF 0, #FDF9EFeb 30%, #FDF9EF99 48%, transparent 66%);
}
.skola-kolumn { display: flex; flex-direction: column; gap: 32px; max-width: 38rem; }
.skola-inledning { display: flex; flex-direction: column; gap: 14px; }
.overrad {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--teal-700);
}
.skola-punkter { display: flex; flex-direction: column; gap: 20px; }
.skola-punkter li { display: flex; gap: 16px; align-items: flex-start; }
.punkt-ikon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #DEF1F8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.punkt-ikon .ikon { width: 24px; height: 24px; color: var(--petrol-900); }
.punkt-rubrik { font-size: 1.375rem; line-height: 1.3; }
.punkt-text { margin: 2px 0 0; font-size: 1.0625rem; }

.kontakt { background: #DEF1F8; padding: 40px max(24px, calc((100vw - 1120px)/2 + 24px)) 44px; }
.kontakt-kolumn { max-width: 40rem; display: flex; flex-direction: column; gap: 14px; }
.kontakt-rubrik { font-size: clamp(1.75rem, 3.4vw, 2.375rem); line-height: 1.15; text-wrap: balance; }
.kontakt-stycke { margin: 0; font-size: 1.0625rem; max-width: 30em; text-wrap: pretty; }
.kontakt-mejl { padding: 0 34px; gap: 10px; font-size: 1.0625rem; }
.kontakt-mejl .ikon { width: 20px; height: 20px; }

/* ── Sidfot ────────────────────────────────────────────────────────────── */

.sidfot {
  background: #FDFBF8;
  padding: 18px max(24px, calc((100vw - 1120px)/2 + 24px)) 26px;
  display: flex;
  align-items: center;
  gap: 24px 40px;
  flex-wrap: wrap;
}
.sidfot-marke { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sidfot-marke img { height: 64px; max-width: 100%; width: auto; }
.sidfot-slogan {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--petrol-900);
}
.sidfot-info { display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; min-width: 0; }
.sidfot-meny { margin: 0 0 0 -8px; display: flex; gap: 0 4px; flex-wrap: wrap; }
.sidfot-info p { margin: 0; }
