@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@300;400;500&family=Jost:wght@300;400&display=swap');

/* Open Field — komponenter. Rene HTML-klasser (of-*), ingen JavaScript. Verdier kommer fra tokens. */

html { background: var(--bg); color: var(--ink); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-tekst); font-size: 20px; line-height: 32px; -webkit-font-smoothing: antialiased; }
.of-demo { padding: var(--space-6); }

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: var(--stroke-fokus) solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typografi-hjelpere ---------- */
.of-etikett { font-family: var(--font-tekst); font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--sand-tekst); margin: 0 0 var(--space-3); }
.of-tittel { font-family: var(--font-display); font-weight: 300; margin: 0; }
.of-tall { font-family: var(--font-display); font-weight: 300; font-size: 20px; letter-spacing: .04em; color: var(--sand-tekst); font-variant-numeric: tabular-nums; }
.of-muted { color: var(--ink-muted); }

/* ---------- Knapp og lenke ---------- */
.of-knapp {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-tekst); font-size: 20px; line-height: 28px; font-weight: 400;
  padding: 14px 30px; border: 0; border-radius: var(--radius-full);
  background: var(--sand); color: var(--on-sand); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease;
}
.of-knapp:hover { background: var(--sand-lys); color: var(--on-sand); }
.of-knapp--flate { background: var(--flate-2); color: var(--ink); }
.of-knapp--flate:hover { background: var(--flate); color: var(--ink); }
.of-knapp[disabled], .of-knapp[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.of-knapp__pil { font-family: var(--font-display); font-weight: 300; transition: transform .2s ease; }
.of-knapp:hover .of-knapp__pil { transform: translateX(4px); }

.of-lenke {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 7px; text-decoration-color: var(--sand);
  transition: text-decoration-color .2s ease;
}
.of-lenke:hover { text-decoration-color: currentColor; }
.of-lenke--stor { font-family: var(--font-display); font-weight: 300; font-size: 44px; line-height: 56px; text-underline-offset: 12px; }

/* ---------- Flate: innhold på farget flate, hårlinjer mellom ---------- */
.of-flate { background: var(--flate); color: var(--ink); border-radius: var(--radius-lg); padding: var(--space-7); --of-line: var(--line); }
.of-flate--sand    { background: var(--sand);    color: var(--on-sand);    --of-line: rgba(43, 32, 25, .32); }
.of-flate--himmel  { background: var(--himmel);  color: var(--on-himmel);  --of-line: rgba(43, 32, 25, .32); }
.of-flate--oliven  { background: var(--oliven);  color: var(--on-oliven);  --of-line: rgba(244, 236, 224, .34); }
.of-flate--sand .of-etikett, .of-flate--himmel .of-etikett, .of-flate--oliven .of-etikett,
.of-flate--sand .of-tall, .of-flate--himmel .of-tall, .of-flate--oliven .of-tall,
.of-flate--sand .of-muted, .of-flate--himmel .of-muted, .of-flate--oliven .of-muted { color: inherit; }
.of-flate--rett { border-radius: 0; }

/* Rader: linje under hver rad, også den siste, så to rader ser like ut. */
.of-rader { margin: 0; padding: 0; }
.of-rader > * { border-bottom: var(--stroke-hair) solid var(--of-line, var(--line)); }
dl.of-rader > div { display: grid; grid-template-columns: minmax(140px, 14rem) 1fr; gap: 4px 24px; padding: 14px 0; }
dl.of-rader dt { margin: 0; }
dl.of-rader dd { margin: 0; }
@container (max-width: 560px) { dl.of-rader > div { grid-template-columns: 1fr; } }
.of-kolonner-ramme, .of-flate { container-type: inline-size; }
.of-kolonner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.of-kolonner > * { padding: 0 var(--space-7); }
.of-kolonner > *:first-child { padding-left: 0; }
.of-kolonner > *:last-child { padding-right: 0; }
.of-kolonner > * + * { border-left: var(--stroke-hair) solid var(--of-line, var(--line)); }
@container (max-width: 760px) {
  .of-kolonner { grid-auto-flow: row; }
  .of-kolonner > * { padding: var(--space-6) 0; }
  .of-kolonner > *:first-child { padding-top: 0; }
  .of-kolonner > *:last-child { padding-bottom: 0; }
  .of-kolonner > * + * { border-left: 0; border-top: var(--stroke-hair) solid var(--of-line, var(--line)); }
}
.of-skille { border: 0; border-top: var(--stroke-hair) solid var(--of-line, var(--line)); margin: var(--space-6) 0; }

/* ---------- Trekkspill (accordion), native <details> ---------- */
.of-trekkspill { --of-line: var(--line); }
.of-trekk + .of-trekk { border-top: var(--stroke-hair) solid var(--of-line, var(--line)); }
.of-trekk > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: var(--space-5);
  padding: var(--space-5) 0;
  font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 34px;
}
.of-trekk > summary::-webkit-details-marker { display: none; }
.of-trekk > summary:hover .of-trekk__tittel { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; text-decoration-color: var(--sand); }
.of-trekk__nr { font-family: var(--font-display); font-weight: 300; font-size: 20px; letter-spacing: .04em; color: var(--sand-tekst); min-width: 2.2ch; }
.of-trekkspill:not(.of-trekkspill--nummerert) .of-trekk__nr { display: none; }
.of-trekkspill:not(.of-trekkspill--nummerert) .of-trekk > summary { grid-template-columns: 1fr auto; }
.of-trekk__ikon {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: inset 0 0 0 var(--stroke-hair) var(--line-strong);
  transition: background-color .2s ease;
}
.of-trekk__ikon::before, .of-trekk__ikon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: var(--stroke-ikon);
  background: currentColor; transform: translate(-50%, -50%); transition: transform .25s ease;
}
.of-trekk__ikon::after { transform: translate(-50%, -50%) rotate(90deg); }
.of-trekk[open] .of-trekk__ikon::after { transform: translate(-50%, -50%) rotate(0deg); }
.of-trekk > summary:hover .of-trekk__ikon { background: var(--flate-2); }
.of-trekk__innhold { padding: 0 0 var(--space-6); max-width: 62ch; }
.of-trekkspill--nummerert .of-trekk__innhold { padding-left: calc(2.2ch + var(--space-5) + 6px); }
.of-trekk__innhold > :first-child { margin-top: 0; }
.of-trekk__innhold > :last-child { margin-bottom: 0; }
.of-trekkspill--stor .of-trekk > summary { font-size: 32px; line-height: 40px; font-weight: 300; padding: var(--space-6) 0; }
.of-flate--sand .of-trekk__ikon, .of-flate--himmel .of-trekk__ikon { box-shadow: inset 0 0 0 1px rgba(43,32,25,.55); }
.of-flate--sand .of-trekk__nr, .of-flate--himmel .of-trekk__nr, .of-flate--oliven .of-trekk__nr { color: inherit; }
.of-flate--sand .of-trekk > summary:hover .of-trekk__ikon, .of-flate--himmel .of-trekk > summary:hover .of-trekk__ikon { background: rgba(255,255,255,.25); }
@media (prefers-reduced-motion: reduce) { .of-trekk__ikon::before, .of-trekk__ikon::after, .of-knapp__pil { transition: none; } }

