@font-face {
  font-family: "Nunito";
  src: url("nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --paper: #f6f1ea;
  --surface: #fffdf9;
  --ink: #1b2421;
  --muted: #45504c;
  --edge: #e4dbcf;
  --primary: #3b5252;
  --on-primary: #ffffff;
  --accent: #a15730;
  --on-accent: #ffffff;
  --soft: #e9efec;
  --radius: 18px;
  --wrap: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121917;
    --surface: #1a2321;
    --ink: #ece6dc;
    --muted: #a9b3ae;
    --edge: #2c3835;
    --primary: #9cc0bc;
    --on-primary: #10201e;
    --accent: #e0a074;
    --on-accent: #1b1410;
    --soft: #1f2b29;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
[id] { scroll-margin-top: 96px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Topp */
.top { border-bottom: 1px solid var(--edge); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: var(--ink); }
.brand svg { width: 40px; height: 40px; color: var(--primary); }
.brand b { display: block; font-weight: 800; font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.2; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: .98rem; padding: 10px 12px; border-radius: 10px; }
.nav a[aria-current="page"] { color: var(--primary); background: var(--soft); }
.menu-btn { display: none; }

@media (max-width: 799px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
    border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); color: var(--ink);
    font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--edge); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; font-size: 1.05rem; }
  .top .wrap { position: static; }
  .top { position: sticky; }
}

/* Seksjoner */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.hero { padding: 80px 0 64px; }
.hero .grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero-fact { margin: 16px 0 0; color: var(--muted); font-size: .95rem; font-weight: 700; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.eyebrow { display: inline-block; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 28px; background: var(--soft); border: 1px solid var(--edge);
  display: grid; place-items: center; color: var(--primary); overflow: hidden;
}
.portrait span { font-size: 4.5rem; font-weight: 900; letter-spacing: .02em; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.alt { background: var(--surface); border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.section-head p { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column;
}
.alt .card { background: var(--paper); }
.card p { color: var(--muted); }
.card .more { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; text-decoration: none; }
.card .more::after { content: "→"; margin-left: .35em; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }

.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 14px;
}
.steps p { color: var(--muted); }

.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px;
  border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid var(--primary); font-size: 1rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease-out;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-ghost { color: var(--primary); }

.price { font-size: 2.2rem; font-weight: 900; color: var(--ink); margin: 4px 0 2px; }
.price small { font-size: 1rem; font-weight: 700; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 16px 0 24px; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 8px;
  border-left: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: rotate(-45deg);
}
.tag { display: inline-block; font-size: .8rem; font-weight: 800; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 3px 12px; margin-left: 8px; vertical-align: middle; }
.note { color: var(--muted); font-size: .95rem; }

.band { background: var(--primary); color: var(--on-primary); border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center; }
.band h2 { color: inherit; }
.band p { opacity: .9; margin: 0; }
.band .btn { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0; }
.facts div { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 24px; }
.facts dt { font-weight: 800; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 6px 0 0; font-size: 1.15rem; font-weight: 700; word-break: break-word; }

/* Kontaktskjema */
.form { display: grid; gap: 18px; max-width: 560px; margin-top: 32px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; }
.field small { font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--edge);
  border-radius: 12px; padding: 12px 14px; width: 100%; min-height: 50px;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .btn { justify-self: start; cursor: pointer; font-family: inherit; }
.form .btn:disabled { opacity: .7; cursor: default; }
.form .note { margin: 0; }
.form-error { margin: 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--accent); color: var(--ink); background: var(--surface); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Utkast: tekst Kristian må bekrefte før publisering */
.utkast { background: #fff3c4; color: #5a4300; border-radius: 4px; padding: 0 4px; }

/* Bunn */
footer { border-top: 1px solid var(--edge); padding: 40px 0 56px; color: var(--muted); font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
footer a { color: var(--muted); display: inline-block; padding: 10px 0; }
footer p { margin: 0; }

@media (max-width: 899px) {
  .hero .grid { grid-template-columns: 1fr; gap: 32px; }
  .portrait { max-width: 220px; }
  .cards, .cards.two, .steps, .facts { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; padding: 32px 24px; }
}
@media (max-width: 639px) {
  body { font-size: 17px; }
  section { padding: 52px 0; }
  .hero { padding: 48px 0 40px; }
  .wrap { padding: 0 16px; }
  .card { padding: 22px; }
  .brand small { display: none; }
  .btn { width: 100%; }
}
/* Hover bare på enheter med mus, så fargen ikke blir hengende etter et trykk på telefonen */
@media (hover: hover) and (pointer: fine) {
  a:hover { color: var(--accent); }
  .nav a:hover { background: var(--soft); color: var(--ink); }
  .card:has(.more) { transition: transform .2s ease-out, box-shadow .2s ease-out; }
  .card:has(.more):hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgb(27 36 33 / .08); }
  .btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .btn-ghost:hover { background: var(--soft); color: var(--primary); }
  .band .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
}
.nav a { transition: background-color .15s ease, color .15s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav a { transition: none; }
  .btn:active { transform: none; }
  .card:has(.more), .card:has(.more):hover { transition: none; transform: none; }
}

/* Portrett og sertifikat */
.portrait.round { aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--surface); box-shadow: 0 0 0 1px var(--edge); max-width: 380px; justify-self: center; }
.cert { background: #fff; border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; }
.cert img { width: 100%; height: auto; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.badges li { background: var(--soft); color: var(--primary); font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: .95rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* Lister med fet tittel */
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.points li { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 20px 22px; }
.alt .points li { background: var(--paper); }
.points b { display: block; margin-bottom: 4px; }
.points span { color: var(--muted); }
.cards.four { grid-template-columns: repeat(2, 1fr); }

/* Referanser */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.quote { margin: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); padding: 28px; }
.alt .quote { background: var(--paper); }
.quote p { font-size: 1.05rem; }
.quote p::before { content: "«"; }
.quote p::after { content: "»"; }
.quote cite { font-style: normal; font-weight: 800; color: var(--primary); }

@media (max-width: 899px) {
  .split, .quotes, .cards.four { grid-template-columns: 1fr; gap: 24px; }
  .portrait.round { max-width: 240px; justify-self: start; }
}
