@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/fonts/bricolage.woff2) format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url(/fonts/schibsted.woff2) format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --sol: #ffc629;
  --sol-dyp: #d99e00;
  --larvikitt: #0e3341;
  --korall: #ff6b4a;
  --himmel: #bfe6ff;
  --mynte: #bdefd3;
  --sno: #ffffff;

  --bg: #ffffff;
  --ink: #0e3341;
  --muted: #3e5965;
  --line: #d3dee3;
  --accent: #0e3341;
  --hero-bg: var(--sol);
  --hero-ink: var(--larvikitt);
  --hero-muted: var(--larvikitt);
  --pill-bg: var(--sno);
  --pill-ink: var(--larvikitt);

  --display: "Bricolage Grotesque", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --text: "Schibsted Grotesk", -apple-system, "Segoe UI", system-ui, sans-serif;
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 48px);
  --kant: clamp(32px, 5vw, 64px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  background: var(--hero-bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-stretch: 86%;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.02;
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 0 0 12px 0;
  background: var(--larvikitt);
  color: var(--sno);
  font-weight: 700;
}

.skip:focus {
  left: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 15px 26px;
  border: 3px solid var(--btn-edge, var(--larvikitt));
  border-radius: 999px;
  background: var(--btn-bg, var(--larvikitt));
  box-shadow: 0 6px 0 var(--btn-edge, var(--larvikitt));
  color: var(--btn-ink, var(--sno));
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.bar {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-top: 12px;
  padding-inline: clamp(12px, 3vw, 32px);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 7px 8px 7px 12px;
  border: 3px solid var(--larvikitt);
  border-radius: 999px;
  background: var(--sno);
  box-shadow: 0 5px 0 var(--larvikitt);
  color: var(--larvikitt);
}

.bar :focus-visible {
  outline-color: var(--larvikitt);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: inherit;
  font-family: var(--display);
  font-size: 1.2rem;
  font-stretch: 88%;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.mark img {
  width: 38px;
  height: 38px;
}

.bar-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 28px);
}

.bar-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 2px;
  background: linear-gradient(var(--korall), var(--korall)) left calc(100% - 8px) / 0 3px no-repeat;
  color: var(--larvikitt);
  font-weight: 600;
  text-decoration: none;
}

.bar-link:hover {
  background-size: 100% 3px;
}

.bar .btn {
  min-height: 44px;
  padding: 11px 20px;
  box-shadow: none;
  font-size: 1rem;
}

@media (max-width: 600px) {
  .bar-link {
    display: none;
  }
}

.sheet {
  position: relative;
  margin-top: calc(var(--kant) * -1);
  padding-block: clamp(56px, 8vw, 104px) calc(clamp(56px, 8vw, 104px) + var(--kant));
  border-radius: var(--kant) var(--kant) 0 0;
  background: var(--bg);
}

main > .sheet:last-child {
  padding-bottom: clamp(56px, 8vw, 104px);
}

.lead {
  max-width: 36em;
  margin-top: 18px;
  font-size: clamp(1.12rem, 1.7vw, 1.3rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 30px;
}

.actions a:not(.btn) {
  color: inherit;
  font-weight: 700;
}

.hello {
  position: relative;
  padding-block: clamp(36px, 6vw, 80px) calc(clamp(64px, 9vw, 112px) + var(--kant));
  color: var(--larvikitt);
}

.hello.tiles {
  background-image: url(/hello-tiles.svg);
  background-position: right max(0px, calc((100vw - var(--maxw)) / 2)) bottom;
  background-repeat: no-repeat;
  background-size: auto 100%;
}

.hello.tiles .lead {
  max-width: 26em;
}

.fall-tile {
  position: absolute;
  z-index: 2;
  right: calc(max(var(--pad), (100% - var(--maxw)) / 2 + var(--pad)) + clamp(150px, 14vw, 230px));
  bottom: calc(var(--kant) - 62px);
  width: 112px;
  height: auto;
  rotate: 16deg;
  pointer-events: none;
}

@media (max-width: 1199px) {
  .fall-tile {
    display: none;
  }
}

@media (max-width: 1199px) {
  .hello.tiles {
    background-image: none;
  }
}

.hello h1 {
  max-width: 11em;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
  line-height: 0.96;
}

.stamp {
  position: absolute;
  top: clamp(16px, 2.4vw, 36px);
  right: max(var(--pad), calc((100vw - var(--maxw)) / 2 + var(--pad)));
  width: clamp(120px, 13vw, 172px);
  rotate: 10deg;
}

.stamp svg {
  display: block;
  width: 100%;
  height: auto;
}

.stamp text {
  font-family: var(--display);
  font-size: 25px;
  font-stretch: 86%;
  font-weight: 800;
  letter-spacing: 0.4px;
}

@media (min-width: 981px) {
  .hello h1 {
    padding-right: calc(clamp(120px, 13vw, 172px) + 24px);
  }
}

@media (max-width: 980px) {
  .stamp {
    display: none;
  }
}

.apps h2,
.about h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.shelf {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 32px);
  margin-top: clamp(32px, 4.4vw, 52px);
}