/* ---------- Lister ---------- */
.of-liste { list-style: none; margin: 0; padding: 0; }
.of-liste > li { position: relative; padding: var(--space-4) 0 var(--space-4) 32px; }
.of-liste > li + li { border-top: var(--stroke-hair) solid var(--of-line, var(--line)); }
.of-liste > li::before { content: ""; position: absolute; left: 4px; top: 29px; width: 9px; height: 9px; border-radius: 50%; background: var(--sand); }
.of-liste--nummer { counter-reset: of-nr; }
.of-liste--nummer > li { counter-increment: of-nr; padding-left: 56px; }
.of-liste--nummer > li::before {
  content: counter(of-nr, decimal-leading-zero); background: none; width: auto; height: auto; border-radius: 0;
  left: 0; top: var(--space-4); font-family: var(--font-display); font-weight: 300; font-size: 20px; line-height: 32px; letter-spacing: .04em; color: var(--sand-tekst);
}
.of-liste--hake > li::before {
  background: none; border-radius: 0; width: 12px; height: 6px; left: 3px; top: 25px;
  border-left: var(--stroke-ikon) solid var(--sand-tekst); border-bottom: var(--stroke-ikon) solid var(--sand-tekst); transform: rotate(-45deg);
}
.of-liste__tittel { display: block; font-family: var(--font-display); font-size: 24px; line-height: 32px; }
.of-liste__tekst { display: block; color: var(--ink-muted); }
.of-liste--luft > li { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.of-liste--luft > li::before { top: 37px; }
.of-liste--luft.of-liste--nummer > li::before { top: var(--space-5); }

/* ---------- Tjenesteleveranse (prosjekter) ---------- */
.of-leveranser { list-style: none; margin: 0; padding: 0; }
.of-leveranse { display: grid; grid-template-columns: 72px 1fr; column-gap: var(--space-6); padding: var(--space-7) 0; }
.of-leveranse + .of-leveranse { border-top: var(--stroke-hair) solid var(--of-line, var(--line)); }
.of-leveranser > .of-leveranse:first-child { padding-top: 0; }
.of-leveranser > .of-leveranse:last-child { padding-bottom: 0; }
.of-ikonmerke { width: 72px; height: 72px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; flex: none; }
.of-ikonmerke img { width: 40px; height: 40px; display: block; }
.of-ikonmerke--bilde { background: var(--ramme); padding: 4px; box-sizing: border-box; overflow: hidden; }
.of-ikonmerke--bilde img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.of-leveranse__tittel { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 40px; margin: 14px 0 var(--space-4); }
.of-leveranse__tekst { max-width: 62ch; }
.of-leveranse__tekst p { margin: 0 0 var(--space-4); }
.of-leveranse__tekst p:last-child { margin-bottom: 0; }

/* ---------- Bilderamme (passepartout på alle bilder) ---------- */
.of-ramme { margin: 0; background: var(--ramme); color: var(--on-ramme); padding: var(--space-4) var(--space-4) 0; border-radius: 2px; }
.of-ramme__bilde { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--flate-2); }
.of-ramme--kvadrat .of-ramme__bilde { aspect-ratio: 1 / 1; }
.of-ramme--portrett .of-ramme__bilde { aspect-ratio: 4 / 5; }
.of-ramme--bred .of-ramme__bilde { aspect-ratio: 16 / 9; }
.of-ramme figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); font-size: 17px; line-height: 24px; padding: 14px 2px 16px; }
.of-ramme__merke { font-family: var(--font-display); font-weight: 300; font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
.of-ramme:not(:has(figcaption)) { padding-bottom: var(--space-4); }
.of-ramme--himmel { background: var(--himmel); color: var(--on-himmel); }
.of-ramme--oliven { background: var(--oliven); color: var(--on-oliven); }

/* ---------- Bølge ---------- */
.of-bolge { display: block; width: 100%; height: 180px; }
.of-bolge .b-sand { fill: var(--sand); }
.of-bolge .b-himmel { fill: var(--himmel); }
.of-bolge .b-oliven { fill: var(--oliven); }
.of-bolge .b-oliven-lys { fill: var(--oliven-lys, #7f825a); }
.of-bolge .b-linje { fill: none; stroke: var(--sand); stroke-width: 1; vector-effect: non-scaling-stroke; }
.of-bolge .b-linje-lys { fill: none; stroke: var(--ramme); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- Navigasjon ---------- */
.of-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-6) 0; flex-wrap: wrap; }
.of-logo { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 300; font-size: 32px; line-height: 40px; letter-spacing: -.005em; }
.of-logo img { width: 40px; height: 40px; }
.of-nav ul { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.of-nav a:not(.of-logo) { color: var(--ink); text-decoration: none; font-size: 19px; padding-bottom: 8px; border-bottom: var(--stroke-hair) solid transparent; transition: border-color .2s ease; }
.of-nav a:not(.of-logo):hover { border-bottom-color: var(--line-strong); }
.of-nav a[aria-current="page"] { border-bottom-color: var(--sand); color: var(--ink); }

/* ---------- Skjema ---------- */
.of-felt { display: grid; gap: var(--space-2); margin-bottom: var(--space-6); }
.of-felt label { font-size: 17px; line-height: 24px; color: var(--ink-muted); }
.of-felt input, .of-felt textarea {
  font: inherit; color: var(--ink); background: var(--flate-2);
  border: 0; border-bottom: 2px solid var(--ink-muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0; padding: 14px var(--space-4);
}
.of-felt textarea { min-height: 140px; resize: vertical; }
.of-felt input::placeholder, .of-felt textarea::placeholder { color: var(--ink-muted); opacity: 1; }
.of-felt__hjelp { font-size: 17px; line-height: 24px; color: var(--ink-muted); margin: 0; }
.of-felt--feil input, .of-felt--feil textarea { border-bottom-color: var(--feil); }
.of-felt__feil { font-size: 17px; line-height: 24px; color: var(--feil); margin: 0; }

/* ---------- Merkelapp ---------- */
.of-merker { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); list-style: none; margin: 0; padding: 0; }
.of-merke { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; box-sizing: border-box; font-size: 17px; line-height: 1.2; padding: 6px 16px 7px; border-radius: var(--radius-full); background: var(--flate-2); color: var(--ink); }
.of-merke--sand { background: var(--sand); color: var(--on-sand); }
.of-merke--himmel { background: var(--himmel); color: var(--on-himmel); }
.of-merke--oliven { background: var(--oliven); color: var(--on-oliven); }

/* ---------- Prosjektkort ---------- */
.of-prosjekt { display: grid; gap: var(--space-4); color: var(--ink); text-decoration: none; }
.of-prosjekt__kunde { margin: var(--space-2) 0 0; }
.of-prosjekt__tittel { font-family: var(--font-display); font-weight: 300; font-size: 32px; line-height: 40px; margin: 0; }
.of-prosjekt:hover .of-prosjekt__tittel { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; text-decoration-color: var(--sand); }

/* ---------- Bunntekst ---------- */
.of-bunn { background: var(--oliven); color: var(--on-oliven); padding: var(--space-8) var(--space-7); display: grid; grid-template-columns: max-content max-content max-content 1fr; gap: 0; align-items: start; font-size: 17px; line-height: 30px; --of-line: rgba(244, 236, 224, .34); }
.of-bunn .of-logo { color: var(--on-oliven); font-size: 40px; line-height: 48px; white-space: nowrap; margin-right: var(--space-7); }
.of-bunn ul { list-style: none; margin: 0; padding: 0 var(--space-7); }
.of-bunn ul + ul { border-left: var(--stroke-hair) solid var(--of-line); }
.of-bunn a { color: var(--on-oliven); text-decoration: none; }
.of-bunn a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.of-bunn__info { margin: 0; text-align: right; }
@media (max-width: 760px) {
  .of-bunn { grid-template-columns: 1fr; gap: var(--space-6); }
  .of-bunn ul { padding: 0; }
  .of-bunn ul + ul { border-left: 0; border-top: var(--stroke-hair) solid var(--of-line); padding-top: var(--space-5); }
  .of-bunn__info { text-align: left; }
}

/* ---------- Havbølge og Hav-tema (tillegg; endrer ikke noe over) ---------- */
.of-hav { display: block; width: 100%; height: 200px; }
.of-hav .h-himmel { fill: var(--himmel); }
.of-hav .h-midt { fill: var(--hav-midt); }
.of-hav .h-dyp { fill: var(--hav-dyp); }
.of-hav .h-sand { fill: var(--sand); }
.of-hav .h-skum { fill: none; stroke: var(--skum); stroke-width: 1; vector-effect: non-scaling-stroke; }
.of-hav .h-linje { fill: none; stroke: var(--himmel); stroke-width: 1; vector-effect: non-scaling-stroke; }
.of-bunn--hav { background: var(--hav-dyp); color: var(--on-hav-dyp); }
.of-bunn--hav .of-logo, .of-bunn--hav a { color: var(--on-hav-dyp); }
.of-innlegg__meta { font-size: 17px; line-height: 24px; color: var(--ink-muted); margin: var(--space-2) 0 0; }

/* ---------- Bildekort: bilde og tekst sammen, uten ramme rundt ---------- */
.of-bildekort { margin: 0; background: var(--flate); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; display: grid; text-decoration: none; }
.of-bildekort__bilde { position: relative; }
.of-bildekort__bilde img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.of-bildekort__tekst { padding: var(--space-6) var(--space-7) var(--space-7); }
.of-bildekort__tekst > :first-child { margin-top: 0; }
.of-bildekort__tekst > :last-child { margin-bottom: 0; }
.of-bildekort__tittel { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 40px; margin: var(--space-2) 0 var(--space-4); }
.of-bildekort__tekst p { margin: 0 0 var(--space-4); }
/* 1. Bølgekant: bildet slutter i en myk bølge mot tekstflaten */
.of-bildekort--bolge .of-bildekort__bilde::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 44px; background: var(--flate);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 44' preserveAspectRatio='none'%3E%3Cpath d='M0 26C70 8 150 6 230 20S350 38 400 18V44H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 44' preserveAspectRatio='none'%3E%3Cpath d='M0 26C70 8 150 6 230 20S350 38 400 18V44H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
/* 2. Side ved side */
.of-bildekort--side { grid-template-columns: 1fr 1fr; }
.of-bildekort--side .of-bildekort__bilde img { aspect-ratio: auto; min-height: 100%; }
.of-bildekort--side .of-bildekort__tekst { padding: var(--space-7); align-self: center; }
/* 3. Tekstflate over bildet (tekst ligger alltid på flate, aldri rett på foto) */
.of-bildekort--over { background: none; position: relative; overflow: visible; }
.of-bildekort--over .of-bildekort__bilde img { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); }
.of-bildekort--over .of-bildekort__tekst { background: var(--flate); border-radius: var(--radius-lg); margin: calc(-1 * var(--space-9)) var(--space-6) 0 0; position: relative; max-width: 520px; }
/* 4. Rund: sirkelutsnitt som gjentar logoen */
.of-bildekort--rund { grid-template-columns: auto 1fr; align-items: center; gap: var(--space-6); padding: var(--space-7); }
.of-bildekort--rund .of-bildekort__bilde img { width: 168px; height: 168px; aspect-ratio: 1; border-radius: 50%; }
.of-bildekort--rund .of-bildekort__tekst { padding: 0; }
/* 5. Fargefelt: bildet står i et fargefelt som bryter ut av kortet */
.of-bildekort--felt { background: none; overflow: visible; }
.of-bildekort--felt .of-bildekort__bilde { background: var(--sand); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: var(--space-6) var(--space-6) 0; }
.of-bildekort--felt .of-bildekort__bilde img { border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 16 / 11; }
.of-bildekort--felt .of-bildekort__tekst { background: var(--flate); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.of-bildekort--felt.of-bildekort--himmel .of-bildekort__bilde { background: var(--himmel); }
.of-bildekort--felt.of-bildekort--oliven .of-bildekort__bilde { background: var(--oliven); }
a.of-bildekort:hover .of-bildekort__tittel { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; text-decoration-color: var(--sand); }
@container (max-width: 640px) { .of-bildekort--side { grid-template-columns: 1fr; } .of-bildekort--side .of-bildekort__bilde img { aspect-ratio: 4 / 3; } .of-bildekort--rund { grid-template-columns: 1fr; } }
.of-bildekort-ramme { container-type: inline-size; }

/* ---------- Foto: forslag til ny bilderamme (uten boks) ---------- */
.of-foto { margin: 0; position: relative; color: var(--ink); }
.of-foto img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; position: relative; }
.of-foto figcaption { font-size: 17px; line-height: 26px; color: var(--ink-muted); margin-top: var(--space-4); display: flex; gap: var(--space-3); align-items: baseline; }
.of-foto--kvadrat img { aspect-ratio: 1; } .of-foto--portrett img { aspect-ratio: 4 / 5; } .of-foto--bred img { aspect-ratio: 16 / 9; }
/* B. Horisont: myke hjørner og én hårlinje som bildet står på */
.of-foto--horisont img { border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-sm); }
.of-foto--horisont figcaption { margin-top: 0; padding-top: var(--space-4); border-top: var(--stroke-hair) solid var(--sand); margin-left: calc(-1 * var(--space-5)); margin-right: calc(-1 * var(--space-5)); padding-left: var(--space-5); padding-right: var(--space-5); }
.of-foto--blad figcaption::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--sand); transform: translateY(-1px); }
/* D. Blad: asymmetriske hjørner, organisk som et blad eller en åker */
.of-foto--blad img { border-radius: 96px var(--radius-sm) 96px var(--radius-sm); }

