/* grunnstil.css — reset, fonter, grunnstil og typografi */

/* --- Selvhostede fonter --- */
@font-face {
  font-family: "Spectral";
  src: url("../fonter/spectral-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Spectral";
  src: url("../fonter/spectral-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonter/instrument-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonter/instrument-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonter/instrument-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  background-color: var(--flate);
}

/* Hele siden har et tak i bredden; paa ultrabrede skjermer sentreres den paa en
   moerkere beige flate, med myk skygge langs kantene saa siden faar dybde */
body {
  max-width: var(--side-maks);
  margin-inline: auto;
  box-shadow: 0 0 0 1px var(--kant-lys), 0 0 56px rgba(31, 27, 22, 0.14);
}

body {
  background-color: var(--bg);
  color: var(--tekst);
  font-family: var(--font-brod);
  font-size: 1rem;
  line-height: var(--lh-brod);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

/* Overskriftstaggene nullstilles. Taggen baerer hierarkiet, klassen baerer utseendet. */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* --- Typografi-klasser --- */
.t-hero {
  font-family: var(--font-overskrift);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: var(--lh-overskrift);
  letter-spacing: -0.01em;
}

.t-seksjon {
  font-family: var(--font-overskrift);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  line-height: 1.14;
  max-width: 22ch;
}

.t-kort {
  font-family: var(--font-overskrift);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
}

.t-liten {
  font-family: var(--font-brod);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: var(--spor-stor);
  text-transform: uppercase;
  color: var(--struktur);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: var(--tekst-svak);
}

.brod {
  font-size: 1rem;
  line-height: var(--lh-brod);
  color: var(--tekst-svak);
}

.brod-stor {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--tekst);
}

/* Skjult, men lesbart for skjermlesere */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Store skjermer: hele siden skaleres proporsjonalt opp (alt er bygget i rem) */
@media (min-width: 1600px) {
  html {
    font-size: 17.5px;
  }
}
