/* ==========================================================================
   Sprinktec AS – stilark
   Gjenskaper uttrykket fra den tidligere Wix-siden.
   ========================================================================== */

:root {
  --black: #000;
  --white: #fff;
  --text: #000;
  --grey-band: #c4c4c4;   /* sidetittel og flisseksjon */
  --grey-light: #f0f0f0;  /* lyse mellomrom */
  --blue: #0965a1;        /* topplinje */
  --blue-band: rgba(16, 104, 168, 0.94);
  /* Rødtonen er litt mørkere enn Wix-originalen (#ff0000) for å gi
     kontrast på minst 4,5:1 mot hvit tekst (WCAG 1.4.3) */
  --red: #d40000;
  --red-line: #ff0000;    /* dekorativ strek i footer */
  --red-band: rgba(212, 0, 0, 0.95);
  --menu-active: #0a5bd6;
  --focus: #0a5bd6;
  --focus-on-dark: #ffdd00;
  --error: #b00000;
  --success: #1a7f37;
  --red-hover: #a80000;
  --grey-dark: #3a3a3a;     /* skillelinjer i toppfeltet */
  --text-muted: #444;
  --line: #d4d4d4;          /* tynne skillelinjer på lys bakgrunn */
  --line-strong: #999;      /* tabellkanter */
  --line-on-dark: #333;
  --hover-on-dark: #1c1c1c;
  --input-border: #767676;  /* minst 3:1 mot hvit (WCAG 1.4.11) */
  --link-map: #005a85;
  --credit: #ffff00;
  --overlay: rgba(0, 0, 0, .6);

  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Inter", "Helvetica Neue", Arial, sans-serif;

  --max: 1440px;
  --header-h: 98px;
}

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

html { scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* <picture> fra bildeoptimaliseringen skal ikke påvirke layouten. <source> må skjules,
   ellers blir de egne celler når <picture> ligger i et grid. */
picture { display: contents; }
picture > source { display: none; }

a { color: inherit; }

h1, h2, h3, h4 {
  overflow-wrap: break-word;
  hyphens: auto;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em; /* Inter trenger litt tettere sporing i store størrelser */
  line-height: 1.25;
  margin: 0 0 .6em;
}

p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--white); color: var(--black);
  padding: 10px 16px; z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Synlig fokus (WCAG 2.4.7) ---------------------------------------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.hero-card:focus-visible,
.tile:focus-visible {
  outline-color: var(--focus-on-dark);
  outline-offset: 3px;
}
main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.link-button {
  background: none; border: 0; padding: 0;
  font: inherit; color: inherit;
  text-decoration: underline; cursor: pointer;
}

/* --- Knapper ----------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  font: 500 16px/1 var(--font-text);
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-hover); }
.btn-black { background: var(--black); color: var(--white); border-radius: 0; font-size: 14px; padding: 10px 20px; }
.btn-outline { background: var(--white); color: var(--black); border: 1px solid var(--black); border-radius: 0; font-size: 14px; padding: 9px 18px; }
.btn-small { font-size: 13px; padding: 9px 16px; border-radius: 6px; }

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--grey-dark);
  border-bottom: 0;
}
.topbar p {
  margin: 0;
  background: var(--blue);
  color: var(--white);
  font: 700 14px/30px var(--font-display);
  text-align: center;
}
.topbar a { text-decoration: none; }

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 68px;
  padding: 0 28px 0 24px;
  border-bottom: 2px solid var(--grey-dark);
}

.logo {
  margin-right: auto;
  align-self: flex-start;
  padding-top: 4px;
}
/* Logoen har sprinkler-dråper som henger under menylinjen, slik som originalen */
.logo img { width: clamp(200px, 22vw, 320px); height: auto; position: relative; z-index: 2; }

