/* Ridderne af det Runde Bord
   Farver: vaid (woad), tin, guld og en enkelt dråbe rød til seglet. */

:root {
  --nat: #0f1830;
  --nat-2: #16213f;
  --vaid: #22325a;
  --vaid-lys: #34477a;
  --tin: #b8bfcc;
  --tin-moerk: #7d8699;
  --guld: #e0b53b;
  --guld-moerk: #a9821f;
  --segl: #b3302c;
  --lys: #efe9da;
  --lys-dim: rgba(239, 233, 218, 0.72);
  --linje: rgba(184, 191, 204, 0.18);

  --display: "Grenze Gotisch", "UnifrakturMaguntia", serif;
  --tekst: "Familjen Grotesk", system-ui, sans-serif;

  --maal: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-lille: 6px;
  --radius-stor: 14px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--nat);
  color: var(--lys);
  font-family: var(--tekst);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

.skjult {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ramme {
  width: 100%;
  max-width: var(--maal);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Navigation ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
.top.fast {
  position: sticky;
  top: 0;
  background: rgba(15, 24, 48, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linje);
}
.top .ramme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}
.maerke {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
}
.maerke img { width: 40px; height: 40px; }
.maerke span { white-space: nowrap; }
.menu {
  display: flex;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin: 0; padding: 0;
  list-style: none;
}
.menu a {
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.menu a:hover { border-color: var(--tin-moerk); }
.menu a[aria-current="page"] { border-color: var(--guld); }

@media (max-width: 560px) {
  .maerke span { display: none; }
}

/* ---------- Forsidens scene ---------- */

.scene {
  position: relative;
  min-height: max(100svh, 640px);
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-items: end;
}
.scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.scene::after {
  /* bordpladen nederst, som kruset står på */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 92px;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.0) 0 180px, rgba(0,0,0,0.25) 180px 182px),
    linear-gradient(#4a3020, #2c1b11 70%, #1d120b);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
}
.scene::before {
  /* dæmper himlen bag teksten, så den kan læses i alt slags vejr */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 20% 60%, rgba(10, 16, 34, 0.5), transparent 70%);
}
.scene-indhold {
  padding-top: 7rem;
  padding-bottom: calc(92px + clamp(2rem, 6vh, 4rem));
}

.titel {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  max-width: 11ch;
  text-shadow: 0 2px 24px rgba(10, 14, 30, 0.6), 0 1px 2px rgba(10, 14, 30, 0.4);
}
.titel .lille {
  display: block;
  font-size: 0.42em;
  line-height: 1.1;
  color: var(--tin);
  margin-bottom: 0.15em;
}
.motto {
  margin: 1.1rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--lys-dim);
}

