/* ==========================================================================
   Multihus Jystrup — stylesheet
   Design tokens sampled directly from Ditte's mockup (design/mockup-2.png).
   Structure: tokens → reset → typography → components → sections → responsive.
   ========================================================================== */

:root {
  /* Greens — sampled from the hero headline, buttons and icon badges */
  --groen-900: #34462e;
  --groen-800: #3a4e34;
  --groen-700: #44583e; /* headings on light backgrounds */
  --groen-600: #4a6044; /* primary button fill */
  --groen-500: #55704e; /* button hover */

  /* Warm neutrals */
  --cream:      #f7f6f2; /* page background */
  --cream-lys:  #fbf8f3; /* header */
  --sage:       #e4e5dd; /* "Følg rejsen" band */
  --varm:       #ece8e3; /* news panel */
  --sand:       #e6e6df; /* support box */
  --hvid:       #fffdfa;

  --bronze:     #ae794d; /* secondary accent (primary CTA in mockup 1) */
  --bronze-moerk: #96653d;

  /* Ink */
  --tekst:        #3e3c3c;
  --tekst-daempet:#666564;
  --linje:        #dcdad2;

  /* Typography.
     To self-host webfonts (do NOT use the Google Fonts CDN — it is a GDPR
     problem for an EU public-facing site), drop .woff2 files in
     assets/fonts/, add @font-face rules below, and change these two lines.
     The mockup uses a light geometric sans for display (Jost / Poppins Light)
     and a neutral humanist sans for body text (Inter / Source Sans). */
  --font-display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, sans-serif;
  --font-body:    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, sans-serif;

  --trin--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --trin-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --trin-1:  clamp(1.1rem, 1.05rem + 0.25vw, 1.25rem);
  --trin-2:  clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --trin-3:  clamp(1.9rem, 1.5rem + 1.8vw, 3.1rem);

  /* Rhythm */
  --indre-bredde: 1180px;
  --gab:      clamp(1.5rem, 1rem + 2vw, 3rem);
  --sektion:  clamp(3.5rem, 2rem + 5vw, 6.5rem);
  --radius:   4px;
  --radius-stor: 8px;

  --skygge: 0 2px 4px rgba(52, 70, 46, 0.04), 0 12px 32px rgba(52, 70, 46, 0.08);
}

/* ---------- Reset ---------- */

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--tekst);
  font-family: var(--font-body);
  font-size: var(--trin-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--groen-600);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Utilities ---------- */

.indre {
  width: 100%;
  max-width: var(--indre-bredde);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.indre--smal { max-width: 46rem; }

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

.spring-til {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 1.1rem;
  background: var(--groen-600);
  color: var(--hvid);
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.15s ease;
}
.spring-til:focus { top: 1rem; }

/* ---------- Typography ---------- */

.overtitel {
  font-family: var(--font-display);
  font-size: var(--trin--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--groen-700);
}

.overskrift {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--tekst);
  font-size: var(--trin-2);
  text-wrap: balance;
}
.overskrift--stor { font-size: var(--trin-3); }

.overtitel + .overskrift { margin-top: 0.9rem; }

.broedtekst {
  color: var(--tekst-daempet);
  max-width: 62ch;
}
.overskrift + .broedtekst { margin-top: 1.35rem; }

.prosa { margin-top: 1.5rem; color: var(--tekst-daempet); }
.prosa > * + * { margin-top: 1.1rem; }
.prosa h2 {
  font-family: var(--font-display);
  font-size: var(--trin-1);
  font-weight: 500;
  color: var(--tekst);
  margin-top: 2.2rem;
}
.prosa a { color: var(--groen-700); text-underline-offset: 3px; }

/* ---------- Icons ---------- */

.ikon { width: 2.5rem; height: 2.5rem; color: var(--groen-700); flex: none; }
.ikon--stor { width: 3.4rem; height: 3.4rem; }
.pil { width: 1.35rem; height: 0.7rem; flex: none; transition: transform 0.18s ease; }
.chevron { width: 0.6rem; height: 0.4rem; margin-left: 0.35rem; }

/* ---------- Buttons and arrow links ---------- */

