/* R. Åmås Maskin AS — stilark. Barlow Condensed (overskrifter) og Barlow (brødtekst) er selv-hostet, latin-subsett. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/fonts/barlow-condensed-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/fonts/barlow-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1f50a7;        /* fra logoen */
  --blue-deep: #16397a;
  --navy: #0f1f3f;        /* overskrifter og bunn */
  --yellow: #f7b500;      /* maskingult: bare på ring-knappen i den blå toppen */
  --yellow-deep: #e0a300;
  --text: #2c3340;
  --muted: #5c6577;
  --bg: #fff;
  --band: #eef2f8;
  --line: #d3dae6;
  --radius: 6px;
  --container: 72rem;
  --gutter: 1rem;
}
@media (min-width: 48em) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Barlow, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: "Barlow Condensed", "Arial Narrow", Barlow, sans-serif;
  font-weight: 700; color: var(--navy); margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.75rem, 8vw, 6.25rem); line-height: 0.95; letter-spacing: -0.005em; }
h2 { font-size: clamp(2rem, 4.5vw, 3.125rem); line-height: 1; }
h3 { font-size: 1.625rem; line-height: 1.1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 1.1875rem; line-height: 1.5; }
.measure, .prose { max-width: 38rem; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* Topp */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; position: relative; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 2.5rem; width: auto; }
@media (min-width: 48em) { .logo img { height: 2.75rem; } }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; font-weight: 600; color: var(--text); padding: 0.25rem 0; }
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--blue); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.menu-btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: #fff; color: var(--navy);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0.55em 0.9em;
}
.menu-btn:active { transform: scale(0.97); }
.btn-call { padding: 0.6em 1em; font-size: 0.9375rem; }
@media (max-width: 26em) { .btn-call .num { display: none; } }
@media (min-width: 56em) {
  .nav { display: block; margin-left: 2rem; }
  .menu-btn { display: none; }
}
.nav.open {
  display: block; position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--gutter) 1rem; margin: 0;
}
.nav.open ul { flex-direction: column; gap: 0; }
.nav.open a { display: block; padding: 0.8rem 0; font-size: 1.125rem; border-top: 1px solid var(--line); }
.nav.open a[aria-current="page"] { box-shadow: none; }

/* Knapper */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8em 1.3em; border-radius: var(--radius);
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.1s ease-out, background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn-ghost:hover { background: #fff; color: var(--blue); border-color: #fff; }

/* Seksjoner */
.section { padding-block: 3.5rem; }
@media (min-width: 48em) { .section { padding-block: 5.5rem; } }
.band { background: var(--band); }
.section-head { margin-bottom: 2rem; max-width: 38rem; }
.page-head { padding-block: 2.5rem 1.5rem; }
@media (min-width: 48em) { .page-head { padding-block: 4rem 2rem; } }
.page-head + .section { padding-top: 1rem; }

/* Forsidetopp: blått felt, teksten gjør jobben */
.hero { background: var(--blue); color: #fff; padding-block: 3rem 3.5rem; }
.hero h1 { color: #fff; max-width: 22ch; }
.hero .lead { color: rgba(255, 255, 255, 0.88); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.5rem; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; font-weight: 600; }
.checks li::before { content: "✓"; color: var(--yellow); font-weight: 700; margin-right: 0.45em; }
.hero .checks { color: rgba(255, 255, 255, 0.92); }
@media (min-width: 48em) { .hero { padding-block: 5rem 5.5rem; } }
@media (min-width: 64em) { .hero { padding-block: 6.5rem 7rem; } }

/* Tjenesteliste */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services li { border-bottom: 1px solid var(--line); }
.services a { display: grid; gap: 0.2rem; padding: 1.25rem 0; text-decoration: none; color: inherit; }
.services h3 { margin: 0; }
.services p { margin: 0; color: var(--muted); }
.services a:hover h3 { color: var(--blue); }
@media (min-width: 40em) {
  .services a { grid-template-columns: 16rem 1fr; gap: 1.5rem; align-items: baseline; }
}

/* Tekst + bilde. Bildene er små (ca. 400 px), så de får en smal kolonne og blir aldri forstørret mye. */
.split { display: grid; gap: 2rem; align-items: center; }
.split img { width: 100%; border-radius: var(--radius); }
.split .btn { margin-top: 0.5rem; }
@media (min-width: 52em) {
  .split { grid-template-columns: 7fr 5fr; gap: 4rem; }
  .split.reverse > :first-child { order: 2; }
}

/* Fakta */
.facts { margin: 0; padding: 0; list-style: none; }
.facts li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts strong { color: var(--navy); }

/* Kontakt */
.contact-grid { display: grid; gap: 2rem; }
.contact-list { display: grid; gap: 0.75rem; justify-items: start; }
.contact-big {
  font-family: "Barlow Condensed", "Arial Narrow", Barlow, sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 700; line-height: 1;
  text-decoration: none; color: var(--blue);
}
.contact-big:hover { color: var(--blue-deep); }
.contact-line { font-size: 1.125rem; }
.contact-list .btn { margin-top: 0.5rem; }
address { font-style: normal; }
@media (min-width: 48em) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
  .contact-grid.top { align-items: start; }
}

/* Skjema */
.form { display: grid; gap: 1.1rem; max-width: 36rem; }
.field { display: grid; gap: 0.35rem; }
label { font-weight: 600; color: var(--navy); }
.hint { color: var(--muted); font-size: 0.9375rem; }
input, textarea {
  font: inherit; width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--text);
}
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31, 80, 167, 0.2); }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { display: none; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--band); border-left: 4px solid var(--blue); margin-bottom: 1.5rem; max-width: 36rem; }
.notice.show { display: block; }

/* Oppfordring nederst på undersider */
.cta { padding-block: 3rem; }
.cta-inner { display: grid; gap: 1.25rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 48em) { .cta-inner { grid-template-columns: 1fr auto; align-items: center; gap: 3rem; } }

/* Løpende tekst på undersider */
.prose h2 { margin-top: 2.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4em; }
.service { padding-block: 2.5rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.service:first-of-type { border-top: 0; }
.service.split { align-items: start; }
@media (min-width: 48em) { .service { padding-block: 3.5rem; } }

/* Bunn */
.site-footer { background: var(--navy); color: #c3cadb; padding-block: 3rem 2rem; font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .logo { margin-bottom: 1rem; }
.site-footer .logo img { height: 2.5rem; }
.footer-h { font-family: Barlow, sans-serif; font-size: 1rem; color: #fff; margin: 0 0 0.75rem; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #27375c; font-size: 0.875rem; color: #9aa5bd; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; } }

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