/* ScanDoc – webbplatsens stilmall (ren CSS, inga ramverk, inga inline-stilar) */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/opensans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --nav: #264b6e;
  --nav-sub: #375979;
  --page: #e5e5e5;
  --main: #f5f4ee;
  --text: #3c4858;
  --heading: #1c396a;
  --accent: #3d79b0;
  --accent-dark: #2f6596;
  --side-link: #2c577f;
  --footer: #323437;
  --error: #b3261e;
  --ok: #1b6b3a;
  --header-h: 70px;
}

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

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

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.618;
  letter-spacing: -0.5px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { color: var(--accent-dark); }
b, strong { font-weight: 700; }
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  background: #fff; color: var(--nav); padding: 10px 16px; border-radius: 0 0 6px 6px;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ---------- Sidhuvud och meny ---------- */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: var(--nav);
  color: #f5f4ee;
  box-shadow: 0 1px 10px -6px rgba(0,0,0,.42), 0 1px 10px 0 rgba(0,0,0,.12), 0 4px 5px -2px rgba(0,0,0,.1);
}
.navbar { height: 100%; }
.navbar__inner {
  max-width: 1170px; height: 100%; margin: 0 auto; padding: 0 15px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: block; flex: 0 0 auto; line-height: 0; }
.brand img { width: 217px; height: 50px; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; height: 100%; }
.nav__item { position: relative; display: flex; align-items: center; height: 100%; }
.nav__link {
  display: block; margin: 0 2px; padding: 9px 13px; border: 0; border-radius: 4px;
  background: transparent; color: #f5f4ee; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 400; line-height: 15px; letter-spacing: -0.5px;
  text-transform: uppercase; white-space: nowrap;
}
.nav__link:hover, .nav__link:focus-visible,
.nav__item.is-open > .nav__link,
.nav__item.has-sub:hover > .nav__link { background: rgba(255,255,255,.12); color: #fff; }
.nav__item.is-active > .nav__link, .nav__link[aria-current="page"] { background: rgba(255,255,255,.12); }

.caret {
  display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle;
  border-top: 4px solid currentColor; border-right: 4px solid transparent; border-left: 4px solid transparent;
}

.nav__sub {
  display: none; position: absolute; top: 100%; left: 0; z-index: 10;
  min-width: 160px; margin: 0; padding: 5px 0; list-style: none;
  background: var(--nav-sub); border-radius: 0 0 4px 4px; box-shadow: 0 6px 12px rgba(0,0,0,.176);
}
.nav__item.has-sub:hover > .nav__sub,
.nav__item.has-sub:focus-within > .nav__sub,
.nav__item.is-open > .nav__sub { display: block; }
.nav__sub a {
  display: block; padding: 10px; color: #f5f4ee; font-size: 13px; font-weight: 400; white-space: nowrap;
}
.nav__sub a:hover, .nav__sub a:focus, .nav__sub a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
.nav__item--cta .nav__link { background: var(--accent); border-radius: 20px; padding: 11px 20px; margin: 0; }
.nav__item--cta .nav__link:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none; width: 44px; height: 40px; padding: 0; border: 0; border-radius: 3px;
  background: transparent; cursor: pointer;
}
.nav-toggle__bar { display: block; width: 24px; height: 2px; margin: 5px auto; background: #f5f4ee; border-radius: 1px; }
.nav-toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); }

@media (max-width: 991px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    height: auto; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch;
    background: var(--nav); padding: 0 15px 12px;
    box-shadow: 0 8px 12px rgba(0,0,0,.2);
  }
  .nav.is-open { display: flex; }
  .nav__item { flex-direction: column; align-items: stretch; height: auto; }
  .nav__link { width: 100%; text-align: left; padding: 14px 15px; margin: 0; }
  .nav__item.has-sub:hover > .nav__sub, .nav__item.has-sub:focus-within > .nav__sub { display: none; }
  .nav__item.has-sub.is-open > .nav__sub { display: block; }
  .nav__sub { position: static; box-shadow: none; border-radius: 3px; padding: 0 0 6px 12px; background: var(--nav-sub); }
  .nav__sub a { padding: 12px 15px; }
  .nav__item--cta .nav__link { text-align: center; margin-top: 8px; }
}

/* ---------- Huvudyta ---------- */

.main { margin-top: var(--header-h); background: var(--main); min-height: 60vh; }

.container-fluid { width: 100%; }

