/* havinor.io – offentlig side */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --ink: #2B343E;
  --ink-2: #3E4852;
  --muted: #55606B;
  --amber: #E5A400;
  --amber-text: #8A6200;
  --deep: #1E252C;
  --soft: #F3F4F1;
  --line: #E2E6E9;
  --line-2: #DCE1E4;
  --field: #B9C2C9;
  --chip: #EEF1F3;
  --white: #FFFFFF;
  --ok: #1D6B3A;
  --error: #A12B2B;
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --wrap: 1240px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--amber-text); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
section[id], main[id] { scroll-margin-top: 80px; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--white); border-radius: 6px; }
.skip-link:focus { top: 12px; color: var(--white); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap--narrow { max-width: 888px; text-align: center; }
.wrap--text { max-width: 808px; }

/* Typografi */
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-text); }
.h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; letter-spacing: -.02em; }
.h2--narrow { max-width: 760px; }
.h2--sm { font-size: clamp(28px, 3vw, 38px); line-height: 1.15; }
.h3 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); letter-spacing: -.01em; }
.prose { color: var(--ink-2); }
.prose p { margin: 16px 0 0; }
.prose p:first-child { margin-top: 24px; }

.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: -.045em; color: var(--ink); white-space: nowrap; }
.wordmark__r { color: var(--amber); }

/* Knapper */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 6px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: #F2B41A; color: var(--ink); }
.btn--ghost { border-color: var(--white); color: var(--white); background: rgba(20, 26, 32, .25); }
.btn--ghost:hover { background: var(--white); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--dark:hover { background: var(--deep); color: var(--white); }
.btn--outline { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--soft); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: 68px; }
.site-header__logo img { height: 30px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 8px 28px; font-weight: 500; font-size: 16px; }
.main-nav ul a { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.main-nav__actions { display: flex; align-items: center; gap: 12px; }
.login-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; font-size: 15px; color: var(--muted); text-decoration: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-header__inner { flex-wrap: wrap; }
  .js .main-nav { display: none; }
  .main-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 4px 0 20px; }
  .js .main-nav.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; font-size: 18px; }
  .main-nav ul a { width: 100%; border-bottom: 1px solid var(--line); }
  .main-nav__actions { justify-content: space-between; padding-top: 8px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: #C9CDD0; min-height: min(760px, calc(100svh - 68px)); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.hero__inner { position: relative; min-height: inherit; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding-top: clamp(48px, 9vh, 104px); padding-bottom: 40px; }
.hero__title { display: flex; flex-direction: column; }
.hero__title .wordmark { font-size: clamp(72px, 11vw, 148px); line-height: .95; }
.hero__kicker { margin-top: 20px; font-family: var(--display); font-weight: 700; font-size: clamp(14px, 1.5vw, 20px); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.hero__lead { margin: 14px 0 0; max-width: 520px; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink); }
.hero__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__badge { margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(20, 26, 32, .6); color: var(--white); font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

@media (max-width: 700px) {
  .hero { min-height: 600px; }
  .hero__img { object-position: 62% 70%; }
  .hero__lead { display: none; }
  .hero__ctas, .hero__ctas .btn { width: 100%; }
  .hero__badge { font-size: 12px; letter-spacing: .1em; }
}

/* Seksjoner */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark .eyebrow { color: var(--amber); }
.section--dark .prose { color: #D5DBE0; }
.section--dark figcaption { color: #C3CBD2; }
.section--about { border-top: 1px solid var(--line); }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; }
.split__text { flex: 1 1 420px; min-width: 0; }
.split__media { flex: 1 1 500px; min-width: 0; }
.split__media--wide { flex-basis: 560px; }
.split--reverse { flex-wrap: wrap-reverse; }
figcaption { margin-top: 12px; font-size: 15px; color: var(--muted); }
.framed { border: 1px solid var(--line); border-radius: 8px; }
.paper { border-radius: 8px; background: var(--white); }
.rounded { border-radius: var(--radius); }

.features { list-style: none; margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; }
.features li { display: flex; flex-direction: column; gap: 8px; }
.features .icon { color: var(--amber-text); }
.features strong { font-family: var(--display); font-size: 17px; }
.features span { font-size: 16px; color: var(--muted); }

.list-title { margin: 28px 0 12px; font-weight: 600; }
.marker-list { list-style: none; display: flex; flex-direction: column; gap: 12px; color: #D5DBE0; }
.marker-list li { display: flex; gap: 14px; align-items: baseline; }
.marker-list li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--amber); transform: translateY(-1px); }

/* Slik virker det */
.intro { max-width: 760px; }
.layers { margin-top: 56px; }
.layer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 24px 28px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); }
.layer__title { flex: 0 1 260px; margin: 0; font-family: var(--display); font-size: 17px; font-weight: 700; }
.layer--core { background: var(--ink); border-color: var(--ink); color: var(--white); padding: 28px; }
.wordmark--layer { color: var(--white); font-size: 36px; line-height: 1; }
.layer-link { margin: 0; display: flex; align-items: center; gap: 12px; padding: 14px 0 14px 36px; font-size: 15px; color: var(--muted); }
.chips { flex: 1 1 400px; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--chip); font-size: 16px; }
.chips--dark li { background: transparent; border: 1px solid #5B6772; }
.steps-title { margin-top: 88px; }
.steps { list-style: none; margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--white); border-radius: var(--radius); border-top: 4px solid var(--amber); }
.steps__no { font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--amber-text); }
.steps strong { font-family: var(--display); font-size: 18px; }
.steps span:last-child { font-size: 16px; color: var(--muted); }

