/* Zen Finans demo. Design tokens lifted from the live site:
   primary purple rgb(68,24,186), body bg rgb(248,247,250), ink rgb(15,16,16),
   square buttons (no border radius on CTAs), Open Sans body, rounded display
   face for headings (omnes-pro on the live site; Nunito is the closest
   Google-hosted match). */

:root {
  --purple: #4418ba;
  --purple-dark: #351292;
  --purple-soft: #ede8fb;
  --lavender: #e3dcf7;
  --ink: #0f1010;
  --body-bg: #f8f7fa;
  --muted: #55565a;
  --card: #ffffff;
  --line: #e5e2ee;
  --green: #1e9e6a;
  --vipps: #ff5b24;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 10px 34px rgba(38, 18, 90, 0.08);
  --font-body: "Open Sans", "Segoe UI", Arial, sans-serif;
  --font-head: "Nunito", "Open Sans", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--body-bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 800; line-height: 1.18; color: var(--ink); }
h1 { font-size: 52px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  padding: 14px 34px; border: 2px solid var(--purple); cursor: pointer;
  background: var(--purple); color: #fff; border-radius: 0; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--purple-dark); border-color: var(--purple-dark); text-decoration: none; }
.btn.outline { background: transparent; color: var(--purple); }
.btn.outline:hover { background: var(--purple); color: #fff; }
.btn.ghost-white { background: #fff; color: var(--purple); border-color: #fff; }
.btn.vipps { background: var(--vipps); border-color: var(--vipps); border-radius: 6px; font-size: 18px; }
.btn.vipps:hover { background: #e64d1a; border-color: #e64d1a; }
.btn.bankid { background: #39134c; border-color: #39134c; border-radius: 6px; font-size: 18px; }
.btn.bankid:hover { background: #260c33; border-color: #260c33; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 9px 20px; font-size: 14px; }

/* ---------- top bar + header ---------- */
.topbar {
  background: var(--purple); color: #fff; text-align: center;
  font-size: 14px; padding: 8px 12px;
}
.topbar b { font-weight: 700; }
.topbar a { color: #fff; font-weight: 700; }
.site-header {
  background: var(--body-bg); position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: #fff; border-bottom-color: var(--line); }
.site-header .inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 24px; color: var(--ink); }
.brand img { height: 44px; width: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink); font-weight: 600; font-size: 16px; }
.nav a:hover { color: var(--purple); text-decoration: none; }
.lang-switch {
  display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden;
  font-size: 13px; font-weight: 700; margin-left: 6px;
}
.lang-switch button {
  border: 0; background: transparent; padding: 6px 12px; cursor: pointer;
  font-weight: 700; color: var(--muted); font-family: var(--font-body);
}
.lang-switch button.active { background: var(--purple); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 12px; }
.hero .grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .sub { font-weight: 700; font-size: 19px; margin-bottom: 22px; }
.checklist { list-style: none; margin: 0 0 26px; }
.checklist li { padding-left: 32px; position: relative; margin-bottom: 10px; font-size: 16px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--purple);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>') center/contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>') center/contain no-repeat;
}
.hero .photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero .photo img { width: 100%; height: 100%; object-fit: cover; }
.trustline { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.trust-stars { color: #00b67a; letter-spacing: 2px; font-size: 16px; }

/* wave band under hero */
.wave-band {
  height: 130px;
  background: linear-gradient(90deg, #cdbdf2 0%, #e8e1f9 45%, #f3effc 100%);
  clip-path: ellipse(120% 100% at 50% 0%);
  margin-top: 34px;
}

/* ---------- USP tiles ---------- */
.usp-row { margin-top: -86px; position: relative; z-index: 2; padding-bottom: 40px; }
.usp-row .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.usp {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 20px; text-align: center; font-weight: 600; font-size: 15px;
}
.usp .ico { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--purple); }
.usp .ico svg { width: 100%; height: 100%; }

/* ---------- sections ---------- */
section.block { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.eyebrow { color: var(--muted); font-weight: 700; font-size: 15px; margin-bottom: 8px; }

/* product cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pcard {
  background: linear-gradient(160deg, #ffffff 55%, #efe9fb 100%);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 26px;
  display: flex; flex-direction: column;
}
.pcard img.icon { width: 120px; height: 120px; margin: 0 auto 8px; }
.pcard h3 { margin-bottom: 14px; }
.pcard ul { margin: 0 0 22px 18px; color: var(--ink); font-size: 15px; }
.pcard ul li { margin-bottom: 9px; }
.pcard .btn { margin-top: auto; align-self: flex-start; }

/* banks */
.banks { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.bank-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; align-items: center; }
.bank-grid .bank {
  background: #fff; border-radius: 10px; padding: 14px 18px; height: 74px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 14px rgba(38,18,90,.05);
}
.bank-grid .bank img { max-height: 42px; max-width: 82%; object-fit: contain; }
.banks .pitch { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 36px; }
.banks .pitch h2 { margin-bottom: 14px; }
.banks .pitch p { margin-bottom: 22px; }

.smallprint { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.smallprint p { margin-bottom: 6px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 34px; }
.step-card { text-align: left; }
.step-card img { width: 130px; height: 130px; margin-bottom: 4px; }
.step-card h3 { margin-bottom: 10px; }
.center { text-align: center; }
.note-em { font-style: italic; color: var(--muted); font-size: 14px; margin-top: 10px; }

/* om oss */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px; }
.about h2 { margin: 6px 0 18px; }
.about p { margin-bottom: 14px; }
.about .photo img { border-radius: var(--radius); }

/* photo + checklist */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.split .photo img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.faq-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.faq-card h5 { font-size: 18px; margin-bottom: 10px; }
.faq-card p { font-size: 15px; color: var(--muted); }
.linkrow { text-align: center; margin-top: 34px; font-size: 15px; }
.linkrow a { margin: 0 10px; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, #5b2fd0 0%, var(--purple) 55%, #7a4fe0 100%);
  color: #fff; text-align: center; padding: 64px 24px; border-radius: 0;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { max-width: 760px; margin: 0 auto 24px; }

/* footer */
.site-footer { background: #fff; padding: 56px 0 0; margin-top: 0; }
.site-footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.site-footer h4 { font-size: 18px; margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; font-size: 15px; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--purple); }
.subfooter { border-top: 1px solid var(--line); padding: 22px 0 30px; }
.subfooter .legal { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* cookie bar */
.cookiebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #211440; color: #fff; padding: 16px 24px; font-size: 14px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.cookiebar .btn { padding: 8px 20px; font-size: 14px; }
.cookiebar .btn.outline { color: #fff; border-color: #fff; background: transparent; }

/* demo ribbon */
.demo-ribbon {
  background: #fff7e6; color: #8a5b00; border: 1px solid #f0d9a8;
  font-size: 13px; text-align: center; padding: 7px 12px;
}

/* ---------- wizard (soknad) ---------- */
.wizard-wrap { max-width: 860px; margin: 40px auto 80px; padding: 0 24px; }
.wizard-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; }
.progress { display: flex; gap: 6px; margin-bottom: 30px; }
.progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--purple); }
.wizard-card h2 { font-size: 28px; margin-bottom: 8px; }
.wizard-card .lead { color: var(--muted); margin-bottom: 26px; }
.fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 16px; font-family: var(--font-body); background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--purple-soft); border-color: var(--purple); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field.invalid input { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 13px; margin-top: 4px; display: none; }
.field.invalid .err { display: block; }
.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.radio-card {
  border: 2px solid var(--line); border-radius: 10px; padding: 16px 18px; cursor: pointer;
  font-weight: 700; display: flex; align-items: center; gap: 10px; background: #fff;
}
.radio-card input { accent-color: var(--purple); width: 18px; height: 18px; }
.radio-card.sel { border-color: var(--purple); background: var(--purple-soft); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 30px; gap: 14px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv b { text-align: right; }
.pill { display: inline-block; background: var(--purple-soft); color: var(--purple); font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.pill.green { background: #e2f6ec; color: var(--green); }

/* gate (appfarm-style start) */
.gate { max-width: 520px; margin: 56px auto 90px; text-align: center; }
.gate .wizard-card { padding: 44px 40px; }
.gate h2 { margin-bottom: 24px; }
.gate .or { color: var(--muted); margin: 16px 0; font-size: 14px; }
.gate .consent { font-size: 12.5px; color: var(--muted); margin-top: 26px; text-align: left; }
.gate .contactline { margin-top: 26px; font-size: 13px; color: var(--muted); }

/* debts table */
table.debts { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
table.debts th, table.debts td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.debts th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
table.debts td.num, table.debts th.num { text-align: right; }

/* offers */
.offer { border: 2px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 14px; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: #fff; }
.offer.sel { border-color: var(--purple); background: var(--purple-soft); }
.offer .bank { font-weight: 800; font-family: var(--font-head); font-size: 18px; }
.offer .rates { font-size: 13.5px; color: var(--muted); }
.offer .mo { font-size: 22px; font-weight: 800; font-family: var(--font-head); white-space: nowrap; }
.offer .mo small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* insurance step */
.ins-price { text-align: center; margin: 26px 0 8px; }
.ins-price .amount { font-size: 44px; font-weight: 800; font-family: var(--font-head); color: var(--purple); }
.ins-price .amount.loading { opacity: .35; }
.ins-price .per { color: var(--muted); font-size: 15px; }
.sum-slider { margin: 26px 0 8px; }
.sum-slider output { display: block; text-align: center; font-size: 22px; font-weight: 800; font-family: var(--font-head); margin-bottom: 10px; }
.sum-slider input[type=range] { width: 100%; accent-color: var(--purple); height: 34px; cursor: pointer; }
.sum-slider .ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.coverages { margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.coverage { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.coverage .tick { color: var(--green); font-weight: 800; flex: none; }
.coverage .cvg-title { font-weight: 700; }
.coverage .cvg-desc { color: var(--muted); font-size: 13px; }
.ins-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 4px; }
.ins-note { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.vipps-mark { display: inline-block; background: var(--vipps); color: #fff; font-weight: 800; font-size: 12px; border-radius: 4px; padding: 2px 8px; }
.error-box { background: #fdeceb; border: 1px solid #f5c6c2; color: var(--danger); border-radius: 8px; padding: 12px 16px; font-size: 14px; margin: 14px 0; display: none; }
.error-box.show { display: block; }
.spinner {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 18px;
  border: 4px solid var(--purple-soft); border-top-color: var(--purple);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* receipt */
.receipt-icon { width: 76px; height: 76px; border-radius: 50%; background: #e2f6ec; color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 38px; }

/* minside */
.portal-frame-wrap { max-width: 1200px; margin: 26px auto 60px; padding: 0 24px; }
#portal-frame { width: 100%; border: 0; min-height: 760px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.portal-login { max-width: 480px; margin: 60px auto 100px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  h1 { font-size: 36px; } h2 { font-size: 28px; }
  .hero .grid, .banks, .about, .split { grid-template-columns: 1fr; }
  .usp-row .grid, .cards-3, .steps, .faq-grid, .coverages { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .usp-row .grid, .cards-3, .steps, .faq-grid, .fieldrow, .radio-cards, .ins-choice, .coverages { grid-template-columns: 1fr; }
  .wizard-card { padding: 28px 22px; }
  .offer { grid-template-columns: 1fr; }
}