/* Hero */
.hero {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 350px; overflow: hidden; background: #3b3b3b; color: #fff;
}
.hero__img, .hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.hero__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.265); }
.hero__title {
  position: relative; z-index: 1; margin: 0; padding: 0 10px; width: 100%;
  font-size: 72px; font-weight: 300; line-height: 1; text-align: center; letter-spacing: -0.5px; color: #fff;
}
.hero--home .hero__title { font-size: 61px; line-height: 1.2; }

.hero__slide {
  opacity: 0; transform: scale(1);
  transition: opacity 1s ease-in-out;
}
/* Första bilden syns direkt, utan övergång, tills skriptet startar zoomen. */
.hero__slide.is-start { opacity: 1; transition: none; }
/* Aktiv bild zoomar in långsamt (Ken Burns). Zoomen är 7 s = 6 s visning + 1 s toning, så den
   avslutas exakt när bilden är borta. Bilden som lämnar behåller zoomen medan den tonas ut,
   så den aldrig hoppar tillbaka till ozoomat synligt. */
.hero__slide.is-active, .hero__slide.is-leaving { transform: scale(1.1); transition: opacity 1s ease-in-out, transform 7s linear; }
.hero__slide.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__slide.is-active, .hero__slide.is-leaving { transform: none; transition: opacity 1s; }
}

/* Startsidans kort */
.cards {
  max-width: 1120px; margin: 0 auto; padding: 30px 0 70px;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; row-gap: 45px; align-items: start;
}
.card { text-align: center; color: var(--heading); padding: 0 10px; }
.card__image { display: block; margin-bottom: 8px; line-height: 0; }
.card--billbox .card__image { margin-bottom: 18px; }
.card__image img { display: inline-block; }
.card__title { margin: 0; font-size: 29px; font-weight: 300; line-height: 1.618; color: var(--heading); }
.card__text { margin: 0 0 15px; font-size: 18px; font-weight: 300; line-height: 1.618; color: var(--heading); }
.card__action { margin: 0; }
.card--verify, .card--rpa { align-self: end; }