@media (min-width: 800px) {
  .shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shelf > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - clamp(20px, 2.6vw, 32px)) / 2);
  }

  .shelf > .card-wide {
    grid-column: 1 / -1;
  }

  .shelf > .card-wide ~ .card:last-child:nth-child(odd) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .shelf > .card-wide ~ .card:last-child:nth-child(even) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - clamp(20px, 2.6vw, 32px)) / 2);
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 22px;
  border: 3px solid var(--larvikitt);
  border-radius: 28px;
  background: var(--hero-bg);
  box-shadow: 0 8px 0 var(--larvikitt);
  color: var(--hero-ink);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-head img,
.hero-icon {
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.22);
}

.card-head img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.card h3 {
  font-size: 1.75rem;
}

.card p {
  color: var(--hero-muted);
  text-wrap: pretty;
}

.card .pills {
  flex-wrap: wrap-reverse;
  margin-top: auto;
  padding-top: 6px;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  padding-top: 2px;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--hero-ink);
  font-weight: 700;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
}

.card .card-art {
  order: -1;
  width: 100%;
  height: auto;
  border: 3px solid var(--pill-bg);
  border-radius: 20px;
  box-shadow: 0 6px 0 rgb(0 0 0 / 0.35);
}

@media (min-width: 980px) {
  .card.card-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: clamp(24px, 3vw, 40px);
    align-items: center;
  }

  .card-wide .card-body {
    height: 100%;
  }

  .card-wide .card-art {
    order: 0;
  }
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-block;
  align-self: flex-start;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.pill.quiet {
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
  color: var(--hero-ink);
}

.store-badge {
  display: inline-block;
  align-self: center;
  border-radius: 8px;
  line-height: 0;
}

.store-badge img {
  display: block;
  width: auto;
  height: 52px;
}

.hero .store-badge img {
  height: 60px;
}

.pills .store-badge ~ .pill {
  align-self: center;
}

.about {
  background: var(--mynte);
  color: var(--larvikitt);
}

.about p {
  max-width: 36em;
  text-wrap: pretty;
}

.about p + p {
  margin-top: 12px;
}

.about .lead + p {
  margin-top: 16px;
}

.about a:not(.btn) {
  color: inherit;
  font-weight: 700;
}

.hero {
  padding-block: clamp(28px, 4vw, 48px) calc(clamp(56px, 8vw, 96px) + var(--kant));
  color: var(--hero-ink);
}

.card :focus-visible,
.hero :focus-visible {
  outline-color: var(--focus-on-hero, var(--larvikitt));
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}

.hero-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 22px;
  border-radius: 22px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98;
}

.hero .lead {
  max-width: 30em;
  color: var(--hero-muted);
}

.hero .pills {
  margin-top: 26px;
}

.hero-art {
  justify-self: center;
  width: min(100%, 360px);
}

img.hero-art {
  border: 3px solid var(--larvikitt);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--larvikitt);
}

.dial {
  position: relative;
}

.dial img {
  width: 100%;
}

.dial figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dial strong {
  font-family: var(--display);
  font-size: clamp(3.2rem, 9vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dial span {
  color: var(--hero-muted);
  font-size: 1rem;
}

@media (max-width: 760px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    width: min(70%, 280px);
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(18px, 2.6vw, 28px);
}

.facts section,
.note,
.short {
  padding: 22px 24px 24px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--sno);
  box-shadow: 0 6px 0 var(--ink);
}

.facts h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.facts ul,
.doc ul {
  padding-left: 1.2em;
}

.facts li + li {
  margin-top: 6px;
}

.facts li::marker,
.doc li::marker {
  color: var(--accent);
}

.faq {
  margin-top: clamp(48px, 7vw, 80px);
}

.faq > h2 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.faq-liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(16px, 2.4vw, 24px);
  margin-top: clamp(24px, 3.4vw, 36px);
}

.faq-liste article {
  padding: 20px 22px 22px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: var(--sno);
  box-shadow: 0 6px 0 var(--ink);
}

.faq-liste h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.faq-liste p {
  text-wrap: pretty;
}

.kilder {
  max-width: 44em;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
  margin-top: clamp(40px, 6vw, 64px);
}

.shots img {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: clamp(12px, 2.4vw, 22px);
}

