/* Intro-animationen (js/intro.js). Mål i px svarer til et 1920×1080-felt, som skaleres til skærmen.
   Farverne følger sidens temavariabler, så intro'en også virker i lyst tema. */

.ix-overlay {
  --ix-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(0, 0, 0, 0.6);
  --ix-lift: 0 18px 40px -12px rgba(0, 0, 0, 0.8);
  --ix-vignette: rgba(0, 0, 0, 0.72);
  --ix-haze-a: 0.12;
  --ix-win-a: 0.1;
  --ix-sweep-a: 0.07;
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: var(--bg);
  transition: opacity 0.65s ease;
}
:root[data-theme="light"] .ix-overlay {
  --ix-shadow: 0 40px 80px -36px rgba(16, 40, 64, 0.35), 0 2px 6px rgba(16, 40, 64, 0.06);
  --ix-lift: 0 16px 30px -14px rgba(16, 40, 64, 0.35);
  --ix-vignette: rgba(170, 186, 200, 0.35);
  --ix-haze-a: 0.1;
  --ix-win-a: 0.08;
  --ix-sweep-a: 0.06;
}
.ix-overlay.closing { opacity: 0; pointer-events: none; }
html.intro-open { overflow: hidden; }

.ix-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: var(--bg);
  transform-origin: 50% 50%;
  color: var(--ink);
  font-family: var(--font);
  line-height: normal;
}
/* Prototypen bruger browserens standard-boksmodel. */
.ix-stage *, .ix-stage *::before, .ix-stage *::after { box-sizing: content-box; }

/* ---------- Baggrund ---------- */

.ix-grid-wrap { position: absolute; left: 0; top: 0; right: 0; height: 0; overflow: hidden; }
.ix-grid {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px;
  background-image:
    radial-gradient(circle, rgb(var(--grid-rgb) / var(--dot-a)) 0, rgb(var(--grid-rgb) / var(--dot-a)) 1.6px, transparent 2.4px),
    linear-gradient(rgb(var(--grid-rgb) / var(--grid-b)) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--grid-rgb) / var(--grid-b)) 1px, transparent 1px),
    linear-gradient(rgb(var(--grid-rgb) / var(--grid-a)) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--grid-rgb) / var(--grid-a)) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 240px 240px, 48px 48px, 48px 48px;
  background-position: -120px -60px, 0 60px, 0 60px, 0 12px, 0 12px;
}
.ix-haze {
  position: absolute; width: 1900px; height: 1440px; opacity: 0;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / var(--ix-haze-a)), transparent);
}
.ix-win {
  position: absolute; left: 770px; top: -40px; width: 1400px; height: 1200px; opacity: 0;
  background: radial-gradient(closest-side, rgb(var(--good-rgb) / var(--ix-win-a)), transparent);
}
.ix-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 50%, var(--ix-vignette) 100%); }
.ix-cam { position: absolute; inset: 0; transform-origin: 50% 50%; }
.ix-place { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 50% 50%; }
.ix-sweep { position: absolute; left: 0; right: 0; top: 0; height: 320px; opacity: 0; pointer-events: none; }
.ix-sweep-fill { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgb(var(--accent-rgb) / var(--ix-sweep-a))); }
.ix-sweep-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent-line); box-shadow: 0 0 24px 3px var(--accent-glow); }

/* ---------- Fælles dele ---------- */

.ix-panel {
  position: relative; border-radius: 18px; color: var(--ink);
  background: linear-gradient(180deg, var(--card-top), var(--card) 160px);
  border: 1px solid var(--line); box-shadow: var(--ix-shadow);
}
.ix-panel-top { position: absolute; top: -1px; left: 14%; right: 14%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-line), transparent); }
.ix-panel-dim { position: absolute; inset: -1px; z-index: 5; border-radius: 18px; background: var(--bg); opacity: 0; pointer-events: none; }
.ix-row { display: flex; align-items: center; gap: 12px; }
.ix-minw0 { min-width: 0; }
.ix-tile { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ix-tile .icon { width: 20px; height: 20px; }
.ix-tile.accent { background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); }
.ix-tile.good { background: var(--good-soft); border: 1px solid var(--good-line); color: var(--good); }
.ix-mono { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.18em; color: var(--ink-3); white-space: nowrap; }

.ix-cipher { white-space: pre; }
.ix-cell { position: relative; display: inline-block; }
.ix-gl { position: absolute; left: 50%; top: 0; transform: translateX(-50%); color: var(--accent); font-family: var(--mono); font-weight: 500; }

.ix-reticle { position: absolute; inset: -28px; opacity: 0; pointer-events: none; --rc: var(--accent); }
.ix-corner { position: absolute; width: 20px; height: 20px; border: 0 solid var(--rc); }
.ix-corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 6px; }
.ix-corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 6px; }
.ix-corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 6px; }
.ix-corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 6px; }

/* ---------- Timerkortet ---------- */

.ix-timer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.ix-timer-title { font-size: 27px; font-weight: 600; margin-top: 14px; white-space: nowrap; font-kerning: none; letter-spacing: -0.005em; }
.ix-clockwrap { position: relative; width: 230px; height: 92px; }
.ix-clock {
  position: absolute; inset: 0; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ix-clock-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.2em; color: var(--ink-3); }
