/* Sjalvhostade typsnitt — ingen extern begaran, GDPR-sakert. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Archivo-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Archivo-700-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/IBMPlexMono-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-500-latin.woff2') format('woff2');
}

/* Lerum Pac Maskin AB — stilmall
   Företagsblått #00539F är behållet från den gamla sajten. */

:root {
  --brand: #00539f;
  --brand-ink: #003a70;
  --brand-wash: #eef4fa;

  /* Neutralerna är kalla, dragna mot företagsblått — inte grått rakt ur burken. */
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --surface: #ffffff;
  --border: #dde5ec;
  --text: #101c27;
  --text-soft: #556474;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 8px 24px rgba(16, 32, 48, .06);

  --wrap: 1140px;
  --radius: 12px;
  /* Archivo till rubriker (industriell grotesk), IBM Plex Sans till löptext
     och IBM Plex Mono till nyckeltal — teknisk precision framför neutralitet. */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --logo-plate: transparent;
  --logo-plate-pad: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4d9de0;
    --brand-ink: #8bc0ea;
    --brand-wash: #14202c;
    --bg: #0e151c;
    --bg-alt: #131c25;
    --surface: #16202a;
    --border: #26333f;
    --text: #e7edf3;
    --text-soft: #a2b0bd;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --logo-plate: #f4f7fa;
    --logo-plate-pad: 7px 12px;
  }
}

:root[data-theme="dark"] {
  --brand: #4d9de0;
  --brand-ink: #8bc0ea;
  --brand-wash: #14202c;
  --bg: #0e151c;
  --bg-alt: #131c25;
  --surface: #16202a;
  --border: #26333f;
  --text: #e7edf3;
  --text-soft: #a2b0bd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --logo-plate: #f4f7fa;
  --logo-plate-pad: 7px 12px;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-ink); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.14;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.8vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }

/* ── Sidhuvud ─────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { flex: 0 0 auto; display: flex; }
.logo img {
  height: 30px; width: auto;
  background: var(--logo-plate);
  padding: var(--logo-plate-pad);
  border-radius: 7px;
  box-sizing: content-box;
}

/* Logotypen är blå på inbakad vit botten — GIF-filen har ingen transparens.
   I mörkt läge får den därför en egen ljus platta med luft runt om, så den
   läses som en avsiktlig märkesyta i stället för en vit kloss. */

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 8px 14px; border-radius: 8px; font-size: .95rem; font-weight: 500;
  color: var(--text); text-decoration: none;
}
.nav a:hover { background: var(--bg-alt); }
.nav a[aria-current="page"] { background: var(--brand); color: #fff; }

.langs { display: flex; gap: 2px; padding-left: 16px; border-left: 1px solid var(--border); }
.langs a {
  font-family: var(--font-mono);
  padding: 6px 9px; border-radius: 6px; font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; color: var(--text-soft); text-decoration: none;
}
.langs a:hover { background: var(--bg-alt); color: var(--text); }
.langs a[aria-current="true"] { color: var(--brand); background: var(--brand-wash); }

/* ── Hjältesektion ────────────────────────────────────── */

.hero { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: clamp(40px, 7vw, 80px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero .tagline { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-soft); margin: 0 0 24px; max-width: 34ch; }
.hero figure { margin: 0; }
.hero figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: .74rem;
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 14px;
}

/* ── Nyckeltal ────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border);
         border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 0; }
.stats div { background: var(--surface); padding: 24px; text-align: center; }
.stats dt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--brand);
  line-height: 1.1;
  letter-spacing: -.03em;
}
.stats dd { margin: 6px 0 0; font-size: .88rem; color: var(--text-soft); }

/* ── Innehållssektioner ───────────────────────────────── */

section { padding: clamp(40px, 6vw, 72px) 0; }
section + section { border-top: 1px solid var(--border); }
.lede { font-size: 1.08rem; max-width: 68ch; }
.muted { color: var(--text-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 32px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0; display: flex; gap: 12px; align-items: flex-start; }
.card .bullet {
  font-family: var(--font-mono);
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-wash); color: var(--brand);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.card.accent { border-color: var(--brand); }
.card.accent h3 { color: var(--brand); }

/* ── Produktlistor ────────────────────────────────────── */

.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 36px; }
.group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.group > h3 {
  font-family: var(--font);
  margin: 0; padding: 14px 20px; background: var(--brand); color: #fff;
  font-size: .95rem; letter-spacing: .01em;
}
.group ul { list-style: none; margin: 0; padding: 14px 20px 20px; columns: 2; column-gap: 24px; }
.group li { font-size: .92rem; padding: 3px 0; break-inside: avoid; color: var(--text-soft); }
.group li::before { content: "·"; color: var(--brand); font-weight: 700; margin-right: 8px; }
.group .count { float: right; font-family: var(--font-mono); font-weight: 500; opacity: .8; }

/* ── Maskingalleri och video ──────────────────────────── */

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s ease; }
.gallery a:hover img { transform: scale(1.03); }

.video { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
         border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Formulär ─────────────────────────────────────────── */

.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 4vw, 52px); align-items: start; }

form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--text-soft); }
input, select, textarea {
  font: inherit; font-size: .98rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
textarea { resize: vertical; min-height: 150px; }
button {
  font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  background: var(--brand); color: #fff; border: 0; border-radius: 8px;
  padding: 13px 26px; justify-self: start;
}
button:hover { background: var(--brand-ink); }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.info-card h3 { color: var(--brand); }
.info-card dl { margin: 0; display: grid; gap: 12px; }
.info-card dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); font-weight: 700; }
.info-card dd { margin: 2px 0 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status { margin: 0; padding: 12px 16px; border-radius: 8px; font-size: .93rem; }
.status.ok { background: var(--brand-wash); border-left: 3px solid var(--brand); color: var(--text); }
.status.fel { background: color-mix(in srgb, #c0392b 12%, var(--surface)); border-left: 3px solid #c0392b; color: var(--text); }
label span[aria-hidden] { color: var(--brand); }
button[disabled] { opacity: .6; cursor: progress; }

.note { background: var(--brand-wash); border-left: 3px solid var(--brand); border-radius: 6px; padding: 14px 18px; font-size: .92rem; }

/* ── Sidfot ───────────────────────────────────────────── */

.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 44px 0; margin-top: 0; font-size: .9rem; color: var(--text-soft); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: var(--brand); }
.site-footer address { font-style: normal; line-height: 1.8; }

/* ── Mindre skärmar ───────────────────────────────────── */

@media (max-width: 860px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .group ul { columns: 1; }
  .header-inner { flex-wrap: wrap; min-height: 0; padding-block: 14px; gap: 12px; }
  .nav { margin-left: 0; order: 3; width: 100%; }
  .langs { margin-left: auto; }
}

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

/* ── Tillgänglighet ───────────────────────────────────── */

a:focus-visible, button:focus-visible, .nav a:focus-visible, .langs a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