/* ---------- Bilde: enkle rammer til hverdagsbilder og skjermbilder ---------- */
.of-bilde { margin: 0; color: var(--ink); }
.of-bilde img { display: block; width: 100%; height: auto; }
.of-bilde figcaption { font-size: 17px; line-height: 26px; color: var(--ink-muted); margin-top: var(--space-3); }
.of-bilde__kilde { color: var(--sand-tekst); margin-right: var(--space-2); }
/* 1. Ren: bare myke hjørner */
.of-bilde--ren img { border-radius: var(--radius-md); }
/* 2. Flate: bildet ligger på en flate i samme tone som siden */
.of-bilde--flate { background: var(--flate); border-radius: var(--radius-lg); padding: var(--space-3); }
.of-bilde--flate img { border-radius: var(--radius-sm); }
.of-bilde--flate figcaption { margin: var(--space-3) var(--space-2) var(--space-1); }
/* 3. Vindu: for skjermbilder, en stille vinduslist over */
.of-bilde--vindu .of-bilde__list { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-4); background: var(--flate-2); border-radius: var(--radius-md) var(--radius-md) 0 0; font-size: 15px; color: var(--ink-muted); }
.of-bilde--vindu .of-bilde__list i { width: 8px; height: 8px; border-radius: 50%; background: var(--sand); }
.of-bilde--vindu .of-bilde__list span { margin-left: var(--space-2); }
.of-bilde--vindu img { border-radius: 0 0 var(--radius-md) var(--radius-md); }
/* 4. Kant: en svak hårlinje inni bildet, så hvite skjermbilder ikke flyter ut i lys bakgrunn */
.of-bilde--kant { position: relative; }
.of-bilde--kant .of-bilde__flate { position: relative; border-radius: var(--radius-md); overflow: hidden; }
.of-bilde--kant .of-bilde__flate::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--line-kant, var(--line)); pointer-events: none; }
.of-bilde--flate figcaption.of-bilde__lang { color: var(--ink); max-width: 62ch; }
.of-bilde--side { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-6); align-items: start; }
.of-bilde--side figcaption { margin: var(--space-3) var(--space-3) 0 0; }

