/* ============ Tokens ============ */
:root {
  --blush: #FFE9EF;
  --ink: #33202A;
  --cherry: #E0355F;
  --cherry-dyb: #C21E4E;
  --card: #FFFDF9;
  --sennep: #FFC53D;
  --groen: #2F9E44;
  --linje: rgba(51, 32, 42, 0.18);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --brod: system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  background-color: var(--blush);
  background-image: radial-gradient(rgba(224, 53, 95, 0.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--brod);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; }
p { margin: 0 0 0.75rem; }
.mono { font-family: var(--mono); }
.fineprint { font-size: 0.8rem; opacity: 0.75; }

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

/* ============ Knapper ============ */
.btn {
  font-family: var(--brod);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-ja {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--cherry);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 1rem 2.6rem;
}
.btn-ja:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-ja:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.btn-nej { font-size: 0.95rem; padding: 0.8rem 1.6rem; }
.btn-nej.vrid { animation: vrid 0.3s ease; }
.btn-nej-doed {
  background: #d6d2cf;
  color: #8a8580;
  border-color: #a8a29c;
  cursor: not-allowed;
}

/* Fake systemfejl-popup */
.fejl-overlay[hidden] { display: none; }
.fejl-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(51, 32, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.fejlboks {
  width: min(22rem, 100%);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  text-align: center;
  padding-bottom: 1.25rem;
  animation: ind 0.2s ease both;
}
.fejl-titel {
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: left;
  padding: 0.4rem 0.75rem;
  margin: 0 0 1rem;
}
.fejlboks p:not(.fejl-titel) { padding: 0 1.25rem; }
.fejlboks .btn { margin-top: 0.5rem; padding: 0.55rem 2.2rem; border-radius: 6px; }

@keyframes vrid {
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

/* ============ Hero ============ */
.hero {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 3rem 1.25rem;
}
.hero > * { animation: ind 0.55s ease both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.34s; }
.hero > *:nth-child(6) { animation-delay: 0.42s; }
.hero > *:nth-child(7) { animation-delay: 0.5s; }

@keyframes ind {
  from { opacity: 0; transform: translateY(12px); }
}

.sticker {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: var(--sennep);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0.4rem 1rem;
  transform: rotate(-4deg);
  margin: 0 0 1.25rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cherry-dyb);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8.5vw, 5.2rem);
  max-width: 14ch;
  margin-bottom: 1rem;
}
.accent {
  color: var(--cherry);
  text-decoration: underline wavy var(--sennep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.hero-sub { font-size: 1.1rem; max-width: 38ch; }

.choice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 1.75rem;
  min-height: 5.5rem;
}

.hero .fineprint { margin-top: 1rem; max-width: 42ch; }

.scroll-hint {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 2rem;
}

/* ============ Sektioner ============ */
.section { max-width: 62rem; margin: 0 auto; padding: 4rem 1.25rem; }

.section h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1.75rem; }
.kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cherry-dyb);
  margin-bottom: 0.5rem;
}
.section-intro { max-width: 48ch; margin-bottom: 1.5rem; }

.card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 1.5rem;
}

/* Produktfordele */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.25rem;
}
.feature-emoji { font-size: 2rem; display: block; }
.features h3 { font-size: 1.15rem; margin: 0.5rem 0; }
.features p { font-size: 0.95rem; margin: 0; }

/* Datablad */
.specs { max-width: 42rem; margin: 0; font-size: 0.9rem; }
.spec-raekke {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--linje);
}
.spec-raekke:last-child { border-bottom: none; }
.spec-raekke dt { font-weight: 600; flex-shrink: 0; }
.spec-raekke dd { margin: 0; text-align: right; }

/* Minispil */
.guess-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.gaet { border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
.gaet:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.gaet[aria-pressed="true"] { background: var(--sennep); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.guess-result { min-height: 3rem; font-weight: 600; margin-top: 1.25rem; max-width: 52ch; }
.uniform-foto { max-width: 16rem; margin-top: 0.5rem; }

/* Galleri */
.fotos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.5rem;
}
.foto {
  margin: 0;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 0.75rem 0.75rem 0.5rem;
  transition: transform 0.2s ease;
}
.foto:nth-child(odd) { transform: rotate(-1.2deg); }
.foto:nth-child(even) { transform: rotate(1.1deg); }
.foto:hover { transform: rotate(0); }
.foto img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 6px;
  display: block;
}
.ramme { display: none; }
.foto.mangler img { display: none; }
.foto.mangler .ramme {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-size: 3rem;
  border: 2px dashed var(--ink);
  border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--blush), var(--blush) 12px, var(--card) 12px, var(--card) 24px);
}
.foto figcaption { font-size: 0.85rem; padding: 0.6rem 0.25rem 0.25rem; }

/* Footer-CTA */
.footer-cta { text-align: center; padding-bottom: 6rem; }
.footer-cta p { max-width: 44ch; margin: 0 auto 1.75rem; }

.site-footer { text-align: center; font-size: 0.75rem; opacity: 0.65; padding: 2rem 1.25rem; }

/* ============ Overlay (ja-flow) ============ */
.overlay[hidden] { display: none; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(51, 32, 42, 0.8);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.panel {
  position: relative;
  width: min(34rem, 100%);
  max-height: 90svh;
  overflow-y: auto;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 2rem 1.5rem;
  animation: ind 0.3s ease both;
}
.panel h2 { font-size: 1.7rem; margin-bottom: 0.5rem; padding-right: 2rem; }

.overlay-luk {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--blush);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.valg-liste { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.valg {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  font-family: var(--brod);
  font-size: 1rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.valg:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: #fff; }
.valg-emoji { font-size: 1.6rem; flex-shrink: 0; }
.valg strong { font-family: var(--display); font-weight: 800; display: block; }
.valg small { display: block; font-size: 0.85rem; opacity: 0.8; }

.tilbage {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-top: 1.25rem;
}

/* Kvittering */
.kvittering {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 1.5rem 1.25rem;
  margin-top: 1.25rem;
}
.kv-head { text-align: center; font-weight: 600; font-size: 1rem; letter-spacing: 0.12em; margin-bottom: 0.25rem; }
.kv-sub { text-align: center; font-size: 0.75rem; opacity: 0.7; margin-bottom: 1rem; }
.kv-raekke {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--linje);
}
.kv-raekke dt { flex-shrink: 0; opacity: 0.75; }
.kv-raekke dd { margin: 0; text-align: right; font-weight: 600; }
.kvittering dl { margin: 0; }

.stempel {
  width: max-content;
  margin: 1.5rem auto 0.5rem;
  transform: rotate(-6deg);
  border: 3px double var(--groen);
  border-radius: 8px;
  color: var(--groen);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  padding: 0.45rem 1.1rem;
  animation: stemple 0.45s cubic-bezier(0.2, 2, 0.4, 1) both;
}
@keyframes stemple {
  from { opacity: 0; transform: rotate(-6deg) scale(2.4); }
}

.insta { margin-top: 1.25rem; }
.insta-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}
.insta-felt {
  width: 100%;
  font-family: var(--brod);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
.insta-felt::placeholder { color: var(--ink); opacity: 0.4; }

.kv-knapper { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.kv-knapper .btn-ja { font-size: 1.05rem; padding: 0.85rem 1.5rem; }

/* ============ Konfetti & motion ============ */
#konfetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

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