/* Felles grunnlag for de tre nye forslagene (runde 3, 20.11.2026).
   Bare oppførsel og tilgjengelighet her. Farger, fonter og oppsett ligger i hvert forslag. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--blekk); font-family: var(--brod); font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--tittel); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fokus, var(--aksent)); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hopp { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--blekk); color: var(--bg); }
.hopp:focus { top: 12px; }
.ramme { width: min(100% - 32px, 1280px); margin-inline: auto; }
@media (min-width: 768px) { .ramme { width: min(100% - 80px, 1280px); } }

/* Meny på mobil: <details>, så den virker uten JavaScript */
.meny-mobil { display: none; }
@media (max-width: 900px) {
  .meny-pc { display: none !important; }
  .meny-mobil { display: block; position: relative; }
  .meny-mobil > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; }
  .meny-mobil > summary::-webkit-details-marker { display: none; }
  .meny-mobil > summary span, .meny-mobil > summary span::before, .meny-mobil > summary span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s var(--ease-ut); }
  .meny-mobil > summary span::before, .meny-mobil > summary span::after { content: ""; position: absolute; left: 0; }
  .meny-mobil > summary span::before { top: -7px; } .meny-mobil > summary span::after { top: 7px; }
  .meny-mobil[open] > summary span { background: transparent; }
  .meny-mobil[open] > summary span::before { transform: translateY(7px) rotate(45deg); }
  .meny-mobil[open] > summary span::after { transform: translateY(-7px) rotate(-45deg); }
  .meny-mobil nav { position: absolute; right: -8px; top: 52px; min-width: 240px; padding: 8px; display: grid; background: var(--meny-bg, var(--bg)); box-shadow: 0 12px 32px rgb(0 0 0 / .18); border-radius: var(--r, 4px); }
  .meny-mobil nav a { padding: 12px 14px; text-decoration: none; }
}

/* Skjema */
.felt { display: grid; gap: 6px; }
.felt label { font-size: .9375rem; font-weight: 600; }
.felt input, .felt textarea, .felt select { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--linje); border-radius: var(--r-felt, 2px); background: var(--felt-bg, var(--flate)); }
.felt textarea { min-height: 132px; resize: vertical; }
.felt input::placeholder, .felt textarea::placeholder { color: var(--dempet); opacity: .8; }
.skjema-svar { min-height: 1.5em; font-size: .9375rem; color: var(--dempet); }

/* Plassholder for tekst Dilson må gi oss */
.mangler { color: var(--dempet); font-style: normal; opacity: .8; }

/* Kurver fra skillen */
:root {
  --ease-ut: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-inn-ut: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-avdekk: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Overskrift som bygges opp linje for linje (effekt 4). Teksten er vanlig HTML. */
.linjer .l { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.linjer .l > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .linjer .l > span { animation: linje-opp .8s var(--ease-avdekk) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
}
@keyframes linje-opp { from { transform: translateY(105%); } }

/* Bilder som avdekkes ved scrolling (effekt 5). Uten støtte vises de ferdig. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .avdekk { animation: avdekk linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes avdekk { from { clip-path: inset(14% 10% 14% 10%); transform: scale(1.08); } to { clip-path: inset(0); transform: none; } }
  }
}

/* Tekst som tennes ord for ord (effekt 7) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tenn [aria-hidden] span { opacity: .22; animation: tenn linear both; animation-timeline: view(); animation-range: cover 18% cover 42%; }
    @keyframes tenn { to { opacity: 1; } }
  }
}

.demo-merk { font-size: .8125rem; opacity: .75; }