/* ---------- Bildegalleri ---------- */
.of-galleri { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.of-galleri figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.of-galleri img { display: block; width: 100%; object-fit: cover; border-radius: var(--radius-md); background: var(--flate-2); }
.of-galleri figcaption { font-size: 17px; line-height: 24px; color: var(--ink-muted); margin-top: var(--space-2); }
/* Rutenett: like ruter */
.of-galleri--rutenett { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-6) var(--space-4); }
.of-galleri--rutenett img { aspect-ratio: 4 / 3; }
/* Mosaikk: ett hovedbilde og mindre bilder rundt */
.of-galleri--mosaikk { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 180px; }
.of-galleri--mosaikk li:first-child { grid-row: span 2; }
.of-galleri--mosaikk img { height: 100%; min-height: 0; flex: 1; }
.of-galleri--mosaikk figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Rad: bla sidelengs, med snap */
.of-galleri--rad { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-4); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.of-galleri--rad li { flex: 0 0 min(320px, 80%); scroll-snap-align: start; }
.of-galleri--rad img { aspect-ratio: 4 / 3; }
.of-galleri__tittel { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-5); }
.of-galleri__tittel span { font-size: 17px; color: var(--ink-muted); }
@container (max-width: 640px) { .of-galleri--mosaikk { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; } .of-galleri--mosaikk li:first-child { grid-column: span 2; } }

