/*
  Modern, clean UI (no frameworks)
  - Smooth typography + spacing
  - Accessible focus states
  - Responsive layout
*/

:root{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2:#fbfcff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --shadow-sm: 0 6px 16px rgba(2, 6, 23, .08);
  --radius: 18px;
  --radius-sm: 14px;
  --ring: 0 0 0 4px rgba(59, 130, 246, .18);
  --accent: #2563eb;
  --accent-2:#1d4ed8;
  --danger:#ef4444;
  --ok:#16a34a;
  --warn:#f59e0b;

  --container: 1120px;
}

*{ box-sizing: border-box; }
html, body{ min-height: 100%; }

html{
  background: var(--bg); /* fallback */
}

body{
  margin:0;
  min-height: 100vh;
  display:flex;
  flex-direction:column;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  line-height: 1.45;
  background: transparent;
  position: relative;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }

/* ✅ Baggrund der ALTID fylder hele viewport */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(37,99,235,.15), transparent 60%),
    radial-gradient(900px 500px at 85% -15%, rgba(16,185,129,.12), transparent 60%),
    var(--bg);
}

/* ✅ Bund “reverse shadow” der skjuler stregen nederst */
body::after{
  content:"";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px; /* gør større hvis nødvendigt */
  pointer-events: none;
  z-index: 1; /* over indhold */
  background: linear-gradient(
    to bottom,
    rgba(246,247,251,0),
    rgba(246,247,251,.92),
    rgba(246,247,251,1)
  );
}

/* Layout */
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 20px 120px; /* ✅ mere bund-luft så resultat ikke rammer footer */
}

/* Gør main fleksibel så footer ikke laver “spring” */
main.container{
  flex: 1;
}

/* ✅ ekstra luft ved testen/resultatet */
#test{
  padding-bottom: 80px;
}

/* Sections */
.section{ margin-top: 26px; }
.section-head{ margin-bottom: 14px; }
.section-head h2{ margin:0; letter-spacing: -0.02em; font-size: 22px; }
.section-head p{ margin: 6px 0 0; color: var(--muted); }

/* Navbar */
.navbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(226,232,240,.7);
}

/* ✅ Fuld bredde så logo kan komme længere til venstre */
.nav-inner{
  max-width: none;
  margin: 0;
  padding: 14px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 220px;
}
.logo{
  height: 44px;
  width: auto;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: transparent;
}
.brand-title{ font-weight: 850; letter-spacing:-0.02em; line-height:1.1; }
.brand-sub{ color: var(--muted); font-size: 13px; margin-top:2px; }

.nav-links{ display:flex; align-items:center; gap: 10px; flex-wrap: wrap; }

.nav-link{
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  font-weight: 800;
}
.nav-link:hover{ background: #fff; box-shadow: var(--shadow-sm); }

.nav-cta{
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border: 0;
  box-shadow: 0 10px 18px rgba(37,99,235,.25);
}
.nav-cta:hover{ filter: brightness(.98); }

/* Hero */
.hero{
  margin-top: 22px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: start;
}
.hero-left h1{
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.07;
}
.lead{
  margin: 10px 0 10px;
  color: var(--muted);
  font-size: 16px;
  max-width: 65ch;
}

.fact{
  margin: 10px 0 16px;
  color: var(--muted);
  max-width: 70ch;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, .9);
  background: rgba(255,255,255,.65);
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.card{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: 0 14px 22px rgba(2,6,23,.05);
}
.card-title{
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.card-value{ margin-top: 6px; font-weight: 900; letter-spacing: -0.02em; font-size: 18px; }
.card-note{ margin-top: 6px; color: var(--muted); font-size: 12px; }

.panel{
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel-title{ font-weight: 900; letter-spacing:-0.02em; margin-bottom: 10px; }
.bullets{ margin: 0; padding-left: 18px; color: var(--muted); }
.bullets li{ margin: 8px 0; }

/* Quiz boxes */
.quiz{ margin-top: 10px; }
.box{
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.footer-box{ margin-top: 12px; }

.q-top{ margin-bottom: 10px; }

/* ✅ Progress bar (blå) */
.q-progress-bar{
  height: 10px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
  border: 1px solid rgba(226,232,240,.9);
}
.q-progress-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #4f46e5);
  transition: width .25s ease;
}
.q-progress-text{ margin-top: 8px; color: var(--muted); font-size: 13px; }

.q-title{ margin: 8px 0 6px; font-weight: 950; letter-spacing: -0.02em; font-size: 18px; }
.hint{ margin: 0 0 10px; color: var(--muted); }

/* Options */
.q-options{ display:grid; gap: 10px; margin-top: 8px; }
.opt{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(248,250,252,.9);
  cursor: pointer;
  user-select: none;
}
.opt:hover{ background:#fff; box-shadow: var(--shadow-sm); }
.opt input{ margin-top: 3px; accent-color: var(--accent); }

/* Buttons */
.btn{
  border: 0;
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37,99,235,.22);
}
.btn:hover{ filter: brightness(.98); }
.btn:active{ transform: translateY(1px); }

.btn.ghost{
  background: rgba(255,255,255,.85);
  color: var(--text);
  border: 1px solid rgba(226,232,240,.95);
  box-shadow: none;
}
.btn.ghost:hover{ box-shadow: var(--shadow-sm); }

.q-nav{
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Fields */
.field{ display:flex; flex-direction:column; gap: 6px; }
.field input{
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,.95);
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
.field input:focus{ outline:none; box-shadow: var(--ring); border-color: rgba(37,99,235,.45); }
.field-note{ color: var(--muted); font-size: 12px; }

.email-row{
  display:grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  align-items:start;
}
.field.compact input{ background: rgba(248,250,252,.9); }

.consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  margin-top: 12px;
  color: var(--text);
  font-weight: 700;
}
.consent input{ margin-top: 3px; accent-color: var(--accent); }

.actions{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Result */
.result{ margin-top: 14px; }
.result-inner{ padding-bottom: 6px; }
.result-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.85);
  font-weight: 800;
}
.result-box h3{ margin: 8px 0 8px; letter-spacing:-0.02em; }
.result-box p{ margin: 8px 0; color: var(--muted); }
.result-box ul{ margin: 8px 0; padding-left: 18px; }
.result-box li{ margin: 6px 0; color: var(--text); }

.result-actions{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Admin table */
.admin-table th, .admin-table td{ padding: 10px; }
.admin-table thead th{
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-table tbody tr:hover{ background: rgba(248,250,252,.9); }

/* Helpers */
.muted{ color: var(--muted); }
.error{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.07);
  color: #7f1d1d;
  display:none;
}

/* Focus */
:focus-visible{ outline:none; box-shadow: var(--ring); border-radius: 12px; }

/* Footer */
.footer{ margin-top: 0; }
.footer-inner{
  color: var(--muted);
  font-size: 13px;
  padding: 12px 4px;
}

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .cards{ grid-template-columns: 1fr; }
  .email-row{ grid-template-columns: 1fr; }
  .container{ padding: 22px 14px 120px; }
}

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