/* Dødsboguiden: felles stil for alle sider (Refero-stilen "Portal" i grønt: fotoheadere, Fraunces og Inter).
   Fontene ligger i fonts/ (serveren tillater ikke skrift fra andre steder). */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/fraunces-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(fonts/fraunces-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --ink: #000;
  --graphite: #3e3e3e;
  --smoke: #5e5e5e;
  --ash: #f6f7f3;
  --paper: #fff;
  --signal-dyp: #1f5c46;
  --signal-hover: #174536;
  --signal-tone: #e7f1ea;
  --signal-ring: #dfe9e2;
  --ring-ash: #e8eae4;
  --linje: #e3e6df;
  --natt: #102519;
  --natt-2: #16352a;
  --sol: #f1bd4f;
  --lauv: linear-gradient(160deg, #2f7a59 0%, #5fa577 55%, #a9cf8f 100%);
  --skog: 16, 37, 25;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bredde: 1180px;
  --smal: 760px;
  --gutter: clamp(16px, 4vw, 40px);
  --land-h: clamp(220px, calc((100vw - 24px) * .3125), 470px);
  --kort-inn: 360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--ash); color: var(--graphite);
  font-family: var(--sans); font-size: 20px; line-height: 1.55; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.serif, h1, h2 {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100, "WONK" 0;
  font-optical-sizing: auto; color: var(--ink); letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance;
}
p { text-wrap: pretty; }
a { color: var(--signal-dyp); text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--signal-dyp); outline-offset: 4px; border-radius: 14px;
}
.lys a:focus-visible, .lys button:focus-visible, .natt a:focus-visible { outline-color: #fff; }
.skjult { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ramme { width: 100%; max-width: calc(var(--bredde) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.ramme-smal { width: 100%; max-width: calc(var(--smal) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Pikselbilder (piksel.js setter inn de samme reglene) */
.piksel { position: relative; overflow: hidden; }
.piksel > img, .piksel > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; image-rendering: crisp-edges; }
.piksel > img { opacity: 0; }
.piksel > img:first-of-type, .piksel > img.aktiv { opacity: 1; }
.piksel.klar > img:first-of-type:not(.aktiv) { opacity: 0; }

/* ---------- Merke og knapper ---------- */
.merke-lenke { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 56px; padding-inline: 6px 4px; }
.merke { flex: none; width: 28px; height: 35px; }
.merke-navn { font-family: var(--serif); font-weight: 500; font-variation-settings: "SOFT" 100, "WONK" 0; font-size: 23px; letter-spacing: -0.02em; line-height: 1; }

.knapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 56px; border-radius: 50px;
  font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  border: 0; cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease;
}
.knapp svg { flex: none; }
.knapp-hoved { min-height: 66px; padding: 0 10px 0 30px; background: #fff; color: var(--ink); font-size: 21px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .26); }
.knapp-hoved:hover { box-shadow: 0 0 0 7px rgba(255, 255, 255, .38); }
.knapp-pil { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--signal-dyp); color: #fff; flex: none; }
.knapp-pil svg { width: 22px; height: 22px; }
.knapp-bla { min-height: 62px; padding: 0 30px; background: var(--signal-dyp); color: #fff; font-size: 20px; box-shadow: 0 0 0 5px var(--signal-tone); }
.knapp-bla:hover { background: var(--signal-hover); }
.knapp-bla svg { width: 20px; height: 20px; }
.knapp-liten { padding: 0 22px 0 24px; background: var(--signal-dyp); color: #fff; font-size: 18px; gap: 10px; }
.knapp-liten svg { width: 18px; height: 18px; }
.knapp-liten:hover { background: var(--signal-hover); }
.knapp-spokelse { padding: 0 28px; color: var(--ink); font-size: 19px; background: #fff; box-shadow: inset 0 0 0 1.5px #c3c9c1; }
.knapp-spokelse:hover { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- Kapselmenyen ---------- */
.kapsel {
  width: 100%; max-width: 1120px; margin: 8px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .3);
}
.kapsel-hoyre { display: flex; align-items: center; gap: 6px; }
.kapsel-lenke { display: inline-flex; align-items: center; min-height: 56px; padding: 0 16px; color: var(--graphite); font-size: 18px; font-weight: 500; text-decoration: none; border-radius: 16px; }
.kapsel-lenke:hover, .kapsel-lenke[aria-current="page"] { color: var(--ink); background: var(--ash); }

/* ---------- Forsiden: bare foto i toppen ---------- */
.hero {
  position: relative; isolation: isolate; margin: 12px; border-radius: 40px; min-height: max(720px, calc(100vh - 24px));
  display: flex; flex-direction: column; padding: 16px 16px var(--land-h); color: #fff; background: #1f3d30;
}
.hero-innhold { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(56px, 8vh, 96px) 8px clamp(48px, 7vh, 80px); }
.hero h1 { color: #fff; max-width: 11em; font-size: clamp(46px, 6.6vw + 4px, 104px); line-height: 1.0; letter-spacing: -0.025em; }
.hero-ingress { max-width: 34em; margin-top: 30px; color: #fff; font-size: clamp(20px, 1vw + 9px, 24px); line-height: 1.5; }
.hero .knapp-hoved { margin-top: 40px; }
.hero-merknad { margin-top: 16px; color: #fff; font-size: 19px; font-weight: 500; }

/* Fotoet dekker hele headeren. Sløret (::after) holder hvit tekst over AA på det lyseste punktet. */
.hero-bilde, .himmel-bilde { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; }
.hero-bilde .piksel, .himmel-bilde .piksel { height: 100%; }
.hero-bilde::after, .himmel-bilde::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero-bilde::after {
  background:
    radial-gradient(ellipse 62% 46% at 50% 30%, rgba(var(--skog), .34) 0%, rgba(var(--skog), 0) 100%),
    linear-gradient(180deg, rgba(var(--skog), .57) 0%, rgba(var(--skog), .57) 64%, rgba(var(--skog), .16) 100%);
}

/* ---------- Undersider: lav fotoheader ---------- */
.himmel {
  position: relative; isolation: isolate; margin: 12px; border-radius: 40px; color: #fff; background: #1f3d30;
  padding: 16px 16px clamp(48px, 5vw, 72px);
}
.himmel-bilde::after { background: linear-gradient(180deg, rgba(var(--skog), .5) 0%, rgba(var(--skog), .54) 100%); }
.himmel-innhold { max-width: 920px; margin-inline: auto; padding: clamp(40px, 5vw, 64px) 8px 0; text-align: center; }
.himmel h1 { color: #fff; font-size: clamp(42px, 4.4vw + 12px, 80px); line-height: 1.02; letter-spacing: -0.025em; margin-inline: auto; max-width: 13em; }
.himmel-ingress { max-width: 36em; margin: 24px auto 0; color: #fff; font-size: clamp(20px, .6vw + 14px, 23px); line-height: 1.5; }

/* Smuler */
.smuler { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 28px; font-size: 17px; color: #fff; }
.smuler a { color: #fff; }
.smuler span[aria-hidden] { opacity: .8; }

/* ---------- Seksjoner ---------- */
.del { padding-block: clamp(80px, 10vw, 140px); }
.del-hvit { background: var(--paper); }
.del-ash { background: var(--ash); }
.del-hode { max-width: 760px; margin-inline: auto; text-align: center; }
h2 { font-size: clamp(40px, 3vw + 14px, 60px); }
.del-hode p { margin-top: 22px; font-size: clamp(20px, .4vw + 15px, 22px); }
.kort { background: #fff; border-radius: 30px; box-shadow: 0 0 0 5px var(--ring-ash); }

/* Valgkort (Hvor er dere nå?) */
.valg-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 56px; }
.valg {
  display: flex; align-items: center; gap: 22px; height: 100%; min-height: 156px; padding: 28px 26px 28px 28px; border-radius: 26px;
  background: #fff; box-shadow: 0 0 0 5px var(--ring-ash); color: var(--graphite); text-decoration: none; transition: box-shadow .15s ease;
}
.valg:hover { box-shadow: 0 0 0 5px #cfe1d4; }
.ikon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--lauv); color: #fff; }
.ikon svg { width: 30px; height: 30px; }
.valg-tekst { flex: 1; min-width: 0; }
.valg-tittel { font-family: var(--sans); font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.valg-beskr { display: block; margin-top: 6px; font-size: 20px; line-height: 1.5; }
.pil-rund { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #edf2ec; color: var(--signal-dyp); transition: background-color .15s ease, color .15s ease; }
.pil-rund svg { width: 22px; height: 22px; }
.valg:hover .pil-rund { background: var(--signal-dyp); color: #fff; }
.under-lenke { margin-top: 44px; text-align: center; font-size: 20px; font-weight: 500; }
.under-lenke a { display: inline-flex; align-items: center; min-height: 56px; }

/* Nummererte steg */
.steg { display: grid; counter-reset: steg; }
.steg > li { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 26px; padding-bottom: 44px; }
.steg > li:last-child { padding-bottom: 0; }
.steg > li:not(:last-child)::before { content: ""; position: absolute; left: 29px; top: 68px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--linje); }
.steg-nr { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50px; background: var(--signal-tone); color: var(--signal-dyp); font-family: var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0; font-size: 30px; line-height: 1; }
.steg h3 { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100, "WONK" 0; font-size: clamp(27px, 1vw + 17px, 32px); line-height: 1.12; letter-spacing: -0.015em; color: var(--ink); padding-top: 12px; }
.steg p { margin-top: 12px; max-width: 34em; }

/* Spørsmål og svar */
.sos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.sos dl { border-top: 1px solid var(--linje); }
.sos dl > div { padding: 34px 0 36px; border-bottom: 1px solid var(--linje); }
.sos dt { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100, "WONK" 0; font-size: clamp(25px, .8vw + 17px, 29px); line-height: 1.15; letter-spacing: -0.015em; color: var(--ink); }
.sos dd { margin-top: 12px; max-width: 36em; }
.sos dd + dd { margin-top: 10px; }

/* ---------- Lesetekst (temasider, vilkår, personvern) ---------- */
.artikkel { color: var(--graphite); }
.artikkel > * + * { margin-top: 22px; }
.artikkel h2 { font-size: clamp(34px, 1.6vw + 18px, 46px); margin-top: 72px; scroll-margin-top: 24px; }
.artikkel h2:first-child { margin-top: 0; }
.artikkel h3 { font-family: var(--sans); font-size: 23px; font-weight: 600; line-height: 1.3; color: var(--ink); margin-top: 40px; letter-spacing: -0.015em; }
.artikkel h2 + p, .artikkel h3 + p, .artikkel h2 + ul, .artikkel h3 + ul, .artikkel h3 + ol { margin-top: 16px; }
.artikkel ul, .artikkel ol { display: grid; gap: 12px; padding-left: 0; }
.artikkel ul > li { position: relative; padding-left: 30px; }
.artikkel ul > li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--lauv); }
.artikkel ol { counter-reset: punkt; }
.artikkel ol > li { position: relative; padding-left: 44px; counter-increment: punkt; }
.artikkel ol > li::before { content: counter(punkt); position: absolute; left: 0; top: .05em; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--signal-tone); color: var(--signal-dyp); font-size: 16px; font-weight: 600; }
.artikkel strong { color: var(--ink); font-weight: 600; }
.artikkel table { width: 100%; border-collapse: collapse; font-size: 19px; }
.artikkel th, .artikkel td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--linje); vertical-align: top; }
.artikkel th { color: var(--ink); font-weight: 600; }

/* Informasjonsbokser */
.boks { padding: 26px 28px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 5px var(--ring-ash); }
.boks > * + * { margin-top: 12px; }
.boks-tittel { font-weight: 600; color: var(--ink); font-size: 21px; }
.boks-viktig { background: #fdf7e9; box-shadow: 0 0 0 5px #f3e4bf; }
.boks-viktig .boks-tittel { color: #7a4600; }
.boks-bla { background: #eff5f0; box-shadow: 0 0 0 5px var(--signal-ring); }

/* Kildeliste nederst på temasider */
.kilder-liste { display: grid; gap: 10px; margin-top: 18px; }
.kilder-liste a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.kilder-liste a::after { content: "↗"; font-size: .85em; }
.sist-kontrollert { margin-top: 28px; color: var(--smoke); font-size: 18px; }

/* Neste steg nederst på undersider */
.videre { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }

/* ---------- Bunnen: dyp skog ---------- */
.natt {
  position: relative; isolation: isolate; margin: 12px; border-radius: 40px; overflow: hidden;
  color: #d3e2d7; font-size: 18px; line-height: 1.6;
  background: linear-gradient(180deg, var(--natt-2) 0%, var(--natt) 100%);
}
.natt-innhold { position: relative; max-width: calc(var(--bredde) + 2 * var(--gutter)); margin-inline: auto; padding: clamp(48px, 5vw, 72px) var(--gutter) 40px; }
.natt a { color: #fff; }
.natt .merke-navn { color: #fff; }
.natt-midt { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 24px clamp(40px, 5vw, 80px); align-items: start; }
.natt-kol h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; color: #fff; letter-spacing: 0; }
.natt-kol ul { margin-top: 6px; display: grid; }
.natt-kol a { display: inline-flex; align-items: center; min-height: 44px; color: #e2ede5; text-decoration: none; }
.natt-kol a:hover, .natt-kol a[aria-current="page"] { color: #fff; text-decoration: underline; }
.natt-bunn { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; color: #b8cdbf; font-size: 16.5px; }
.natt-bunn p { max-width: 52em; }

/* ---------- Skjema (kjøp, angre) ---------- */
.felt { display: grid; gap: 8px; }
.felt > span { font-weight: 600; color: var(--ink); font-size: 19px; }
.felt input[type="text"], .felt input[type="email"], .felt input[type="date"], .felt textarea, .felt select {
  font: inherit; font-size: 20px; color: var(--ink); min-height: 60px; padding: 12px 20px; border-radius: 18px; border: 0; background: #fff;
  box-shadow: inset 0 0 0 1.5px #c3c9c1; width: 100%;
}
.felt input:focus, .felt textarea:focus, .felt select:focus { box-shadow: inset 0 0 0 2px var(--signal-dyp); outline: none; }

/* ---------- Mellomstore skjermer ---------- */
@media (max-width: 900px) {
  .natt-midt { grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; }
  .natt-merke { grid-column: 1 / -1; }
}
@media (max-width: 900px) { .sos { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .valg-liste, .videre { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 760px) {
  :root { --kort-inn: 48px; --land-h: clamp(260px, 62vw, 340px); }
  .kapsel-lenke { display: none; }
}

/* ---------- Telefon ---------- */
@media (max-width: 600px) {
  body { font-size: 19px; }
  .hero, .himmel, .natt { margin: 8px; border-radius: 32px; }
  .hero { padding: 8px 8px var(--land-h); min-height: auto; }
  .hero-bilde::after {
    background:
      radial-gradient(ellipse 90% 40% at 50% 40%, rgba(var(--skog), .3) 0%, rgba(var(--skog), 0) 100%),
      linear-gradient(180deg, rgba(var(--skog), .57) 0%, rgba(var(--skog), .57) 76%, rgba(var(--skog), .12) 100%);
  }
  .himmel { padding: 8px 8px 40px; }
  .kapsel { margin-top: 4px; padding: 6px 6px 6px 4px; border-radius: 20px; }
  .merke-lenke { gap: 8px; padding-inline: 4px 0; }
  .merke { width: 26px; height: 32.5px; }
  .merke-navn { font-size: 19px; }
  .knapp-liten { padding: 0 16px 0 18px; font-size: 16px; gap: 8px; }
  .knapp-liten svg { display: none; }
  .hero-innhold { padding: 52px 6px 48px; }
  .hero-ingress { margin-top: 22px; }
  .hero .knapp-hoved { margin-top: 32px; }
  .knapp-hoved { font-size: 20px; padding-left: 26px; gap: 12px; }
  .himmel-innhold { padding-top: 36px; }
  .del-hode p { font-size: 19px; }
  .valg { flex-wrap: wrap; align-items: flex-start; gap: 18px; padding: 24px 22px; min-height: 0; position: relative; }
  .valg .ikon { width: 56px; height: 56px; }
  .valg .ikon svg { width: 27px; height: 27px; }
  .valg-tekst { flex: 1 1 100%; order: 2; }
  .pil-rund { margin-left: auto; }
  .valg-tittel { font-size: 22px; }
  .valg-beskr { font-size: 19px; }
  .steg > li { grid-template-columns: 48px minmax(0, 1fr); gap: 18px; }
  .steg-nr { width: 48px; height: 48px; font-size: 25px; }
  .steg > li:not(:last-child)::before { left: 23px; top: 56px; }
  .steg h3 { padding-top: 7px; }
  .boks { padding: 22px 20px; }
  .natt { font-size: 17px; }
  .natt-midt { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .natt-midt > :nth-child(2) { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .merke-navn { font-size: 17.5px; }
  .merke { width: 24px; height: 30px; }
  .knapp-liten { padding: 0 14px 0 16px; font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
@media print { .kapsel, .natt, .hero-bilde, .himmel-bilde, .knapp { display: none !important; } .hero, .himmel { background: none; color: #000; } .hero h1, .himmel h1, .himmel-ingress { color: #000; } }
