:root {
  --bg: #162144;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.17);
  --text: #f3f6fc;
  --muted: #aebfd8;
  --accent: #ef2440;
  --accent-deep: #c9112c;
  --accent-blue: #5b93e0;
  --radius: 16px;
  --maxw: 620px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #2a3d74 0%, #1c2a52 48%, #162144 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Lyspunkt øverst + diskret norsk-rødt skjær på blå Bonum-bakgrunn */
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 620px at 50% -12%, rgba(104, 132, 214, 0.30), transparent 62%),
    radial-gradient(720px 520px at 86% 4%, rgba(239, 36, 64, 0.12), transparent 55%);
  animation: glowPulse 7s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Logo helt øverst, midtstilt */
.brand {
  width: clamp(128px, 36vw, 172px);
  height: auto;
  display: block;
  margin: 0 auto 24px;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.35));
  animation: rise 0.6s ease both;
}

.brand-foot { margin: 30px auto 4px; animation-delay: 0.3s; }

.hero { text-align: center; padding: 2px 0 6px; }
.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  animation: rise 0.6s 0.06s ease both;
}
.flag {
  display: inline-flex;
  width: 24px;
  height: 17px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.flag svg { width: 100%; height: 100%; display: block; }

.hero h1 {
  font-family: "Anton", "Inter", sans-serif;
  font-size: clamp(64px, 20vw, 120px);
  line-height: 0.86;
  margin: 0;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 38%, #cdd8ea 50%, #ffffff 62%, #ffffff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.6s 0.1s ease both, sheen 9s 1s ease-in-out infinite;
}
.hero h1 .vs {
  display: block;
  font-size: 0.4em;
  letter-spacing: 0.05em;
  margin-top: 8px;
}
@keyframes sheen {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}
.subhead {
  font-family: "Anton", "Inter", sans-serif;
  font-size: clamp(18px, 5.4vw, 26px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 10px 0 0;
  color: var(--accent);
  animation: rise 0.6s 0.16s ease both;
}
.tagline { margin: 16px 0 0; color: var(--muted); font-weight: 500; font-size: 15px; animation: rise 0.6s 0.22s ease both; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 34px 0 26px; }
.fact {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  animation: rise 0.6s ease both;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.fact:nth-child(1) { animation-delay: 0.26s; }
.fact:nth-child(2) { animation-delay: 0.32s; }
.fact:nth-child(3) { animation-delay: 0.38s; }
.fact:nth-child(4) { animation-delay: 0.44s; }
.fact:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.26); background: var(--surface-strong); }
.fact-ico { font-size: 22px; line-height: 1.2; }
.fact strong { display: block; font-size: 14px; font-weight: 600; }
.fact small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
  animation: rise 0.6s 0.5s ease both;
}
.card h2 { font-size: 20px; margin: 0 0 6px; font-weight: 700; }
.card-lead { color: var(--muted); margin: 0 0 20px; font-size: 14.5px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.hint { color: var(--muted); font-weight: 400; }

input, select {
  width: 100%;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 12px 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #8294b0; }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(239, 36, 64, 0.18);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aebfd8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { color: #111; }

button {
  position: relative; width: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #fff; border: none; border-radius: 11px;
  font: inherit; font-weight: 700; font-size: 16px;
  padding: 14px; cursor: pointer; margin-top: 4px; overflow: hidden;
  transition: transform 0.08s, filter 0.15s, opacity 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 20px rgba(239, 36, 64, 0.30);
}
button::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg); transition: left 0.5s ease;
}
button:hover { filter: brightness(1.06); box-shadow: 0 8px 26px rgba(239, 36, 64, 0.38); }
button:hover::after { left: 140%; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: default; box-shadow: none; }
button:disabled::after { display: none; }

