/* =========================================================
   Engboms – version 1
   Fristående stilmall, ingen ramverksberoende kod.
   ========================================================= */

/* Typsnitt för logotypen (ordmärket) */
@font-face {
  font-family: 'Engboms Logo';
  src: url('../assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #0b1220;
  --text: #3a4456;
  --muted: #687385;
  --line: #e3e7ee;
  --line-strong: #cfd5df;
  --surface: #f5f7fa;
  --white: #ffffff;
  --brand: #0b4fd0;
  --brand-hover: #0941ad;
  --brand-tint: #e9f0fd;
  --navy: #0a1428;
  --navy-line: rgba(255, 255, 255, 0.12);
  --navy-text: #b7c0d0;

  --font: 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
svg { flex-shrink: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Logotyp ---------- */
.logo {
  display: inline-flex;
  align-items: flex-start;
  font-family: 'Engboms Logo', var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--brand);
  transform: scaleX(1.08);
  transform-origin: left center;
}
.logo-reg {
  font-size: 0.4em;
  font-weight: 600;
  margin: 0.1em 0 0 0.1em;
}
.logo-light { color: var(--white); }

/* ---------- Knappar och länkar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg,
.text-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-sm { height: 42px; padding: 0 18px; font-size: 0.9375rem; }

.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-hover); }

.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--brand);
  transition: color 0.15s ease;
}
.text-link:hover { color: var(--brand-hover); }
.text-link-light { color: var(--white); }
.text-link-light:hover { color: var(--navy-text); }

/* ---------- Etiketter och rubriker ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: currentColor;
}
.label-light { color: #8fb0f0; }

.section-title {
  font-size: clamp(2rem, 3.6vw, 2.875rem);
  max-width: 18ch;
}

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--text);
}

.body-text {
  margin-top: 20px;
  max-width: 56ch;
  font-size: 1.0625rem;
}

/* ---------- Sidhuvud ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: var(--header-h);
}

.main-nav {
  display: flex;
  gap: 32px;
  margin-right: auto;
  margin-left: 24px;
}
.main-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--brand); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.15s ease;
}
.header-phone:hover { color: var(--brand); }
.header-phone svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { bottom: 16px; }
.menu-toggle[aria-expanded='true'] span:first-child { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { bottom: 20px; transform: rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--white);
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding-block: 12px 24px;
}
.mobile-menu nav > a {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink);
}
.mobile-menu-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(32px, 4vw, 56px); }

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px 64px;
  align-items: end;
}

.hero-title {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero-title span {
  display: block;
  color: var(--brand);
}

.hero-aside { padding-bottom: 6px; }
.hero-aside .btn-row { margin-top: 28px; }

.hero-media {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}

.hero-photo {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: 40% 30%;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}
.hero-panel-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-panel-text {
  margin-top: 16px;
  max-width: 32ch;
  color: var(--navy-text);
}
.hero-panel-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--navy-line);
  font-weight: 500;
}
.hero-panel-list li:last-child { padding-bottom: 0; }
.hero-panel-list svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #8fb0f0;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}
.stats > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  padding: 28px 24px 40px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child { padding-left: 0; border-left: 0; }
.stats dd {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stats dt {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- Sektioner ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section-tight { padding-block: clamp(56px, 6vw, 80px); }
.section-muted { background: var(--surface); }

.section-dark {
  background: var(--navy);
  color: var(--navy-text);
}
.section-dark h2,
.section-dark h3 { color: var(--white); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 56px);
}
.section-intro {
  font-size: 1.0625rem;
  color: var(--text);
}

/* ---------- Tjänster ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.15s ease;
}
.service:hover { border-color: var(--line-strong); }

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-num {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.service h3 { font-size: 1.5rem; }
.service > p { margin-top: 10px; }

.checklist {
  margin: 24px 0 32px;
  border-top: 1px solid var(--line);
}
.checklist li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--ink);
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  width: 12px;
  height: 7px;
  margin-top: -5px;
  border-left: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.service .text-link { margin-top: auto; }

/* ---------- Tvåkolumnslayout ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(48px, 7vw, 112px);
  align-items: center;
}

.steps { border-top: 1px solid var(--line); }
.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.25rem; }
.steps p { margin-top: 6px; }

/* ---------- Sjukvård ---------- */
.split-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.media-photo {
  overflow: hidden;
  border-radius: var(--radius);
  height: 100%;
}
.media-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: 30% center;
}

.section-dark .body-text { color: var(--navy-text); }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
  margin: 36px 0 36px;
  border-top: 1px solid var(--navy-line);
}
.feature-grid li {
  padding: 20px 0;
  border-bottom: 1px solid var(--navy-line);
}
.feature-grid h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
.feature-grid p { margin-top: 4px; font-size: 0.9375rem; }

/* ---------- Teknik ---------- */
.tech-title {
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  text-align: center;
}
.tech-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.tech-list li {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(48px, 7vw, 112px);
  align-items: center;
}
.contact .btn-row { margin-top: 32px; }

.contact-cards {
  display: grid;
  gap: 12px;
}
.contact-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 4px 24px;
  align-items: baseline;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.15s ease;
}
.contact-card:hover { border-color: var(--brand); }
.contact-card-label {
  grid-row: span 2;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.contact-card-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.contact-card-note {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- Sidfot ---------- */
.site-footer {
  background: var(--navy);
  color: var(--navy-text);
  padding-top: clamp(56px, 7vw, 88px);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-brand p { margin-top: 16px; }
.site-footer h2 {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.site-footer ul li + li { margin-top: 10px; }
.site-footer a { transition: color 0.15s ease; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px;
  border-top: 1px solid var(--navy-line);
  font-size: 0.875rem;
}
.footer-bottom ul { display: flex; gap: 24px; }
.footer-bottom ul li + li { margin-top: 0; }

/* ---------- Responsivt ---------- */
@media (max-width: 1080px) {
  .main-nav { gap: 24px; margin-left: 8px; }
  .header-phone { display: none; }
}

@media (max-width: 960px) {
  .main-nav,
  .header-actions { display: none; }
  .menu-toggle { display: block; }

  .hero-intro,
  .section-head,
  .split,
  .contact { grid-template-columns: 1fr; }
  .hero-intro { row-gap: 28px; }

  .hero-media { grid-template-columns: 1fr; }
  .hero-photo img { aspect-ratio: 16 / 10; min-height: 0; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .services { grid-template-columns: 1fr; }
  .media-photo img { aspect-ratio: 16 / 10; min-height: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .btn-row .btn { flex: 1 1 100%; }
  .stats > div { padding: 22px 16px 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; padding: 22px; }
  .contact-card-label { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; }
}

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