/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --text: #0f2f3a;
  --accent: #0077ff;

  /* Typografi-skala (let reduceret) */
  --fs-300: clamp(0.86rem, 0.83rem + 0.16vw, 0.96rem);
  --fs-400: clamp(0.95rem, 0.86rem + 0.28vw, 1.04rem); /* brødtekst */
  --fs-500: clamp(1.03rem, 0.92rem + 0.42vw, 1.14rem);
  --fs-600: clamp(1.16rem, 1.0rem + 0.7vw, 1.30rem);
  --fs-700: clamp(1.28rem, 1.12rem + 1.0vw, 1.64rem);
  --fs-800: clamp(1.68rem, 1.38rem + 1.8vw, 2.15rem);
  --fs-900: clamp(1.95rem, 1.65rem + 2.3vw, 2.55rem);   /* H1 */

  --lh-tight: 1.13;
  --lh-snug: 1.22;
  --lh-normal: 1.44;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 56px;

  /* Chrome-højder til låsning */
  --header-h: 44px;   /* kompakt header */
  --footer-h: 24px;   /* kompakt footer */

  /* Introduktion: nudge for at få billed-top til at flugte med 1. tekstlinje */
  --intro-align-nudge: 22px;

  /* Hero-scrim for læsbarhed over baggrundsbillede */
  --hero-scrim: rgba(255,255,255,0.25);
}

/* ---------- Font: Inter (variable) ---------- */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-VariableFont_opsz,wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Inter", Arial, sans-serif;
  font-size: var(--fs-400);
  line-height: var(--lh-normal);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
}

/* Standard links (ikke header) */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Container ---------- */
.container {
  width: min(100% - 2rem, 1200px);
  margin-inline: auto;
}

/* ---------- Header / navigation (uden logo) ---------- */
.site-header {
  position: sticky; top: 0;
  height: var(--header-h);
  background: #fff;
  z-index: 10;
  border-bottom: 1px solid transparent;
}
.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: flex-end;
}
.site-nav a {
  margin-left: 18px;
  font-weight: 500;
  font-size: 0.95rem;
  color: #000;            /* sorte links i header */
  text-decoration: none;
}
.site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Overskrifter ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin: 0 0 var(--space-4);
  font-weight: var(--fw-bold);
}
h1 { font-size: var(--fs-900); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-800); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-700); line-height: var(--lh-snug);  font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-600); line-height: var(--lh-snug);  font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-500); line-height: var(--lh-normal); font-weight: var(--fw-medium); }
h6 { font-size: var(--fs-500); line-height: var(--lh-normal); font-weight: var(--fw-regular); }

p { margin: 0 0 var(--space-4); }
small { font-size: var(--fs-300); }

/* Begræns linjelængde for brødtekst */
.prose { max-width: 70ch; }

/* ---------- Forside-hero (bund-højre) ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: end;
  justify-content: end;
  padding: 24px;
  background: #ffffff; /* fallback, hvis billede ikke loader */
  color: var(--text);
}
.hero-inner { text-align: right; }
.hero-title { font-weight: 800; font-size: clamp(1.85rem, 1.45rem + 2.1vw, 2.6rem); line-height: 1.08; }
.hero-sub   { font-weight: 500; font-size: clamp(0.96rem, 0.92rem + 0.45vw, 1.22rem); }
.hero-date  { font-weight: 500; font-size: clamp(0.9rem, 0.86rem + 0.4vw, 1.12rem); }

/* Helsides baggrundsbillede for forsiden */
.hero--image {
  position: relative;

  /* Baseline: JPEG (layer 2 som solid fallback) */
  background-image: url("/assets/img/hero-poster.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Moderne browsere: WebP via image-set (layer 1) + JPEG fallback som layer 2
     -> hvis WebP 404'er, vises JPG stadig */
  background-image:
    -webkit-image-set(
      url("/assets/img/hero-poster.webp") type("image/webp") 1x,
      url("/assets/img/hero-poster.jpg")  type("image/jpeg") 1x
    ),
    url("/assets/img/hero-poster.jpg");
  background-image:
    image-set(
      url("/assets/img/hero-poster.webp") type("image/webp") 1x,
      url("/assets/img/hero-poster.jpg")  type("image/jpeg") 1x
    ),
    url("/assets/img/hero-poster.jpg");
}

/* Lys scrim for læsbarhed */
.hero--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
  z-index: 0;
}

/* Hero-tekst: hvid */
.hero--image .hero-inner { position: relative; z-index: 1; color: #fff; }

/* ---------- (TOC-styles findes stadig, men vi viser ikke TOC på forsiden) ---------- */

/* ---------- Generisk side-layout ---------- */
.page {
  min-height: 100svh;
  display: block;
  padding: 8px 0 0;
  background: #ffffff;
  color: var(--text);
}
.page-header { margin: 2px 0 10px; }
.muted { opacity: 0.75; }

/* ---------- Introduktion: strammere + viewport-låst ---------- */
.intro-title {
  font-size: clamp(1.85rem, 1.5rem + 1.9vw, 2.4rem);
  margin-bottom: 6px;
}
.intro-prose { 
  max-width: 60ch; 
  font-size: 0.95rem;
}
.intro-prose p { margin-bottom: 8px; line-height: 1.38; }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(300px, 480px) 1fr;
  gap: 20px;
  align-items: start;
}
.map-figure { margin: 0; }
.map-figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
.fig-credit {
  font-size: 0.8rem;
  opacity: 0.65;
  font-style: italic;
  margin-top: 4px;
  text-align: right;
}

/* Låsning + præcis top-justering på ≥1024px */
@media (min-width: 1024px){
  body.intro-lock { overflow: hidden; }
  .page--intro {
    height: calc(100svh - var(--header-h) - var(--footer-h));
    overflow: hidden;
  }
  .page--intro > .container {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
  }
  .intro-grid {
    height: 100%;
    grid-template-columns: minmax(300px, 470px) 1fr;
    gap: 18px;
  }
  .intro-prose { max-height: 100%; overflow: clip; }

  /* Flyt billedet op uden at påvirke layout-flowet */
  .map-figure picture { 
    display: block;
    transform: translateY(calc(-1 * var(--intro-align-nudge)));
  }
  .map-figure img {
    height: 100%;
    width: 100%;
    object-fit: contain;
  }
}

/* Side-fod */
.page-footer small {
  display: block;
  text-align: center;
  opacity: 0.7;
  padding: 6px 0;
  height: var(--footer-h);
}

/* kun H1 i hero på forsiden */
.hero--image .hero-title {
  color: #ffffff;   /* sæt din ønskede farve her */
}