.form-msg { margin: 14px 0 0; font-size: 14px; }
.form-msg.error { color: #ff8095; }
.form-msg.success { color: #6fe39a; }

.confirmed { text-align: center; padding: 8px 0 4px; animation: rise 0.45s ease both; }
.confirmed .check {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(111, 227, 154, 0.15); border: 1px solid rgba(111, 227, 154, 0.4);
  display: grid; place-items: center; margin: 0 auto 14px; font-size: 28px; color: #6fe39a;
  animation: pop 0.4s 0.05s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confirmed h3 { margin: 0 0 6px; font-size: 19px; }
.confirmed p { color: var(--muted); margin: 0 0 18px; }
.link-btn {
  background: none; border: 1px solid var(--border); color: var(--text);
  box-shadow: none; width: auto; padding: 9px 18px; font-size: 14px; display: inline-block;
}
.link-btn::after { display: none; }
.link-btn:hover { filter: none; background: var(--surface); box-shadow: none; }
.link-btn { border-radius: 11px; text-decoration: none; font-family: inherit; font-weight: 600; }

/* Backend / status-side */
.admin-title {
  font-family: "Anton", sans-serif; text-transform: uppercase;
  font-size: clamp(22px, 6.5vw, 34px); letter-spacing: 0.02em; margin: 4px 0 0;
}
.count-row { display: flex; align-items: center; gap: 16px; padding-bottom: 4px; }
.count { font-family: "Anton", sans-serif; font-size: 54px; line-height: 1; color: var(--accent); }
.count-label { font-size: 15px; font-weight: 600; }
.count-label small { color: var(--muted); font-weight: 400; font-size: 13px; }

.rsvp-list { list-style: none; margin: 16px 0 0; padding: 0; }
.rsvp-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-top: 1px solid var(--border); gap: 12px;
  animation: rise 0.4s ease both;
}
.rsvp-list li:first-child { border-top: none; }
.rsvp-name { font-weight: 600; font-size: 14.5px; }
.rsvp-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.li-right { display: flex; align-items: center; gap: 10px; }
.rsvp-tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pax { font-family: "Anton", sans-serif; font-size: 18px; color: var(--text); min-width: 26px; text-align: right; }
.empty-state { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.table-wrap { overflow-x: auto; margin-top: 16px; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.rsvp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.rsvp-table th, .rsvp-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rsvp-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; white-space: nowrap; }
.rsvp-table tbody tr { animation: rise 0.4s ease both; }
.rsvp-table tbody tr:last-child td { border-bottom: none; }
.rsvp-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rsvp-table .dim { color: var(--muted); }
.admin-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.admin-actions .link-btn { margin-top: 0; }
.link-btn { border-radius: 11px; text-decoration: none; font-family: inherit; font-weight: 600; }
.rsvp-table td.action { text-align: right; white-space: nowrap; width: 1%; }
.del-btn {
  width: auto; margin: 0; padding: 4px 9px; font-size: 13px; line-height: 1;
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; box-shadow: none; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.del-btn::after { display: none; }
.del-btn:hover { color: #ff8095; border-color: rgba(239, 36, 64, 0.5); background: rgba(239, 36, 64, 0.10); filter: none; box-shadow: none; }

.closed { text-align: center; padding: 6px 0 2px; }
.closed-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ffd0d8;
  background: rgba(239, 36, 64, 0.16); border: 1px solid rgba(239, 36, 64, 0.4);
  padding: 6px 14px; border-radius: 99px; margin-bottom: 16px;
}
.closed h2 { margin: 0 0 10px; }
.closed .card-lead { margin: 0 0 14px; }
.closed a.link-btn { margin-top: 6px; }
.rsvp-table td.action { text-align: right; white-space: nowrap; width: 1%; }
.del-btn {
  width: auto; margin: 0; padding: 4px 9px; font-size: 13px; line-height: 1;
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; box-shadow: none; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.del-btn::after { display: none; }
.del-btn:hover { color: #ff8095; border-color: rgba(239, 36, 64, 0.5); background: rgba(239, 36, 64, 0.10); filter: none; box-shadow: none; }

.closed { text-align: center; padding: 6px 0 2px; }
.closed-badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ffd0d8;
  background: rgba(239, 36, 64, 0.16); border: 1px solid rgba(239, 36, 64, 0.4);
  padding: 6px 14px; border-radius: 99px; margin-bottom: 16px;
}
.closed h2 { margin: 0 0 10px; }
.closed .card-lead { margin: 0 0 14px; }
.closed a.link-btn { margin-top: 6px; }

.page-footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; animation: rise 0.6s 0.6s ease both; }

@media (max-width: 460px) {
  .facts { grid-template-columns: 1fr; }
  main { padding: 24px 16px 56px; }
}

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