/* ═══════════════════════════════════════════════════════════════════════════
   minservicebok.no — nettside

   Drop-in stilark for landingssiden. Bygget på designsystemet Industry og
   MinServiceBoks profilmanual.

   Filen er selvstendig: den definerer Industry-tokenene den trenger, så
   siden ikke må laste hele systembundelen i produksjon. Bruker du systemets
   eget styles.css i stedet, kan :root-blokken under fjernes — men da må
   registreringsmerkene legges inn som <i class="corner">-elementer, ikke
   tegnes i CSS slik denne filen gjør.
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;

  /* — Industry-tokens — */
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #5980a6;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);
  --color-hairline: color-mix(in srgb, #1d1f20 8%, transparent);

  --color-neutral-100: #f5f5f8;
  --color-neutral-200: #e7e7ea;
  --color-neutral-300: #d4d4d7;
  --color-neutral-400: #b7b7ba;
  --color-neutral-500: #98989b;
  --color-neutral-600: #7a7a7d;
  --color-neutral-700: #5d5d60;
  --color-neutral-800: #424244;
  --color-neutral-900: #2b2b2d;

  --color-accent-100: #eef6ff;
  --color-accent-200: #d6ebff;
  --color-accent-300: #b5d9fd;
  --color-accent-400: #94bce3;
  --color-accent-500: #749dc4;
  --color-accent-600: #597ea3;
  --color-accent-700: #416180;
  --color-accent-800: #2c455d;
  --color-accent-900: #1d2d3d;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2b2b2d 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2b2b2d 16%, transparent);

  /* — Statusfarger: MinServiceBoks tillegg, kun til servicestatus — */
  --st-ok: #5f9070;   --st-ok-tint: #e3f0e7;   --st-ok-text: #2f5b40;   --st-ok-line: #b3d5bf;
  --st-soon: #c08f3a; --st-soon-tint: #f8ecd2; --st-soon-text: #6b4f14; --st-soon-line: #e2c894;
  --st-late: #a3564a; --st-late-tint: #fae7e2; --st-late-text: #7a3a2e; --st-late-line: #e5b7ab;

  /* — Sidens egen geometri — */
  --leading: 24px;                  /* vertikal rytme */
  --edge: clamp(20px, 5vw, 72px);   /* sidemarg */
  --wrap: 1200px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
img { display: block; max-width: 100%; }

a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* ── Sideoppsett ─────────────────────────────────────────────────────── */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--edge);
}

.section { padding-block: calc(3 * var(--leading)); }
.section-tight { padding-block: calc(2.8 * var(--leading)); }

/* Grå flate — brukes til historien og avslutningen */
.band-grey {
  background: var(--color-surface);
  border-block: 1px solid var(--color-divider);
}

/* Stålfelt — hero, verdi ved salg, bunn. Aksentens dypeste trinn, ikke svart. */
.band-steel {
  position: relative;
  overflow: hidden;
  background: var(--color-accent-900);
  color: #f2f2f3;
}
.band-steel h1, .band-steel h2, .band-steel h3 { color: #f2f2f3; }
.band-steel p { color: rgba(242, 242, 243, 0.82); }
.band-steel a { color: var(--color-accent-300); }
.band-steel a:hover { color: #f2f2f3; }

/* Rutenettet i stålfeltene — rent dekor, aldri klikkbart */
.grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
}
.grid-lines span { position: absolute; background: var(--color-accent-600); }
.grid-lines .h { left: 0; right: 0; height: 1px; }
.grid-lines .v { top: 0; bottom: 0; width: 1px; }

/* ── Kicker + strek ──────────────────────────────────────────────────────
   Systemets landingsgrammatikk: etiketten står OVER en tegnet 1px strek,
   innholdet seter under. Nummereringen binder seksjonene til ett sett.   */

.kicker {
  display: block;
  font-size: 13px;
  line-height: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-700);
  margin: 0 0 12px;
}
.band-steel .kicker { color: var(--color-accent-300); }

