/* =========================================================
   DATABLADET — Cranepartner (minimalistiskt datablad)
   Vit bas · Magni-röd #AE171A endast på nyckeltal + en knapp ·
   grå #2F383C som text · Open Sans + IBM Plex Mono · strikt vänsterrutnät
   ========================================================= */

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

  --ink-70: rgba(47, 56, 60, 0.70);
  --ink-55: rgba(47, 56, 60, 0.55);
  --ink-40: rgba(47, 56, 60, 0.40);

  --rule: rgba(47, 56, 60, 0.14);   /* 1px hairline */
  --rule-strong: rgba(47, 56, 60, 0.26);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 56px);
  --cols: 12;
  --colgap: clamp(16px, 2vw, 28px);

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

  --sec-y: clamp(80px, 12vw, 128px);
}

/* ---------- reset ---------- */
*, *::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;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { list-style: none; padding: 0; }

/* tabular mono numbers everywhere */
.mono, .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* the ONE red: key figures */
.num--red { color: var(--red); }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* =========================================================
   GRID — 12 columns, left-aligned, hairline rhythm
   ========================================================= */
.grid {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  column-gap: var(--colgap);
}

/* ---------- shared section ---------- */
.section {
  padding-block: var(--sec-y);
  border-top: 1px solid var(--rule);
}
.section__head {
  grid-column: 1 / span 12;
  max-width: 60ch;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section__media {
  grid-column: 1 / span 12;
  margin: 0 0 clamp(36px, 5vw, 56px);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.section__media img {
  width: 100%;
  height: clamp(280px, 42vw, 540px);
  object-fit: cover;
  /* HARD RULE: photos always in full colour — never grayscale/duotone */
  filter: none !important;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-bottom: 18px;
}
.section__title {
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section__lede {
  margin-top: 16px;
  color: var(--ink-70);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  max-width: 52ch;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  align-items: center;
  min-height: 68px;
  padding-block: 14px;
}
.nav__logo {
  grid-column: 1 / span 4;
  display: inline-flex;
  align-items: center;
}
.nav__logo img { height: 26px; width: auto; }
.nav__links {
  grid-column: 5 / span 8;
  display: flex;
  justify-content: flex-end;
  gap: clamp(18px, 2.4vw, 34px);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink-70);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-block: clamp(56px, 9vw, 104px) clamp(64px, 9vw, 110px); }
.hero__inner { row-gap: clamp(40px, 6vw, 0px); align-items: start; }
.hero__text {
  grid-column: 1 / span 7;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__media {
  grid-column: 8 / span 5;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: clamp(340px, 38vw, 520px);
  object-fit: cover;
  filter: none !important;
}
.hero__title {
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-top: 6px;
}
.hero__title .num--red { white-space: nowrap; }
.hero__lede {
  margin-top: 24px;
  color: var(--ink-70);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  max-width: 46ch;
}
.hero__spec { margin-top: clamp(28px, 4vw, 40px); width: 100%; max-width: 480px; }

/* =========================================================
   SPECLIST — datablad key/value rows with hairlines
   ========================================================= */
.speclist { display: block; width: 100%; }
.speclist__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
  border-top: 1px solid var(--rule);
}
.speclist__row:last-child { border-bottom: 1px solid var(--rule); }
.speclist__label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.speclist__val .num {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
}

/* =========================================================
   BUTTONS + LINKS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
/* the ONE filled red surface */
.btn--red {
  background: var(--red);
  color: #fff;
  margin-top: clamp(32px, 4vw, 44px);
}
.btn--red:hover { background: #94131599; background: #8f1316; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.link-underline {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  transition: border-color 0.18s ease;
}
.link-underline:hover { border-bottom-color: var(--ink); }

.tel { text-decoration: none; font-weight: 500; }
.tel--big { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; line-height: 1.1; }

/* =========================================================
   PRODUKTBLAD — the datasheet table
   ========================================================= */
.dsheet {
  grid-column: 1 / span 12;
  border-top: 1px solid var(--rule-strong);
}
.dsheet__head {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.6fr;
  gap: var(--colgap);
  padding-block: 14px;
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.dsheet__row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.6fr;
  gap: var(--colgap);
  padding-block: 24px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.dsheet__c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dsheet__c .lbl {
  display: none; /* labels visible on mobile only */
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-40);
}
.dsheet__c .mono { font-size: 15px; color: var(--ink); }
.fam__name { font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.01em; }
.fam__note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: 0.01em;
}
.dsheet__c--doc { gap: 8px; }
.doclink {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 2px;
  width: fit-content;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.doclink:hover { border-bottom-color: var(--red); color: var(--red); }
.doclink--req { color: var(--ink-70); }
.dsheet__foot {
  grid-column: 1 / span 12;
  margin-top: 22px;
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* =========================================================
   SERVICE
   ========================================================= */
.warranty {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--colgap);
  row-gap: clamp(36px, 5vw, 52px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(36px, 5vw, 52px);
}
.warranty__nums {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi__val { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 600; line-height: 0.95; }
.kpi__val .num, .kpi__val.mono { font-size: inherit; }
.kpi__lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.warranty__detail { grid-column: 7 / span 6; }
.warranty__line { color: var(--ink-70); max-width: 46ch; margin-bottom: 26px; }
.grouplist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.grouplist li {
  font-size: 14px;
  color: var(--ink);
  padding-block: 11px;
  border-top: 1px solid var(--rule);
}

.depots {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--colgap);
  margin-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(32px, 4vw, 44px);
}
.depot { display: flex; flex-direction: column; gap: 6px; }
.depot__city { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.depot__addr { font-size: 14px; color: var(--ink-70); }
.depot__role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.depot .tel { margin-top: 6px; font-size: 1.05rem; color: var(--ink); }
.depot--jour .tel--big { margin-top: 4px; }

/* =========================================================
   BEGAGNAT & DEMO
   ========================================================= */
.begagnat__agg {
  grid-column: 1 / span 7;
  max-width: 520px;
}
.begagnat__intro {
  grid-column: 1 / span 12;
  margin-top: clamp(28px, 4vw, 40px);
  color: var(--ink-70);
  max-width: 56ch;
}
.cards {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--colgap);
  margin-top: clamp(36px, 5vw, 52px);
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(28px, 4vw, 40px);
}
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 20px;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.card__badge {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.badge--demo { background: var(--red); color: #fff; }
.badge--beg { background: transparent; color: var(--ink); border: 1px solid var(--rule-strong); }
.card__fam { font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em; }
.card__type { font-size: 13px; color: var(--ink-55); }

.begagnat__cta {
  grid-column: 1 / span 12;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 52px);
}

/* =========================================================
   CTA / KONTAKT
   ========================================================= */
.contacts {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--colgap);
  border-top: 1px solid var(--rule-strong);
  padding-top: clamp(32px, 4vw, 44px);
}
.contact { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.contact__role {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-55);
}
.contact__name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.contact .tel--big { margin-top: 4px; color: var(--ink); }
.contact .link-underline { margin-top: 6px; font-size: 14px; color: var(--ink-70); }

.offert {
  grid-column: 1 / span 12;
  margin-top: clamp(44px, 6vw, 68px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(32px, 4vw, 44px);
}
.offert__title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-bottom: 22px;
}
.offert__fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--colgap);
  margin-bottom: 28px;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field__lbl {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-55);
}
.field input {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  padding: 10px 0;
  border-radius: 0;
  transition: border-color 0.18s ease;
}
.field input::placeholder { color: var(--ink-40); }
.field input:focus { outline: none; border-bottom-color: var(--red); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  border-top: 1px solid var(--rule-strong);
  padding-block: clamp(48px, 7vw, 80px) 40px;
}
.footer__inner { row-gap: 32px; }
.footer__col {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.footer__col a { text-decoration: none; color: var(--ink-70); transition: color 0.18s ease; }
.footer__col a:hover { color: var(--ink); }
.footer__logo { height: 22px; width: auto; }
.footer__tag { font-size: 12px; color: var(--ink-55); letter-spacing: 0.04em; }
.footer__copy {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding-inline: var(--gutter);
  font-size: 12px;
  color: var(--ink-40);
}

/* =========================================================
   STICKY MOBILE RING BAR (<768px)
   ========================================================= */
.ringbar {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}
.ringbar__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  text-decoration: none;
  color: var(--ink);
  border-right: 1px solid var(--rule);
}
.ringbar__btn--jour { border-right: none; }
.ringbar__role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.ringbar__num { font-size: 15px; font-weight: 600; }
.ringbar__btn--jour .ringbar__num { color: var(--red); }

/* =========================================================
   MOTION — minimal, choreographed reveals
   ========================================================= */
.reveal { opacity: 0; transform: translateY(8px); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }

/* prefers-reduced-motion: everything static & visible, numbers final */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero__text { grid-column: 1 / span 12; }
  .hero__media { grid-column: 1 / span 12; margin-top: 12px; }
  .dsheet__head { display: none; }
  .dsheet__row {
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    padding-block: 26px;
  }
  .dsheet__c--fam { grid-column: 1 / span 2; }
  .dsheet__c--doc { grid-column: 1 / span 2; flex-direction: row; flex-wrap: wrap; gap: 14px 20px; }
  .dsheet__c .lbl { display: block; }
  .warranty__nums { grid-column: 1 / span 12; flex-direction: row; flex-wrap: wrap; gap: 32px 48px; }
  .warranty__detail { grid-column: 1 / span 12; }
  .depots { grid-template-columns: 1fr; gap: 28px; }
  .begagnat__agg { grid-column: 1 / span 12; }
  .cards { grid-template-columns: 1fr 1fr; }
  .contacts { grid-template-columns: 1fr; gap: 32px; }
  .offert__fields { grid-template-columns: 1fr; }
  .footer__col { grid-column: span 6; }
}

@media (max-width: 768px) {
  body { padding-bottom: 76px; } /* clear sticky ring bar */
  .ringbar { display: grid; }
  .nav__links { display: none; }
  .nav__logo { grid-column: 1 / span 12; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .grouplist { grid-template-columns: 1fr; }
  .speclist__row { gap: 16px; }
  .begagnat__cta { flex-direction: column; align-items: flex-start; gap: 18px; }
}
