/* Calm Creatives. Values measured on the Adobe Portfolio original (referens/matt/, 1440 and 390 px wide).
   The font is the one change: Nunito in place of Museo Sans Rounded (Adobe Fonts). */

@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito.woff2') format('woff2-variations'), url('/fonts/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --kram: #fbf1e6;
  --rost: #cc3400;
  --rubriktext: #3d3d3d;
  --brodtext: #111111;
  --lank: #8c8c8c;
  --datum: #a3a3a3;
  --knapptext: #f6f6f6;
  --vit: #ffffff;
  --svart: #000000;
  --typsnitt: 'Nunito', 'Varela Round', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --kolumn: 1089px;
  --textbredd: 800px;
  --mjuk: 0.2s;
  /* The header's height, measured: 224 px on a computer, 110 on a phone. */
  --sidhuvud-hojd: 224px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--typsnitt);
  font-weight: 300;
  color: var(--brodtext);
  background: var(--vit);
  -webkit-font-smoothing: antialiased;
}
html:has(.sida-rutnat), html:has(.sida-kontakt), html:has(.sida-om),
.sida-rutnat, .sida-kontakt, .sida-om { background: var(--kram); }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.dold {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ikon { width: 26px; height: 26px; }
.ikon.liten { width: 14px; height: 14px; }
.ikon-fylld { fill: currentColor; stroke: none; }

/* ---- Header: the logo centred, the menu under it ---- */

.sidhuvud {
  position: relative;
  background: var(--kram);
  text-align: center;
  padding: 57px 16px 30px;
}
.logo-h1 { font-size: inherit; font-weight: inherit; }
.logo { display: block; width: max-content; margin: 0 auto; }
.logo img { width: 200px; margin: 0 auto; }
.meny {
  display: flex; justify-content: center; gap: 20px;
  margin-top: 29px;
}
.meny a {
  font-size: 16px; line-height: 20px; font-weight: 500;
  color: var(--rost); text-decoration: none;
  transition: color var(--mjuk);
}
.meny a:hover { color: var(--svart); }
.meny a.aktiv { font-weight: 700; }
.menyknapp { display: none; }

/* ---- Main area ---- */

.huvud { width: 90%; margin: 0 auto; }

/* ---- Cover grid ---- */

.rutnat {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
  padding-top: 43px;
}
.omslag {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 642 / 800;
  color: var(--vit); text-decoration: none;
}
.omslag-bild, .omslag-bild picture, .omslag-bild img { width: 100%; height: 100%; }
.omslag-bild img { object-fit: cover; }
.omslag-bild::after {
  content: ''; position: absolute; inset: 0;
  background: var(--svart); opacity: 0;
  transition: opacity var(--mjuk);
}
.omslag-detaljer {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 68px;
  opacity: 0; transition: opacity 0.15s;
}
.omslag:hover .omslag-bild::after, .omslag:focus-visible .omslag-bild::after { opacity: 0.7; }
.omslag:hover .omslag-detaljer, .omslag:focus-visible .omslag-detaljer { opacity: 1; }
.omslag-ar { display: block; font-size: 18px; line-height: 18px; font-weight: 500; padding-bottom: 5px; }
.omslag-titel { font-size: 41px; line-height: 55px; font-weight: 300; }

/* ---- Project page and blog post ---- */

.kolumn { max-width: var(--kolumn); margin: 0 auto; }
.sidrubrik { padding: 71px 0 47px; }
.datum { font-size: 16px; line-height: 18px; color: var(--datum); font-weight: 300; }
.sidrubrik h1 {
  padding-top: 16px;
  font-size: 41px; line-height: 64px; font-weight: 300; color: var(--rubriktext);
}
.ingress {
  max-width: 893px; padding-top: 19px;
  font-size: 20px; line-height: 30px; font-weight: 300; color: var(--rubriktext);
}
.ingress a, .stycke a { color: var(--lank); }
.ingress strong, .stycke strong { font-weight: 600; }

.text .stycke {
  max-width: var(--textbredd);
  padding-top: 25px;
  font-size: 16px; line-height: 25px;
}
.text .stycke + .stycke { padding-top: 0; }
.text .stycke:has(+ .stycke) { padding-bottom: 15px; }
.text .mediarad + .stycke { padding-top: 25px; }
.text .stycke + .mediarad { margin-top: 25px; }
.textrubrik {
  max-width: var(--textbredd);
  padding-top: 30px;
  font-size: 25px; line-height: 34px; font-weight: 400; color: var(--rubriktext);
}
.textrubrik + .stycke { padding-top: 10px; }

.mediarad { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.mediarad .cell { flex: 1 1 0; min-width: 0; }
.mediarad img { width: 100%; cursor: zoom-in; }
.mediarad-video { justify-content: center; }
.mediarad-video .cell { flex: 0 1 auto !important; }
.video { width: 100%; background: var(--svart); }

/* Pictures fade in when they have loaded, as the original's lazy images. Only with the script, so nothing hides
   without it. */
.js .mediarad img, .js .omslag-bild img, .js .inlagg-bild img { opacity: 0; transition: opacity 0.4s ease; }
.js .mediarad img.laddad, .js .omslag-bild img.laddad, .js .inlagg-bild img.laddad { opacity: 1; }

/* ---- You may also like ---- */

.andra { padding-top: 40px; text-align: center; }
.andra h2 {
  display: inline-block; margin-bottom: 60px;
  font-size: 40px; line-height: 50px; font-weight: 300; color: var(--rost);
}
.rutnat-tre { grid-template-columns: repeat(3, 1fr); padding-top: 0; text-align: left; }
.rutnat-tre .omslag { aspect-ratio: 423 / 300; }
.rutnat-tre .omslag-detaljer { padding: 0 62px; }
.rutnat-tre .omslag-titel { font-size: 25px; line-height: 30px; }

/* ---- Back to top and footer ---- */

.tillbaka { padding-top: 100px; text-align: center; }
.tillbaka a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; line-height: 19px; font-weight: 300;
  color: var(--lank); text-decoration: none;
}
.tillbaka a:hover { color: var(--rost); }
.sidfot { padding: 60px 0; text-align: center; }
.sidfot-text { padding-top: 14px; font-size: 13px; line-height: 19px; }
.sidfot-text a { color: #b0b0b0; text-decoration: none; }
.sidfot-text a:hover { color: var(--rost); }
/* Who maintains the site: one quiet line under the rest (owner 2026-11-19: "diskret"). */
.sidfot-forvaltare { padding-top: 10px; font-size: 11px; line-height: 16px; color: #c8c8c8; }
.sidfot-forvaltare a { color: inherit; text-decoration: none; }
.sidfot-forvaltare a:hover { color: #9a9a9a; text-decoration: underline; }
.sociala { display: flex; justify-content: center; gap: 20px; }
.sociala a { color: var(--rost); display: inline-flex; padding: 4px; transition: color var(--mjuk); }
.sociala a:hover { color: var(--svart); }

/* ---- Buttons ---- */

.knapp {
  display: inline-block;
  height: 40px; padding: 0 30px;
  font-size: 16px; line-height: 40px; font-weight: 500;
  color: var(--knapptext); background: var(--rost);
  border-radius: 4px; text-decoration: none;
  transition: background var(--mjuk);
}
.knapp:hover { background: #a82b00; }
.knapp-rund { border-radius: 20px; font-size: 14px; font-weight: 700; padding: 0 30px; }

/* ---- Contact ---- */

.kontakt { max-width: 654px; margin: 0 auto; padding: 30px 0 0; }
.kontakt h1 {
  padding-top: 41px;
  font-size: 41px; line-height: 64px; font-weight: 300; color: var(--rost);
}
.kontakt .ingress { padding-top: 9px; font-size: 18px; line-height: 30px; }
.kontakt .ingress a { color: var(--rubriktext); text-decoration: none; }
.kontakt .ingress a:hover { text-decoration: underline; }
.kontakt-formular {
  max-width: 580px; margin: 47px 0 0 37px;
  --kf-site-accent: var(--rost);
  --kf-site-accent-text: var(--knapptext);
  --kf-site-kant: #e8b9ab;
  --kf-site-text: var(--rubriktext);
  --kf-site-svag: #a3a3a3;
  --kf-site-yta: var(--vit);
  --kf-site-hornor: 4px;
  --kf-site-fel: #a82b00;
}
.kontakt-formular .kf-knapp { min-height: 40px; }
.kontakt-formular .kf-tack { color: var(--rubriktext); }

/* ---- Text page (privacy) ---- */

.textsida .text .stycke { max-width: none; padding-top: 12px; }
.textsida .textrubrik { font-size: 20px; line-height: 28px; padding-top: 28px; }
.textsida .text .stycke:first-child { padding-top: 9px; }

/* ---- About me: text left, portrait right, no menu ---- */

.om { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--sidhuvud-hojd)); }
.om-text {
  align-self: center;
  max-width: 800px; padding: 40px 37px;
  color: var(--rubriktext);
}
.om-text h1 {
  padding-bottom: 20px;
  font-size: 25px; line-height: 33px; font-weight: 500; color: var(--rost);
}
.om-text p { font-size: 16px; line-height: 25px; padding-bottom: 16px; }
.om-text strong { font-weight: 700; }
.om-knapp { text-align: center; padding: 24px 0 40px !important; }
.om-bild { position: relative; }
.om-bild picture, .om-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- Blog list ---- */

.inlagg-lista { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 13px; }
.inlagg-bild { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.inlagg-bild picture, .inlagg-bild img { width: 100%; height: 100%; object-fit: cover; }
.inlagg-kort .datum { padding-top: 16px; }
.inlagg-kort h2 { padding-top: 6px; font-size: 25px; line-height: 33px; font-weight: 400; color: var(--rubriktext); }
.inlagg-kort h2 a { text-decoration: none; }
.inlagg-kort h2 a:hover { color: var(--rost); }
.inlagg-ingress { padding-top: 8px; font-size: 16px; line-height: 25px; }

/* ---- Lightbox ---- */

.ljuslada {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0; pointer-events: none; transition: opacity var(--mjuk);
}
.ljuslada.oppen { opacity: 1; pointer-events: auto; }
.ljuslada img { max-width: calc(100vw - 160px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; }
.ljuslada button {
  position: absolute; display: inline-flex; padding: 12px;
  background: none; border: 0; color: var(--vit); cursor: pointer;
}
.ljuslada .stang { top: 16px; right: 16px; }
.ljuslada .foregaende { left: 16px; top: 50%; transform: translateY(-50%); }
.ljuslada .nasta { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---- Tablet ---- */

@media (max-width: 768px) {
  .omslag-titel { font-size: 30px; line-height: 40px; }
  .om { grid-template-columns: 1fr; }
  .om-bild { order: -1; aspect-ratio: 1; }
  .om-text { padding: 32px 20px; }
}

/* ---- Phone (the original switches at 540 px) ---- */

@media (max-width: 540px) {
  :root { --sidhuvud-hojd: 110px; }
  .sidhuvud { padding: 25px 16px 25px; text-align: center; }
  .logo img { width: 137px; }
  .menyknapp {
    display: inline-flex; position: absolute; top: 34px; right: 16px;
    width: 44px; height: 44px; align-items: center; justify-content: center;
    padding: 0; background: none; border: 0; color: var(--rost); cursor: pointer;
  }
  .menyknapp .ikon:last-child { display: none; }
  .meny-oppen .menyknapp .ikon:first-child { display: none; }
  .meny-oppen .menyknapp .ikon:last-child { display: block; }
  .meny {
    position: fixed; inset: 0; z-index: 5;
    flex-direction: column; align-items: center; justify-content: center; gap: 28px;
    margin: 0; background: var(--kram);
    opacity: 0; visibility: hidden; transition: opacity var(--mjuk), visibility var(--mjuk);
  }
  .meny a { font-size: 22px; line-height: 30px; }
  .meny-oppen .meny { opacity: 1; visibility: visible; }
  .meny-oppen .menyknapp { position: fixed; z-index: 6; }

  .huvud { width: auto; margin: 0 4px; }
  .rutnat, .rutnat-tre { grid-template-columns: 1fr; padding-top: 20px; }
  .omslag { aspect-ratio: 382 / 255; }
  .rutnat-tre .omslag { aspect-ratio: 382 / 300; }
  .omslag-detaljer { padding: 0 40px; }
  .omslag-titel { font-size: 21px; line-height: 28px; }
  .rutnat-tre .omslag-titel { font-size: 16px; line-height: 19px; }

  .sidrubrik { padding: 18px 0 21px; }
  .sidrubrik h1 { font-size: 21px; line-height: 33px; padding-top: 10px; }
  .ingress { font-size: 14px; line-height: 21px; padding-top: 11px; }
  .text .stycke, .textrubrik { padding-left: 15px; padding-right: 15px; }
  .text .stycke { font-size: 14px; line-height: 20px; }
  .text .stycke:has(+ .stycke) { padding-bottom: 10px; }
  .textrubrik { font-size: 18px; line-height: 26px; }
  .mediarad { gap: 5px; }
  .andra h2 { font-size: 21px; line-height: 26px; margin-bottom: 25px; }
  .tillbaka { padding-top: 34px; }
  .sidfot { padding: 25px 0; }
  .knapp { height: 35px; line-height: 35px; font-size: 14px; }
  .kontakt { padding: 0; }
  .kontakt h1 { font-size: 21px; line-height: 33px; padding-top: 18px; }
  .kontakt .ingress { font-size: 14px; line-height: 20px; padding-top: 7px; }
  .kontakt-formular { margin: 24px 0 0; }
  .om-text { padding: 32px 42px; }
  .om-text h1 { font-size: 16px; line-height: 24px; padding-bottom: 12px; }
  .om-text p { font-size: 14px; line-height: 20px; padding-bottom: 10px; }
  .om-knapp { padding: 20px 0 28px !important; }
  .inlagg-kort h2 { font-size: 21px; line-height: 28px; }
  .inlagg-lista { grid-template-columns: 1fr; gap: 36px; }
  .ljuslada img { max-width: 100vw; }
}
