/* Forsiden efter Riddernes eget designudkast: bannerbilledet som baggrund, nedtælling til
   venstre og tre kort i bunden. Står i ét skærmbillede på computer. */

.forside {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

/* ---------- Hovedflade ---------- */
.fs {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(14px, 2.4vh, 30px);
  padding: 0 var(--side) clamp(14px, 2.6vh, 30px);
  min-height: 0;
}

.fs-helt { align-self: center; display: grid; justify-items: start; padding-top: clamp(14px, 3vh, 34px); }
.fs-etiket {
  margin: 0;
  font-family: "Cinzel", serif; font-weight: 700; font-size: clamp(14px, min(1.2vw, 2.4vh), 22px);
  letter-spacing: .05em; text-transform: uppercase; color: var(--guld);
}
.fs-helt h1 {
  margin: .12em 0 0;
  font-family: "Cinzel", serif; font-weight: 600;
  font-size: clamp(36px, min(4.4vw, 7.4vh), 80px); line-height: 1.05; letter-spacing: .02em;
  text-transform: uppercase; color: var(--elfenben);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.fs-helt h1::after {
  content: ""; display: block; width: clamp(56px, 5.2vw, 96px); height: 5px; border-radius: 3px;
  background: var(--guld); margin-top: clamp(8px, 1.5vh, 16px);
}
.fs-dato {
  display: flex; align-items: center; gap: 14px;
  margin: clamp(10px, 2vh, 22px) 0 0;
  font-size: clamp(15px, min(1.15vw, 2.3vh), 22px); color: var(--elfenben);
}
.fs-dato svg { width: 1.4em; height: 1.4em; flex: none; }

/* Nedtælling i kasser */
.fs-ur { display: flex; gap: clamp(10px, .95vw, 18px); margin: clamp(10px, 2.2vh, 24px) 0 0; }
.fs-ur > div {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: clamp(78px, 7.8vw, 140px);
  padding: clamp(10px, 1.6vh, 18px) clamp(12px, 1.2vw, 22px) clamp(10px, 1.4vh, 16px);
  border: 1.5px solid var(--kant); border-radius: 12px;
  background: rgba(9, 13, 30, .5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fs-ur > div:first-child { min-width: clamp(90px, 8.8vw, 160px); }
.fs-ur dd {
  margin: 0; display: flex;
  font-family: "Cinzel", serif; font-weight: 600;
  font-size: clamp(32px, min(3.2vw, 6.2vh), 58px); line-height: 1; height: 1em; overflow: hidden;
  color: var(--guld);
}
.fs-ur dt { font-weight: 600; font-size: clamp(11px, min(.9vw, 1.8vh), 16px); letter-spacing: .06em; text-transform: uppercase; }
.ciffer { position: relative; width: .64em; height: 1em; overflow: hidden; }
.ciffer .strimmel {
  position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column;
  transition: transform .6s cubic-bezier(.65, .05, .25, 1.12);
  transform: translateY(calc(var(--n, 0) * -1em));
}
.ciffer .strimmel span { height: 1em; display: grid; place-items: center; }
.fs-besked { margin: 18px 0 0; font-family: "Cinzel", serif; font-size: 28px; }

/* Knapper */
.fs-handlinger { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.2vw, 22px); margin-top: clamp(12px, 2.6vh, 28px); }
.fs-knap {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: clamp(46px, 6.4vh, 60px); min-width: clamp(190px, 16vw, 290px); padding: 0 28px;
  border-radius: 7px; border: 1.5px solid rgba(241, 235, 221, .85);
  background: rgba(9, 13, 30, .35); color: var(--elfenben);
  font: inherit; font-weight: 600; font-size: clamp(14px, min(1.05vw, 2.1vh), 19px); letter-spacing: .03em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
}
.fs-knap svg { width: 1.35em; height: 1.35em; flex: none; }
.fs-knap:hover { background: rgba(241, 235, 221, .1); }
.fs-knap.guld {
  border: 0; color: #1a1305;
  background: linear-gradient(180deg, var(--guld-lys), var(--guld) 55%, var(--guld-moerk));
  box-shadow: 0 6px 22px rgba(226, 177, 60, .25), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.fs-knap.guld:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(226, 177, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.fs-knap .pause, .fs-knap[aria-pressed="true"] .spil { display: none; }
.fs-knap[aria-pressed="true"] .pause { display: block; }

/* Herolden */
.fs-herold {
  margin: clamp(10px, 1.8vh, 20px) 0 0; display: flex; gap: 12px; align-items: baseline;
  max-width: 44rem; min-height: 1.5em;
  font-size: clamp(13.5px, min(.95vw, 1.9vh), 17px); line-height: 1.5; color: var(--elfenben);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.fs-herold-navn {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  font-family: "Cinzel", serif; font-weight: 700; font-size: .82em; letter-spacing: .06em; text-transform: uppercase; color: var(--guld);
}
.fs-herold-navn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--guld); animation: blink 2.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Kortene i bunden ---------- */
.fs-kort-raekke {
  display: grid;
  grid-template-columns: 1.45fr 1.65fr 1fr;
  gap: clamp(14px, 1.5vw, 28px);
  height: clamp(170px, 24vh, 250px);
}
.fs-kort-raekke.uden-side { grid-template-columns: 1fr 1fr; }
.fs-kort {
  position: relative; overflow: hidden; min-height: 0;
  border-radius: 12px; border: 1px solid var(--kant);
  background: var(--kortflade);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.fs-foto-link { position: absolute; inset: 0; display: block; color: inherit; text-decoration: none; }
.fs-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .9s ease, transform 6s ease; }
.fs-foto #karusel-b { opacity: 0; }
.fs-foto:hover img { transform: scale(1.03); }
.fs-foto-link::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 20, .85) 0%, rgba(5, 8, 20, .35) 38%, rgba(5, 8, 20, 0) 62%);
}
.fs-foto-tekst {
  position: absolute; left: clamp(18px, 2vw, 34px); bottom: clamp(14px, 2vh, 24px); right: 90px; z-index: 1;
  display: grid; gap: 6px;
}
.fs-foto-tekst strong {
  font-family: "Cinzel", serif; font-weight: 600; font-size: clamp(19px, min(1.6vw, 3.2vh), 30px);
  line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; transition: opacity .4s;
}
.fs-foto-tekst span { display: flex; align-items: center; gap: 10px; font-size: clamp(13px, .95vw, 17px); }
.fs-foto-tekst span::before {
  content: ""; width: 1.3em; height: 1.05em; flex: none;
  background: var(--guld);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1.5' y='1.5' width='21' height='17' rx='2'/%3E%3Ccircle cx='8' cy='7' r='2'/%3E%3Cpath d='m1.5 16 6-6 5 5 3-3 6.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='1.5' y='1.5' width='21' height='17' rx='2'/%3E%3Ccircle cx='8' cy='7' r='2'/%3E%3Cpath d='m1.5 16 6-6 5 5 3-3 6.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fs-foto-tekst span:empty { display: none; }
.fs-pil {
  position: absolute; right: clamp(16px, 1.8vw, 30px); bottom: clamp(14px, 2vh, 24px); z-index: 2;
  display: grid; place-items: center; width: clamp(42px, 3vw, 54px); aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid rgba(241, 235, 221, .9); background: rgba(5, 8, 20, .35); color: var(--elfenben); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.fs-pil:hover { background: rgba(226, 177, 60, .2); border-color: var(--guld); }
.fs-pil svg { width: 55%; height: 55%; }

.fs-tekstkort { padding: clamp(16px, 2.2vh, 26px) clamp(20px, 2.2vw, 40px); display: flex; flex-direction: column; }
.fs-tekst-ikon { width: clamp(40px, 3.4vw, 60px); height: auto; color: var(--guld); flex: none; }
.fs-tekst {
  margin-top: clamp(6px, 1.2vh, 12px); min-height: 0; overflow: hidden;
  font-size: clamp(13.5px, min(.9vw, 1.85vh), 17px); line-height: 1.5; color: var(--elfenben);
}
.fs-tekst h3 {
  margin: 0 0 .25em; font-family: "Cinzel", serif; font-weight: 700;
  font-size: clamp(22px, min(1.8vw, 3.5vh), 36px); line-height: 1.05; letter-spacing: .03em; text-transform: uppercase;
}
.fs-tekst p { margin: 0 0 .4em; }
.fs-tekst > :last-child { margin-bottom: 0; }
.fs-tekst strong { font-weight: 700; }
.fs-tekst a { color: var(--guld-lys); text-underline-offset: 3px; }
.fs-tekst ul { margin: 0 0 .4em; padding-left: 1.2em; }
.fs-guldstreg { display: block; flex: none; width: clamp(56px, 5.2vw, 96px); height: 4px; border-radius: 2px; background: var(--guld); margin-top: auto; }
.fs-tekst + .fs-guldstreg { margin-top: clamp(8px, 1.4vh, 16px); }

.fs-sidebillede img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Computer: alt i ét skærmbillede ---------- */
@media (min-width: 900px) and (min-height: 620px) {
  html, body.forside { height: 100%; overflow: hidden; }
  .forside { height: 100svh; }
}

/* ---------- Mobil ---------- */
@media (max-width: 899px), (max-height: 619px) {

  .fs { grid-template-rows: auto auto; gap: 26px; padding-top: 18px; }
  .fs-helt { padding-top: 22vh; }
  .fs-helt h1 { font-size: clamp(34px, 10vw, 48px); }
  .fs-ur { width: 100%; gap: 8px; }
  .fs-ur > div, .fs-ur > div:first-child { flex: 1; min-width: 0; padding: 10px 4px; }
  .fs-ur dd { font-size: clamp(26px, 8vw, 38px); }
  .ciffer { width: .7em; }
  .fs-handlinger { width: 100%; }
  .fs-knap { flex: 1; min-width: 0; padding: 0 12px; font-size: 13.5px; gap: 8px; }
  .fs-herold { font-size: 14px; flex-direction: column; gap: 4px; }

  .fs-kort-raekke, .fs-kort-raekke.uden-side { grid-template-columns: 1fr; height: auto; }
  .fs-foto { aspect-ratio: 16 / 10; }
  .fs-sidebillede { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .ciffer .strimmel, .fs-foto img { transition: none; }
}
