/* Synlig Svar v4 – selvhostede skrifter, ingen tredjepartsforespørsler. */

@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/BodoniModa-500.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/BodoniModa-600.woff2") format("woff2");
}
@font-face {
  font-family: "Bodoni Moda";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/BodoniModa-Italic-500.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Inter-400.woff2") format("woff2");
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/Inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-500.woff2") format("woff2");
}

:root {
  --bakgrunn: #ffffff;
  --blekk: #111111;
  --dempet: #5a5a5a;
  --myk: #767674;
  --lime: #7de07d;
  --gronn: #417341;
  --linje: #e4e4e4;
  --flate: #f6f8f6;
  --serif: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --marg: clamp(20px, 5vw, 72px);
  --seksjon: clamp(64px, 9vh, 120px);
  --ramme: 1120px;
}

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

html {
  scroll-padding-top: 5.5rem;
  background: var(--bakgrunn);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bakgrunn);
  color: var(--blekk);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  hanging-punctuation: first last;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
input, button, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--gronn);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--blekk); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}
.sjekk input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.hopp {
  position: absolute;
  left: var(--marg);
  top: -4rem;
  z-index: 30;
  background: var(--bakgrunn);
  color: var(--blekk);
  padding: 0.5rem 0.8rem;
}
.hopp:focus { top: 0.6rem; }

.ramme {
  width: 100%;
  max-width: var(--ramme);
  margin: 0 auto;
  padding-inline: max(var(--marg), env(safe-area-inset-left)) max(var(--marg), env(safe-area-inset-right));
}

/* Header */
.topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem var(--marg);
  padding-left: max(var(--marg), env(safe-area-inset-left));
  padding-right: max(var(--marg), env(safe-area-inset-right));
  border-bottom: 1px solid var(--linje);
  background: var(--bakgrunn);
  position: sticky;
  top: 0;
  z-index: 20;
}

.merke {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--blekk);
  line-height: 1;
  padding: 0.2rem 0;
}
.merke:hover { color: inherit; }
.merke-navn {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.merke-url {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gronn);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav a {
  color: inherit;
  text-decoration: none;
  padding: 0.75rem 0;
  margin: -0.75rem 0;
}
.nav a:hover { color: var(--lime); }
.forside:not(.har-rullet) .nav a:hover { color: var(--lime); }
body:not(.forside) .nav a:hover { color: var(--gronn); }
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.4em;
}

/* Forside: gjennomsiktig topp over bildet, tett når man ruller */
.forside .topp {
  position: fixed;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.forside .merke { color: #fff; }
.forside .merke-url { color: var(--lime); }
.forside.har-rullet .topp {
  background: rgba(17, 17, 17, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
  .forside .topp { transition: none; }
}

/* Type */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-wrap: balance;
  margin: 0 0 1rem;
  color: inherit;
}
h1 {
  font-size: clamp(3.15rem, 8.6vw, 5.85rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 0 0 0.9rem;
}
h1 em {
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.025em;
}
h2 { font-size: clamp(1.9rem, 3.4vw, 2.55rem); line-height: 1.18; color: var(--blekk); }
h3 { font-size: 1.4rem; line-height: 1.25; margin-bottom: 0.5rem; color: var(--blekk); }

/* Hero */
.helt {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}
.helt-bilde {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.helt-bilde img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.08);
  transform-origin: center center;
  will-change: transform;
}
.helt-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.38) 0%, rgba(17, 17, 17, 0.28) 28%, rgba(17, 17, 17, 0.62) 62%, rgba(17, 17, 17, 0.86) 100%),
    linear-gradient(90deg, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0.22) 48%, rgba(17, 17, 17, 0.08) 100%);
  pointer-events: none;
}
.helt-inn {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(6.5rem, 14vh, 9rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
}
.helt-innhold { max-width: 38rem; }
.helt-under {
  margin: 0 0 1.7rem;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.9);
  max-width: 28.5rem;
  hanging-punctuation: first last;
  text-wrap: pretty;
}

