:root {
  --paper: #ffffff;
  --soft: #f8f7f4;
  --soft-green: #eef3f1;
  --soft-rose: #f7efec;
  --ink: #242424;
  --muted: #686868;
  --line: #e7e6e2;
}

* { box-sizing: border-box; }

html { color: var(--ink); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  line-height: 1.72;
}

body p,
body .lato_thin,
body .lato_light,
body .lato_regular,
body .lato_black {
  color: var(--ink);
  font-family: "Open Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.72;
}

body h1,
body h2,
body h3,
body h4 {
  color: var(--ink);
  font-family: "IM Fell Double Pica", serif;
  font-weight: 400;
  line-height: 1.08;
}

button, a { font: inherit; }
a { color: var(--ink); }

/* Gemensamt skal för appfamiljen. */
.ecosystem-header {
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}

.ecosystem-header-inner {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 24px 6.5%;
}

.ecosystem-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: .68rem;
  line-height: 1.35;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ecosystem-brand a,
.ecosystem-brand img { display: block; }
.ecosystem-brand img { width: 58px; height: 58px; object-fit: cover; }

.ecosystem-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ecosystem-nav a { color: inherit; text-decoration: none; }
.ecosystem-nav a:hover,
.ecosystem-nav a:focus-visible,
.ecosystem-nav .current { text-decoration: underline; text-underline-offset: 5px; }
.ecosystem-nav .current { text-decoration-thickness: 2px; }

.ecosystem-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.ecosystem-hamburger { display: grid; width: 23px; gap: 5px; }
.ecosystem-hamburger span { display: block; width: 100%; height: 1.5px; background: currentColor; }

/* Produkttoppen följer Fot++ men låter Rallyslingans bilder stå för färgen. */
.product-hero { background: var(--paper); }

.product-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, .92fr);
  gap: clamp(54px, 8vw, 104px);
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 86px 0 92px;
}

