/* Typsnitt (lagras lokalt, se assets/fonts/README.md) */

@font-face {
  font-family: "Indie Flower";
  src: url("../assets/fonts/indie-flower-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Clash Grotesk";
  src: url("../assets/fonts/clash-grotesk-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Reset */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-text);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

input,
textarea,
button,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* Typografi */

h1,
h2,
h3,
h4 {
  font-family: var(--font-hand);
  font-weight: 400;
  line-height: normal;
}

.title {
  font-family: var(--font-hand);
  font-size: var(--fs-title);
  line-height: 1;
}

.subtitle {
  font-family: var(--font-hand);
  font-size: var(--fs-subtitle);
}

.h2 {
  font-size: var(--fs-h2);
}

.h3 {
  font-size: var(--fs-h3);
}

/* Fokus: syns bara vid tangentbordsnavigering */

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Menylänken som får tillbaka fokus när en undersida stängs med en tryckning/ett klick
   (sätts av js/main.js, tas bort när fokus flyttas) */
.no-focus-ring:focus-visible {
  outline: none;
}

/* Ingen grå ruta när man trycker på en länk på mobil (iOS/Android) */
a {
  -webkit-tap-highlight-color: transparent;
}

/* Hjälpklasser */

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