.ix-clock-time { font-family: var(--mono); font-size: 44px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ix-done {
  position: absolute; inset: 0; border-radius: 12px; background: var(--good-soft); border: 1px solid var(--good-line); color: var(--good);
  display: flex; align-items: center; justify-content: center; gap: 12px; opacity: 0;
}
.ix-done .icon { width: 26px; height: 26px; stroke-width: 2.2; }
.ix-done span { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: 0.01em; }
.ix-progress { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.ix-ticks { flex: 1; display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 4px; }
.ix-tick { height: 12px; border-radius: 3px; background: var(--track); opacity: 0; }
.ix-count { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.ix-of { color: var(--ink-3); }

/* ---------- Spørgsmålskortet ---------- */

.ix-chips { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.ix-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 18px; font-weight: 500;
}
.ix-chip .icon { width: 18px; height: 18px; color: var(--ink-3); }
.ix-chip-mono { font-family: var(--mono); font-size: 15px; letter-spacing: 0.12em; }
.ix-shuffle {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 16px 7px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-size: 18px; font-weight: 500;
}
.ix-shuffle .icon { width: 18px; height: 18px; }
.ix-question { font-size: 35px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 26px; }
.ix-opts { position: relative; height: 354px; }
.ix-opt { position: absolute; left: 0; right: 0; top: 0; height: 78px; opacity: 0; }
.ix-opt-base, .ix-opt-outline, .ix-opt-sel, .ix-opt-good, .ix-opt-scan { position: absolute; inset: 0; border-radius: 14px; }
.ix-opt-base { background: var(--card-2); border: 1px solid var(--line-2); }
.ix-opt-outline { border: 1px solid var(--accent-line); opacity: 0; }
.ix-opt-sel { background: var(--accent-soft); border: 1.5px solid var(--accent); opacity: 0; }
.ix-opt-good { background: var(--good-soft); border: 1.5px solid var(--good); opacity: 0; }
.ix-opt-scan { overflow: hidden; opacity: 0; }
.ix-opt-scanbar { position: absolute; top: 0; bottom: 0; width: 22%; left: -22%; background: linear-gradient(90deg, transparent, var(--good-soft), var(--good-line), transparent); }
.ix-opt-content {
  position: relative; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 0 22px;
}
.ix-opt-text { font-size: 25px; color: var(--ink); white-space: nowrap; font-kerning: none; }
.ix-radio { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); }
.ix-radio-dot { position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); transform: scale(0); }
.ix-radio-good {
  position: absolute; inset: -2px; border-radius: 50%; background: var(--good); display: grid; place-items: center; opacity: 0; color: var(--accent-ink);
}
.ix-radio-good .icon { width: 18px; height: 18px; stroke-width: 3; }
.ix-korrekt {
  display: flex; align-items: center; gap: 8px; color: var(--good); font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.14em; opacity: 0;
}
.ix-korrekt .icon { width: 20px; height: 20px; }

/* ---------- Resultatkortet ---------- */

.ix-gauge { position: relative; width: 300px; height: 300px; margin: 20px auto 24px; }
.ix-gauge-sweep { position: absolute; inset: 32px; border-radius: 50%; opacity: 0; }
.ix-gauge-ring { position: absolute; inset: 46px; border-radius: 50%; border: 1px solid var(--line); }
.ix-gauge-tick { position: absolute; left: 147px; top: 139px; width: 6px; height: 22px; border-radius: 3px; background: var(--track); }
.ix-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ix-gauge-num { font-family: var(--mono); font-size: 72px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ix-gauge-pct { font-size: 38px; color: var(--ink-3); }
.ix-gauge-sub { font-family: var(--mono); font-size: 16px; font-weight: 500; letter-spacing: 0.16em; color: var(--ink-3); margin-top: 10px; }
.ix-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ix-stat { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.ix-stat .icon { width: 30px; height: 30px; stroke-width: 1.8; }
.ix-stat.good .icon, .ix-stat.good strong { color: var(--good); }
.ix-stat.bad .icon, .ix-stat.bad strong { color: var(--bad); }
.ix-stat-text { display: flex; flex-direction: column; }
.ix-stat-text strong { font-family: var(--mono); font-size: 36px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ix-stat-text span { font-size: 17px; color: var(--ink-3); }

/* ---------- Titlen ---------- */

.ix-hero { position: absolute; left: 140px; top: 300px; width: 1000px; color: var(--ink); }
.ix-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 14px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
  font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: 0.14em; opacity: 0; transform-origin: 0% 50%;
}
.ix-badge .icon { width: 22px; height: 22px; }
.ix-h1 { font-family: var(--display); font-size: 124px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; margin: 34px 0 32px; font-kerning: none; }
.ix-h1-line { white-space: nowrap; color: var(--ink); opacity: 0; }
.ix-h1-line.accent { color: var(--accent); }
.ix-h1-row { display: flex; align-items: baseline; }
.ix-cursor { display: inline-block; width: 0.4em; height: 0.72em; margin-left: 0.14em; background: var(--accent); opacity: 0; }
.ix-hero-text { font-size: 30px; line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 820px; opacity: 0; }

/* ---------- Spring over ---------- */

.ix-skip {
  position: absolute; right: 24px; bottom: 24px; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 16px; border-radius: 999px; background: rgb(var(--card-rgb) / 0.82); border: 1px solid var(--line-2);
  color: var(--ink-2); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
}
.ix-skip:hover, .ix-skip:focus-visible { color: var(--accent); border-color: var(--accent-line); background: rgb(var(--card-rgb) / 0.95); }
.ix-skip kbd { font-family: var(--mono); font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); letter-spacing: 0.06em; }

/* Knappen i bunden, der afspiller intro'en igen. */
.footer .replay-intro { margin-top: 10px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
