/* Ridderberg Hjemme – felles stil for forside, selge og bo */

@font-face {
  font-family: "Karla";
  src: url("fonter/karla-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonter/karla-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("fonter/karla-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Caslon Display";
  src: url("fonter/libre-caslon-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --grunn: #E6E7DD;
  --flate: #F4F4EC;
  --blekk: #20241D;
  --dempet: #3E4438;
  --linje: #4C5246;
  --oker: #C99A2E;
  --lys-tekst: #B9BCAD;
  --bildegrunn: #DCDED2;
  --tittelskrift: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --brodskrift: "Karla", "Trebuchet MS", Arial, sans-serif;
}

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

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

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

body {
  margin: 0;
  background: var(--grunn);
  color: var(--blekk);
  font-family: var(--brodskrift);
  font-size: 1.125rem;
  line-height: 1.55;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

a {
  color: inherit;
  text-underline-offset: 4px;
}

a:hover {
  color: #5A4310;
}

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

.hopp {
  position: absolute;
  left: 12px;
  top: -80px;
  padding: 12px 18px;
  background: var(--blekk);
  color: var(--flate);
  font-weight: 700;
  border-radius: 2px;
}

.hopp:focus {
  top: 12px;
  color: var(--flate);
}

/* ---------- Forsiden: to dører ---------- */

.forside {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.stripe {
  padding: 16px clamp(16px, 3vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 28px;
}

.stripe-navn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 20px;
}

.merke {
  font-family: var(--tittelskrift);
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.2;
}

.linje {
  color: var(--dempet);
}

.stripe-kontakt {
  font-size: 1.0625rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.dorer {
  flex: 1 1 auto;
  padding: 0 8px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
}

.dor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 240px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bildegrunn);
  color: var(--blekk);
  text-decoration: none;
}

.dor img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.dor-selge img {
  object-position: 100% 50%;
}

.dor-bo img {
  object-position: 35% 50%;
}

.felt {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: start;
  margin: clamp(12px, 2.5vw, 28px);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border: 1.5px solid var(--blekk);
  border-radius: 2px;
  background: var(--flate);
  transition: background-color 120ms ease-out;
}

.dor:hover,
.dor:focus-visible {
  color: var(--blekk);
}

.dor:hover .felt,
.dor:focus-visible .felt {
  background: var(--oker);
}

.felt-tekst {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sporsmal {
  font-family: var(--tittelskrift);
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  line-height: 1.05;
}

.under {
  font-size: 1.0625rem;
}

.felt svg {
  flex: 0 0 auto;
}

/* ---------- Undersidene ---------- */

.ramme {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.topp {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 24px;
}

.topp .merke {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.meny {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  font-size: 1.0625rem;
  font-weight: 500;
}

.meny a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.meny a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.apning {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: clamp(24px, 5vw, 56px) 72px;
}

.apning h1 {
  max-width: 18em;
  font-family: var(--tittelskrift);
  font-weight: 400;
  font-size: clamp(2.125rem, 5vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.ingress {
  max-width: 36em;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--dempet);
  text-wrap: pretty;
}

.banner {
  display: block;
  width: 100%;
  margin-top: 8px;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bildegrunn);
}

.banner-selge {
  object-position: 50% 28%;
}

.banner-bo {
  object-position: 50% 62%;
}

@media (max-width: 640px) {
  .banner {
    aspect-ratio: 4 / 3;
  }
  .banner-selge {
    object-position: 85% 50%;
  }
  .banner-bo {
    object-position: 35% 50%;
  }
}

.seksjon {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 88px;
}

.seksjon h2,
.om h2,
.kontakt h2 {
  font-family: var(--tittelskrift);
  font-weight: 400;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  line-height: 1.1;
  text-wrap: balance;
}

.tre {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 32px;
}

.punkt {
  border-top: 1.5px solid var(--blekk);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.punkt h3 {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.punkt p {
  font-size: 1.0625rem;
  color: var(--dempet);
}

.punkt .pris {
  color: var(--blekk);
  font-weight: 700;
}

.punkt a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 1.0625rem;
  font-weight: 700;
}

.merknad {
  font-size: 1.0625rem;
  color: var(--dempet);
}

.handling {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.handling > a:not(.knapp) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.knapp {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 28px;
  background: var(--blekk);
  color: var(--flate);
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
}

.knapp:hover {
  background: var(--dempet);
  color: var(--flate);
}

.om {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 56px;
  padding-bottom: 96px;
}

.om img {
  flex: 0 1 280px;
  width: 280px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: var(--bildegrunn);
}

.om-tekst {
  flex: 999 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.om-tekst p {
  max-width: 34em;
  color: var(--dempet);
  text-wrap: pretty;
}

.kontakt {
  background: var(--blekk);
  color: var(--grunn);
}

.kontakt :focus-visible {
  outline-color: #8FA6B8;
}

.kontakt-innhold {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-block: clamp(48px, 7vw, 80px) 56px;
}

.kontakt p {
  max-width: 34em;
  color: var(--lys-tekst);
}

.kontakt a:hover {
  color: var(--flate);
}

.knapp-oker,
.knapp-oker:hover {
  background: var(--oker);
  color: var(--blekk);
}

.knapp-oker:hover {
  background: #D9AE4A;
}

.bunn {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 24px 40px;
  border-top: 1px solid var(--linje);
  font-size: 0.9375rem;
  color: var(--lys-tekst);
}
