/* =========================================================
   HÖJDRESAN — Cranepartner (runda 3)
   En vertikal resa mark → 51 m. Signaturen är höjdmätaren.
   Brand: vit bas · Magni-röd #AE171A · grå #2F383C · vitt.
   Open Sans + IBM Plex Mono. Endast transform/opacity i rörelse.
   ========================================================= */

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

  /* AA-säkra grånyanser av --ink mot vitt */
  --ink-70: #5a6166;
  --ink-55: #6b7378;

  --rule: #e4e6e7;
  --rule-strong: #cfd3d5;

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

  --meter-w: 132px;          /* bredd på höjdmätar-spalten (desktop) */
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 88px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

a { color: inherit; }

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

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--text {
  background: transparent;
  color: var(--ink);
  padding: 14px 6px;
  border: 0;
  font-weight: 600;
  position: relative;
}
.btn--text::after {
  content: "";
  position: absolute;
  left: 6px; right: 6px; bottom: 8px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.btn--text:hover::after { transform: scaleX(1); }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin: 0 0 18px;
}
.kicker--inv { color: rgba(255,255,255,0.7); }

.tick {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 8px;
  vertical-align: 1px;
}
.tick--lit { box-shadow: 0 0 0 4px rgba(174,23,26,0.18); }

/* =========================================================
   HÖJDMÄTAREN — signaturen, fast i vänstermarginalen
   ========================================================= */
.meter {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--meter-w);
  height: 100vh;
  height: 100dvh;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 96px 0 88px;
  pointer-events: none;
  border-right: 1px solid var(--rule);
  background: var(--white);
}

.meter__readout {
  order: -1;
  margin-bottom: 18px;
  text-align: center;
  line-height: 1;
}
.meter__value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 22px;
  color: var(--red);
  letter-spacing: -0.01em;
}
.meter__unit {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-55);
  margin-left: 3px;
}

.meter__rail {
  position: relative;
  flex: 1;
  width: 2px;
  background: var(--rule-strong);
  margin: 6px 0 14px;
}
/* den röda "sanna" fyllningen — tickar uppifrån marken till nådd höjd */
.meter__fill {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 0%;
  background: var(--red);
  will-change: height;
}
.meter__cursor {
  position: absolute;
  left: 50%;
  bottom: 0%;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--red);
  transform: translate(-50%, 50%);
  box-shadow: 0 0 0 4px rgba(174,23,26,0.16);
  will-change: bottom;
}

.meter__stations {
  position: absolute;
  top: 96px; bottom: 88px;
  left: 0; right: 0;
  margin: 6px 0 14px;
  list-style: none;
  padding: 0;
}
.meter__station {
  position: absolute;
  /* p = procent från botten (0 = mark, 100 = 51 m) */
  bottom: calc(var(--p) * 1%);
  left: 50%;
  transform: translate(-50%, 50%);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-55);
  background: var(--white);
  padding: 2px 6px;
  white-space: nowrap;
  transition: color .25s ease;
}
.meter__station.is-reached { color: var(--ink); }
.meter__station.is-active { color: var(--red); font-weight: 600; }

/* huvudinnehållet skjuts in förbi mätaren på desktop */
.nav__inner,
.hero,
.stations,
.record,
.service,
.used,
.contact,
.footer__inner { padding-left: max(var(--pad), calc(var(--meter-w) + 28px)); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-right: var(--pad);
}
.nav__logo img { height: 30px; width: auto; }
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { border-bottom-color: var(--red); }
.nav__cta {
  text-decoration: none;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 2px;
}

/* =========================================================
   HERO — marken, 0,00 m
   ========================================================= */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(40px, 6vw, 84px);
  padding-bottom: clamp(56px, 8vw, 110px);
  padding-right: var(--pad);
  min-height: 86vh;
}
.hero__media {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #eceeef;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__panel { max-width: 38rem; }
.hero__kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin: 0 0 20px;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero__num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--red);
  font-weight: 600;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-70);
  margin: 0 0 28px;
  max-width: 34ch;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.hero__foot {
  font-size: 13px;
  color: var(--ink-55);
  border-left: 2px solid var(--red);
  padding-left: 12px;
  margin: 0;
}
.hero__scroll {
  position: absolute;
  right: var(--pad);
  bottom: 28px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--ink-55);
  writing-mode: vertical-rl;
}

