/* 1. Grundinställningar och färger */
:root {
  --page-background: #f5f1e9;
  --surface: #ffffff;
  --surface-tinted: #e9f0ee;
  --text: #17282d;
  --muted-text: #53656a;
  --nav-background: #123c43;
  --accent: #e56d4b;
  --accent-dark: #a43d22;
  --border: #cbd6d3;
  --content-width: 72rem;
  --shadow: 0 1rem 2.5rem rgb(23 40 45 / 10%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page-background);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.2em;
}

a:focus-visible {
  outline: 0.2rem solid #ffca68;
  outline-offset: 0.2rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
}

code {
  padding: 0.08em 0.3em;
  border-radius: 0.25rem;
  background: #dfe8e5;
  font-size: 0.92em;
}

/* 2. Gemensamma layouthjälpmedel */
.content-width,
.header-inner {
  width: min(100% - 2rem, var(--content-width));
  margin-inline: auto;
}

.narrow-content {
  max-width: 48rem;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-tinted {
  background: var(--surface-tinted);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.eyebrow {
  margin-bottom: 0.55rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #ffad92;
}

.lead {
  max-width: 42rem;
  color: var(--muted-text);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

/* 3. Tillgänglig länk för att hoppa över navigationen */
.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #ffffff;
  background: #000000;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* 4. Sidhuvud och navigation */
.site-header {
  color: #ffffff;
  background: var(--nav-background);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-block: 1rem;
}

.site-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 0.35rem;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  background: rgb(255 255 255 / 16%);
}

nav a[aria-current="page"] {
  box-shadow: inset 0 -0.2rem 0 #ffad92;
}

/* 5. Introduktion och inbäddad film på 3.1 */
.page-intro {
  padding-block: clamp(4rem, 10vw, 8rem);
}

.video-frame {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  background: #0c2227;
  box-shadow: var(--shadow);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  display: grid;
  place-content: center;
  height: 100%;
  padding: 2rem;
  color: #ffffff;
  text-align: center;
}

.video-placeholder span {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  color: var(--nav-background);
  background: #ffffff;
  font-size: 1.5rem;
}

.video-placeholder p,
.caption-note {
  margin-bottom: 0;
}

.caption-note {
  margin-top: 1rem;
  color: var(--muted-text);
  font-size: 0.95rem;
}

/* 6. Innehållskort och textspalter */
.card-grid,
.text-columns {
  display: grid;
  gap: 1.25rem;
}

.info-card {
  padding: 1.5rem;
  border: 0.08rem solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.info-card p:last-child,
.info-card ul:last-child,
.text-columns p:last-child {
  margin-bottom: 0;
}

.info-card ul {
  padding-left: 1.25rem;
}

.source-link {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 0.08rem solid var(--border);
}

.check-list {
  padding-left: 1.25rem;
}

.check-list li + li {
  margin-top: 0.5rem;
}

/* 7. Videobakgrund på 3.2 */
.video-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: min(76vh, 48rem);
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, #173f45, #6f392c);
}

.background-video {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgb(4 24 29 / 82%), rgb(4 24 29 / 42%));
  content: "";
}

.video-overlay {
  align-self: end;
  padding-block: clamp(5rem, 13vw, 9rem);
}

.video-overlay p:last-child {
  max-width: 38rem;
  margin-bottom: 0;
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
}

/* 8. Sidfot */
.site-footer {
  padding: 2rem 1rem;
  color: #dce7e5;
  background: #0d2d33;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* 9. Anpassning för större skärmar */
@media (min-width: 52rem) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .text-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* 10. Minska rörelse när besökaren har valt det i sitt system */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .background-video {
    display: none;
  }
}
