/*
 * BMS-service — rolig og lesbart, som et godt teknisk brev.
 * Én aksentfarge, kun på knappen.
 */

:root {
  --bg: #f6f5f1;
  --bg-alt: #ecebe5;
  --surface: #ffffff;
  --text: #1b2026;
  --muted: #5a6370;
  --line: #d6d4cc;
  --accent: #b5481d;          /* knapp */
  --accent-hover: #963a15;
  --accent-text: #ffffff;
  --link: #1d4f7a;
  --chart-line: #1b2026;
  --chart-area: rgba(27, 32, 38, 0.08);
  --chart-night: rgba(29, 79, 122, 0.10);
  --chart-target: #2f7a4a;
  --ok: #2f7a4a;
  --error-bg: #fbeae5;
  --error-line: #c4532c;

  --ff: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --prose: 68ch;
  --radius: 6px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --bg-alt: #1b2027;
    --surface: #20262e;
    --text: #e8e6e1;
    --muted: #a3abb5;
    --line: #333b45;
    --accent: #e0703f;
    --accent-hover: #f08454;
    --accent-text: #14181d;
    --link: #8cbce6;
    --chart-line: #e8e6e1;
    --chart-area: rgba(232, 230, 225, 0.08);
    --chart-night: rgba(140, 188, 230, 0.12);
    --chart-target: #6fc28e;
    --ok: #6fc28e;
    --error-bg: #3a2420;
    --error-line: #e0703f;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 0; }
h3, .h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: calc(var(--prose) + 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.lead { font-size: 1.2rem; color: var(--text); }
.small { font-size: 0.9rem; color: var(--muted); }
.source { font-size: 0.85rem; color: var(--muted); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

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

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7em 1.3em;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.3;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn--large { font-size: 1.1rem; padding: 0.85em 1.6em; }
.btn--small { font-size: 0.95rem; padding: 0.5em 1em; }
.btn--secondary { background: transparent; color: var(--text); border: 2px solid var(--text); }
.btn--secondary:hover { background: var(--text); color: var(--bg); }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.nav__mark { width: 28px; height: 28px; color: var(--text); }
.nav__menu { display: flex; align-items: center; gap: 24px; }
.nav__link { color: var(--text); text-decoration: none; font-size: 0.97rem; }
.nav__link:hover, .nav__link.is-current { text-decoration: underline; }
.nav__burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

@media (max-width: 820px) {
  .nav__burger { display: block; }
  .nav__menu {
    display: none;
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav__menu.is-open { display: flex; }
  .nav__link { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__menu .btn { margin-top: 12px; text-align: center; }
}

/* ── Sections ─────────────────────────────────────────── */
.section { padding: 64px 0; }
.section--tight { padding: 32px 0 64px; }
.section--alt { background: var(--bg-alt); }
.section--offer { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-head { padding: 56px 0 16px; }

/* Hero */
.hero { padding: 56px 0 48px; }
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.hero__text { max-width: 36rem; }
@media (min-width: 960px) {
  .hero { padding: 80px 0 72px; }
  .hero__inner { grid-template-columns: 1fr 1.1fr; }
}

/* Chart */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.chart__night { fill: var(--chart-night); }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { stroke: var(--muted); stroke-width: 1; }
.chart__area { fill: var(--chart-area); }
.chart__line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; }
.chart__target { stroke: var(--chart-target); stroke-width: 2; stroke-dasharray: 6 5; }
.chart__label { fill: var(--muted); font-size: 15px; font-family: var(--ff); }
.chart__note { fill: var(--chart-target); font-size: 18px; font-weight: 600; font-family: var(--ff); text-anchor: middle; }
.chart__note--strong { fill: var(--text); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 24px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--text); font-weight: 700; margin-bottom: 12px; }
.steps p { margin: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Readers */
.readers { display: grid; gap: 32px; }
.reader { border-top: 3px solid var(--text); padding-top: 16px; }
.reader__for { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
@media (min-width: 820px) { .readers { grid-template-columns: repeat(3, 1fr); } }

/* Offer */
.price { font-size: 1.15rem; }
.guarantee { border-left: 4px solid var(--ok); background: var(--bg); padding: 16px 20px; margin: 0 0 1em; border-radius: 0 var(--radius) var(--radius) 0; }
.guarantee p { margin: 0; }
.section--offer .guarantee { background: var(--bg-alt); }
.prices { border-collapse: collapse; width: 100%; margin-bottom: 0.6em; }
.prices th, .prices td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.prices td { text-align: right; white-space: nowrap; }

.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plain { padding-left: 1.2em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

/* People */
.people { display: grid; gap: 32px; }
@media (min-width: 720px) { .people { grid-template-columns: 1fr 1fr; } }
.person__photo { width: 160px; height: 160px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.person__role { color: var(--muted); margin-top: -0.4em; }
.person__photo--empty, .signature__photo--empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px dashed var(--line); color: var(--muted); font-size: 0.85rem;
}

/* Form */
.section--form { background: var(--surface); border-top: 1px solid var(--line); }
.form-wrap { max-width: 760px; }
.notfor { font-weight: 500; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 32px; background: var(--bg); }

.signature { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.signature p { margin: 0; }
.signature__photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex: none; }
.signature__lead { font-weight: 500; }
.signature__name { font-weight: 700; }

.form__grid { display: grid; gap: 16px; margin-bottom: 20px; }
@media (min-width: 640px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 4px; }
.field input, .field select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; min-height: 46px;
}
.field input:focus, .field select:focus { border-color: var(--link); outline: 2px solid var(--link); outline-offset: 0; }
.field_with_errors { display: contents; }
.field_with_errors input, .field_with_errors select { border-color: var(--error-line); border-width: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--link); }
.form .btn { margin-top: 12px; }
.form__errors { background: var(--error-bg); border-left: 4px solid var(--error-line); padding: 12px 16px; margin-bottom: 20px; border-radius: 0 var(--radius) var(--radius) 0; }
.form__errors p, .form__errors ul { margin: 0; }
.form__errors ul { padding-left: 1.2em; margin-top: 4px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* /nattsjekk */
.nattsjekk-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .nattsjekk-grid { grid-template-columns: 1.6fr 1fr; } }
.side { align-self: start; }
.sample { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); min-height: 180px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.sample__empty { color: var(--muted); margin: 0; }
.checklist { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.form--compact .field { margin-bottom: 12px; }

/* CTA */
.cta { background: var(--bg-alt); padding: 48px 0; }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta__text { font-size: 1.15rem; margin: 0; max-width: 40rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 0.95rem; color: var(--muted); }
.footer__inner { display: grid; gap: 24px; }
@media (min-width: 820px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer__brand { color: var(--text); font-weight: 700; margin-bottom: 4px; }
.footer__nav { display: flex; flex-direction: column; gap: 6px; }
.footer__nav a { color: var(--muted); }