.knap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--font-display);
  font-size: var(--trin--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  text-wrap: balance;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.knap--primaer { background: var(--groen-600); color: var(--hvid); }
.knap--primaer:hover { background: var(--groen-500); }

.knap--sekundaer {
  background: rgba(255, 253, 250, 0.9);
  color: var(--groen-700);
  border-color: var(--groen-600);
}
.knap--sekundaer:hover { background: var(--hvid); }

.knap--bronze { background: var(--bronze); color: var(--hvid); }
.knap--bronze:hover { background: var(--bronze-moerk); }

.knap--lille { padding: 0.7rem 1.35rem; white-space: nowrap; }
.knap--fuld { width: 100%; }

.lenke-pil {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: var(--trin--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--groen-700);
}
.lenke-pil:hover .pil { transform: translateX(4px); }
.lenke-pil--tilbage .pil { transform: scaleX(-1); }

/* ==========================================================================
   Header
   ========================================================================== */

.sidehoved {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream-lys);
  border-bottom: 1px solid var(--linje);
}
.sidehoved__indre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gab);
  min-height: 4.6rem;
}
.sidehoved__logo { text-decoration: none; }

.logo { display: inline-flex; align-items: center; gap: 0.85rem; color: var(--groen-800); }
.logo__mark { width: 3rem; height: 2.1rem; }
.logo__ord {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: var(--trin-0);
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.15;
  text-transform: uppercase;
}
.logo__ord-2 { letter-spacing: 0.3em; }

.hovedmenu { display: flex; align-items: center; gap: var(--gab); }
.hovedmenu__liste { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }

.hovedmenu__punkt > a {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: var(--trin--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tekst);
  padding-block: 0.5rem;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.hovedmenu__punkt > a:hover,
.hovedmenu__punkt > a[aria-current] { color: var(--groen-600); }

.hovedmenu__punkt { position: relative; }
.undermenu {
  position: absolute;
  top: 100%;
  left: -1rem;
  min-width: 15rem;
  padding: 0.5rem;
  background: var(--hvid);
  border: 1px solid var(--linje);
  border-radius: var(--radius);
  box-shadow: var(--skygge);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.hovedmenu__punkt:hover .undermenu,
.hovedmenu__punkt:focus-within .undermenu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.undermenu a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: var(--trin--1);
  text-decoration: none;
  border-radius: 3px;
  color: var(--tekst-daempet);
}
.undermenu a:hover { background: var(--cream); color: var(--groen-700); }

.menuknap { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(30rem, 52vw, 44rem);
  padding-block: clamp(3rem, 6vw, 5rem) clamp(6rem, 10vw, 9rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__billede {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 48%;
  z-index: -2;
}
/* Light scrim so the dark-green headline keeps contrast over the render.
   The render is mid-tone on the left, so this needs to be fairly opaque
   there — check any replacement hero image against it. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(251, 248, 243, 0.95) 0%,
    rgba(251, 248, 243, 0.86) 30%,
    rgba(251, 248, 243, 0.45) 55%,
    rgba(251, 248, 243, 0.05) 78%,
    rgba(251, 248, 243, 0) 90%
  );
}

.hero__indre { position: relative; }
.hero__overskrift {
  display: flex;
  flex-direction: column;
  max-width: 15ch;
  font-family: var(--font-display);
  font-size: var(--trin-3);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--groen-700);
}
.hero__broedtekst {
  margin-top: 1.6rem;
  max-width: 34ch;
  color: var(--tekst);
}
.hero__knapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

/* ---------- Fact card overlapping the hero ---------- */

.faktabaand { margin-top: clamp(-5rem, -7vw, -3.5rem); position: relative; z-index: 2; }
.faktakort {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: var(--hvid);
  border-radius: var(--radius-stor);
  box-shadow: var(--skygge);
}
.faktakort__punkt {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: var(--trin--1);
  line-height: 1.55;
  color: var(--tekst-daempet);
}
.faktakort__punkt + .faktakort__punkt {
  border-left: 1px solid var(--linje);
  padding-left: clamp(1.25rem, 3vw, 2.75rem);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.sektion { padding-block: var(--sektion); }
.sektion--lys { background: var(--cream); }

/* ---------- About + values ---------- */

.om__indre {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.vaerdier { display: grid; grid-template-columns: repeat(4, 1fr); }
.vaerdi {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding-inline: clamp(0.75rem, 1.6vw, 1.4rem);
}
.vaerdi + .vaerdi { border-left: 1px solid var(--linje); }
.vaerdi__titel {
  font-family: var(--font-display);
  font-size: var(--trin--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tekst);
}
.vaerdi__tekst { font-size: var(--trin--1); color: var(--tekst-daempet); line-height: 1.6; }

/* ---------- The journey ---------- */

.rejsen { background: var(--sage); }
.rejsen__indre { position: relative; }
.rejsen__tekst {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}
.rejsen__tekst .broedtekst { margin-inline: auto; }
.rejsen__tekst .knap { margin-top: 2rem; }

.polaroid {
  position: absolute;
  top: 50%;
  width: clamp(11rem, 17vw, 15rem);
  padding: 0.55rem 0.55rem 1.5rem;
  background: var(--hvid);
  box-shadow: var(--skygge);
}
.polaroid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.polaroid--venstre { left: 0; transform: translateY(-50%) rotate(-4deg); }
.polaroid--hoejre  { right: 0; transform: translateY(-50%) rotate(3.5deg); }

/* ---------- Document cards ---------- */

.dokumentgitter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.2rem);
}
.dokumentkort { display: flex; flex-direction: column; }
.dokumentkort__medie { position: relative; margin-bottom: 2.1rem; }
.dokumentkort__medie img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.dokumentkort__badge {
  position: absolute;
  left: 0.9rem;
  bottom: -1.4rem;
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--groen-600);
  color: var(--hvid);
  box-shadow: var(--skygge);
}
.dokumentkort__badge .ikon { width: 2.2rem; height: 2.2rem; color: currentColor; }
/* The badge already provides the circular frame */
.dokumentkort__badge .ikon > circle:first-child { display: none; }

.dokumentkort__titel {
  font-family: var(--font-display);
  font-size: var(--trin-1);
  font-weight: 500;
  line-height: 1.3;
  color: var(--tekst);
}
.dokumentkort__tekst {
  margin-top: 0.7rem;
  font-size: var(--trin--1);
  color: var(--tekst-daempet);
}
.dokumentkort .lenke-pil { margin-top: auto; padding-top: 1.2rem; }

/* ---------- News + support ---------- */

.nyhedssektion__indre {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.nyhedspanel {
  background: var(--varm);
  border-radius: var(--radius-stor);
  padding: clamp(1.5rem, 3vw, 2.4rem);
}
.nyhedspanel__hoved {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.nyhedspanel__hoved .lenke-pil { margin-top: 0; }

.nyhedsgitter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.7rem);
}
.nyhedsgitter--liste { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }

.nyhedskort__lenke { display: block; text-decoration: none; }
.nyhedskort__billede {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.nyhedskort__dato {
  display: block;
  margin-top: 1rem;
  font-size: var(--trin--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tekst-daempet);
}
.nyhedskort__titel {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: var(--trin-1);
  font-weight: 500;
  line-height: 1.3;
  color: var(--tekst);
  transition: color 0.18s ease;
}
.nyhedskort__lenke:hover .nyhedskort__titel { color: var(--groen-600); }
.nyhedskort__resume {
  margin-top: 0.5rem;
  font-size: var(--trin--1);
  color: var(--tekst-daempet);
}

.stoetteboks {
  background: var(--sand);
  border-radius: var(--radius-stor);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.stoetteboks__titel {
  font-family: var(--font-display);
  font-size: var(--trin-2);
  font-weight: 400;
  color: var(--tekst);
}
.stoetteboks__tekst {
  margin-top: 1rem;
  font-size: var(--trin--1);
  color: var(--tekst-daempet);
}
.stoetteboks .knap { margin-top: 1.8rem; }
.stoetteboks .lenke-pil { margin-top: 1.1rem; }

/* Fundraising meter (hidden unless forside.stoet.vis_maaler is true) */
.maaler { margin-top: 1.8rem; }
.maaler__tal { display: flex; justify-content: space-between; gap: 1rem; }
.maaler__tal span { display: flex; flex-direction: column; }
.maaler__tal small {
  font-size: var(--trin--1);
  color: var(--tekst-daempet);
}
.maaler__tal strong {
  font-family: var(--font-display);
  font-size: var(--trin-1);
  font-weight: 500;
}
.maaler__bane {
  margin-top: 0.75rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--hvid);
  overflow: hidden;
}
.maaler__fyld { height: 100%; background: var(--groen-600); border-radius: inherit; }
.maaler__procent {
  margin-top: 0.5rem;
  text-align: right;
  font-size: var(--trin--1);
  color: var(--tekst-daempet);
}

/* ---------- Single news article ---------- */

.nyhed__dato {
  display: block;
  margin-bottom: 0.6rem;
  font-size: var(--trin--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tekst-daempet);
}
.nyhed__billede {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-stor);
  margin-top: 2rem;
}
.lenke-pil--tilbage { margin-top: 0; margin-bottom: 2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.sidefod {
  background: var(--cream-lys);
  border-top: 1px solid var(--linje);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.sidefod__indre {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.sidefod__logo { text-decoration: none; }
.sidefod__tekst { font-size: var(--trin--1); color: var(--tekst-daempet); max-width: 34ch; }
.sidefod__tekst .lenke-pil { margin-top: 0.9rem; }

.social-liste { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social-liste a {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--groen-600);
  color: var(--hvid);
  transition: background-color 0.18s ease;
}
.social-liste a:hover { background: var(--groen-500); }
.social-liste svg { width: 1.15rem; height: 1.15rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 68rem) {
  .om__indre { grid-template-columns: 1fr; }
  .vaerdier { grid-template-columns: repeat(4, 1fr); }
  .dokumentgitter { grid-template-columns: repeat(2, 1fr); }
  .nyhedssektion__indre { grid-template-columns: 1fr; }
  .polaroid { display: none; }
}

@media (max-width: 56rem) {
  /* Collapse the header into a toggled panel */
  .menuknap {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    background: none;
    border: 1px solid var(--linje);
    border-radius: var(--radius);
    color: var(--tekst);
  }
  .menuknap__streger,
  .menuknap__streger::before,
  .menuknap__streger::after {
    display: block;
    width: 1.15rem;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .menuknap__streger { position: relative; }
  .menuknap__streger::before,
  .menuknap__streger::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menuknap__streger::before { top: -5px; }
  .menuknap__streger::after  { top: 5px; }

  .menu-aaben .menuknap__streger { background: transparent; }
  .menu-aaben .menuknap__streger::before { transform: translateY(5px) rotate(45deg); }
  .menu-aaben .menuknap__streger::after  { transform: translateY(-5px) rotate(-45deg); }

  .hovedmenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
    background: var(--cream-lys);
    border-bottom: 1px solid var(--linje);
    box-shadow: var(--skygge);
  }
  .menu-aaben .hovedmenu { display: flex; }
  .sidehoved__indre { position: relative; flex-wrap: wrap; }
  .hovedmenu__liste { flex-direction: column; align-items: stretch; gap: 0; }
  .hovedmenu__punkt > a { padding-block: 0.8rem; border-bottom: 1px solid var(--linje); }
  .hovedmenu__punkt > a::after { content: none; }

  /* Sub-navigation is always visible in the mobile panel */
  .undermenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    background: none;
    padding: 0.4rem 0 0.8rem 1rem;
    min-width: 0;
  }
  .chevron { display: none; }
  .sidehoved__cta { margin-top: 0.75rem; }

  .faktakort { grid-template-columns: 1fr; }
  .faktakort__punkt + .faktakort__punkt {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--linje);
    padding-top: 1.25rem;
  }

  .vaerdier { grid-template-columns: repeat(2, 1fr); gap: 2.25rem 0; }
  .vaerdi:nth-child(odd) { border-left: 0; }

  .nyhedsgitter { grid-template-columns: 1fr; }

  .sidefod__indre { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 34rem) {
  .hero { min-height: 0; }
  .hero__overskrift { max-width: none; }
  .hero__knapper .knap { width: 100%; }
  .dokumentgitter { grid-template-columns: 1fr; }
  .nyhedspanel__hoved { flex-direction: column; align-items: flex-start; }
}
