/* Enviro Rørservice landingsside v1. Nøytral palett: byttes når branding kommer (bare variablene under). */
:root {
  --rs-color-bg: #ffffff;
  --rs-color-surface: #f4f4f2;
  --rs-color-text: #1c1d1f;
  --rs-color-muted: #4a4d52;
  --rs-color-border: #d6d6d2;
  --rs-color-action: #1c1d1f;
  --rs-color-action-text: #ffffff;
  --rs-color-action-hover: #3a3c40;
  --rs-color-focus: #1c1d1f;
  --rs-color-missing-bg: #fff4cc;
  --rs-color-missing-text: #4d3b00;
  --rs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rs-space-1: 0.5rem;
  --rs-space-2: 1rem;
  --rs-space-3: 1.5rem;
  --rs-space-4: 2.5rem;
  --rs-space-5: 4rem;
  --rs-radius: 8px;
  --rs-max: 68rem;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--rs-color-bg);
  color: var(--rs-color-text);
  font-family: var(--rs-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: 5rem; /* plass til ringelinja på mobil */
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--rs-space-2); }
h1 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 var(--rs-space-2); }

a { color: var(--rs-color-text); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--rs-color-focus);
  outline-offset: 3px;
}

.wrap { max-width: var(--rs-max); margin: 0 auto; padding: 0 var(--rs-space-2); }
.wrap.narrow { max-width: 44rem; }

.skip {
  position: absolute; left: var(--rs-space-2); top: -4rem;
  background: var(--rs-color-action); color: var(--rs-color-action-text);
  padding: 0.75rem 1rem; border-radius: var(--rs-radius); z-index: 10;
}
.skip:focus { top: var(--rs-space-1); }

/* Toppfelt */
.site-header { border-bottom: 1px solid var(--rs-color-border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--rs-space-2); min-height: 4rem;
}
.brand { font-weight: 700; font-size: 1.125rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; }
.site-header .btn { display: none; }

/* Knapp */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; padding: 0.75rem 1.5rem;
  background: var(--rs-color-action); color: var(--rs-color-action-text);
  border-radius: var(--rs-radius); font-weight: 700; font-size: 1.125rem;
  text-decoration: none;
}
.btn:hover { background: var(--rs-color-action-hover); }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

/* Seksjoner */
section { padding: var(--rs-space-4) 0; }
section + section { border-top: 1px solid var(--rs-color-border); }
.alt { background: var(--rs-color-surface); }

.hero { padding: var(--rs-space-4) 0 var(--rs-space-5); }
.lead { font-size: 1.1875rem; color: var(--rs-color-muted); max-width: 38rem; }
.hero .btn { width: 100%; margin-top: var(--rs-space-1); }
.hero-note { margin-top: var(--rs-space-2); color: var(--rs-color-muted); font-size: 1rem; }

.services { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--rs-space-2); }
.services li {
  background: var(--rs-color-bg); border: 1px solid var(--rs-color-border);
  border-radius: var(--rs-radius); padding: var(--rs-space-3);
}
.services p { margin: 0; color: var(--rs-color-muted); }

.facts { padding-left: 1.25rem; margin: 0; }
.facts li { margin-bottom: var(--rs-space-1); }

.contact { display: grid; gap: var(--rs-space-3); }
.contact address { font-style: normal; }
.contact dl { margin: 0; display: grid; gap: var(--rs-space-1); }
.contact dt { font-weight: 700; }
.contact dd { margin: 0 0 var(--rs-space-1); }

/* Bunntekst */
.site-footer { background: var(--rs-color-surface); border-top: 1px solid var(--rs-color-border); padding: var(--rs-space-3) 0; font-size: 1rem; color: var(--rs-color-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--rs-space-1) var(--rs-space-3); align-items: center; }
.site-footer a { color: var(--rs-color-text); display: inline-flex; align-items: center; min-height: 44px; }

/* Ringelinje, bare mobil */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 0.625rem var(--rs-space-2) calc(0.625rem + env(safe-area-inset-bottom));
  background: var(--rs-color-bg); border-top: 1px solid var(--rs-color-border);
}
.callbar .btn { width: 100%; }

/* Plassholdere: synlige med vilje. Fjernes når innholdet er på plass. */
.mangler {
  background: var(--rs-color-missing-bg); color: var(--rs-color-missing-text);
  outline: 2px dashed var(--rs-color-missing-text); outline-offset: 1px;
  border-radius: 3px; padding: 0 0.25rem; font-weight: 600;
}
.logo-mangler {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; height: 2.75rem; padding: 0 0.375rem; font-size: 0.6875rem; line-height: 1.1; text-align: center;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
  .site-header .btn { display: inline-flex; min-height: 48px; font-size: 1rem; padding: 0.5rem 1.25rem; }
  section { padding: var(--rs-space-5) 0; }
  .hero { padding: var(--rs-space-5) 0; }
  .hero .btn { width: auto; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .services { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .callbar, .skip, .site-header .btn { display: none; }
  body { padding-bottom: 0; }
}

/* Lange sammensatte ord og store tekststørrelser (tekst 200 %) */
body { overflow-wrap: break-word; }
h1, h2, h3 { hyphens: auto; overflow-wrap: anywhere; }
.services li, .contact > * { min-width: 0; }
.btn { flex-wrap: wrap; text-align: center; }

/* Frittstående lenker får minst 44 px klikkflate */
.contact dd a, .back { display: inline-flex; align-items: center; min-height: 44px; }