.product-identity {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.product-icon {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 22px;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.product-identity h1 { margin: 0; font-size: clamp(2.8rem, 5vw, 4.25rem); }
.product-subtitle { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.product-description { margin-top: 48px; }
.product-description h2 { max-width: 650px; margin: 0 0 22px; font-size: clamp(2rem, 3.5vw, 3.15rem); }
.product-intro { max-width: 650px; margin: 0; color: #4d4d4d; font-size: 1.08rem; }

.store-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.store-links a,
.store-links img { display: block; }
.store-links img { width: 150px; height: auto; }

.product-hero-media { display: grid; place-items: center; }
.product-hero-media img {
  display: block;
  width: min(285px, 100%);
  max-height: 590px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(35, 34, 32, .13));
}

/* Rallyslingans befintliga bilder och texter får rymligare, lugnare ytor. */
.rally-scene {
  width: 100%;
  max-width: none;
  padding: 54px max(24px, calc((100% - 1120px) / 2));
  border-top: 1px solid var(--line);
  background: var(--soft);
}

.rally-scene .row { margin: 0; }
.rally-scene .feature { width: 100%; }
.rally-scene img { max-width: 1040px; margin: 0 auto; }

.intro-overview,
.getting-started,
.tailor-section,
.complement-section,
.guides-section {
  max-width: 1120px;
  padding-top: 82px;
  padding-bottom: 82px;
}

.intro-overview .row,
.getting-started .row,
.tailor-section .row,
.complement-section .row { align-items: center; margin-top: 0 !important; margin-bottom: 0 !important; }

.intro-overview h3,
.getting-started h3,
.tailor-section h3,
.timing-section h3,
.complement-section h3 { margin: 0 0 20px; font-size: clamp(2rem, 3vw, 2.8rem); }

.intro-overview img[src*="Megafon"] { display: block; width: min(170px, 70%) !important; margin: 0 auto; }
.ruta { padding: 30px 3.5%; }

.getting-started { border-top: 1px solid var(--line); }
.getting-started > .row { gap: 30px 0; }
.getting-started > .row > div:first-child img { display: block; max-width: 470px; margin: 0 auto; }
.getting-started > .row > div:last-child > img:first-child { display: block; max-width: 260px; margin: 0 auto 26px; }
.getting-started img[src*="startknapp"] { display: block; width: min(210px, 70%) !important; margin: 24px auto 0; }

.environment-scene { max-width: 1120px; margin-top: 0 !important; padding: 22px 15px 72px; }
.environment-scene .row { justify-content: center; }
.environment-scene img { display: block; width: min(430px, 82%); margin: 0 auto; }

.tailor-section {
  max-width: none;
  padding-right: max(24px, calc((100% - 1120px) / 2));
  padding-bottom: 38px;
  padding-left: max(24px, calc((100% - 1120px) / 2));
  border-top: 1px solid var(--line);
  background: var(--soft-green);
}
.function-heading-with-icon { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.function-heading-with-icon .function-icon { flex: 0 0 auto; width: 82px !important; height: 82px; object-fit: contain; }
.function-heading-with-icon h3 { margin: 0; }
.tailor-section img[src*="TelBana"] { width: min(160px, 55%) !important; margin-bottom: 28px; }
.tailor-section img[src*="valjabana"] { display: block; max-width: 250px; margin: 0 auto; }

.timing-section {
  padding: 24px max(24px, calc((100% - 1120px) / 2)) 82px;
  border-top: 0;
  background: var(--soft-green);
}
.timing-section .row { align-items: center; margin: 0 !important; }
.timing-section .rundrod { margin-left: 0; }
.timing-section .rundrod img { display: block; width: min(250px, 80%); margin: 0 auto; }

/* Den gamla starkt röda funktionsdelen får en mild ton, men behåller ikonerna. */
.tabbar-section { background: var(--soft-rose); }
.feature-overview,
.feature-overview.bg-danger,
.feature-overview .bg-danger,
.feature-overview .card { background: var(--soft-rose) !important; }

.feature-overview { padding: 0 max(24px, calc((100% - 1120px) / 2)) !important; }
.feature-overview > .row,
.feature-overview.feature-overview-last {
  align-items: center;
  margin: 0;
  padding: 68px 0;
  border-top: 0;
}
.feature-overview > .row + .row { border-top: 1px solid var(--line); }
.feature-overview.feature-overview-last { border-top: 1px solid var(--line); }
.feature-overview.feature-overview-last { padding-right: max(24px, calc((100% - 1120px) / 2)); padding-left: max(24px, calc((100% - 1120px) / 2)); }
.feature-overview .text-light { color: var(--ink) !important; }
.feature-overview .card { border: 0; }
.feature-overview .display-3 { margin-top: 16px; font-family: "IM Fell Double Pica", serif; font-size: clamp(2rem, 4vw, 3rem); }
.feature-overview img[src*="Tass_Full"],
.feature-overview img[src*="Hjartafull"],
.feature-overview img[src*="stjarnaFull"],
.feature-overview img[src*="Info_Full"] { width: min(82px, 42%) !important; }
.feature-overview .card-body { padding-right: 6px; padding-left: 6px; }

.complement-section img[src*="Hund"] { display: block; width: min(190px, 75%) !important; margin: 0 auto; }

.guides-section { border-top: 1px solid var(--line); text-align: center; }
.guides-section h1 { margin-bottom: 20px; font-size: clamp(2.3rem, 4vw, 3.7rem); }
.guides-section > .row { margin: 0; }
.guides-section img { display: block; width: min(190px, 48%) !important; margin: 34px auto 12px; }

.related-tools {
  padding: 104px 24px 118px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.related-tools-inner { width: min(1120px, 100%); margin: 0 auto; }
.related-tools h2 { max-width: 720px; margin: 0 0 48px; font-size: clamp(2rem, 4vw, 3.4rem); }
.related-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.related-apps article {
  display: flex;
  min-height: 100%;
  padding: 30px;
  flex-direction: column;
  background: var(--soft);
  border: 1px solid var(--line);
}
.related-apps article > img {
  display: block;
  width: 150px;
  height: 150px;
  margin: 4px auto 30px;
  border-radius: 32px;
  object-fit: contain;
  box-shadow: 0 12px 30px rgba(24, 23, 22, .11);
}
.related-apps article > div { display: flex; flex: 1; flex-direction: column; }
.related-apps h3 { margin: 0 0 14px; font-size: 1.65rem; }
.related-apps p { margin: 0 0 24px; font-size: .96rem; }
.related-apps a { margin-top: auto; color: var(--ink); }

.inline-privacy,
.inline-privacy.bg-danger,
.inline-privacy .bg-danger,
.inline-privacy .jumbotron { background: var(--soft) !important; }
.inline-privacy { padding: 68px 24px; border-top: 1px solid var(--line); }
.inline-privacy .row { margin: 0 !important; }
.inline-privacy .jumbotron { width: min(820px, 100%); margin: 0 auto !important; padding: 0; }
.inline-privacy h1 { margin: 0 0 22px; color: var(--ink) !important; font-size: clamp(2rem, 3vw, 2.8rem); }
.inline-privacy p { margin: 0; color: var(--ink) !important; text-align: left !important; }

.ecosystem-footer {
  padding: 30px 24px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  text-align: center;
  font-size: .85rem;
}
.ecosystem-footer p { margin: 0; font-size: inherit; }
.ecosystem-footer a { color: var(--ink); }

@media (max-width: 767px) {
  .ecosystem-header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; padding: 16px 18px; }
  .ecosystem-brand { gap: 10px; max-width: 210px; font-size: .58rem; }
  .ecosystem-brand img { width: 44px; height: 44px; }
  .ecosystem-menu-button { display: grid; flex: 0 0 auto; place-items: center; }
  .ecosystem-nav { display: none; flex: 1 0 100%; padding-top: 8px; font-size: .84rem; text-transform: none; }
  .ecosystem-nav.is-open { display: grid; }
  .ecosystem-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ecosystem-nav a:last-child { border-bottom: 0; }

  .product-hero-grid { display: block; width: calc(100% - 44px); padding: 58px 0 66px; }
  .product-identity { grid-template-columns: 76px minmax(0, 1fr); gap: 17px; }
  .product-icon { width: 76px; height: 76px; border-radius: 17px; }
  .product-identity h1 { font-size: 2.65rem; }
  .product-subtitle { font-size: .88rem; }
  .product-description { margin-top: 44px; }
  .product-description h2 { font-size: 2.15rem; }
  .product-intro { font-size: 1rem; }
  .store-links img { width: 138px; }
  .product-hero-media { margin-top: 48px; }
  .product-hero-media img { width: min(220px, 72vw); }

  .rally-scene { padding: 34px 0; overflow: hidden; }
  .rally-scene .row { margin: 0; }
  .rally-scene img { width: 135%; max-width: none; margin-left: -17.5%; }

  .intro-overview,
  .getting-started,
  .complement-section,
  .guides-section { padding: 60px 22px; }

  .tailor-section { padding: 60px 22px 32px; }

  .intro-overview .ruta,
  .getting-started .ruta,
  .tailor-section .ruta,
  .timing-section .ruta,
  .complement-section .ruta { padding: 24px 0 0; }

  .intro-overview img[src*="Megafon"] { width: 105px !important; }
  .getting-started > .row > div:first-child { margin: 0 !important; }
  .getting-started > .row > div:first-child img { max-width: 310px; }
  .getting-started > .row > div:last-child > img:first-child { max-width: 220px; }
  .environment-scene { padding: 0 22px 56px; }

  .timing-section .osynlig { display: none; }
  .function-heading-with-icon { gap: 16px; }
  .function-heading-with-icon .function-icon { width: 64px !important; height: 64px; }
  .tailor-section img[src*="TelBana"] { float: none !important; margin-right: auto; margin-left: auto; }
  .tailor-section img[src*="valjabana"] { margin-top: 36px; }

  .timing-section { padding: 24px 22px 60px; }

  .feature-overview { padding: 0 22px !important; }
  .feature-overview > .row,
  .feature-overview.feature-overview-last { display: block; padding: 56px 0; }
  .feature-overview.feature-overview-last { padding-right: 22px; padding-left: 22px; }
  .feature-overview > .row > div,
  .feature-overview.feature-overview-last > div { width: 100%; max-width: 100%; }
  .feature-overview .display-3 { font-size: 2.2rem; }
  .feature-overview img:not([src*="Full"]) { display: block; width: min(220px, 72vw); margin: 22px auto; }
  .feature-overview .card { padding: 0; }

  .guides-section img { width: 150px !important; }

  .related-tools { padding: 68px 22px 74px; }
  .related-tools h2 { margin-bottom: 34px; font-size: 2.15rem; }
  .related-apps { grid-template-columns: 1fr; gap: 16px; }
  .related-apps article { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; padding: 21px; }
  .related-apps article > img { width: 82px; height: 82px; margin: 0; border-radius: 18px; }
  .related-apps h3 { font-size: 1.35rem; }
  .related-apps p { margin-bottom: 8px; font-size: .88rem; line-height: 1.55; }
  .related-apps a { font-size: .86rem; }

  .inline-privacy { padding: 58px 22px; }
  .ecosystem-footer { padding: 28px 22px; font-size: .8rem; }
}

@media (max-width: 390px) {
  .store-links { align-items: flex-start; flex-direction: column; }
  .store-links img { width: 145px; max-width: 100%; }
}
