@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-vf.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: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/karla-vf.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: "Karla Stand-in";
  font-style: normal;
  font-weight: 400;
  src: local("Arial"), local("ArialMT");
  size-adjust: 103.95%;
  ascent-override: 88.22%;
  descent-override: 24.24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Karla Stand-in";
  font-style: normal;
  font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 98.34%;
  ascent-override: 93.25%;
  descent-override: 25.63%;
  line-gap-override: 0%;
}

:root {
  --night: #081a20;
  --deep: #0c252d;
  --lake: #123641;
  --lake-hi: #1a4855;
  --foam: #eef5f1;
  --mist: #a9c2bd;
  --float: #ff5b3a;
  --float-hi: #ff7a5c;
  --float-ink: #1c0b05;
  --sun: #ffc861;
  --reed: #7fd19b;
  --reed-hi: #a6e6bb;
  --line: rgba(238, 245, 241, 0.14);
  --glass: rgba(18, 54, 65, 0.78);
  --display: "Bricolage Grotesque", "Karla Stand-in", Arial, sans-serif;
  --sans: "Karla", "Karla Stand-in", Arial, sans-serif;
  --round: 20px;
  --round-s: 12px;
  --gutter: clamp(16px, 4vw, 32px);
  --sheet: 1200px;
  --glide: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}

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

html.sp4-hold {
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--foam);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}

[hidden] {
  display: none !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--foam);
  text-wrap: balance;
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: var(--reed);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--reed-hi);
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 84px;
}

.sp4-folio {
  width: 100%;
  max-width: calc(var(--sheet) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sp4-pages:focus {
  outline: none;
}

.sp4-glyphs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sp4-hush {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.sp4-bypass {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 80;
  padding: 12px 18px;
  border-radius: var(--round-s);
  background: var(--sun);
  color: #2a1c00;
  font-weight: 700;
  text-decoration: none;
}

.sp4-bypass:focus {
  top: 12px;
  color: #2a1c00;
}

/* Sidhuvud */

.sp4-binding {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 26, 32, 0.9);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) {
  .sp4-binding {
    background: rgba(8, 26, 32, 0.72);
  }

  /* Oskärpan ligger på ett pseudoelement så att den fasta mobilmenyn inte låses inuti huvudet. */
  .sp4-binding::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    backdrop-filter: blur(12px) saturate(1.2);
  }
}

.sp4-binding__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.sp4-spine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
}

.sp4-spine__mark {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--foam);
  text-decoration: none;
}

.sp4-spine__mark:hover {
  color: var(--foam);
}

.sp4-spine__float {
  flex: none;
  color: var(--foam);
  margin-right: 8px;
}

.sp4-spine__perch {
  color: var(--float);
}

.sp4-spine__toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--round-s);
  background: transparent;
  color: var(--foam);
  cursor: pointer;
}

.sp4-spine__glyph--shut {
  display: none;
}

.sp4-spine__toggle[aria-expanded="true"] .sp4-spine__glyph--open {
  display: none;
}

.sp4-spine__toggle[aria-expanded="true"] .sp4-spine__glyph--shut {
  display: block;
}

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

.sp4-index__link {
  display: block;
  border-radius: 999px;
  color: var(--foam);
  font-weight: 700;
  text-decoration: none;
}

.sp4-index__link:hover {
  background: var(--lake);
  color: var(--foam);
}

.sp4-index__link--cta,
.sp4-index__link--cta:hover {
  background: var(--float);
  color: var(--float-ink);
}

.sp4-index__link--cta:hover {
  background: var(--float-hi);
}

@media (max-width: 899px) {
  .sp4-index {
    position: fixed;
    inset: 64px 0 0;
    z-index: 39;
    display: none;
    padding: 20px var(--gutter) 40px;
    background: var(--night);
    overflow-y: auto;
  }

  .sp4-index--open {
    display: block;
  }

  .sp4-index__list {
    display: grid;
    gap: 6px;
  }

  .sp4-index__link {
    padding: 14px 18px;
    font-family: var(--display);
    font-size: 1.3rem;
  }

  .sp4-index__link--cta {
    margin-top: 12px;
    text-align: center;
  }
}