.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  white-space: nowrap;
  padding: 8px 10px;
  color: var(--white);
  font: 500 17px/1 var(--font-text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { border-bottom-color: var(--white); }

.nav-cta { font-size: 19px; padding: 14px 30px; margin-left: 20px; white-space: nowrap; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 34px; height: 2px;
  background: var(--white);
  margin: 7px 0;
}

/* Mobilmeny – svart panel fra høyre, samme uttrykk som headeren */
.mobile-menu { position: fixed; inset: 0; z-index: 100; }
.mobile-menu[hidden] { display: none; }
.mobile-menu__backdrop { position: absolute; inset: 0; background: var(--overlay); }
.mobile-menu__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(380px, 88vw);
  overflow-y: auto;
  background: var(--black);
  color: var(--white);
  padding: 76px 0 28px;
  border-left: 4px solid var(--red);
  animation: slide-in .25s ease-out;
}
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
.mobile-menu__panel ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-on-dark); }
.mobile-menu__panel li a {
  display: block;
  padding: 16px 28px;
  font-size: 19px;
  text-decoration: none;
  color: var(--white);
  border-bottom: 1px solid var(--line-on-dark);
  border-left: 5px solid transparent;
}
.mobile-menu__panel li a:hover { background: var(--hover-on-dark); }
.mobile-menu__panel a[aria-current="page"] { border-left-color: var(--red); font-weight: 700; }
.mobile-menu__close {
  position: absolute; top: 14px; right: 18px;
  width: 48px; height: 48px;
  background: none; border: 0;
  color: var(--white);
  font-size: 40px; line-height: 1; cursor: pointer;
}
.mobile-menu__phone { margin: 28px 28px 0; font-weight: 700; font-size: 18px; }
.mobile-menu__phone a { color: var(--white); }
.mobile-menu :focus-visible { outline-color: var(--focus-on-dark); outline-offset: -3px; }

/* --- Sidetittel -------------------------------------------------------- */

.page-title {
  background: var(--grey-band);
  padding: 22px 16px 14px;
  text-align: center;
}
.page-title h1 {
  margin: 0;
  font-size: clamp(22px, 3.6vw, 52px);
  overflow-wrap: anywhere;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* Referanseprosjekter på landingssidene (partials/prosjekter.njk) */
.projects { max-width: var(--max); margin: 0 auto; padding: 50px 16px 56px; }
.prose + .projects { padding-top: 0; }
.projects h2 { text-align: center; font-size: clamp(22px, 2.6vw, 38px); margin: 0 0 32px; }
.projects__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
.project { background: var(--grey-light); display: flex; flex-direction: column; }
.project img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project__text { padding: 16px 18px 20px; }
.project__text h3 { margin: 0; font-size: 18px; }
.project__text p { margin: .4em 0 0; }
.project__meta { font-size: 14px; color: var(--text-muted); }

/* --- Forside: hero ----------------------------------------------------- */

/* Alt innhold holder seg innenfor samme ramme (--max), uansett skjermbredde
   eller zoomnivå. Bakgrunnsfarger går fortsatt kant i kant. */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px;
}
.hero + .tiles-section { border-top: 12px solid var(--grey-light); }
.hero-card {
  display: grid;
  overflow: hidden;
  text-decoration: none;
}
.hero-card > *, .hero-card picture > img { grid-area: 1 / 1; }
.hero-card img {
  width: 100%; height: 100%;
  aspect-ratio: 700 / 545;
  object-fit: cover;
  transition: transform .5s ease;
}
.hero-card:hover img { transform: scale(1.04); }
.hero-card__band {
  position: relative;
  align-self: end;
  min-height: 26%;
  padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px;
  background: var(--blue-band);
  color: var(--white);
  font: 800 clamp(26px, 3.4vw, 48px)/1 var(--font-display);
  text-transform: uppercase;
}
.hero-card__band svg { width: .95em; height: .95em; flex: none; }

/* --- Tjeneste-fliser --------------------------------------------------- */

.tiles-section {
  background: var(--grey-band);
  padding: 50px 16px 56px;
  text-align: center;
}
.tiles-section h2 {
  font-size: clamp(22px, 2.6vw, 38px);
  margin-bottom: 40px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
  max-width: var(--max);
  margin: 0 auto;
}
.tile {
  display: grid;
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
}
.tile > *, .tile picture > img { grid-area: 1 / 1; }
.tile img { width: 100%; height: 100%; aspect-ratio: 325 / 400; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.05); }
.tile__band {
  position: relative;
  align-self: end;
  margin-bottom: 11%;
  padding: 10px 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.tile__band--red { background: var(--red-band); }
.tile__band--blue { background: var(--blue-band); }
.tile__title {
  font: 700 clamp(18px, 2vw, 28px)/1.1 var(--font-display);
  text-transform: uppercase;
}
.tile__text { font-size: clamp(13px, 1.2vw, 17px); line-height: 1.45; }

/* --- Delte rader (bilde + tekst) --------------------------------------- */


.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: var(--max);
  padding: 0 8px;
  margin: 10px auto;
}
.split--intro { grid-template-columns: 2fr 1fr; padding: 0; margin: 0 auto; }