.sjekk { margin: 0; }
.sjekk-felt { margin-bottom: 0.9rem; }
.sjekk .felt-feil {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #fff;
  text-wrap: pretty;
}
.sjekk .felt-feil:empty { display: none; }
.sjekk label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--lime);
  margin-bottom: 0.42rem;
}
.sjekk input[type="url"],
.sjekk input[type="email"],
.sjekk input[type="text"] {
  width: 100%;
  height: 3.85rem;
  padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--blekk);
  font-size: 1.0625rem;
  appearance: none;
}
.sjekk input::placeholder { color: var(--dempet); }
.sjekk input[type="url"]:focus-visible,
.sjekk input[type="email"]:focus-visible,
.sjekk input[type="text"]:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  border-color: var(--blekk);
  box-shadow: 0 0 0 1px var(--blekk);
}
.sjekk .samtykke {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.95rem 0 1rem;
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--sans);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
  cursor: pointer;
}
.sjekk .samtykke input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex: none;
  accent-color: var(--lime);
}
.sjekk .samtykke a { color: var(--lime); }
.sjekk .samtykke a:hover { color: #fff; }

/* Diskré Turnstile (managed, interaction-only). Skjules uten sitekey. */
.sjekk .cf-turnstile-ramme {
  margin: 0.35rem 0 0.85rem;
  min-height: 0;
  max-width: 100%;
}
.sjekk .cf-turnstile-ramme[data-sitekey=""],
.sjekk .cf-turnstile-ramme[data-sitekey="__TURNSTILE_SITEKEY__"] {
  display: none;
}
.sjekk .cf-turnstile {
  display: block;
  line-height: 0;
}


.knapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3.85rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 2px;
  background: var(--lime);
  color: var(--blekk);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
a.knapp { color: var(--blekk); text-decoration: none; }
.knapp:hover {
  background: #8fe88f;
  box-shadow: 0 8px 22px rgba(125, 224, 125, 0.32);
  transform: translateY(-1px);
}
.knapp:active {
  background: #74d474;
  transform: translateY(0);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}
.knapp:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--blekk);
}
.knapp--smal { width: auto; padding-inline: 1.4rem; margin-top: 0.5rem; }

.sjekk-pris {
  margin: 0.95rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}
.sjekk-pris span:not(:last-child)::after {
  content: " \00b7 ";
  white-space: pre;
}

.inngar {
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}
.inngar li {
  position: relative;
  padding-left: 1.15rem;
  margin: 0 0 0.45rem;
}
.inngar li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--lime);
}

.foto-kreditt {
  margin: 1.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.foto-kreditt a { color: inherit; }
.foto-kreditt a:hover { color: var(--lime); }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Sammenfoldet innhold */
.mer {
  padding-block: clamp(4.75rem, 10vh, 7.5rem);
  background: var(--bakgrunn);
}
.mer-liste { max-width: 38.5rem; }
.merke-seksjon {
  border-top: 1px solid var(--linje);
}
.merke-seksjon:last-of-type { border-bottom: 1px solid var(--linje); }
.merke-seksjon > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.35rem 2.5rem 1.35rem 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
  position: relative;
  transition: color 0.2s ease;
}
.merke-seksjon > summary:hover { color: var(--gronn); }
.merke-seksjon > summary:focus-visible {
  outline: 3px solid var(--gronn);
  outline-offset: 4px;
}
.merke-seksjon > summary::-webkit-details-marker { display: none; }
.merke-seksjon > summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--gronn);
  transition: transform 0.25s ease, color 0.2s ease;
}
.merke-seksjon[open] > summary { color: var(--blekk); }
.merke-seksjon[open] > summary::after { content: "–"; }
.merke-seksjon .merke-innhold {
  padding: 0.1rem 0 2.1rem;
  color: var(--dempet);
  max-width: 36rem;
  line-height: 1.7;
  hanging-punctuation: first last;
}
.merke-innhold h3 { font-size: 1.15rem; margin: 1.25rem 0 0.4rem; }
.merke-innhold ul { margin: 0 0 1.15rem; padding-left: 1.2rem; }
.merke-innhold li { margin: 0 0 0.45rem; }
.kilde { font-size: 0.92rem; color: var(--dempet); margin-top: 0.8rem; }
.sitat { margin: 0; color: var(--blekk); }

.steg {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  list-style: none;
  padding: 0;
  margin: 0;
}
.steg li p { color: var(--dempet); margin: 0; }
.steg .nr {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gronn);
  display: block;
  margin-bottom: 0.6rem;
}

.faq { border-top: 1px solid var(--linje); }
.faq details { border-bottom: 1px solid var(--linje); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 2.2rem 1.05rem 0;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
  position: relative;
  color: var(--blekk);
  transition: color 0.2s ease;
}
.faq summary:hover { color: var(--gronn); }
.faq summary:focus-visible {
  outline: 3px solid var(--gronn);
  outline-offset: 4px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1rem;
  color: var(--gronn);
  font-family: var(--mono);
  font-size: 1.05rem;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  padding: 0 0 1.15rem;
  color: var(--dempet);
  line-height: 1.7;
  hanging-punctuation: first last;
}