@media (min-width: 900px) {
  .sp4-spine {
    flex: 0 0 auto;
  }

  .sp4-spine__toggle {
    display: none;
  }

  .sp4-index__list {
    display: flex;
    align-items: center;
    gap: 2px;
  }

  .sp4-index__link {
    padding: 8px 14px;
    font-size: 0.975rem;
  }

  .sp4-index__link--cta {
    margin-left: 10px;
    padding-inline: 18px;
  }
}

/* Knappar och länkar */

.sp4-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--foam);
  font: 700 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--glide), border-color 0.2s var(--glide), transform 0.2s var(--glide);
}

.sp4-tab:hover {
  border-color: var(--mist);
  color: var(--foam);
}

.sp4-tab:active {
  transform: translateY(1px);
}

.sp4-tab--solid {
  border-color: var(--float);
  background: var(--float);
  color: var(--float-ink);
}

.sp4-tab--solid:hover {
  border-color: var(--float-hi);
  background: var(--float-hi);
  color: var(--float-ink);
}

.sp4-tab--big {
  min-height: 56px;
  padding: 14px 30px;
  font-size: 1.125rem;
}

.sp4-trail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--float);
  color: var(--foam);
  font-weight: 700;
  text-decoration: none;
}

.sp4-trail::after {
  content: "→";
}

.sp4-trail:hover {
  color: var(--float-hi);
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 6px;
  border: 1px solid var(--lake-hi);
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--lake);
  color: var(--foam);
  font: 700 0.85em/1.4 var(--sans);
  text-align: center;
}

/* Tabeller */

.sp4-sheet {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--round-s);
  background: var(--deep);
}

.sp4-sheet__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.975rem;
}

.sp4-sheet__table--slim {
  min-width: 0;
}

.sp4-sheet__table caption {
  padding: 14px 16px 0;
  caption-side: top;
  color: var(--mist);
  font-size: 0.9rem;
  text-align: left;
}

.sp4-sheet__table th,
.sp4-sheet__table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.sp4-sheet__table thead th {
  color: var(--mist);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sp4-sheet__table tbody th {
  color: var(--foam);
  font-weight: 700;
}

.sp4-sheet__table tbody tr:last-child > * {
  border-bottom: 0;
}

.sp4-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Sidfot */

.sp4-colophon {
  padding: 56px 0 32px;
  background: var(--deep);
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.975rem;
}

.sp4-colophon a {
  color: var(--foam);
}

.sp4-colophon__grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 760px) {
  .sp4-colophon__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.sp4-colophon__brand {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--foam);
}

.sp4-colophon__label {
  margin-bottom: 8px;
  color: var(--foam);
  font-weight: 700;
}

.sp4-colophon__text + .sp4-colophon__text {
  margin-top: 8px;
}

.sp4-colophon__list {
  display: grid;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.sp4-colophon__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

/* Informationsruta och till toppen */

.sp4-slip {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 12px;
  max-width: 600px;
  margin-inline: auto;
  padding: 18px 20px;
  border: 1px solid var(--lake-hi);
  border-radius: var(--round);
  background: var(--lake);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  font-size: 0.95rem;
}

.sp4-slip__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 640px) {
  .sp4-slip {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.sp4-up {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 55;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--lake-hi);
  border-radius: 50%;
  background: var(--lake);
  color: var(--foam);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--glide), transform 0.25s var(--glide), visibility 0.25s;
}

.sp4-up--shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Mjuk inglidning när sektioner syns */

.sp4-awake .sp4-drift {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--glide), transform 0.6s var(--glide);
}

.sp4-awake .sp4-drift.sp4-seen {
  opacity: 1;
  transform: none;
}
