/* Samma designsystem som christoffergullin.se, men med höstgrön accent i stället för blå. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/FamiljenGrotesk-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #f6f7f8;
  --surface: #e7e9e3;
  --line: var(--surface);
  --line-strong: #7f867a;
  --ink: #1f2620;
  --ink-muted: #5a6358;
  --accent: #3f5a2a;
  --accent-hover: #2d4220;
  --on-accent: #ffffff;
  --focus: var(--accent);

  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: Newsreader, Georgia, "Times New Roman", serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --measure: 68ch;
  --container: 1200px;
  --gutter: var(--space-4);
  --section-y: var(--space-16);
}

@media (min-width: 720px) {
  :root {
    --gutter: var(--space-8);
    --section-y: var(--space-24);
  }
}

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

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

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

@media (min-width: 720px) {
  body {
    font-size: 19px;
  }
}

/* ---------- Typografi ---------- */

h1,
h2,
h3 {
  font-family: var(--sans);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

@media (min-width: 720px) {
  h2 {
    font-size: 34px;
  }
}

p {
  margin: 0 0 var(--space-4);
  text-wrap: pretty;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
}

@media (min-width: 720px) {
  .lead {
    font-size: 22px;
  }
}

.meta {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

address {
  font-style: normal;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.band {
  background: var(--surface);
}

.rule-top {
  border-top: 1px solid var(--line);
}

.measure {
  max-width: var(--measure);
}

.split {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 720px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-12);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--sans);
  font-weight: 500;
  border-radius: 2px;
}

.skip-link:focus {
  top: var(--space-4);
  color: var(--on-accent);
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn--secondary {
  background: transparent;
  color: var(--accent);
}

.btn--secondary:hover {
  border-color: var(--accent-hover);
  color: var(--accent-hover);
  background: var(--surface);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  min-height: 72px;
  padding-block: var(--space-3);
}

.site-header__logo {
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 720px) {
  .site-header__logo {
    font-size: 26px;
  }
}

.site-header__logo:hover {
  color: var(--accent-hover);
}

.site-nav a {
  display: inline-block;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Hero ---------- */

.hero__top {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-12) var(--space-16);
}

.hero__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

@media (min-width: 960px) {
  .hero__top {
    grid-template-columns: 7fr 5fr;
    align-items: center;
    gap: var(--space-12);
    padding-block: var(--space-24);
  }
}

.hero__side .lead {
  margin-bottom: var(--space-6);
}

/* ---------- Verksamhet ---------- */

.verksamhet + .verksamhet {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--line-strong);
}

.verksamhet--huvud h3 {
  font-size: 30px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
}

/* ---------- Företagsuppgifter ---------- */

.fakta {
  margin: 0;
}

.row {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-top: 1px solid var(--line-strong);
}

.row dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
}

.row__meta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
}

@media (min-width: 720px) {
  .row--wide-label {
    grid-template-columns: 7rem 1fr;
    gap: var(--space-6);
  }
}

#verksamhet,
#foretaget {
  scroll-margin-top: var(--space-4);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
}

.site-footer__bottom p {
  margin: 0;
}