/* ---------- Karusell: ett bilde om gangen ---------- */
.of-karusell { position: relative; max-width: 880px; }
.of-karusell__spor { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: var(--radius-lg); }
.of-karusell__spor::-webkit-scrollbar { display: none; }
.of-karusell__spor > li { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.of-karusell figure { margin: 0; }
.of-karusell img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); background: var(--flate-2); }
.of-karusell figcaption { display: flex; justify-content: space-between; gap: var(--space-4); font-size: 17px; line-height: 26px; color: var(--ink-muted); margin-top: var(--space-3); padding: 0 var(--space-2); }
.of-karusell__teller { font-family: var(--font-display); color: var(--sand-tekst); white-space: nowrap; }
.of-karusell__pil { position: absolute; top: calc(50% - 40px); width: 48px; height: 48px; border-radius: 50%; background: var(--flate); color: var(--ink); display: flex; align-items: center; justify-content: center; text-decoration: none; font-family: var(--font-display); font-size: 24px; transition: background-color .2s ease; }
.of-karusell__pil:hover { background: var(--flate-2); }
.of-karusell__pil--forrige { left: var(--space-4); } .of-karusell__pil--neste { right: var(--space-4); }
.of-karusell__punkter { display: flex; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.of-karusell__punkter a { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.of-karusell__punkter a[aria-current="true"], .of-karusell__punkter a:hover { background: var(--sand); }

/* Prosjektkort på flate: bilde og tekst samlet på ett kort */
.of-prosjekt { background: var(--flate); border-radius: var(--radius-lg); overflow: hidden; gap: 0; align-content: start; transition: background-color .2s ease; }
.of-prosjekt:hover { background: var(--flate-2); }
.of-prosjekt > figure, .of-prosjekt > .of-bilde { margin: 0; }
.of-prosjekt > figure img, .of-prosjekt > .of-bilde img { border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; display: block; }
.of-prosjekt__innhold { padding: var(--space-5) var(--space-6) var(--space-6); display: grid; gap: var(--space-3); }
.of-prosjekt__innhold .of-prosjekt__kunde { margin: 0; }
.of-prosjekt__innhold .of-merker { margin-top: var(--space-2); }
.of-prosjekt .of-merke { background: var(--bg); }
.of-prosjekt .of-merke--sand { background: var(--sand); } .of-prosjekt .of-merke--himmel { background: var(--himmel); } .of-prosjekt .of-merke--oliven { background: var(--oliven); }

/* Flate-rammen: konsentriske hjørner (indre radius = ytre radius - luft) */
.of-bilde--flate { padding: var(--space-5); border-radius: var(--radius-lg); }
.of-bilde--flate img { border-radius: 8px; }
.of-bilde--flate figcaption { margin: var(--space-4) var(--space-1) 0; }
/* Galleri-overskrift: tittel øverst, beskrivelse under */
.of-galleri__tittel { display: block; margin-bottom: var(--space-5); }
.of-galleri__tittel > :first-child { margin: 0; white-space: nowrap; }
.of-galleri__tittel > span { display: block; margin-top: var(--space-1); max-width: 62ch; }

/* ---------- Side (global ramme) ---------- */
/* Hele siden: innhold øverst, bølge og bunntekst alltid nederst. Ekstra høyde havner i innholdet, aldri under bunnteksten. */
.of-side { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.of-side > main { flex: 1 0 auto; }
.of-side > .of-bolge, .of-side > .of-bunn { flex: none; }
.of-side > header.wrap { width: 100%; }

/* ---------- Sand aldri på farget flate ---------- */
/* Sand-tekst og sand-prikker har for lav kontrast på himmel, oliven og sand. På fargede flater arver de tekstfargen. */
.of-flate--sand, .of-flate--himmel, .of-flate--oliven { --sand-tekst: currentColor; }
.of-flate--sand .of-liste:not(.of-liste--nummer):not(.of-liste--hake) > li::before,
.of-flate--himmel .of-liste:not(.of-liste--nummer):not(.of-liste--hake) > li::before,
.of-flate--oliven .of-liste:not(.of-liste--nummer):not(.of-liste--hake) > li::before { background: currentColor; }
/* Oliven: haker og prikker er grafikk (krav 3:1) og kan være sand-tekst (3,4:1). Tall og etiketter er tekst (krav 4,5:1) og bruker tekstfargen. */
.of-flate--oliven .of-liste--hake > li::before { border-color: #d9bb88; }
.of-flate--oliven .of-liste:not(.of-liste--nummer):not(.of-liste--hake) > li::before { background: #d9bb88; }
/* Lenker på oliven, himmel og sand beholder tekstfargen ved hover (sand gir for lav kontrast). Hover vises med understrek. */
.of-bunn a:not(.of-knapp):hover, .of-bunn a:not(.of-knapp):focus-visible { color: var(--on-oliven); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.of-flate--sand a:not(.of-knapp):hover, .of-flate--himmel a:not(.of-knapp):hover, .of-flate--oliven a:not(.of-knapp):hover { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- Fokus på fargede flater ---------- */
/* Sand og himmel er lyse: fokusringen blir mørk der, så den holder minst 3:1 (WCAG 1.4.11). */
.of-flate--sand, .of-flate--himmel { --focus: #2b2019; }

/* ---------- Hopp til hovedinnhold ---------- */
/* Første lenke på hver side. Skjult til den får tastaturfokus (WCAG 2.4.1). */
.of-hopp { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--sand); color: var(--on-sand); padding: 12px 20px; border-radius: var(--radius-md); text-decoration: none; }
.of-hopp:focus { top: 16px; outline: var(--stroke-fokus) solid var(--ink); outline-offset: 3px; }
.of-side { position: relative; }
.of-side > main:focus { outline: none; }

/* ---------- Sitat ---------- */
/* Sitat fra kunde eller mentee. Anførselstegnet er pynt og skjules for skjermleser (tom alt-tekst i content).
   Sitat på annet språk enn siden får lang på <blockquote>. */
.of-sitat { margin: 0; display: grid; gap: 20px; align-content: start; }
.of-sitat blockquote { margin: 0; }
.of-sitat blockquote p { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: 26px; line-height: 38px; }
.of-sitat blockquote::before { content: "\201C" / ""; display: block; font-family: var(--font-display); font-weight: 300; font-size: 72px; line-height: 40px; height: 32px; color: var(--sand-tekst); }
.of-sitat figcaption { font-size: 17px; line-height: 26px; color: var(--ink-muted); }
.of-flate--sand .of-sitat figcaption, .of-flate--himmel .of-sitat figcaption, .of-flate--oliven .of-sitat figcaption { color: inherit; }

/* ---------- Lenker på lyse flater ---------- */
/* På sand og himmel får lenker tekstfargen til flaten (7:1), med understrek. Lys lenkefarge ga bare 1,9:1. */
.of-flate--sand a:not(.of-knapp), .of-flate--himmel a:not(.of-knapp) { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
