/* =========================================================
   REPORTAGET — Cranepartner (runda 3)
   Bildburet helbredds-reportage: stora färgfoton bär sidan,
   texten ligger PÅ bilderna i editorial-overlays. Vit botten
   MELLAN bildblocken. Endast #AE171A / #2F383C / vitt.
   Open Sans + IBM Plex Mono. Lugn fade/clip-reveal, parallax-fritt.
   ========================================================= */

:root {
  --red: #AE171A;
  --ink: #2F383C;
  --white: #FFFFFF;

  /* härledda grå (alla AA-säkra mot vitt) */
  --ink-70: #50585c;
  --ink-55: #6b7378;
  --ink-40: #8b9296;
  --rule: #e4e6e7;
  --rule-strong: #cdd1d3;

  --sans: "Open Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1320px;
  --pad: clamp(20px, 5vw, 72px);
  --nav-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::selection { background: var(--red); color: #fff; }

/* Global fokus: röd 2px-ring */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   NAV — transparent över hero, vit vid scroll
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad);
  display: flex; align-items: center; gap: 24px;
}
.nav__logo { display: inline-flex; align-items: center; height: 100%; }
.nav__logo img { height: 26px; width: auto; }
/* logon vit-tonas över mörka hero-foton; vid scroll = original */
.nav:not(.is-scrolled) .nav__logo img { filter: brightness(0) invert(1); }

.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a {
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: #fff; letter-spacing: .005em;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.nav__links a:hover { border-bottom-color: var(--red); }
.nav__cta {
  font-size: 14px; font-weight: 700; text-decoration: none;
  color: #fff; background: var(--red);
  padding: 9px 16px; border-radius: 3px;
  transition: opacity .2s ease;
}
.nav__cta:hover { opacity: .9; }

/* SCROLLED state → vit nav, mörk text */
.nav.is-scrolled {
  background: var(--white);
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.nav.is-scrolled .nav__links a { color: var(--ink); }
.nav.is-scrolled .nav__cta { color: #fff; }

@media (max-width: 880px) {
  .nav__links { display: none; }
}

/* =========================================================
   CHAPTER — helbredds-foto med text-overlay
   ========================================================= */
.chapter {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  isolation: isolate;
  /* vit botten mellan bildblocken: tjock vit ram runt fotot */
  background: var(--white);
  padding: clamp(0px, 3vw, 40px);
}
.chapter--hero { padding: 0; } /* hero = full bleed */

.chapter__media {
  position: absolute; inset: clamp(0px, 3vw, 40px);
  overflow: hidden;
  border-radius: 4px;
  z-index: -1;
}
.chapter--hero .chapter__media { inset: 0; border-radius: 0; }
.chapter__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}

/* ---------- läsbarhets-scrim (läsbarhet, INTE dekor) ---------- */
.scrim {
  position: absolute; inset: 0;
  pointer-events: none;
}
.scrim--bottom-left {
  background: linear-gradient(to top right,
    rgba(20,24,26,.82) 0%, rgba(20,24,26,.55) 32%, rgba(20,24,26,0) 60%);
}
.scrim--top-left {
  background: linear-gradient(to bottom right,
    rgba(20,24,26,.80) 0%, rgba(20,24,26,.5) 32%, rgba(20,24,26,0) 60%);
}
.scrim--bottom-right {
  background: linear-gradient(to top left,
    rgba(20,24,26,.82) 0%, rgba(20,24,26,.52) 34%, rgba(20,24,26,0) 62%);
}
.scrim--right {
  background: linear-gradient(to left,
    rgba(20,24,26,.82) 0%, rgba(20,24,26,.5) 34%, rgba(20,24,26,0) 62%);
}
.scrim--full {
  background: linear-gradient(to top,
    rgba(20,24,26,.88) 0%, rgba(20,24,26,.62) 45%, rgba(20,24,26,.5) 100%);
}

/* =========================================================
   OVERLAY — editorial textblock ankrat i ett hörn
   ========================================================= */
.overlay {
  position: relative; z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 32px) var(--pad) clamp(40px, 7vw, 84px);
  display: flex; flex-direction: column;
  color: #fff;
}
.overlay--bottom-left  { justify-content: flex-end; align-items: flex-start; text-align: left; }
.overlay--top-left     { justify-content: flex-start; align-items: flex-start; text-align: left; padding-top: calc(var(--nav-h) + 56px); }
.overlay--bottom-right { justify-content: flex-end;   align-items: flex-end;   text-align: right; }
.overlay--center       { justify-content: center;     align-items: center;     text-align: center; }

.overlay > * { max-width: 30ch; }
.overlay--center > * { max-width: 62ch; }
.overlay__lede { max-width: 46ch; }
.overlay--center .overlay__lede { max-width: 56ch; }

.overlay__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  margin: 0 0 18px;
  color: #fff;
}
.overlay__kicker .dot {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--red); flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(174,23,26,.25);
}