.caption-rule {
  height: 1px;
  border: 0;
  margin: 0 0 var(--space-6);
  background: var(--color-divider);
}
.band-steel .caption-rule { background: var(--color-accent-600); }

/* ── Blueprint-rammen ────────────────────────────────────────────────────
   Registreringsmerkene tegnes i CSS. Legg IKKE inn <i class="corner"> —
   da får du dem dobbelt.                                               */

.cell {
  position: relative;
  background: #fbfbfc;
  border: 1px solid color-mix(in srgb, var(--color-text) 26%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, #2b2b2d 10%, transparent);
  padding: var(--space-6);
}

.cell::before {
  content: "";
  position: absolute;
  inset: -6px;
  pointer-events: none;
  --mark: color-mix(in srgb, var(--color-text) 78%, transparent);
  background-image:
    linear-gradient(var(--mark) 0 0), linear-gradient(var(--mark) 0 0),
    linear-gradient(var(--mark) 0 0), linear-gradient(var(--mark) 0 0),
    linear-gradient(var(--mark) 0 0), linear-gradient(var(--mark) 0 0),
    linear-gradient(var(--mark) 0 0), linear-gradient(var(--mark) 0 0);
  background-repeat: no-repeat;
  background-size:
    1px 11px, 11px 1px, 1px 11px, 11px 1px,
    1px 11px, 11px 1px, 1px 11px, 11px 1px;
  background-position:
    left 5px top 0, left 0 top 5px, right 5px top 0, right 0 top 5px,
    left 5px bottom 0, left 0 bottom 5px, right 5px bottom 0, right 0 bottom 5px;
}

.cell h3 { font-size: 22px; margin: 0 0 var(--space-2); }
.cell p { font-size: 15px; color: var(--color-neutral-700); }
.cell .ico { width: 26px; height: 26px; color: var(--color-accent-700); margin-bottom: var(--space-4); }
.cell .ico-alert { color: var(--st-late); }

/* Innrammet påstand på stålfelt — verdi-ved-salg-seksjonen */
.claim {
  border: 1px solid var(--color-accent-600);
  background: color-mix(in srgb, var(--color-accent-300) 6%, transparent);
  padding: var(--space-6);
}
.claim strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  color: var(--color-accent-300);
  margin-bottom: var(--space-1);
}
.claim p { font-size: 15px; color: rgba(242, 242, 243, 0.78); }

/* ── Ikoner ──────────────────────────────────────────────────────────────
   Lucide, strekbredde 1,5. Maskinikonene ligger i icons.js.            */

.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ── Knapper ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-divider);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}
.btn-lg { min-height: 48px; font-size: 17px; padding-inline: var(--space-8); }

.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); border-color: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); border-color: var(--color-accent-700); }

.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }

/* Knapp på stålfelt */
.btn-steel { border-color: var(--color-accent-600); color: #f2f2f3; }
.btn-steel:hover { background: color-mix(in srgb, var(--color-accent-300) 16%, transparent); color: #f2f2f3; }

/* ── Toppfelt ────────────────────────────────────────────────────────── */

.topbar { display: flex; align-items: center; gap: var(--space-8); padding-block: var(--space-4); }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: #f2f2f3; }
.brand svg { width: 34px; height: 34px; }
.brand span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0;
}
.brand .min { color: var(--color-accent-300); }

.nav-links { display: flex; gap: var(--space-6); margin-left: var(--space-4); }
.nav-links a { font-family: var(--font-heading); font-weight: 600; font-size: 16px; text-decoration: none; }

.topbar-actions { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; }

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero { padding-block: calc(3.5 * var(--leading)) calc(4 * var(--leading)); position: relative; }
.hero h1 {
  font-size: clamp(44px, 6.4vw, 74px);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: 15em;
  margin: 0 0 var(--space-6);
}
.hero h1 .accent { color: var(--color-accent-300); }
.hero .lead { font-size: 19px; max-width: 33em; margin: 0 0 var(--space-8); }
.hero .actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: calc(1.8 * var(--leading)); }