/* Nedtælling */
.nedtaelling {
  margin-top: clamp(2rem, 6vh, 3.5rem);
}
.nedtaelling h2 {
  margin: 0 0 0.6rem;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--guld);
}
.tal {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 4vw, 2.75rem);
  margin: 0;
}
.tal div { display: flex; flex-direction: column-reverse; }
.tal dt {
  font-size: 0.9rem;
  color: var(--lys-dim);
}
.tal dd {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.nedtaelling .besked {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0;
}

/* Herolden */
.herold {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  max-width: 34rem;
}
.herold svg { flex: none; width: 28px; height: 28px; color: var(--guld); margin-top: 0.1rem; }
.herold p {
  margin: 0;
  min-height: 3.1em;
  font-size: 1.02rem;
}
.herold .markoer {
  display: inline-block;
  width: 0.5ch;
  margin-left: 1px;
  background: var(--guld);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Vejrchip */
.vejr {
  position: absolute;
  top: 5rem;
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 24, 48, 0.45);
  border: 1px solid var(--linje);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.92rem;
}
.vejr select {
  font: inherit;
  font-size: 0.85rem;
  color: var(--lys);
  background: rgba(239, 233, 218, 0.08);
  border: 1px solid var(--linje);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}
.vejr select option { background: var(--nat-2); }
@media (max-width: 700px) {
  .vejr { top: 4.6rem; left: var(--gutter); right: auto; }
  .scene-indhold { padding-top: 9rem; padding-bottom: 190px; }
}

/* Kruset med damp */
.krus {
  position: absolute;
  right: clamp(1rem, 8vw, 9rem);
  bottom: 54px;
  width: clamp(92px, 12vw, 140px);
  z-index: 1;
  pointer-events: none;
}
.krus svg { width: 100%; height: auto; overflow: visible; }
.damp path {
  fill: none;
  stroke: rgba(239, 233, 218, 0.55);
  stroke-width: 7;
  stroke-linecap: round;
  filter: url(#slor);
  opacity: 0;
  animation: damp 4.8s ease-out infinite;
}
.damp path:nth-child(2) { animation-delay: 1.6s; }
.damp path:nth-child(3) { animation-delay: 3.2s; }
@keyframes damp {
  0%   { opacity: 0;    transform: translateY(18px) scaleY(0.7); }
  25%  { opacity: 0.8; }
  100% { opacity: 0;    transform: translateY(-46px) scaleY(1.25) skewX(-8deg); }
}
@media (max-width: 700px) {
  .krus { right: 1.25rem; width: 80px; bottom: 60px; }
}

/* ---------- Sektioner ---------- */

.afsnit { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.afsnit + .afsnit { padding-top: 0; }
.afsnit-hoved {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.afsnit h2, .sidehoved h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
}
.afsnit-hoved p { margin: 0.4rem 0 0; color: var(--lys-dim); }

.knap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--guld);
  background: transparent;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.knap:hover { background: var(--guld); color: var(--nat); }
.knap.fyldt { background: var(--guld); color: var(--nat); }
.knap.fyldt:hover { background: #f0c95a; }

.rund {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--linje);
  background: rgba(239, 233, 218, 0.05);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.rund:hover { border-color: var(--guld); }
.rund svg { width: 18px; height: 18px; }

/* Karusel */
.karusel { position: relative; }
.karusel-spor {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 46rem);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.karusel-spor::-webkit-scrollbar { display: none; }
.karusel figure {
  margin: 0;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-stor);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--nat-2);
}
.karusel img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.karusel figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.2rem 1rem;
  background: linear-gradient(transparent, rgba(10, 14, 30, 0.85));
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
}
.karusel-styr { display: flex; gap: 0.5rem; align-items: center; }
.prikker { display: flex; gap: 6px; margin-right: 0.5rem; }
.prikker span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tin-moerk);
  transition: background 0.2s, transform 0.2s;
}
.prikker span.aktiv { background: var(--guld); transform: scale(1.3); }

/* Årrække på forsiden */
.aarraekke {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scrollbar-width: thin;
}
.aarraekke a {
  flex: none;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-lille);
  color: var(--tin);
  transition: color 0.15s, background 0.15s;
}
.aarraekke a:hover { color: var(--guld); background: rgba(224, 181, 59, 0.08); }

/* ---------- Galleri ---------- */

.sidehoved {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: 1.5rem;
}
.sidehoved p { margin: 0.6rem 0 0; color: var(--lys-dim); max-width: 40rem; }

.filtre {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}
.filtre button {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--linje);
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
}
.filtre button[aria-pressed="true"] {
  background: var(--lys);
  color: var(--nat);
  border-color: var(--lys);
}

.aarti {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1.5rem;
  padding-block: 2rem;
  border-top: 1px solid var(--linje);
}
.aarti h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--tin);
  position: sticky;
  top: 5rem;
  align-self: start;
}
@media (max-width: 640px) {
  .aarti { grid-template-columns: 1fr; gap: 1rem; }
  .aarti h2 { position: static; }
}
.albumgitter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .albumgitter { grid-template-columns: 1fr 1fr; gap: 1rem 0.75rem; }
  .album h3 { font-size: 1rem; }
}
.album {
  position: relative;
  text-decoration: none;
  display: block;
}
.album .omslag {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-stor);
  overflow: hidden;
  background: var(--nat-2);
  border: 1px solid var(--linje);
}
.album .omslag img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.album:hover .omslag img { transform: scale(1.04); }
.album h3 {
  margin: 0.7rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.album .antal { margin: 0.1rem 0 0; color: var(--lys-dim); font-size: 0.92rem; }

.album.laast .omslag {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 45%, rgba(179, 48, 44, 0.25), transparent 60%),
    repeating-linear-gradient(45deg, var(--nat-2) 0 14px, #1a2649 14px 28px);
}
.segl {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #d0463f, var(--segl) 55%, #7d1e1b);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 -3px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s;
}
.album.laast:hover .segl { transform: rotate(-8deg) scale(1.05); }
.segl svg { width: 30px; height: 30px; color: #f6d7d2; }

.tom {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--tin-moerk);
  font-family: var(--display);
  font-size: 2.2rem;
}

/* Album-visning */
.tilbage {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--lys-dim);
  margin-bottom: 1rem;
}
.tilbage:hover { color: var(--lys); }
.tilbage svg { width: 16px; height: 16px; }
.note {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--guld);
  background: rgba(224, 181, 59, 0.07);
  border-radius: 0 var(--radius-lille) var(--radius-lille) 0;
  max-width: 40rem;
}
.billeder {
  columns: 4 13rem;
  column-gap: 0.75rem;
  padding-bottom: 4rem;
}
.billeder button {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lille);
  overflow: hidden;
  background: var(--nat-2);
  cursor: zoom-in;
  break-inside: avoid;
}
.billeder img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s, transform 0.4s;
}
.billeder img[data-venter] { opacity: 0; }
.billeder button:hover img { transform: scale(1.03); }

