/* KMR Links — delad CSS.
   Bygger på assets/tokens.css (kopia av kmr-tools/tokens/kmr-tokens.css).
   Inga externa typsnitt, inga ikoner från CDN, inga spårningsresurser. */

/* Kompletterande värden. Länkfärgen är mörkare än --kmr-lila för att klara
   4,5:1 mot både vit yta och --ui-bg. CTA-gradienten är något djupare än
   originalorange/cerise av samma skäl; nyansen är densamma. */
:root {
  --ui-link: #64398c;
  --ui-link-hover: #4e2a70;
  --cta-start: #cf3d19;
  --cta-end: #b40b55;
  --cta-hover-start: #b8360f;
  --cta-hover-end: #9c094a;
  --cta-gradient: linear-gradient(100deg, var(--cta-start) 0%, var(--cta-end) 100%);
  --cta-gradient-hover: linear-gradient(100deg, var(--cta-hover-start) 0%, var(--cta-hover-end) 100%);
  --wrap-max: 1120px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ui-font);
  font-size: 1rem; /* 16 px brödtext */
  line-height: 1.6;
  color: var(--ui-text);
  background: var(--ui-bg);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  color: var(--ui-heading);
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--ui-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ui-link-hover);
}

/* Synlig fokusmarkering på alla interaktiva ytor. */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--kmr-darkblue);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header :focus-visible,
.cta :focus-visible {
  outline-color: #ffffff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 10;
  transform: translate(-50%, -130%);
  padding: 10px 18px;
  background: var(--ui-surface);
  color: var(--ui-heading);
  font-weight: 600;
  border-radius: 0 0 var(--ui-radius) var(--ui-radius);
  box-shadow: var(--ui-panel-shadow);
  text-decoration: none;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* --- Sidhuvud ------------------------------------------------------------ */

.site-header {
  background: var(--ui-header-gradient);
  color: var(--ui-header-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--kmr-orange) 0%, var(--kmr-cerise) 100%);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  display: flex;
  flex-direction: column;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
}

.brand-name .brand-sub {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 242, 255, 0.72);
}

.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.lang a {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(245, 242, 255, 0.78);
  text-decoration: none;
}

.lang a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.lang a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ui-heading);
}

/* --- Sektionshuvud ------------------------------------------------------- */

.hero {
  padding-block: clamp(36px, 6vw, 68px) clamp(20px, 3vw, 28px);
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ui-link);
  text-decoration: none;
}

.backlink:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-link);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.lede {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ui-muted);
}

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ui-muted);
}

.proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proof li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kmr-cerise);
  flex: none;
}

/* --- Kort ---------------------------------------------------------------- */

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 26px 24px;
  overflow: hidden;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  box-shadow: var(--ui-card-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--kmr-darkblue) 0%, var(--kmr-lila) 48%, var(--kmr-cerise) 100%);
}

.feature:hover {
  transform: translateY(-2px);
  border-color: var(--ui-border-strong);
  box-shadow: var(--ui-panel-shadow);
}

.feature h2 {
  margin: 4px 0 0;
  font-size: 1.4375rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.feature p {
  margin: 0;
  color: var(--ui-muted);
}

.feature .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.feature .meta span {
  padding: 3px 9px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-surface-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ui-muted);
  white-space: nowrap;
}

.arrow {
  font-size: 1.125rem;
  line-height: 1;
  color: var(--ui-link);
  transition: transform 0.18s ease;
}

.feature:hover .arrow,
.tile:hover .arrow,
.service:hover .arrow,
.genre:hover .arrow,
.platform:hover .arrow {
  transform: translateX(3px);
}

.tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tiles > li {
  display: flex;
}

.tiles > li > .tile {
  width: 100%;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 22px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

a.tile:hover {
  transform: translateY(-2px);
  border-color: var(--ui-border-strong);
  box-shadow: var(--ui-card-shadow);
}

.tile-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.tile h2 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.tile p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ui-muted);
}

.tile .tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
}

.tile .tile-actions a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ui-link);
  text-decoration: none;
  border-bottom: 1px solid rgba(100, 57, 140, 0.35);
}

.tile .tile-actions a.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--ui-radius-sm);
  background-image: linear-gradient(90deg, var(--ui-primary-start), var(--ui-primary-end));
  color: #fff;
  box-shadow: 0 4px 12px rgba(213, 15, 103, 0.22);
}