.fin { font-size: 0.95rem; color: var(--dempet); }

/* Sider (vilkår, personvern, takk) */
.hoved { flex: 1 0 auto; }
.side { padding: clamp(3rem, 8vh, 5.5rem) 0; }
.prosa { max-width: 38.5rem; hanging-punctuation: first last; }
.prosa p, .prosa li { line-height: 1.7; }
.etikett {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gronn);
}
.side-meta { color: var(--dempet); margin-bottom: 1.4rem; }
.kallout {
  border-left: 3px solid var(--lime);
  background: var(--flate);
  padding: 1rem 1.15rem;
  margin: 0 0 2rem;
}
.kallout p { margin: 0; }
.placeholder {
  background: color-mix(in srgb, var(--lime) 28%, transparent);
  padding: 0 0.15em;
}
.prosa h2 { margin-top: 2.35rem; font-size: clamp(1.45rem, 2.4vw, 1.8rem); text-wrap: balance; }
.prosa ul { padding-left: 1.15rem; }
.prosa li { margin: 0 0 0.35rem; }

/* Footer */
.bunn {
  border-top: 1px solid var(--linje);
  padding: 2rem 0 2.4rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--dempet);
}
.bunn .ramme {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.bunn-opplysning p { margin: 0 0 0.25rem; }
.bunn-opplysning p:last-child { margin-bottom: 0; }
.bunn a { color: var(--dempet); }
.bunn a:hover { color: var(--gronn); }
.bunn nav {
  display: flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.bunn nav a { text-decoration: none; }

/* Bevegelse: felt vises rolig, rolig parallaks, av under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .helt-bilde img.helt-bilde--tidslinje {
      animation: helt-parallax linear both;
      animation-timeline: scroll();
      animation-range: 0 120vh;
    }
  }

  .sjekk-felt,
  .sjekk .samtykke,
  .sjekk .knapp,
  .sjekk-pris {
    animation: felt-inn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .sjekk-felt:nth-of-type(1) { animation-delay: 0.06s; }
  .sjekk-felt:nth-of-type(2) { animation-delay: 0.13s; }
  .sjekk-felt:nth-of-type(3) { animation-delay: 0.2s; }
  .sjekk .samtykke { animation-delay: 0.27s; }
  .sjekk .knapp { animation-delay: 0.34s; }
  .sjekk-pris { animation-delay: 0.4s; }

  .merke-seksjon[open] > .merke-innhold,
  .faq details[open] > p {
    animation: merke-apen 0.4s ease both;
  }
}

@keyframes helt-parallax {
  from { transform: scale(1.08) translateY(0); }
  to { transform: scale(1.08) translateY(8%); }
}
@keyframes felt-inn {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes merke-apen {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .forside .topp { transition: none; }
  .helt-bilde img {
    transform: none !important;
    animation: none !important;
    will-change: auto;
  }
  .sjekk-felt,
  .sjekk .samtykke,
  .sjekk .knapp,
  .sjekk-pris,
  .merke-seksjon[open] > .merke-innhold,
  .faq details[open] > p {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .knapp,
  .merke-seksjon > summary,
  .faq summary,
  .merke-seksjon > summary::after,
  .faq summary::after {
    transition: none;
  }
  .knapp:hover { transform: none; }
}

@media (max-width: 720px) {
  .steg { grid-template-columns: 1fr; }
  .skjul-sm { display: none; }
  h1 {
    font-size: clamp(2.45rem, 12.5vw, 3.35rem);
    line-height: 0.98;
    margin-bottom: 0.55rem;
  }
  .helt-inn {
    padding-top: 5.25rem;
    padding-bottom: 1.15rem;
  }
  .helt-under {
    margin-bottom: 1rem;
    font-size: 1.02rem;
    line-height: 1.4;
  }
  .sjekk-felt { margin-bottom: 0.55rem; }
  .sjekk input[type="url"],
  .sjekk input[type="email"],
  .sjekk input[type="text"],
  .knapp { height: 3.15rem; }
  .sjekk .samtykke {
    margin: 0.65rem 0 0.7rem;
    font-size: 0.88rem;
  }
  .sjekk-pris {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    margin-top: 0.7rem;
    font-size: 0.88rem;
    line-height: 1.35;
  }
  .sjekk-pris span:not(:last-child)::after { content: none; }
  .inngar { margin-top: 1.05rem; }
}

@media (min-width: 900px) {
  .knapp { width: auto; min-width: 16rem; }
}
