/* Fonter ligger lokalt (ikke Google Fonts) av personvernhensyn. Begge er OFL-lisensiert. */
@font-face {
  font-family: "Creepster";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/creepster-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
}

:root {
  --bg: #120a1f;
  --bg-2: #1f1033;
  --panel: rgba(36, 20, 56, 0.85);
  --border: rgba(255, 140, 26, 0.25);
  --text: #f3eaff;
  --muted: #b8a6d1;
  --orange: #ff8c1a;
  --orange-dark: #e06a00;
  --green: #7cff6b;
  --danger: #ff6b6b;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse at top, #3a1a5c 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 60%);
  background-color: var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, .title {
  font-family: "Creepster", "Nunito", cursive;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
}

a { color: inherit; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Pynt ---------- */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.moon {
  position: absolute;
  top: 24px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8d6, #f5d66b 70%);
  box-shadow: 0 0 60px 20px rgba(245, 214, 107, 0.25);
  opacity: 0.85;
}
.bat {
  position: absolute;
  font-size: 28px;
  filter: brightness(0.3) drop-shadow(0 0 4px rgba(0,0,0,.6));
  animation: fly 14s linear infinite;
}
.b1 { top: 12%; animation-delay: 0s; }
.b2 { top: 30%; font-size: 20px; animation-delay: -5s; animation-duration: 18s; }
.b3 { top: 55%; font-size: 24px; animation-delay: -10s; animation-duration: 16s; }
.ghost {
  position: absolute;
  font-size: 42px;
  opacity: 0.18;
  animation: float 6s ease-in-out infinite;
}
.g1 { bottom: 8%;  left: 6%; }
.g2 { top: 22%;    left: 4%;   font-size: 30px; opacity: 0.12; animation-duration: 7s;  animation-delay: -2s; }
.g3 { top: 42%;    right: 5%;  font-size: 52px; opacity: 0.14; animation-duration: 8s;  animation-delay: -4s; }
.g4 { top: 68%;    left: 45%;  font-size: 26px; opacity: 0.10; animation-duration: 5s;  animation-delay: -1s; }
.g5 { bottom: 20%; right: 12%; font-size: 36px; opacity: 0.16; animation-duration: 9s;  animation-delay: -6s; }
@keyframes fly {
  0%   { transform: translate(-10vw, 0) rotate(-8deg); }
  25%  { transform: translate(25vw, -30px) rotate(8deg); }
  50%  { transform: translate(55vw, 10px) rotate(-8deg); }
  75%  { transform: translate(85vw, -20px) rotate(8deg); }
  100% { transform: translate(115vw, 0) rotate(-8deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@keyframes flicker {
  0%, 100% { text-shadow: 0 0 12px var(--orange), 0 0 30px rgba(255,140,26,.5); }
  50%      { text-shadow: 0 0 6px var(--orange), 0 0 16px rgba(255,140,26,.3); }
}

/* ---------- Layout ---------- */
.hero, main, footer {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.hero {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 32px;
}
.kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 10, 31, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.hero h1 {
  font-size: clamp(56px, 17vw, 104px);
  line-height: 1;
  color: var(--orange);
  animation: flicker 3s ease-in-out infinite;
  overflow-wrap: anywhere;
}
.when {
  font-size: 20px;
  font-weight: 800;
  margin: 12px 0 24px;
}
.deadline {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

main { display: grid; gap: 20px; padding-bottom: 32px; }

/* ---------- Kort ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: 1 / -1; }
}
.card, .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card { padding: 18px 20px; }
.cards .card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
}
.cards .card > :not(.icon):not(h2) { grid-column: 1 / -1; justify-self: start; }
.card .icon { font-size: 28px; line-height: 1; }
.card h2 { font-size: 26px; line-height: 1.2; color: var(--orange); }
.card p { margin: 6px 0 0; }

.panel { padding: 24px 20px; }
.title {
  font-size: 40px;
  text-align: center;
  color: var(--orange);
}
.title.small { font-size: 30px; }
.contact { text-align: center; }
.contact p { margin: 8px 0 0; }

/* ---------- Knapper og lenker ---------- */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  min-height: 52px;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  color: #1a0d00;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
  box-shadow: 0 6px 20px rgba(255, 140, 26, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.full { width: 100%; }

.link {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  color: var(--orange);
  text-decoration: none;
  cursor: pointer;
}
.link:hover { text-decoration: underline; }

/* ---------- Skjema ---------- */
form { display: grid; gap: 18px; margin-top: 20px; }

.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > span, .field legend {
  font-weight: 800;
  padding: 0;
  margin-bottom: 6px;
}

input[type="text"], input[type="number"], textarea {
  width: 100%;
  font: inherit;
  font-size: 17px; /* ≥16px hindrer zoom på iPhone */
  color: var(--text);
  background: rgba(10, 4, 18, 0.6);
  border: 1px solid rgba(184, 166, 209, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
::placeholder { color: rgba(184, 166, 209, 0.6); }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.segmented label { position: relative; }
.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(184, 166, 209, 0.35);
  background: rgba(10, 4, 18, 0.6);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.segmented input:checked + span {
  background: var(--orange);
  border-color: var(--orange);
  color: #1a0d00;
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 8px;
}
.stepper button {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(184, 166, 209, 0.35);
  background: rgba(10, 4, 18, 0.6);
  color: var(--orange);
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
}
.stepper input {
  text-align: center;
  font-weight: 800;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  cursor: pointer;
}
.check input {
  width: 26px;
  height: 26px;
  margin: 0;
  accent-color: var(--orange);
  cursor: pointer;
}
.link.inline { display: inline; margin: 0; }

.privacy dl { margin: 16px 0 0; }
.privacy dt { font-weight: 800; color: var(--orange); margin-top: 14px; }
.privacy dt:first-child { margin-top: 0; }
.privacy dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.5);
  color: var(--danger);
  font-weight: 600;
}

.success { text-align: center; padding: 16px 0 4px; }
.success .big { font-size: 64px; animation: float 3s ease-in-out infinite; }
.success h3 { margin: 8px 0 4px; font-size: 22px; color: var(--green); }
.success p { margin: 0; }

footer {
  text-align: center;
  color: var(--muted);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

[hidden] { display: none !important; }

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