/* =====================================================================
   Forsidens top («hero») – UDSKIFTELIG DEL
   Hører sammen med skabelon/hero.html, statisk/js/hero.js og statisk/js/hero-kaede.js.
   Nu: H2a «Kæden» (valgt 29. sep 2026). Venstre: overskrift, manchet og citater (som V1).
   Højre: kæden lastbil → faktura → tragt → dashboard tegnet i kode; dashboardet løber ud
   over skærmkanten. Bagved: et gråtonet, kraftigt dæmpet luftfoto af en affaldsplads.
   Dæmpningen er bagt ind i billedfilen (14 % foto på antracit), så der ikke skal filtre til.
   ===================================================================== */
.hero {
  /* afstanden fra gitterets højre kant ud til skærmkanten */
  --udfald: calc(var(--kant) + max(0px, (100vw - var(--maks) - 2 * var(--kant)) / 2));
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: stretch;
  min-height: max(660px, min(100svh, 960px));
  /* Bunden giver plads til cookie-baren, så teksten ikke står klistret op ad den (kun desktop) */
  padding-block: calc(var(--top-h) + var(--s8)) calc(var(--s8) + var(--cookie-bar-h, 0px));
  background: var(--antracit) url("../billeder/hero-baggrund-mobil.webp") center / cover no-repeat;
  color: #fff;
  --fokus: #fff;
}
@media (min-width: 641px) {
  .hero { background-image: url("../billeder/hero-baggrund.webp"); }
}

.hero__indhold { grid-template-rows: auto 1fr; align-items: start; row-gap: var(--s7); width: 100%; }
.hero__tekst { grid-column: 1 / span 6; grid-row: 1; }
.hero h1 {
  font-size: var(--t-h1); font-weight: 600; line-height: 1.02; letter-spacing: -0.028em;
  max-width: 13ch;
}
.hero__deck {
  margin-top: var(--s5); max-width: 54ch;
  font-size: var(--t-s); font-weight: 500; line-height: 1.6; letter-spacing: 0.045em;
  color: rgba(255, 255, 255, 0.9);
}

/* Kæden (lærredet tegnes af hero-kaede.js) */
.hero__figur {
  grid-column: 7 / -1; grid-row: 1 / span 2;
  position: relative; align-self: stretch; min-height: 460px;
  margin-right: calc(-1 * var(--udfald));
}
.hero__figur canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.hero__figur.er-klar canvas { opacity: 1; transform: none; }

/* Rul ned (afløser den gamle Lottie-animation): en rolig pil nederst i midten, kun på større skærme */
.hero__rul {
  position: absolute; left: 50%; bottom: calc(var(--s5) + var(--cookie-bar-h, 0px)); z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; margin-left: -22px;
  color: rgba(255, 255, 255, 0.72); border-radius: var(--r);
  transition: color .15s, transform .2s var(--ease);
}
.hero__rul .ikon { width: 24px; height: 24px; stroke-width: 1.5; }
.hero__rul:hover { color: #fff; transform: translateY(2px); }

/* Citater – «Stort citat» (valgt 30. sep 2026): ingen flade, større skrift, grønt citat-ikon (Lucide «quote») og grønt navn */
.hero .citater { grid-column: 1 / span 5; grid-row: 2; align-self: end; }
.citater { position: relative; padding-top: 44px; }
.citater::before {
  content: ""; position: absolute; left: 0; top: 0; width: 30px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234fbf7b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z'/%3E%3Cpath d='M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.citater__spor { display: grid; }
.citat { grid-area: 1 / 1; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s var(--ease), visibility 0s .5s; }
.citat.er-aktiv { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .5s var(--ease); }
.citat blockquote p { font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); font-weight: 500; line-height: 1.3; letter-spacing: -.01em; color: #fff; }
/* Nogle oversættelser har kursiv-mærker i citatet (på den gamle side var alle citater kursive) – her står de ens */
.citat blockquote em, .citat blockquote i { font-style: normal; }
.citat figcaption { margin-top: 18px; font-size: .9375rem; color: rgba(255, 255, 255, 0.75); }
.citat figcaption strong { color: var(--gronn-lys); font-weight: 650; }
/* Lille personikon (Lucide «circle-user») foran navnet, i samme grønne farve */
.citat figcaption .ikon { display: inline-block; width: 1.25em; height: 1.25em; margin-right: .4em; vertical-align: -.28em; color: var(--gronn-lys); stroke-width: 1.75; }
.citater__styring { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s4); }
.citater__prikker { display: flex; gap: 4px; margin-left: -8px; }
.citater__prik {
  position: relative; width: 44px; height: 36px; padding: 0; border: 0; background: none;
}
.citater__prik::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; margin-top: -1px;
  background: rgba(255, 255, 255, 0.4); transition: background-color .2s;
}
.citater__prik[aria-current="true"]::after { background: var(--gronn-lys); }
.citater__prik:hover::after { background: rgba(255, 255, 255, 0.8); }
.citater__pause {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45); border-radius: var(--r); background: none; color: #fff;
}
.citater__pause:hover { border-color: #fff; }
.citater__pause .ikon { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.citater__pause .ikon--afspil { display: none; }
.citater__pause.er-pauset .ikon--pause { display: none; }
.citater__pause.er-pauset .ikon--afspil { display: block; }

/* Desktop: overskriften skal kunne stå i seks kolonner */
@media (min-width: 961px) {
  .hero h1 { font-size: min(var(--t-h1), 5.4vw); }
  .hero__figur { margin-top: 10px; }   /* flugter med overskriftens versaler */
}

/* Tablet og mobil: tekst → kæden → citater, dashboardet løber ud til højre */
@media (max-width: 960px) {
  .hero__rul { display: none; }
  .hero { min-height: auto; padding-block: calc(var(--top-h) + var(--s7)) var(--s7); }
  .hero__indhold { grid-template-rows: none; row-gap: var(--s6); }
  .hero__tekst, .hero .citater, .hero__figur { grid-column: 1 / -1; }
  .hero__figur { grid-row: 2; min-height: 0; height: clamp(360px, 120vw, 580px); }
  .hero .citater { grid-row: 3; max-width: 520px; }
}

@media (max-width: 640px) {
  .hero { padding-bottom: var(--s6); }
  .citat blockquote p { font-size: 1.3125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .citater__pause { display: none; }
}