.split__media { min-height: 420px; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media--logo {
  display: flex; align-items: center; justify-content: center;
  background: var(--blue);
}
.split__media--logo img { width: 82%; height: auto; object-fit: contain; }
.split__media--contain { background: var(--white); }
.split__media--contain img { height: auto; object-fit: contain; }

.split__text {
  align-self: center;
  padding: 40px 60px 40px 50px;
  max-width: 720px;
}
.split__text--top { align-self: start; padding: 24px 30px 24px 24px; }
.split--intro { margin-top: 0; }
.split--intro .split__text { padding: clamp(32px, 4vw, 56px) 32px 40px; max-width: none; align-self: stretch; }

.split__text h2 { font-size: clamp(24px, 2.4vw, 36px); }
.split--intro h2 { font-size: clamp(24px, 2.4vw, 36px); margin-bottom: .5em; }
.split__text h3 { font-size: 15px; font-family: var(--font-text); font-weight: 700; margin: 1.6em 0 0; }
.split__text h3 + p { margin-top: 0; }
.split__text ul { padding-left: 24px; margin: 0 0 1em; }
.split__text li { margin: 0; }
.split__text .btn { margin-top: 10px; }
.center { text-align: center; }

.feature-list { margin-top: 2.2em; }

/* Boks med strek over og under, sentrert tekst */
.callout {
  margin-top: 28px;
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
  padding: 22px 24px;
  text-align: center;
}
.callout h3 { margin: 0; font-size: 15px; font-family: var(--font-text); }
.callout p { margin: 0; }
.callout--strong p { font-weight: 700; margin-top: 1.2em; }
.callout--plain p { font-size: 17px; }

/* Lister av typen "1. Våt sprinkleranlegg" */
.type-list h3 { margin-top: 1.4em; }

/* --- Kontakt ----------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) 24px clamp(48px, 6vw, 88px);
}

.contact-info {
  align-self: start;
  background: var(--grey-light);
  border-top: 4px solid var(--blue);
  padding: 28px 32px 32px;
}
.contact-info h2 { font-size: 26px; margin-bottom: .6em; }
.contact-info .contact-info__sub { font-size: 20px; margin: 1.6em 0 .2em; }
.hours { margin: 0; font-size: 16px; }
.hours div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.hours dt { font-weight: 600; }
.hours dd { margin: 0; }
.contact-info__phone { margin: 0; font: 700 26px/1.2 var(--font-display); }
.contact-info__phone a { text-decoration: none; }
.contact-info__phone a:hover { text-decoration: underline; }
.contact-info__address { margin: 0; font-size: 17px; }

/* Kart (OpenStreetMap via Leaflet) */
.map-section { grid-column: 1 / -1; }
.map-section h2 { font-size: 26px; margin: 0 0 .6em; }
.map {
  height: clamp(280px, 40vw, 440px);
  background: var(--grey-light);
  border: 1px solid var(--line);
  font-family: var(--font-text);
  z-index: 0; /* Leaflet-lagene skal ikke legge seg over den faste toppmenyen */
}
.map:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.map-fallback { margin: 0; padding: 24px; }
.map-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 14px 0 0; font-weight: 600; }
.map.leaflet-container { font-family: var(--font-text); } /* leaflet.css lastes etter style.css */
.map .leaflet-control-attribution { font-size: 12px; }
.map .leaflet-control-attribution a,
.map .leaflet-popup-content a { color: var(--link-map); }
.map .leaflet-popup-content { font-size: 15px; margin: 12px 16px; }
.map .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; color: var(--black); }
.map .leaflet-bar a:focus-visible,
.map .leaflet-marker-icon:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* --- Skjema ------------------------------------------------------------ */