/* Knappar */
.btn, .pill-button, .btn--submit {
  display: inline-block; border: 0; cursor: pointer; text-align: center;
  background: var(--accent); color: #fff; border-radius: 25px;
  font: inherit; font-size: 15px; font-weight: 500; line-height: 15px; letter-spacing: -0.5px; text-transform: uppercase;
  padding: 12px 24px; box-shadow: 0 2px 2px 0 rgba(0,0,0,.5);
  transition: background-color .2s;
}
.btn:hover, .btn:focus, .pill-button:hover, .pill-button:focus { background: var(--accent-dark); color: #fff; }
.btn--small { font-size: 13px; font-weight: 600; padding: 10px 20px; box-shadow: 0 2px 2px 0 rgba(0,0,0,.25); }
.btn-row { margin: 30px 0; }
.btn-row .btn { margin: 0 10px 10px 0; }
.btn-row--center { text-align: center; }

/* Layout för innehållssidor */
.layout {
  max-width: 1000px; margin: 0 auto; padding: 20px 0 80px;
  display: grid; grid-template-columns: 210px minmax(0, 1fr);
}
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.content { grid-column: 2; min-width: 0; padding: 0 10px; color: var(--heading); }
.layout--wide .content { grid-column: 1; }
.content--center { text-align: center; padding-top: 60px; }

.sidebar { grid-column: 1; grid-row: 1; padding: 0 10px; }
.sidebar__inner { position: sticky; top: calc(var(--header-h) + 20px); }
.sidebar h5 { margin: 0 0 15px; font-size: 23px; font-weight: 500; line-height: 1.618; color: #5e5e5e; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 0 0 0 10px; font-size: 18px; line-height: 43.2px; color: #5e5e5e; }
.sidebar li a { color: var(--side-link); font-size: 15px; font-weight: 300; line-height: 36px; }
.sidebar li a:hover { color: var(--accent); }

.breadcrumbs { margin: 0 0 20px; font-size: 13px; line-height: 21px; color: #000; }
.breadcrumbs a { color: var(--side-link); }
.breadcrumbs__home { font-size: 15px; }

.top-figure { margin: 0; padding: 13px 10px 0; text-align: center; }
.top-figure figcaption { padding-top: 10px; font-size: 23px; font-weight: 300; line-height: 1.618; color: var(--heading); }

.lead-image { margin: 0 0 30px; text-align: center; }
.lead-image img { width: 100%; max-width: 638px; }

/* Brödtext */
.content h1, .content h2, .content h3, .content h4 { color: var(--heading); margin: 0 0 15px; }
.content h2 { margin-top: 24px; font-size: 27px; font-weight: 500; line-height: 1.618; }
.content h3 { margin-top: 20px; font-size: 23px; font-weight: 500; line-height: 1.618; }
.content h4 { margin-top: 20px; font-size: 18px; font-weight: 500; line-height: 1.618; }
.content > h2:first-child, .content > nav + h2, .content > nav + p, .content > nav + .lead-image { margin-top: 0; }
.content p, .content li { font-size: 18px; font-weight: 300; line-height: 1.618; }
.content p { margin: 0 0 15px; }
.content ul, .content ol { margin: 0 0 30px; padding-left: 40px; }
.content img { max-width: 100%; height: auto; }
.content .inline-img { width: 101px; height: 41px; vertical-align: middle; }
.content .video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 15px 0 12px; background: #000; }
.content .video-embed + .btn-row + h2 { margin-top: 5px; }
.content .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.content .video video { display: block; max-width: 100%; height: auto; background: #000; }
.content a { color: var(--accent); }
.content a.btn { color: #fff; }
.content .center { text-align: center; }

.error__title { font-size: 40px; font-weight: 300; margin: 0 0 15px; }

/* Partnersidan */
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 40px; margin-bottom: 20px; }
.partner-card img { display: block; margin-bottom: 10px; }
.partner-card ul { margin-bottom: 0; }

/* Tabell */
.data-table { width: 100%; border-collapse: collapse; margin: 10px 0 30px; background: transparent; color-scheme: normal; }
.data-table th, .data-table td { padding: 10px 16px; text-align: left; border-bottom: 1px solid #dfe3e8; font-size: 16px; font-weight: 400; color: var(--text); }
.data-table th { background: var(--nav); color: #fff; font-weight: 600; text-transform: uppercase; font-size: 14px; }
.data-table tbody tr:nth-child(even) { background: #f3f5f7; }

/* Kontaktsidan */
.layout--contact { max-width: 1140px; }
.contact { display: grid; grid-template-columns: 4fr 7fr; column-gap: 30px; align-items: start; }
.contact__title { margin: 0 0 12px; font-size: 45px; font-weight: 400; line-height: 1.2; color: var(--heading); }
.content .contact__title { margin-top: 0; font-size: 45px; font-weight: 400; }
.icon-box { margin: 0 0 28px; }
.icon-box h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 28px; font-weight: 300; line-height: 1.3; color: var(--heading); }
.content .icon-box h2 { margin-top: 0; font-size: 28px; font-weight: 300; }
.icon-box h2 svg { flex: 0 0 auto; width: 28px; height: 28px; color: var(--heading); }
.icon-box p { margin: 0 0 8px 40px; font-size: 15px; line-height: 26px; color: var(--text); }
.content .icon-box p { font-size: 15px; line-height: 26px; }
.icon-box .icon-box__action { margin-left: 0; text-align: center; margin-top: 18px; }
.contact__support p { color: var(--text); }
.freshdesk { display: block; width: 100%; height: 500px; border: 0; margin: 10px 0 30px; background: transparent; color-scheme: normal; }
.content .tools__title { font-size: 22px; font-weight: 300; line-height: 22px; margin-top: 0; }
.tools__row { display: flex; flex-wrap: wrap; margin: 0 0 20px; }
.tools__row .btn { font-size: 13px; font-weight: 400; line-height: 13px; padding: 10px 20px; margin: 10px; box-shadow: 0 2px 2px 0 rgba(0,0,0,.25); }

/* ---------- Formulär ---------- */

.form { margin: 20px 0 0; max-width: 770px; }
.form__group { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.form__group legend, .field__set legend, .field__label {
  display: block; padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--heading);
}
.field { margin: 0 0 22px; }
.form__group .field { margin-bottom: 14px; }
.req { color: var(--error); margin-left: 3px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"],
.field select, .field textarea {
  display: block; width: 100%; padding: 10px 12px;
  border: 1px solid #b8c0cc; border-radius: 4px; background: #fff; color: var(--text);
  font: inherit; font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(61,121,176,.35); border-color: var(--accent); }
.field .input--short { max-width: 120px; }
.field__hint { margin: 6px 0 0; font-size: 14px !important; line-height: 1.5 !important; color: #5d6b7e; }
.field__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field__sub { display: block; margin-bottom: 4px; font-size: 14px; color: #5d6b7e; }
.field__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--text); cursor: pointer; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field__error { margin: 6px 0 0; font-size: 14px !important; font-weight: 600 !important; line-height: 1.4 !important; color: var(--error); }

.rows__list { display: grid; gap: 12px; }
.rows__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; }
.rows__cell { display: block; }
.rows__label { display: block; margin-bottom: 4px; font-size: 14px; color: #5d6b7e; letter-spacing: 0; }
.icon-btn {
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 24px; line-height: 38px; text-align: center;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--accent-dark); }
.icon-btn--add { margin-top: 12px; }
.rows__row .icon-btn { margin-bottom: 1px; }

.notice { margin: 0 0 24px; padding: 14px 18px; border-left: 5px solid; border-radius: 4px; background: #fff; max-width: 770px; }
.notice p { margin: 0; font-size: 16px; font-weight: 400; }
.notice h2 { margin: 0 0 6px !important; font-size: 24px; }
.notice ul { margin: 8px 0 0; padding-left: 22px; }
.notice li { font-size: 15px; font-weight: 400; }
.notice--error { border-color: var(--error); background: #fdecea; color: #5f1410; }
.notice--success { border-color: var(--ok); background: #e7f4ea; color: #12482a; }
.notice--success h2 { color: var(--ok); }
.form__privacy { margin: 8px 0 20px; font-size: 14px !important; line-height: 1.5 !important; color: #5d6b7e; }
.form__submit { margin: 0; }
.btn--submit { font-size: 15px; padding: 14px 32px; line-height: 17px; }

.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Sidfot ---------- */

.site-footer { background: var(--footer); color: #fff; padding: 30px 0 18px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); }
.footer__col { padding: 0 30px; min-width: 0; }
.site-footer h5 { margin: 10px 0 20px; font-size: 18px; font-weight: 600; line-height: 1.4; color: #fff; text-transform: none; }
.site-footer p { margin: 0 0 14px; font-size: 14px; font-weight: 500; line-height: 1.618; color: #fff; }
.site-footer a { color: #fff; }
.footer__phone { font-weight: 700; }
.footer__logo { margin: 0; padding-bottom: 24px; }
.footer__logo img { display: block; }
.footer__buttons { margin-top: 28px; }
.pill-button {
  display: block; width: 190px; margin: 0 0 20px; padding: 12px 30px; border-radius: 24px;
  font-size: 14px; font-weight: 400; line-height: 22px; box-shadow: 0 2px 5px rgba(0,0,0,.35);
}
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { padding: 0 0 0 10px; }
.footer__links li.is-sub { padding-left: 20px; }
.footer__links a { display: block; padding: 11px 0; font-size: 15px; font-weight: 400; line-height: 24px; text-transform: uppercase; }
.footer__links a:hover { text-decoration: underline; }

/* Rulla till toppen */
.to-top {
  position: fixed; right: 15px; bottom: 15px; z-index: 900;
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--side-link); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.to-top svg { width: 22px; height: 22px; }
.to-top:hover { background: var(--accent-dark); }

/* ---------- Mindre skärmar ---------- */

@media (max-width: 991px) {
  .cards { padding-left: 15px; padding-right: 15px; }
  .contact { grid-template-columns: 1fr; row-gap: 20px; }
  .layout--contact { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .brand img { width: 170px; height: 39px; }
  .hero { height: 240px; }
  .hero__title, .hero--home .hero__title { font-size: 34px; line-height: 1.2; }
  .cards { grid-template-columns: 1fr; row-gap: 50px; padding-bottom: 70px; }
  .card--verify, .card--rpa { align-self: start; }
  .card__title { font-size: 24px; }
  .card__text { font-size: 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 15px 0 50px; }
  .content, .sidebar { grid-column: 1; }
  .sidebar { grid-row: auto; margin-bottom: 15px; }
  .sidebar__inner { position: static; }
  .sidebar li { line-height: 34px; }
  .content h2 { font-size: 23px; }
  .content h3 { font-size: 20px; }
  .content p, .content li { font-size: 16px; }
  .content ul, .content ol { padding-left: 28px; }
  .top-figure figcaption { font-size: 20px; }
  .partner-grid { grid-template-columns: 1fr; }
  .contact__title, .content .contact__title { font-size: 34px; }
  .icon-box h2, .content .icon-box h2 { font-size: 24px; }
  .freshdesk { height: 620px; }
  .field__pair { grid-template-columns: 1fr; }
  .rows__row { grid-template-columns: 1fr auto; }
  .rows__cell { grid-column: 1; }
  .rows__row .icon-btn { grid-column: 2; grid-row: 1; align-self: start; margin-top: 22px; }
  .footer__inner { grid-template-columns: 1fr; row-gap: 20px; }
  .footer__col { padding: 0 20px; }
  .error__title { font-size: 30px; }
}

@media print {
  .site-header, .site-footer, .to-top, .sidebar, .skip-link { display: none !important; }
  .main { margin-top: 0; }
}