/* =========================================================
   STATIONER
   ========================================================= */
.stations {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(24px, 4vw, 56px);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.stations__head { max-width: 52rem; margin-bottom: clamp(40px, 6vw, 80px); }
.stations__title {
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.stations__lede { color: var(--ink-70); margin: 0; max-width: 46ch; }

.station {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
  border-top: 1px solid var(--rule);
}
.station:nth-child(even) .station__media { order: 2; }
.station__media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #f3f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.station__media img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 18px;
}
.station__mark {
  font-size: 13px;
  color: var(--ink-55);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.station__h {
  color: var(--red);
  font-weight: 600;
}
.station__name {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.station__desc {
  color: var(--ink-70);
  margin: 0 0 24px;
  max-width: 42ch;
}
.station__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* SPEC — tvåtals i mono, tabulära siffror */
.spec {
  margin: 0 0 4px;
  display: grid;
  gap: 0;
  max-width: 38rem;
}
.spec__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.spec__row dt {
  font-size: 13.5px;
  color: var(--ink-55);
  letter-spacing: 0.01em;
}
.spec__row dd {
  margin: 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-align: right;
}
.spec--wide .spec__row dd { color: var(--red); font-weight: 600; font-size: 17px; }

/* =========================================================
   REKORDET — 51,00 m (helröd panel, vit logo-regel respekteras: vit text på röd botten)
   ========================================================= */
.record {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(48px, 6vw, 84px);
  padding-bottom: clamp(48px, 6vw, 84px);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.record__media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #eceeef;
}
.record__media img { width: 100%; height: 100%; object-fit: cover; }
.record__panel {
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  padding: clamp(28px, 4vw, 56px);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.record__mark {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: rgba(255,255,255,0.92);
}
.record__mark .tick { background: #fff; }
.record__mark .tick--lit { box-shadow: 0 0 0 4px rgba(255,255,255,0.3); }
.record__title {
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 18px;
  color: #fff;
}
.record__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: rgba(255,255,255,0.92);
  margin: 0 0 28px;
}
.record .spec__row { border-bottom-color: rgba(255,255,255,0.28); }
.record .spec__row dt { color: rgba(255,255,255,0.78); }
.record .spec--wide .spec__row dd { color: #fff; }
.record__panel .btn--primary {
  background: #fff;
  color: var(--red);
  align-self: flex-start;
  margin-top: 28px;
}

/* =========================================================
   SERVICE — full-bredd foto med text-panel
   ========================================================= */
.service {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(44px, 6vw, 80px);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.service__media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eceeef;
}
.service__media img { width: 100%; height: 100%; object-fit: cover; }
.service__panel .kicker { color: var(--ink-55); }
.service__title {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.service__lede { color: var(--ink-70); margin: 0 0 26px; max-width: 44ch; }
.service__grid {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.service__grid li {
  background: var(--white);
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.service__k { font-weight: 600; font-size: 15px; color: var(--ink); }
.service__v {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-55);
  letter-spacing: 0;
}
.service__alert {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: #fbecec;
  border-left: 3px solid var(--red);
  padding: 14px 16px;
  border-radius: 2px;
}
.service__alert a { color: var(--red); text-decoration: none; font-weight: 600; }
.service__alert a:hover { text-decoration: underline; }

/* =========================================================
   BEGAGNAT & DEMO
   ========================================================= */
.used {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(44px, 6vw, 80px);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.used:nth-child(n) .used__media { order: 0; }
.used__media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #eceeef;
}
.used__media img { width: 100%; height: 100%; object-fit: cover; }
.used__title {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.used__lede { color: var(--ink-70); margin: 0 0 26px; max-width: 44ch; }
.used__stats {
  display: flex;
  gap: 40px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}
.used__stats div { display: flex; flex-direction: column; gap: 4px; }
.used__stats dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-55);
}
.used__stats dd {
  margin: 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--red);
}
.used__cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* =========================================================
   KONTAKT
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(44px, 6vw, 80px);
  padding-right: var(--pad);
  border-top: 1px solid var(--rule);
}
.contact__media {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #eceeef;
  width: 100%;
}
.contact__media img { width: 100%; height: 100%; object-fit: cover; }
.contact__title {
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.contact__lede { color: var(--ink-70); margin: 0 0 28px; max-width: 52ch; }
.contact__people {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.person {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 16px 18px;
  min-width: 220px;
  transition: border-color .2s ease, transform .2s ease;
}
.person:hover { border-color: var(--red); transform: translateY(-2px); }
.person__role { font-size: 12px; color: var(--ink-55); text-transform: uppercase; letter-spacing: 0.06em; }
.person__num { font-size: 19px; font-weight: 600; color: var(--ink); }
.person__mail { font-size: 13px; color: var(--ink-55); }

.quote {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 30px);
  max-width: 36rem;
  background: var(--white);
}
.quote__h {
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.quote__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.quote__field span {
  font-size: 13px;
  color: var(--ink-55);
  font-family: var(--mono);
}
.quote__field input {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 11px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: var(--white);
}
.quote__field input:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.quote .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--rule);
  padding: clamp(40px, 6vw, 64px) 0 88px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-right: var(--pad);
}
.footer__logo { height: 30px; 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: 14px; color: var(--ink-70); }
.footer__head { font-weight: 600; color: var(--ink) !important; }
.footer__col a { color: var(--red); text-decoration: none; font-size: 14px; }
.footer__col a:hover { text-decoration: underline; }
.footer__copy {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding-right: var(--pad);
  padding-left: max(var(--pad), calc(var(--meter-w) + 28px));
  font-size: 12px;
  color: var(--ink-55);
}

/* =========================================================
   STICKY MOBIL RINGLIST (<768px)
   ========================================================= */
.ringbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: none;
  grid-template-columns: 1fr 1fr;
  background: var(--ink);
}
.ringbar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  text-decoration: none;
  color: #fff;
}
.ringbar__btn--jour { background: var(--red); }
.ringbar__role { font-size: 11px; opacity: 0.82; }
.ringbar__num { font-size: 15px; font-weight: 600; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  :root { --meter-w: 104px; }
  .meter__value { font-size: 18px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__media { aspect-ratio: 16 / 10; order: -1; }
  .station,
  .record,
  .service,
  .used,
  .contact { grid-template-columns: 1fr; }
  .station:nth-child(even) .station__media { order: 0; }
  .record__media,
  .service__media,
  .used__media { aspect-ratio: 16 / 10; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { padding-bottom: 64px; }   /* plats för ringbar */
  /* mätaren blir en smal topp-strip i stället för fast spalt */
  .meter {
    flex-direction: row;
    width: 100%;
    height: auto;
    top: auto;
    bottom: 64px;        /* ovanför ringbaren */
    padding: 8px 14px;
    border-right: 0;
    border-top: 1px solid var(--rule);
    align-items: center;
    gap: 12px;
  }
  .meter__readout { order: 0; margin: 0; }
  .meter__rail { width: auto; height: 2px; flex: 1; margin: 0; }
  .meter__fill { left: 0; bottom: 0; top: 0; height: 100%; width: 0%; }
  .meter__cursor { left: 0%; bottom: 50%; top: auto; transform: translate(-50%, 50%); }
  .meter__stations { display: none; }

  .nav__inner,
  .hero,
  .stations,
  .record,
  .service,
  .used,
  .contact,
  .footer__inner,
  .footer__copy { padding-left: var(--pad); }

  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }

  .ringbar { display: grid; }
  .hero__scroll { display: none; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .service__grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* =========================================================
   REDUCED MOTION — mätaren färdig (51,00), allt statiskt synligt
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meter__fill { height: 100% !important; }
  .meter__cursor { bottom: 100% !important; }
  .meter__station { color: var(--ink) !important; }
  .meter__station[data-h="51"] { color: var(--red) !important; font-weight: 600; }
  .btn, .btn--primary, .person, .nav__links a { transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