.contact-form { align-self: start; }
.contact-form h2 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: .2em; }
.form-note { margin: 0 0 24px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; }
.field-hint { margin: -4px 0 2px; font-size: 14px; color: var(--text-muted); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  font: 16px/1.4 var(--font-text);
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  padding: 11px 14px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.field [aria-invalid="true"] { border: 2px solid var(--error); }
.field-error {
  margin: 0;
  color: var(--error);
  font-size: 15px;
  font-weight: 600;
}
.field-error::before { content: "! "; }
.form-privacy { font-size: 14px; margin: 22px 0 0; }
.btn-submit { margin-top: 20px; font-size: 17px; font-weight: 600; padding: 14px 34px; }
.btn-submit[disabled] { opacity: .7; cursor: progress; }
.form-status { margin: 20px 0 0; padding: 16px 20px; background: var(--white); color: var(--text); border-left: 6px solid; }
.form-status--error { border-color: var(--error); color: var(--error); font-weight: 600; }
.form-status--ok { border-color: var(--success); }
.form-status--ok h3 { margin: 0 0 8px; font-size: 22px; }
.form-status--ok p { margin: 0; }
.form-status--ok:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-status a { color: inherit; }
.contact-form__alt { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

.split--form { align-items: stretch; }
.split--form .contact-form { padding: clamp(24px, 3vw, 40px) clamp(16px, 2.5vw, 32px); }

/* --- Tekstsider (personvern o.l.) -------------------------------------- */

.prose {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 24px 70px;
}
.prose h2 { font-size: 20px; margin: 1.8em 0 .4em; }
.prose h2:first-child { margin-top: 0; }

/* --- Footer ------------------------------------------------------------ */

.site-footer { background: var(--black); color: var(--white); }
.footer-logos {
  display: grid;
  grid-template-columns: auto 1fr 1.4fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 100px 10px 50px;
  border-bottom: 5px solid var(--red-line);
}
.footer-logo--fg img { width: 230px; }
.footer-fg-text { margin: 0; font-size: 15px; line-height: 1.5; max-width: 340px; color: var(--white); }
.footer-fg-text__title { display: block; font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.footer-fg-text a {
  display: inline-block; margin-top: 8px; padding: 4px 0;
  color: var(--white); font-weight: 600; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
}
.footer-fg-text a:hover { text-decoration-thickness: 2px; }
.footer-logo--startbank { width: 290px; justify-self: center; }
.footer-logo--sg { width: 95px; }
.footer-bottom {
  text-align: center;
  padding: 14px 16px 24px;
  font-size: 13px;
  line-height: 1.5;
}
.footer-bottom p { margin: 0; }
.footer-legal ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 18px;
  list-style: none; margin: 6px 0 0; padding: 0;
}
.footer-legal a, .footer-legal .link-button { text-decoration: underline; color: var(--white); padding: 4px 0; display: inline-block; }
.footer-credit { color: var(--credit); }

/* --- Cookie-banner ----------------------------------------------------- */

.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 90;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--white);
  box-shadow: 0 -2px 16px rgba(0,0,0,.2);
  border-top: 4px solid var(--blue);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner {
  display: flex; align-items: center; gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
}
/* Tittelen er ikke en overskrift (h2), så sidens overskriftsstruktur starter med h1 */
.cookie-title { font-family: var(--font-display); font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }
.cookie-banner .cookie-title { font-size: 18px; margin: 0 0 4px; }
.cookie-banner p { margin: 0; font-size: 14px; line-height: 1.5; }
.cookie-banner__text { flex: 1; }
.cookie-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; flex: none; }

/* «Godta alle» og «Avslå alle» har lik vekt – ingen dytting mot samtykke */
.btn-consent,
.btn-consent-secondary {
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 22px;
  min-width: 130px;
  border: 2px solid var(--black);
}
.btn-consent { background: var(--black); color: var(--white); }
.btn-consent:hover { background: var(--line-on-dark); }
.btn-consent-secondary { background: var(--white); color: var(--black); }
.btn-consent-secondary:hover { background: var(--grey-light); }

.cookie-dialog {
  border: 0;
  padding: 28px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cookie-dialog::backdrop { background: var(--overlay); }
.cookie-dialog .cookie-title { font-size: 22px; margin: 0 0 12px; }
.cookie-dialog fieldset { border: 0; margin: 0; padding: 0; }
.cookie-option {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.cookie-option input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--black); }
.cookie-option label { font-size: 16px; }
.cookie-option p { margin: 2px 0 0; }
.cookie-dialog__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* --- Juridiske sider --------------------------------------------------- */

.legal { max-width: 860px; margin: 0 auto; padding: 48px 24px 72px; }
.legal h2 { font-size: 24px; margin: 1.8em 0 .5em; }
.legal h3 { font-size: 18px; margin: 1.4em 0 .4em; }
.legal ul, .legal ol { padding-left: 24px; }
.legal li { margin-bottom: .35em; }
.legal .updated { color: var(--text-muted); font-size: 14px; }
.legal .lead { font-size: 18px; }
.legal address { font-style: normal; }
.table-wrap { overflow-x: auto; margin: 1em 0 1.5em; }
.table-wrap:focus-visible { outline: 3px solid var(--focus); }
.legal code { overflow-wrap: anywhere; }