.assurances { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.assurances li { display: flex; align-items: center; gap: var(--space-2); font-size: 15px; list-style: none; }
.assurances ul { display: contents; }
.assurances .ico { width: 19px; height: 19px; color: var(--color-accent-300); }

/* ── Rutenett ────────────────────────────────────────────────────────── */

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); }
.row-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
.row-split { grid-template-columns: 1fr 1.15fr; align-items: start; }
.row-value { grid-template-columns: 1.1fr 1fr; align-items: center; }

.section h2 { font-size: 42px; max-width: 18em; margin-bottom: var(--space-4); }
.section .intro { font-size: 17px; max-width: 33em; color: var(--color-neutral-800); }

/* ── Historien ───────────────────────────────────────────────────────── */

.story p { font-size: 18px; line-height: 1.68; }
.story p + p { margin-top: var(--space-4); }
.byline { background: var(--color-bg); padding: var(--space-4); }
.byline strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 19px; margin-bottom: var(--space-1); }
.byline p { font-size: 14px; line-height: 1.55; color: var(--color-neutral-700); }

/* ── Stegene ─────────────────────────────────────────────────────────── */

.steps { display: grid; gap: var(--space-6); }
.step { display: flex; gap: var(--space-4); }
.step-no {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-divider);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  color: var(--color-accent-700);
}
.step h3 { font-size: 22px; margin: 0 0 var(--space-1); }
.step p { font-size: 15px; color: var(--color-neutral-700); }

/* ── Utstyrskortet (produktbevis) ────────────────────────────────────── */

.unit-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.unit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.unit-id { display: flex; gap: var(--space-3); align-items: flex-start; }
.unit-icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
  background: var(--color-accent-100);
  color: var(--color-accent-700);
}
.unit-icon svg { width: 26px; height: 26px; }
.unit-reg { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent-600); }
.unit-card h3 { font-size: 21px; margin: 2px 0 0; }
.unit-meta { font-size: 13px; color: var(--color-neutral-700); }

.plan-list {
  display: grid;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-hairline);
}
.plan-row { display: grid; gap: 4px; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); font-size: 13px; }
.plan-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-neutral-700); }

/* ── Aksen ───────────────────────────────────────────────────────────────
   Markøren står der maskinen er i intervallet; streken ved 30 % er
   forfallet. Posisjonen er ANDEL AV INTERVALLET, så timer og kilometer
   kan sammenlignes:

     pos(f) = f >= 0 ? 30 + min(f,1)*70 : max(1.5, 30 + f*75)

   Bare left og width settes inline fra data.                            */

.axis { position: relative; height: 26px; }
.axis > .grid,
.axis > .datum { position: absolute; top: 0; bottom: 0; width: 1px; }
.axis > .grid { background: color-mix(in srgb, var(--color-text) 9%, transparent); }
.axis > .datum { left: 30%; background: color-mix(in srgb, var(--color-text) 62%, transparent); }
.axis > .bar { position: absolute; top: 50%; height: 3px; transform: translateY(-50%); }
.axis > .mark {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border: 1px solid #fbfbfc;
}
.axis.is-late > .bar, .axis.is-late > .mark { background: var(--st-late); }
.axis.is-soon > .bar, .axis.is-soon > .mark { background: var(--st-soon); }
.axis.is-ok > .bar, .axis.is-ok > .mark { background: var(--st-ok); }
.axis.is-ok > .bar { opacity: 0.5; }

/* ── Tags ────────────────────────────────────────────────────────────────
   Tint OG kant. Uten kant forsvinner de i platen.                       */

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 0;
  background: var(--color-neutral-200);
  color: var(--color-neutral-800);
  border: 1px solid var(--color-neutral-300);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); border-color: var(--color-accent-300); }