/* Lysboks */
.lysboks {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(8, 12, 26, 0.96);
  color: var(--lys);
}
.lysboks[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lysboks::backdrop { background: rgba(8, 12, 26, 0.9); }
.lysboks-top, .lysboks-bund {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem var(--gutter);
}
.lysboks-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 4.5rem;
  touch-action: pan-y;
}
.lysboks-scene img {
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.2s;
}
.lysboks-scene .rund { position: absolute; top: 50%; translate: 0 -50%; }
.lysboks-scene .forrige { left: 1rem; }
.lysboks-scene .naeste { right: 1rem; }
@media (max-width: 640px) {
  .lysboks-scene { padding: 0; }
  .lysboks-scene .rund { display: none; }
}

/* Adgangskode-dialog */
.porten {
  width: min(26rem, calc(100vw - 2rem));
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius-stor);
  border: 1px solid var(--linje);
  background: var(--nat-2);
  color: var(--lys);
  text-align: center;
}
.porten::backdrop { background: rgba(8, 12, 26, 0.8); backdrop-filter: blur(4px); }
.porten .segl { margin: 0 auto 1rem; }
.porten h2 { margin: 0; font-family: var(--display); font-size: 2.1rem; line-height: 1; }
.porten p { margin: 0.5rem 0 1.25rem; color: var(--lys-dim); }
.porten input {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-lille);
  border: 1px solid var(--tin-moerk);
  background: var(--nat);
  color: var(--lys);
}
.porten .fejl { color: #f0938d; min-height: 1.4em; margin: 0.5rem 0 0.75rem; font-size: 0.95rem; }
.porten .knapper { display: flex; gap: 0.6rem; justify-content: center; }
.porten.ryst { animation: ryst 0.4s; }
@keyframes ryst {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ---------- Multimedie ---------- */

.medie-gitter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
  align-items: start;
}
.flade {
  padding: 1.4rem;
  border-radius: var(--radius-stor);
  background: var(--nat-2);
  border: 1px solid var(--linje);
}
.flade h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.flade .under { margin: 0 0 1rem; color: var(--lys-dim); font-size: 0.95rem; }
.flade audio, .flade video { width: 100%; }
.flade.bred { grid-column: 1 / -1; }
.versioner { display: grid; gap: 1rem; margin-top: 1.25rem; }
.versioner p { margin: 0 0 0.35rem; font-weight: 500; }
.flade video { border-radius: var(--radius-lille); background: #000; }
.spotify iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; }
.filliste { list-style: none; margin: 0; padding: 0; }
.filliste li + li { border-top: 1px solid var(--linje); }
.filliste a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  text-decoration: none;
}
.filliste a:hover strong { color: var(--guld); }
.filliste span { display: block; color: var(--lys-dim); font-size: 0.92rem; }
.filliste svg { flex: none; width: 20px; height: 20px; color: var(--guld); }

/* ---------- Fod ---------- */

.fod {
  border-top: 1px solid var(--linje);
  padding-block: 2.5rem;
  color: var(--lys-dim);
}
.fod .ramme {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.fod .motto-fod {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--lys);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .damp path { opacity: 0.35; }
}