/* Tabeller blir kort på smale skjermer (og ved kraftig zoom) – ingen sidelengs rulling */
@media (max-width: 640px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal caption { display: block; width: 100%; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal tr { border: 1px solid var(--line-strong); margin-bottom: 12px; }
  .legal td { border: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .legal td:last-child { border-bottom: 0; }
  .legal td::before { content: attr(data-label); display: block; font-weight: 700; font-size: 13px; }
  .legal code { overflow-wrap: normal; word-break: normal; }
}
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.legal th, .legal td { border: 1px solid var(--line-strong); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal thead th { background: var(--grey-light); }
.consent-box {
  border: 2px solid var(--black);
  padding: 18px 20px;
  margin: 1.5em 0;
}
.consent-box p { margin: 0 0 12px; }

/* --- Responsivt -------------------------------------------------------- */

/* Bytter til hamburgermeny før menypunktene rekker å bryte over to linjer
   (f.eks. ved 125–150 % zoom på en vanlig laptop) */
@media (max-width: 1240px) {
  .main-nav, .nav-cta, .topbar { display: none; }
  .menu-toggle { display: block; }
  .navbar { height: 78px; padding: 0 24px 0 16px; }
  .logo img { width: 300px; }
  .footer-logos { padding: 10px 24px; }
  .tiles { gap: 16px; }
  .split__text { padding: 30px 30px; }
}

/* Landingssidene har ingen meny: «Kontakt oss» vises i alle bredder og går til skjemaet */
@media (max-width: 1240px) {
  .site-header--landing .nav-cta { display: inline-block; font-size: 16px; padding: 10px 18px; }
}
@media (max-width: 760px) {
  .site-header--landing .nav-cta { font-size: 13px; padding: 8px 10px; margin-left: 8px; }
}
@media (max-width: 420px) {
  .site-header--landing .logo img { width: 170px; }
}

@media (max-width: 1000px) {
  .contact-layout { grid-template-columns: 1fr; max-width: 680px; }
  .footer-logos { grid-template-columns: 1fr 1fr; justify-items: center; text-align: center; padding: 20px 16px; }
  .footer-fg-text { padding-top: 0; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .navbar { height: 64px; padding: 0 12px 0 12px; }
  .logo img { width: 220px; }
  .hero { grid-template-columns: 1fr; padding: 8px; gap: 8px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .split, .split--intro { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .split__media { min-height: 0; aspect-ratio: 4 / 3; }
  .split__media--contain { aspect-ratio: auto; }
  .split--reverse .split__media { order: -1; }
  .split__text, .split__text--top, .split--intro .split__text { padding: 28px 16px; }
  .contact-layout { padding: 28px 16px 48px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .contact-info { padding: 22px 18px 24px; }
  .split--form .contact-form { padding: 28px 16px; }
  .footer-logos { grid-template-columns: 1fr 1fr; justify-items: center; text-align: center; padding: 20px 16px; }
  .footer-fg-text { padding-top: 0; }
  .footer-logo--startbank { width: 200px; }
  .footer-logo--fg, .footer-fg-text { grid-column: 1 / -1; }
  .footer-logo--fg img { width: 200px; }
  .footer-fg-text { max-width: 360px; }
  .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 14px 16px; }
  .btn-consent, .btn-consent-secondary { flex: 1 1 auto; }
  .legal { padding: 32px 16px 56px; }
}

@media (max-width: 420px) {
  .tiles { grid-template-columns: 1fr; }
  .tile img { aspect-ratio: 4 / 3; }
  .tile__band { margin-bottom: 0; }
}

.spaced-list li { margin-bottom: 1.3em; }

/* 404-siden: lenker til hovedsidene */
.link-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-weight: 600; }

/* --- Utskrift ---------------------------------------------------------- */
@media print {
  .topbar, .main-nav, .nav-cta, .menu-toggle, .mobile-menu, .skip-link,
  .cookie-banner, .cookie-dialog, .map-section, .contact-form form, .form-note,
  .footer-logos, .footer-legal, .btn { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  .site-header, .navbar { position: static; background: #fff; box-shadow: none; }
  .logo img { filter: brightness(0); width: 200px; }
  .contact-form h2 { display: none; }
  .site-footer, .footer-bottom { background: none !important; color: #000 !important; }
  .site-footer a { color: #000 !important; }
  .page-title, .tiles-section, .contact-info { background: none !important; }
  .hero-card__band, .tile__band { background: #fff !important; color: #000 !important; }
  a { color: #000; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  h2, h3 { break-after: avoid; }
  img, tr, .split { break-inside: avoid; }
}