.tile .tile-actions a.tile-cta:hover,
.tile .tile-actions a.tile-cta:focus-visible {
  background-image: linear-gradient(90deg, var(--ui-primary-hover-start), var(--ui-primary-hover-end));
  border: 0;
}

.tile .tile-actions a:hover {
  border-bottom-color: currentColor;
}

.tile--static {
  background: var(--ui-surface-soft);
}

/* --- Knappar ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: var(--cta-gradient);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--cta-gradient-hover);
  color: #ffffff;
}

.btn-outline {
  background: var(--ui-surface);
  border-color: var(--kmr-lila);
  color: var(--ui-link);
}

.btn-outline:hover {
  background: var(--ui-accent-soft);
  border-color: var(--ui-accent-hover);
  color: var(--ui-link-hover);
}

.btn-light {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--ui-heading);
}

.btn-light:hover {
  background: #f0ecf7;
  color: var(--ui-heading);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* --- Sektioner ----------------------------------------------------------- */

.section {
  padding-block: clamp(32px, 5vw, 52px) 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.section-intro {
  margin: 0 0 22px;
  max-width: 64ch;
  color: var(--ui-muted);
}

.services {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius);
  color: var(--ui-heading);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.service:hover {
  border-color: var(--ui-accent);
  background: var(--ui-surface-soft);
  color: var(--ui-link-hover);
}

.service .tag {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.panel {
  padding: clamp(22px, 4vw, 36px);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-card-shadow);
}

.panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

.panel p {
  margin: 0 0 18px;
  max-width: 64ch;
  color: var(--ui-muted);
}

.embed-frame {
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
  padding: 10px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
}

.embed-frame iframe {
  width: 100%;
  height: 450px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
}

.note {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--ui-muted);
}

.genre-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.genre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-left: 3px solid var(--kmr-lila);
  border-radius: var(--ui-radius-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.genre:hover {
  transform: translateY(-2px);
  border-left-color: var(--kmr-cerise);
  box-shadow: var(--ui-card-shadow);
}

.genre .genre-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.genre .genre-kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.genre strong {
  font-size: 1.0625rem;
  color: var(--ui-heading);
}

.profiles {
  display: grid;
  gap: 10px 28px;
  grid-template-columns: 1fr;
  margin: 22px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid var(--ui-border);
}

.profiles a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ui-link);
  text-decoration: none;
}

.profiles a::after {
  content: "↗";
  font-size: 0.875rem;
}

.profiles a:hover {
  text-decoration: underline;
}

.profiles-label {
  margin: 26px 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.platform-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius);
  color: var(--ui-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.platform:hover {
  transform: translateY(-2px);
  border-color: var(--ui-accent);
  box-shadow: var(--ui-card-shadow);
}

.platform .platform-kind {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ui-muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: clamp(40px, 6vw, 64px);
  padding: clamp(26px, 4.5vw, 44px);
  background: var(--ui-header-gradient);
  border-radius: var(--ui-radius);
  color: var(--ui-header-text);
}

.cta h2 {
  margin: 0 0 8px;
  font-size: clamp(1.3125rem, 1.15rem + 0.9vw, 1.625rem);
  line-height: 1.2;
  color: #ffffff;
}

.cta p {
  margin: 0;
  max-width: 52ch;
  color: rgba(245, 242, 255, 0.8);
}

/* --- Sidfot -------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(48px, 8vw, 80px);
  padding-block: 36px 26px;
  background: #fbf9fc;
  border-top: 1px solid var(--ui-border);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ui-heading);
}

.footer-text {
  margin: 0;
  max-width: 46ch;
  font-size: 0.9375rem;
  color: var(--ui-muted);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  color: var(--ui-text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.social a:hover {
  border-color: var(--kmr-lila);
  color: var(--ui-link-hover);
}

.social svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.footer-head {
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ui-muted);
}

.footer-links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--ui-text);
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ui-link-hover);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-border);
  font-size: 0.875rem;
  color: var(--ui-muted);
}

.footer-bottom a {
  color: var(--ui-muted);
}

.footer-bottom a:hover {
  color: var(--ui-link-hover);
}

/* --- Bredare skärmar ----------------------------------------------------- */

@media (max-width: 559px) {
  .proof {
    flex-direction: column;
    gap: 6px;
  }
}

@media (min-width: 640px) {
  .tiles,
  .genre-grid,
  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  }
}

@media (min-width: 760px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

@media (min-width: 1000px) {
  .tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