/* Gevinster */
.wide-img { margin-top: 48px; width: 100%; height: clamp(240px, 32vw, 440px); object-fit: cover; border-radius: var(--radius); }
.cards { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { border: 1px solid var(--line-2); border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); color: var(--ink-2); }
.card .h3 { color: var(--ink); font-size: 24px; }
.card ul { margin-top: 20px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.card p { margin: 20px 0 0; }

/* Integrasjoner */
.int-grid { list-style: none; margin-top: 48px; display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.int-grid li { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--white); border-radius: var(--radius); }
.int-grid strong { font-family: var(--display); font-size: 17px; }
.int-grid span { font-size: 16px; color: var(--muted); }

/* Om */
.partners { list-style: none; margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--muted); }

/* Kontakt */
.contact { background: var(--soft); }
.contact__inner { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; }
.contact__img { flex: 1 1 460px; min-width: 0; width: 100%; min-height: 420px; object-fit: cover; }
.contact__body { flex: 1 1 520px; min-width: 0; padding: clamp(48px, 6vw, 80px) clamp(24px, 5vw, 80px); }
.contact__body .prose p:first-child { margin-top: 16px; }

.contact-form { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 600; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--field); border-radius: 6px; background: var(--white); color: var(--ink); font: inherit; font-size: 17px; }
.field textarea { padding: 12px 14px; resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: 3px solid rgba(229, 164, 0, .55); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { margin: 0; font-size: 14px; color: var(--error); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-note { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.form-privacy { margin: 0; font-size: 14px; color: var(--muted); }
.form-status { margin-top: 24px; padding: 14px 18px; border-radius: 8px; font-weight: 600; }
.form-status--ok { background: #E3F1E8; color: var(--ok); }
.form-status--error { background: #F8E6E6; color: var(--error); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--deep); color: #C3CBD2; padding: 64px 0 32px; font-size: 16px; }
.site-footer a, .site-footer .link-button { color: var(--white); }
.site-footer a:hover, .site-footer .link-button:hover { color: var(--amber); }
.site-footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.site-footer__brand { flex: 1 1 280px; }
.site-footer__brand p { margin: 12px 0 0; }
.wordmark--footer { color: var(--white); font-size: 34px; }
.site-footer__col { flex: 0 1 220px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.site-footer__col h2 { margin-bottom: 4px; font-family: var(--display); font-size: 15px; color: var(--white); }
.site-footer__col .link-button { min-height: 0; text-align: left; }
.site-footer__bottom { margin-top: 48px; }
.site-footer__bottom p { margin: 0; padding-top: 24px; border-top: 1px solid #3A444E; font-size: 14px; }

/* Undersider */
.page { padding: 56px 0 96px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.prose--doc h2 { margin: 40px 0 0; font-family: var(--display); font-size: 22px; color: var(--ink); }
.prose--doc ul { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose--doc p { margin: 12px 0 0; }
.doc-updated { margin-top: 40px; color: var(--muted); font-size: 16px; }

/* Personvern-panel */
.consent-fab { position: fixed; left: 20px; bottom: 20px; z-index: 60; width: 48px; height: 48px; border-radius: 50%; background: var(--white); border: 1px solid var(--line-2); box-shadow: 0 2px 10px rgba(20, 26, 32, .18); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.consent-fab:hover { background: var(--soft); }
.consent { position: fixed; left: 20px; bottom: 84px; z-index: 61; width: min(420px, calc(100vw - 40px)); max-height: calc(100vh - 110px); overflow: auto; padding: 24px; background: var(--white); border-radius: 12px; box-shadow: 0 12px 40px rgba(20, 26, 32, .28); font-size: 15px; color: var(--ink-2); }
.consent__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.consent h2 { font-family: var(--display); font-size: 20px; line-height: 1.25; color: var(--ink); }
.consent__close { flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 6px; }
.consent p { margin: 8px 0 0; }
.consent__list { list-style: none; margin-top: 16px; border-top: 1px solid var(--line); }
.consent__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.consent__list strong { display: block; color: var(--ink); }
.consent__list span span, .consent__list label span { display: block; font-size: 14px; color: var(--muted); }
.consent__list label { cursor: pointer; }
.consent__actions { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.consent__actions .btn { font-size: 15px; padding: 0 10px; }
.consent__foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent__foot .link-button { font-weight: 600; color: var(--ink); }

.switch, .switch-input { flex: none; position: relative; width: 48px; height: 28px; border-radius: 999px; }
.switch--locked { background: #8A949C; }
.switch--locked span { position: absolute; top: 3px; left: 23px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); }
.switch-input { appearance: none; -webkit-appearance: none; margin: 0; background: var(--field); cursor: pointer; transition: background-color .15s; }
.switch-input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); transition: left .15s; }
.switch-input:checked { background: var(--ink); }
.switch-input:checked::after { left: 23px; }

.consent-toast { position: fixed; left: 80px; bottom: 26px; z-index: 61; margin: 0; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: var(--white); font-size: 15px; max-width: calc(100vw - 100px); }

@media print {
  .site-header, .consent-fab, .consent, .hero__img, .contact-form { display: none !important; }
}