.shots.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 600px) {
  .shots.wide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-art.wide {
  width: 100%;
}

.hero-wordmark {
  width: min(100%, 520px);
  height: auto;
  margin-left: -2%;
}

.doc-head a {
  color: inherit;
  font-weight: 700;
}

.note {
  max-width: 44em;
  margin-top: clamp(40px, 6vw, 64px);
}

.note h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.note p + p {
  margin-top: 10px;
}

.doc-head {
  padding-block: clamp(28px, 4vw, 48px) calc(clamp(44px, 6vw, 72px) + var(--kant));
  color: var(--hero-ink);
}

.doc-head h1 {
  max-width: 16em;
  font-size: clamp(2.3rem, 5.6vw, 3.8rem);
}

.doc-head .updated {
  margin-top: 12px;
  color: var(--hero-muted);
}

.doc {
  max-width: 44em;
}

.doc h2 {
  font-size: 1.6rem;
  margin-block: 40px 10px;
}

.doc p + p,
.doc ul + p,
.doc p + ul {
  margin-top: 12px;
}

.doc li + li {
  margin-top: 6px;
}

.short {
  margin-bottom: 8px;
}

.doc p + .short {
  margin-top: 20px;
}

.short + h2 {
  margin-top: 44px;
}

.foot {
  padding-block: 44px;
  background: var(--larvikitt);
  color: var(--sno);
  font-size: 1rem;
}

.foot :focus-visible {
  outline-color: var(--sol);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 36px;
}

.foot .mark {
  font-size: 1.25rem;
}

.foot a {
  color: inherit;
}

.foot a:hover {
  color: var(--sol);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.foot-org {
  width: 100%;
  opacity: 0.86;
}

@media (max-width: 560px) {
  .foot-nav {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .btn {
    transition: translate 0.12s ease, box-shadow 0.12s ease;
  }

  .btn:hover {
    translate: 0 -2px;
    box-shadow: 0 8px 0 var(--btn-edge, var(--larvikitt));
  }

  .btn:active {
    translate: 0 5px;
    box-shadow: 0 1px 0 var(--btn-edge, var(--larvikitt));
  }

  .bar .btn:hover,
  .bar .btn:active {
    box-shadow: none;
  }

  .bar-link {
    transition: background-size 0.18s ease;
  }

  .fall-tile {
    animation: fall 0.9s cubic-bezier(0.3, 0.7, 0.4, 1) 0.4s both;
  }

  @keyframes fall {
    0% {
      transform: translateY(-220px) rotate(-30deg);
      opacity: 0;
    }
    15% {
      opacity: 1;
    }
    70% {
      transform: translateY(10px) rotate(4deg);
    }
    85% {
      transform: translateY(-6px) rotate(-2deg);
    }
    100% {
      transform: translateY(0) rotate(0deg);
    }
  }

  .stamp .bolge-bak {
    animation: bolge-hoyre 9s linear infinite;
  }

  .stamp .bolge-fram {
    animation: bolge-venstre 6s linear infinite;
  }

  .stamp .skoyte {
    transform-origin: 100px 140px;
    animation: gynge 5s ease-in-out infinite;
  }

  @keyframes bolge-hoyre {
    to {
      transform: translateX(68px);
    }
  }

  @keyframes bolge-venstre {
    to {
      transform: translateX(-68px);
    }
  }

  @keyframes gynge {
    0%,
    100% {
      transform: translateY(1.5px) rotate(-1.6deg);
    }
    50% {
      transform: translateY(-1.5px) rotate(1.6deg);
    }
  }
}

.tema-kunnskapsproven {
  --bg: #f6f5f8;
  --ink: #1d1622;
  --muted: #645b6b;
  --line: #e4dfe7;
  --accent: #6e1f48;
  --hero-bg: #3b0e27;
  --hero-ink: #ffffff;
  --hero-muted: rgb(255 255 255 / 0.8);
  --pill-bg: #f0b23e;
  --pill-ink: #3a2600;
  --focus-on-hero: #f0b23e;
}

.tema-zapcage {
  --bg: #f4f7fb;
  --ink: #0d1124;
  --muted: #4d5672;
  --line: #d9dfeb;
  --accent: #5b2bd6;
  --hero-bg: #070914;
  --hero-ink: #eef6ff;
  --hero-muted: #b4c0dd;
  --pill-bg: #ffd166;
  --pill-ink: #070914;
  --focus-on-hero: #3df0ff;
}

.tema-trollsk {
  --bg: #f5ebd3;
  --ink: #2a1c12;
  --muted: #5f4b3a;
  --line: #e2d2b0;
  --accent: #9e2b1c;
  --hero-bg: #16213a;
  --hero-ink: #f6ecd2;
  --hero-muted: #c9d2e3;
  --pill-bg: #e2c27a;
  --pill-ink: #2a1c12;
  --focus-on-hero: #6fe0b4;
}

body.tema-trollsk,
.card.tema-trollsk {
  background: radial-gradient(ellipse 900px 460px at 72% 0, rgb(63 214 160 / 0.22), transparent 70%) no-repeat, var(--hero-bg);
}

.card.tema-trollsk {
  background-size: 140% 100%, auto;
}

.tema-trollsk img.hero-art {
  border-color: var(--pill-bg);
  box-shadow: 0 8px 0 #0b1222;
}