.overlay__title {
  font-weight: 800;
  font-size: clamp(2.1rem, 5.6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  color: #fff;
  text-wrap: balance;
}
.overlay__lede {
  font-size: clamp(1.02rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255,255,255,.92);
  margin: 0 0 26px;
  font-weight: 400;
}

/* mörka kontaktrader i overlay */
.overlay__lines { margin: 0 0 4px; font-size: 14px; line-height: 1.9; max-width: 40ch; }
.overlay__lines p { margin: 0; color: rgba(255,255,255,.9); }
.overlay__lines a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.overlay__lines a:hover { border-bottom-color: #fff; }
.overlay__jour a { color: #fff; }
.overlay__jour { font-weight: 600; }

/* fakta-lista i service-kapitlet */
.overlay__facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px; font-size: 14px; max-width: 36ch;
  width: 100%;
}
.overlay--bottom-right .overlay__facts { text-align: right; }
.overlay__facts li {
  display: flex; justify-content: space-between; gap: 16px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.28);
}
.overlay--bottom-right .overlay__facts li { flex-direction: row-reverse; }
.overlay__facts span { color: rgba(255,255,255,.72); }
.overlay__facts strong { color: #fff; font-weight: 600; }

/* aggregat-rad i begagnat-kapitlet */
.overlay__agg {
  font-size: 15px; color: rgba(255,255,255,.92);
  margin: 0 0 26px; letter-spacing: .01em;
}
.overlay__agg-num { color: #fff; font-weight: 600; font-size: 1.5em; }
.overlay__agg-sep { color: var(--red); padding: 0 6px; font-weight: 700; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .005em;
  text-decoration: none; cursor: pointer;
  padding: 13px 24px; border-radius: 3px; border: 0;
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { opacity: .92; }
.btn--ghost-light {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.7);
}
.btn--ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* =========================================================
   SPECBAND — datablads-remsa i produkt-kapitlet (på vit ram-zon)
   ========================================================= */
.specband {
  position: absolute; z-index: 2;
  left: 50%; transform: translateX(-50%);
  bottom: clamp(24px, 4vw, 56px);
  width: min(var(--maxw), calc(100% - 2 * var(--pad)));
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
}
.speccard {
  display: flex; gap: 14px; align-items: stretch;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px;
  backdrop-filter: blur(4px);
}
.speccard__render {
  flex: 0 0 84px; width: 84px;
  display: grid; place-items: center;
  background: #f6f7f8; border-radius: 3px;
  overflow: hidden;
}
.speccard__render img { width: 100%; height: 100%; object-fit: contain; }
.speccard__render--cab img { object-fit: cover; }
.speccard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.speccard__name {
  margin: 0 0 8px; font-weight: 800; font-size: 16px;
  letter-spacing: -.01em; color: var(--ink);
}
.spec { margin: 0 0 8px; display: grid; gap: 5px; }
.spec > div {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}
.spec dt { color: var(--ink-55); margin: 0; }
.spec dd { margin: 0; color: var(--ink); font-weight: 500; }
/* lyftkapacitet (rad 1) = röd nyckel; kapacitet vid maxhöjd separat (rad 2) */
.spec > div:nth-child(1) dd { color: var(--red); font-weight: 600; }
.speccard__link {
  margin-top: auto; font-size: 12px; font-weight: 500;
  color: var(--red); text-decoration: none;
}
.speccard__link:hover { text-decoration: underline; }

/* =========================================================
   PEOPLE + OFFERT-formulär (CTA-kapitel)
   ========================================================= */
.people {
  display: flex; gap: clamp(20px, 4vw, 56px);
  flex-wrap: wrap; justify-content: center;
  margin: 8px 0 30px;
}
.person { display: flex; flex-direction: column; gap: 3px; }
.person__role {
  font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin: 0 0 4px;
}
.person__name { font-size: 20px; font-weight: 700; margin: 0; color: #fff; }
.person__tel {
  font-size: 22px; font-weight: 600; color: #fff;
  text-decoration: none; letter-spacing: .01em; margin-top: 4px;
}
.person__tel:hover { color: var(--red); }
.person__mail { font-size: 13px; color: rgba(255,255,255,.78); text-decoration: none; }
.person__mail:hover { color: #fff; }

.offert {
  width: 100%; max-width: 560px;
  background: rgba(255,255,255,.97);
  border-radius: 6px; padding: clamp(20px, 3vw, 30px);
  text-align: left; color: var(--ink);
  display: grid; gap: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.offert__title {
  margin: 0; font-weight: 800; font-size: 18px; color: var(--ink);
  letter-spacing: -.01em;
}
.offert__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.offert__field { display: grid; gap: 6px; }
.offert__field span { font-size: 12.5px; font-weight: 600; color: var(--ink-70); }
.offert__field input,
.offert__field textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule-strong); border-radius: 3px;
  padding: 11px 13px; width: 100%; resize: vertical;
}
.offert__field input:focus-visible,
.offert__field textarea:focus-visible { border-color: var(--red); }
.offert .btn { margin-top: 4px; }

/* =========================================================
   CREDIT — mono fotokredit (plats/maskin) per kapitel
   ========================================================= */
.credit {
  position: absolute; z-index: 2;
  right: clamp(20px, 4vw, 56px); bottom: clamp(16px, 3vw, 40px);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin: 0; pointer-events: none;
}
.credit--people { color: rgba(255,255,255,.62); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--white); color: var(--ink);
  border-top: 1px solid var(--rule);
  padding: clamp(40px, 6vw, 72px) 0 28px;
}
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px; align-items: start;
}
.footer__logo { height: 28px; width: auto; margin-bottom: 12px; }
.footer__tag { font-size: 12.5px; color: var(--ink-55); margin: 0; }
.footer__col p { margin: 0 0 4px; font-size: 13.5px; color: var(--ink-70); }
.footer__col a { color: var(--red); text-decoration: none; font-size: 13.5px; }
.footer__col a:hover { text-decoration: underline; }
.footer__copy {
  max-width: var(--maxw); margin: 32px auto 0; padding: 0 var(--pad);
  font-size: 12px; color: var(--ink-40);
}

/* =========================================================
   STICKY MOBIL RINGLIST <768px
   ========================================================= */
.ringbar { display: none; }
@media (max-width: 767px) {
  .ringbar {
    position: fixed; inset: auto 0 0 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-top: 1px solid var(--rule-strong);
    box-shadow: 0 -4px 18px rgba(0,0,0,.12);
  }
  .ringbar__btn {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 9px 8px; text-decoration: none;
    color: var(--ink); border-right: 1px solid var(--rule);
  }
  .ringbar__btn--jour { color: #fff; background: var(--red); border-right: 0; }
  .ringbar__role { font-size: 11px; font-weight: 700; }
  .ringbar__num { font-size: 12.5px; }
  /* lämna plats för ringlisten */
  .footer { padding-bottom: 84px; }
}

/* =========================================================
   REVEAL — lugn fade/clip; app.js togglar .is-in
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .specband {
    position: static; transform: none; width: auto;
    margin: 28px var(--pad) 0; padding: 0;
    grid-template-columns: 1fr;
  }
  .chapter--product { flex-direction: column; padding-bottom: 0; }
  .chapter--product .chapter__media { position: absolute; }
}

@media (max-width: 767px) {
  .chapter {
    min-height: 92svh;
    padding: clamp(0px, 2vw, 16px);
  }
  .overlay {
    padding-left: clamp(18px, 6vw, 28px);
    padding-right: clamp(18px, 6vw, 28px);
    padding-bottom: clamp(64px, 12vw, 84px);
  }
  .overlay > *, .overlay__lede { max-width: none; }
  .overlay--bottom-right { align-items: flex-start; text-align: left; }
  .overlay--bottom-right .overlay__facts { text-align: left; }
  .overlay--bottom-right .overlay__facts li { flex-direction: row; }
  .scrim--right, .scrim--bottom-right {
    background: linear-gradient(to top,
      rgba(20,24,26,.86) 0%, rgba(20,24,26,.55) 42%, rgba(20,24,26,0) 72%);
  }
  /* produkt-remsa staplad under fotot på vit botten */
  .chapter--product { min-height: auto; }
  .specband { grid-template-columns: 1fr; }
  .speccard { padding: 12px; }
  .offert__row { grid-template-columns: 1fr; }
  .people { gap: 24px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .footer__inner { grid-template-columns: 1fr; }
}

/* =========================================================
   PREFERS-REDUCED-MOTION — allt statiskt, overlay-text synlig
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .nav { transition: none; }
  * { scroll-behavior: auto !important; }
}