.tag-ok { background: var(--st-ok-tint); color: var(--st-ok-text); border-color: var(--st-ok-line); }
.tag-soon { background: var(--st-soon-tint); color: var(--st-soon-text); border-color: var(--st-soon-line); }
.tag-late { background: var(--st-late-tint); color: var(--st-late-text); border-color: var(--st-late-line); font-weight: 600; }

.attachments { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.attachments .label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }

/* ── Typeraden ───────────────────────────────────────────────────────── */

.types {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
}
.types .label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent-700); }
.types span { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; color: var(--color-neutral-800); }
.types .ico { width: 22px; height: 22px; color: var(--color-accent-700); }

/* ── Avslutning ──────────────────────────────────────────────────────── */

.close { text-align: center; }
.close h2 { font-size: 46px; line-height: 1.08; max-width: 15em; margin: 0 auto var(--space-4); }
.close p { font-size: 18px; max-width: 30em; margin: 0 auto var(--space-8); color: var(--color-neutral-800); }
.close .actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ── Bunn ────────────────────────────────────────────────────────────── */

.footer { color: rgba(242, 242, 243, 0.72); }
.footer-grid { padding-block: calc(2.2 * var(--leading)) var(--space-8); }
.footer h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-300);
  margin: 0 0 var(--space-3);
}
.footer nav { display: grid; gap: var(--space-2); }
.footer nav a { font-size: 14px; text-decoration: none; }
.footer .about { font-size: 14px; max-width: 24em; }
.footer-legal {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding-block: var(--space-4) var(--space-8);
  border-top: 1px solid var(--color-accent-600);
  font-size: 13px;
}

/* ── Responsivt ──────────────────────────────────────────────────────────
   Ett brytepunkt. Sidemargen krymper løpende med clamp(), så flere
   trengs ikke.                                                          */

@media (max-width: 880px) {
  .row-2, .row-3, .row-4, .row-split, .row-value { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .section h2 { font-size: 34px; }
  .close h2 { font-size: 36px; }
  .assurances { gap: var(--space-4); flex-direction: column; }
}

.brand-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
}

.brand-mark svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: miter;
}

.brand-mark rect,
.brand-mark path {
  stroke-width: 3;
}

.brand-mark .needle {
  stroke: var(--color-accent-300);
}

.brand-mark circle {
  fill: var(--color-accent-300);
  stroke: none;
}

.hero-content,
.steel-content {
  position: relative;
}

.grid-lines .grid-a { top: 33.3%; }
.grid-lines .grid-b { top: 66.6%; }
.grid-lines .grid-c { left: 25%; }
.grid-lines .grid-d { left: 50%; }
.grid-lines .grid-e { left: 75%; }

.section-grid {
  margin-top: calc(1.5 * var(--leading));
}

.section-after {
  padding-top: 0;
}

.steel-lead {
  font-size: 18px;
  line-height: 1.65;
  max-width: 34em;
}

.steel-lead + .steel-lead {
  margin-top: var(--space-4);
}

.claim-list {
  display: grid;
  gap: var(--space-4);
}

.axis .axis-g1 { left: 47.5%; }
.axis .axis-g2 { left: 65%; }
.axis .axis-g3 { left: 82.5%; }

.footer-brand {
  display: inline-flex;
  margin-bottom: var(--space-4);
}

.footer-brand svg {
  width: 30px;
  height: 30px;
}

@media (max-width: 560px) {
  .topbar {
    gap: var(--space-3);
  }

  .brand span {
    font-size: 18px;
  }

  .topbar-actions {
    gap: var(--space-1);
  }

  .topbar-actions .btn {
    min-height: 34px;
    padding-inline: var(--space-2);
    font-size: 13px;
  }

  .hero .actions,
  .close .actions {
    align-items: stretch;
    flex-direction: column;
  }
}
