/* =========================================================
   DUUSERMAND – stilark
   Tre niveauer styres af html[data-level]: 0 Seriøs, 1 Midt, 2 Max Duus
   Mørk tilstand: html.dark
   ========================================================= */

:root {
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;

  --bg: #fbf6ec;
  --bg-2: #f3ead8;
  --paper: #ffffff;
  --ink: #17161b;
  --muted: #5b5863;
  --line: #17161b;
  --accent: #ff5b2e;
  --accent-ink: #ffffff;
  --accent-2: #ffc928;
  --accent-3: #2f6bff;
  --desk: #e9d9bd;
  --desk-2: #dcc6a0;

  --radius: 16px;
  --radius-sm: 10px;
  --border: 2px solid var(--line);
  --shadow: 0 10px 30px -12px rgba(23, 22, 27, .28);
  --shadow-hard: 4px 4px 0 var(--line);
  --h-weight: 750;
  --h-track: -0.025em;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --header-h: 68px;
  --brand: #ff5b2e;
  color-scheme: light;
}

/* 0: Seriøs – corporate: marineblå, grå, stramt */
html[data-level="0"] {
  --bg: #f6f7f9;
  --bg-2: #eceff4;
  --paper: #ffffff;
  --ink: #0f1b2d;
  --muted: #536175;
  --line: #dbe1e8;
  --accent: #1b3a6b;
  --accent-ink: #ffffff;
  --accent-2: #e3e9f2;
  --accent-3: #1b3a6b;
  --desk: #eceff4;
  --desk-2: #e4e8ee;
  --radius: 6px;
  --radius-sm: 4px;
  --border: 1px solid var(--line);
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 20px -10px rgba(0, 0, 0, .15);
  --shadow-hard: var(--shadow);
  --h-weight: 620;
  --h-track: -0.03em;
}

/* 2: Max Duus – knaldfarver og hårde skygger */
html[data-level="2"] {
  --bg: #fff3a3;
  --bg-2: #ffe1f0;
  --paper: #ffffff;
  --ink: #120f1a;
  --muted: #3c3548;
  --line: #120f1a;
  --accent: #ff2e88;
  --accent-2: #00d0ff;
  --accent-3: #7b2cff;
  --desk: #ffb3d4;
  --desk-2: #ff8cc0;
  --radius: 22px;
  --border: 3px solid var(--line);
  --shadow: 6px 6px 0 var(--line);
  --shadow-hard: 6px 6px 0 var(--line);
  --h-weight: 800;
  --h-track: -0.035em;
}

html.dark {
  --bg: #111117;
  --bg-2: #181821;
  --paper: #1d1d27;
  --ink: #f3efe7;
  --muted: #a9a5b4;
  --line: #f3efe7;
  --desk: #2a2420;
  --desk-2: #221d1a;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
html.dark[data-level="0"] { --line: #34343f; }
html.dark[data-level="2"] { --bg: #1a0f24; --bg-2: #22102e; --desk: #3a1430; --desk-2: #2c0f25; }

/* ---------- Grundlag ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color .5s ease, color .5s ease;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: var(--h-weight); letter-spacing: var(--h-track); line-height: 1.08; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent-2); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent-3); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.wrap-wide { width: min(1280px, 100% - 24px); }
.wrap-narrow { width: min(760px, 100% - 40px); }
.section { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
.kicker {
  font-family: var(--hand); font-size: 1.6rem; color: var(--accent); margin: 0 0 .1em; line-height: 1;
  transform: rotate(-2deg); display: inline-block;
}
html[data-level="0"] .kicker { font-family: var(--font); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; transform: none; }
.section-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.hand { font-family: var(--hand); }
.small { font-size: .875rem; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ---------- Knapper ---------- */
.btn {
  --b-bg: var(--paper); --b-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.3em; border-radius: 999px; border: var(--border);
  background: var(--b-bg); color: var(--b-ink); text-decoration: none; font-weight: 650; line-height: 1.1;
  cursor: pointer; transition: transform .2s var(--ease-spring), box-shadow .2s ease, background-color .3s ease;
  box-shadow: var(--shadow-hard);
  white-space: nowrap;
}
html[data-level="0"] .btn { border-radius: 8px; box-shadow: none; }
.btn-primary { --b-bg: var(--accent); --b-ink: var(--accent-ink); }
html[data-level="0"] .btn-primary { border-color: var(--accent); }
.btn-ghost { --b-bg: transparent; }
.btn-sm { padding: .55em 1em; font-size: .95rem; }
.btn-lg { padding: .95em 1.6em; font-size: 1.1rem; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
html[data-level="0"] .btn:hover { transform: none; box-shadow: none; filter: brightness(1.06); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }

/* Vrik ved hover (niveau 1 og 2) */
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -3deg; } 75% { rotate: 3deg; } }
html:not([data-level="0"]) .nav a:hover,
html:not([data-level="0"]) .btn:hover,
html:not([data-level="0"]) .chip-toggle:hover,
html:not([data-level="0"]) .logo:hover { animation: wiggle .35s ease-in-out; }
html[data-level="2"] .btn:hover { animation: wiggle .3s ease-in-out infinite; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  transition: background-color .5s ease;
}
.logo { text-decoration: none; display: inline-block; user-select: none; }
.logo-word { font-weight: 800; font-size: 1.55rem; letter-spacing: -0.04em; line-height: 1; display: inline-block; }
.logo-s { color: var(--brand); display: inline-block; transition: transform .3s var(--ease-spring); }
.logo:hover .logo-s { transform: translateY(-4px) rotate(-12deg); }
html[data-level="0"] .logo-word { font-weight: 650; }
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; font-weight: 550; display: inline-block; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav a:hover::after { transform: scaleX(1); }
@media (min-width: 960px) { .nav { display: flex; } }

/* ---------- Lyskontakt (snor) ---------- */
.cord {
  position: fixed; top: var(--header-h); right: clamp(18px, 6vw, 90px); z-index: 45;
  width: 36px; height: 120px; padding: 0; border: 0; background: none; cursor: grab;
  display: flex; flex-direction: column; align-items: center; touch-action: none;
  transform-origin: top center;
}
.cord-line { width: 2px; flex: 1; background: var(--ink); opacity: .75; transition: height .2s; }
.cord-knob {
  width: 16px; height: 22px; border-radius: 8px 8px 10px 10px; background: var(--accent-2);
  border: 2px solid var(--ink); margin-top: -1px;
}
html[data-level="0"] .cord-knob { background: var(--paper); }
.cord.pulled { cursor: grabbing; }
@keyframes cordSwing { 0% { rotate: 0deg; } 25% { rotate: 7deg; } 50% { rotate: -5deg; } 75% { rotate: 3deg; } 100% { rotate: 0deg; } }
.cord.swing { animation: cordSwing .9s ease-out; }
html[data-level="0"] .cord { display: none; }
/* Seriøs: lys/mørk-kontakt i headeren */
.theme-switch { display: none; border: 0; background: none; padding: 4px; cursor: pointer; margin-right: 10px; }
html[data-level="0"] .theme-switch { display: inline-flex; align-items: center; }
.ts-track { position: relative; width: 44px; height: 24px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); transition: background .25s; }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s ease; }
.ts-knob::after { content: "☀"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--ink); }
.theme-switch[aria-checked="true"] .ts-track { background: var(--ink); }
.theme-switch[aria-checked="true"] .ts-knob { transform: translateX(20px); }
.theme-switch[aria-checked="true"] .ts-knob::after { content: "☾"; }
.theme-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
@media (max-width: 640px) { .cord { height: 84px; right: 16px; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 9vw, 110px) 0 clamp(60px, 10vw, 120px); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr .8fr; } }
.greeting { font-family: var(--hand); font-size: 1.5rem; color: var(--accent); margin-bottom: .4em; min-height: 1.6em; transform: rotate(-1.5deg); }
html[data-level="0"] .greeting { font-family: var(--font); font-size: 1rem; color: var(--muted); transform: none; }
.hero h1 { font-size: clamp(2.8rem, 9vw, 6.4rem); line-height: .98; margin-bottom: .35em; max-width: 13ch; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 56ch; color: var(--muted); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 30px; }
.proof { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .98rem; }
.proof li { display: flex; align-items: center; gap: 8px; }
.proof li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-2); color: var(--ink); font-size: .8rem; font-weight: 800; }

.hero-art { position: relative; min-height: 260px; display: grid; place-items: center; }
@media (max-width: 899px) { .hero-art { display: none; } }
.blob {
  position: absolute; width: 340px; height: 340px; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: var(--accent-2); opacity: .9; animation: blob 12s ease-in-out infinite;
}
html[data-level="0"] .blob { background: var(--bg-2); border-radius: 50%; }
html[data-level="2"] .blob { background: var(--accent-2); border: 3px solid var(--line); }
@keyframes blob {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; rotate: 0deg; }
  50% { border-radius: 60% 40% 35% 65% / 55% 60% 40% 45%; rotate: 20deg; }
}

/* S-maskotten (bruges kun på 404-siden) */
.mascot {
  position: relative; display: inline-block; font-weight: 800; line-height: .8; color: var(--accent);
  font-size: 220px; letter-spacing: 0; user-select: none;
}
.mascot i {
  position: absolute; top: 24%; width: .1em; height: .13em; background: var(--ink); border-radius: 50%;
  animation: blink 4.5s infinite;
}
.mascot i:first-of-type { left: 30%; }
.mascot i:last-of-type { left: 52%; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* Gummi-overskrift */
.rubber .w { display: inline-block; white-space: nowrap; }
.rubber .ch { display: inline-block; will-change: transform; touch-action: pan-y; }
html:not([data-level="0"]) .rubber .ch { cursor: grab; }
html:not([data-level="0"]) .rubber .ch:hover { color: var(--accent); }
.rubber.grabbing .ch { cursor: grabbing; }

/* ---------- Skrivebordet ---------- */
.work .wrap:first-child { margin-bottom: 30px; }
.desk {
  position: relative; height: clamp(560px, 70vh, 720px); border-radius: calc(var(--radius) + 8px);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .25), transparent 40%),
    repeating-linear-gradient(92deg, transparent 0 22px, rgba(0, 0, 0, .025) 22px 23px),
    linear-gradient(160deg, var(--desk), var(--desk-2));
  border: var(--border); box-shadow: inset 0 2px 20px rgba(0, 0, 0, .08);
  overflow: hidden; touch-action: pan-y; user-select: none;
}
.desk-item {
  position: absolute; left: 0; top: 0; touch-action: none; cursor: grab;
  will-change: transform; transition: box-shadow .2s ease;
}
.desk-item.dragging { cursor: grabbing; }
.pcard {
  width: 270px; background: var(--paper); border: var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 10px; text-align: left; font: inherit; color: var(--ink);
}
.desk-item.dragging .pcard { box-shadow: 0 30px 50px -16px rgba(0, 0, 0, .45); }
html[data-level="2"] .desk-item.dragging .pcard { box-shadow: 12px 14px 0 var(--line); }
.shot {
  aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; position: relative;
  background: var(--c2); border: 1px solid rgba(0, 0, 0, .12);
}
.shot img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.shot-bar { height: 14px; background: rgba(0, 0, 0, .08); display: flex; gap: 4px; align-items: center; padding: 0 6px; }
.shot-bar i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, .25); }
.shot-hero { background: var(--c1); color: var(--c2); padding: 12px 12px 14px; height: 56%; display: flex; flex-direction: column; justify-content: flex-end; }
.shot-hero b { font-size: 1rem; line-height: 1.05; letter-spacing: -0.02em; }
.shot-hero span { display: block; width: 40%; height: 7px; margin-top: 8px; border-radius: 4px; background: var(--c2); opacity: .7; }
.shot-lines { padding: 10px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.shot-lines span { height: 22px; border-radius: 4px; background: var(--c1); opacity: .18; }
.pcard-meta { padding: 10px 4px 2px; }
.pcard-meta h3 { font-size: 1.1rem; margin: 0 0 2px; }
.pcard-meta p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.35; }
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  margin-top: 8px; background: var(--accent-2); color: var(--ink); letter-spacing: .02em;
}
.badge.live { background: #2fbf71; color: #fff; }

.postit {
  width: 180px; height: 180px; padding: 18px; background: #ffe36e; color: #2a2410;
  font-family: var(--hand); font-size: 1.65rem; line-height: 1.05; border: 0; text-align: left;
  box-shadow: 0 14px 22px -12px rgba(0, 0, 0, .4); display: flex; flex-direction: column; justify-content: space-between;
}
.postit small { font-size: 1.2rem; text-decoration: underline; }
html[data-level="2"] .postit { background: var(--accent-2); border: 3px solid var(--line); }
.coffee { width: 96px; height: 96px; border: 0; padding: 0; background: none; }
.coffee svg, .pencil svg { width: 100%; height: 100%; pointer-events: none; }
.pencil { width: 200px; height: 34px; border: 0; padding: 0; background: none; }

/* Ryddet skrivebord (Seriøs / reduceret bevægelse) */
.desk.tidy {
  height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; padding: 24px;
  background: var(--bg-2); box-shadow: none;
}
.desk.tidy .desk-item { position: static; transform: none !important; cursor: pointer; }
.desk.tidy .pcard { width: 100%; height: 100%; }
.desk.tidy .postit { width: 100%; height: auto; min-height: 180px; }
.desk.tidy .k-coffee, .desk.tidy .k-pencil { display: none; }

/* Swipe-stak (mobil) */
.desk.stack { height: 370px; touch-action: pan-y; }
.desk.stack .desk-item { left: 50%; top: 40px; }
.desk.stack .k-coffee, .desk.stack .k-pencil { display: none; }
.desk.stack .pcard { width: min(270px, calc(100vw - 110px)); }
.desk.stack .postit { width: min(270px, calc(100vw - 110px)); height: 300px; font-size: 2.2rem; }
.stack-hint { display: none; text-align: center; font-size: 1.4rem; color: var(--muted); margin-top: 10px; }
.desk.stack + .stack-hint { display: block; }

/* Kort-modal */
.card-modal {
  border: var(--border); border-radius: var(--radius); padding: 0; width: min(680px, 100% - 24px);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}
.card-modal::backdrop { background: rgba(10, 10, 15, .6); }
.card-modal[open] { animation: unfold .45s var(--ease-spring); }
@keyframes unfold { from { transform: scale(.6) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.card-modal-inner .shot { aspect-ratio: 16 / 8; border-radius: 0; border: 0; }
.card-modal-inner .shot-hero b { font-size: clamp(1.4rem, 4vw, 2.2rem); }
.modal-body { padding: 24px 26px 26px; }
.modal-body h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: .2em; }
.modal-body .type { color: var(--muted); margin-bottom: 1em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 6px 0 18px; list-style: none; }
.tags li { font-size: .85rem; padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: var(--border); background: var(--paper); cursor: pointer; font-size: 1.2rem; line-height: 1; }

/* ---------- Ydelser ---------- */
.service-grid { display: grid; gap: 18px; margin-top: 36px; }
@media (min-width: 700px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }
.service {
  background: var(--paper); border: var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); transition: transform .3s var(--ease-spring);
}
html:not([data-level="0"]) .service:nth-child(odd) { rotate: -.6deg; }
html:not([data-level="0"]) .service:nth-child(even) { rotate: .6deg; }
html:not([data-level="0"]) .service:hover { transform: translateY(-6px) rotate(-1deg); }
.service-icon { font-size: 2rem; display: inline-block; margin-bottom: 10px; }
html[data-level="0"] .service-icon { filter: grayscale(1); opacity: .7; font-size: 1.5rem; }
.service p { color: var(--muted); margin: 0; }
.why { margin-top: 70px; padding: clamp(24px, 4vw, 44px); border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.why-title { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.why-grid { display: grid; gap: 24px; margin-top: 20px; }
@media (min-width: 760px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why h4 { font-size: 1.15rem; color: var(--accent-2); margin-bottom: .3em; }
html[data-level="0"] .why h4 { color: var(--bg); }
.why p { opacity: .85; margin: 0; }

/* ---------- Proces ---------- */
.process { background: var(--bg-2); transition: background-color .5s ease; }
.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 16px; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { background: var(--paper); border: var(--border); border-radius: var(--radius); padding: 22px; position: relative; }
.step-n {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 1.15rem; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; font-size: .98rem; }
.inline-cta { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.inline-cta p { margin: 0; font-size: 1.2rem; font-weight: 600; }

/* ---------- Historien: den krøllede streg ---------- */
.story-wrap { position: relative; margin-top: 40px; }
.story-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.story-svg path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
html[data-level="0"] .story-svg path { stroke-width: 2; stroke: var(--ink); opacity: .5; }
html[data-level="2"] .story-svg path { stroke-width: 6; }
.milestones { list-style: none; margin: 0; padding: 20px 0 0; position: relative; }
.milestone { position: relative; display: flex; margin-bottom: clamp(90px, 14vw, 160px); }
.milestone:nth-child(odd) { justify-content: flex-start; }
.milestone:nth-child(even) { justify-content: flex-end; }
.ms-card {
  width: min(380px, 44%); background: var(--paper); border: var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow);
  opacity: .15; transform: translateY(20px) scale(.97); transition: opacity .5s ease, transform .6s var(--ease-spring);
}
.milestone.on .ms-card { opacity: 1; transform: none; }
.ms-card h3 { margin-bottom: .3em; }
.ms-card p { margin: 0; color: var(--muted); }
.ms-dot {
  position: absolute; left: 50%; top: 26px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--accent); transition: transform .4s var(--ease-spring), background-color .3s;
}
.milestone.on .ms-dot { background: var(--accent); transform: scale(1.25); }
.ms-n { font-family: var(--hand); font-size: 1.4rem; color: var(--accent); display: block; line-height: 1; margin-bottom: 4px; }
.story-end { text-align: center; position: relative; padding-bottom: 10px; }
@media (max-width: 720px) {
  .milestone, .milestone:nth-child(even) { justify-content: flex-end; }
  .ms-card { width: calc(100% - 54px); }
  .ms-dot { left: 18px; }
}

/* ---------- Leg ---------- */
.play-grid { display: grid; gap: 30px; margin-top: 36px; align-items: center; }
@media (min-width: 820px) { .play-grid { grid-template-columns: 1fr 1fr; } }
.red-wrap { text-align: center; padding: 20px; }
.red-button {
  width: 190px; height: 190px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: radial-gradient(circle at 50% 100%, #6b0a0a, #3a0505); padding: 0 0 18px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); transition: transform .15s ease;
}
.red-cap {
  display: block; width: 160px; height: 140px; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a6b, #e3120b 45%, #a10a05);
  box-shadow: inset 0 -10px 18px rgba(0, 0, 0, .35); transition: transform .1s ease;
}
.red-button:active .red-cap { transform: translateY(12px); }
.red-button.runaway { transition: transform .35s var(--ease-spring); }
.red-button.cta-mode .red-cap { background: radial-gradient(circle at 35% 30%, #7dffa9, #19b45a 45%, #0b6e35); }
.red-label { font-weight: 700; font-size: 1.25rem; margin-top: 18px; min-height: 2.6em; }
.fact-card {
  background: var(--paper); border: var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  min-height: 240px; display: flex; flex-direction: column; align-items: flex-start;
}
html:not([data-level="0"]) .fact-card { rotate: 1deg; }
.fact-text { font-size: 1.35rem; font-weight: 600; line-height: 1.35; flex: 1; }
.fact-text.pop { animation: factPop .45s var(--ease-spring); }
@keyframes factPop { from { transform: scale(.85) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 28px; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: var(--border); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 650; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; transition: transform .3s var(--ease-spring); color: var(--accent); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- Kontakt som samtale ---------- */
.contact { background: var(--bg-2); }
.chat {
  margin-top: 30px; background: var(--paper); border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(16px, 3vw, 28px); position: relative; overflow: hidden;
}
.chat-log { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; line-height: 1.4; animation: msgIn .35s var(--ease-spring); }
@keyframes msgIn { from { transform: translateY(10px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.msg.me { background: var(--bg-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.you { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.react { font-family: var(--hand); font-size: 1.35rem; background: none; padding: 0 6px; color: var(--accent); }
html[data-level="0"] .msg.react { font-family: var(--font); font-size: 1rem; color: var(--muted); font-style: italic; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-input { display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: flex; gap: 10px; }
.chat-row input, .chat-row textarea {
  flex: 1; min-width: 0; font: inherit; padding: 14px 16px; border-radius: 12px; border: var(--border);
  background: var(--bg); color: var(--ink);
}
html[data-level="0"] .chat-row input, html[data-level="0"] .chat-row textarea { border: 1px solid #c9c8c2; }
.chat-row textarea { min-height: 90px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 999px; border: var(--border); background: var(--paper); cursor: pointer; font-weight: 550;
  transition: transform .2s var(--ease-spring), background-color .2s;
}
.chip:hover { background: var(--accent-2); transform: translateY(-2px); }
.chat-error { color: #c0261b; font-weight: 600; margin: 0; font-size: .95rem; }
html.dark .chat-error { color: #ff8a80; }
.shake { animation: shakeX .4s ease; }
@keyframes shakeX { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.direct { margin-top: 18px; color: var(--muted); }
.direct a { font-weight: 650; color: var(--ink); }

/* Papirflyveren */
.plane { position: fixed; z-index: 120; width: 60px; height: 60px; pointer-events: none; }
.plane svg { width: 100%; height: 100%; }

/* ---------- Footer ---------- */
.footer { padding: 60px 0 150px; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 30px; }
.footer-logo { font-size: 2.2rem; margin-bottom: 8px; }
.footer-right { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
@media (min-width: 700px) { .footer-right { align-items: flex-end; text-align: right; } }

/* ---------- Kontrolpanel: stort og centreret ---------- */
.dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 18px; padding: 12px 24px 14px; border-radius: 999px;
  background: var(--paper); border: var(--border); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35);
  width: max-content; max-width: calc(100vw - 20px);
}
html[data-level="2"] .dock { box-shadow: 8px 8px 0 var(--line); }
.meter { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.meter-title { font-family: var(--hand); font-size: 1.35rem; line-height: 1; color: var(--brand); }
html[data-level="0"] .meter-title { font-family: var(--font); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.meter-row { display: flex; align-items: center; gap: 12px; }
.meter-label { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.meter input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 230px; height: 12px; border-radius: 99px; cursor: pointer; margin: 10px 0;
  background: linear-gradient(90deg, #1b3a6b 0%, #ff5b2e 50%, #ff2e88 100%); border: 2px solid var(--ink);
}
.meter input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 3px solid #17161b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3); transition: transform .2s var(--ease-spring);
}
.meter input[type="range"]::-moz-range-thumb { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid #17161b; }
.meter input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15) rotate(20deg); }
.dock-sep { width: 1px; align-self: stretch; background: color-mix(in srgb, var(--ink) 15%, transparent); }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: .95rem; font-weight: 700;
  border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); background: transparent; cursor: pointer;
}
html[data-level="0"] .chip-toggle { border-radius: 6px; border-width: 1px; }
@media (max-width: 700px) {
  .dock { left: 8px; right: 8px; transform: none; width: auto; gap: 10px; padding: 8px 12px 10px; border-radius: 22px; justify-content: space-between; }
  .meter { flex: 1; min-width: 0; }
  .meter-title { font-size: 1.1rem; }
  .meter-row { gap: 6px; width: 100%; }
  .meter-label { font-size: .78rem; }
  .meter input[type="range"] { width: auto; flex: 1; min-width: 60px; }
  .chip-toggle { padding: 10px; }
  .chip-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dock-sep { display: none; }
}
.chip-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* Sønderjysk fane: gul med blå striber */
.flag { width: 20px; height: 14px; background: #ffd31a; border-radius: 2px; position: relative; overflow: hidden; display: inline-block; transform-origin: left center; }
.flag i { position: absolute; left: 0; right: 0; height: 2px; background: #1f4fd1; }
.flag i:first-child { top: 4px; } .flag i:last-child { top: 8px; }
.flag.wave { animation: flagWave .9s ease-in-out; }
@keyframes flagWave { 0%, 100% { transform: none; } 25% { transform: skewY(10deg) scaleX(.9); } 50% { transform: skewY(-8deg); } 75% { transform: skewY(6deg) scaleX(.95); } }


/* ---------- Genvejsmenu ---------- */
.keys-modal { border: var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink); width: min(480px, 100% - 24px); padding: 28px; }
.keys-modal::backdrop { background: rgba(10, 10, 15, .55); }
.keys-modal[open] { animation: unfold .4s var(--ease-spring); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 20px 0 24px; align-items: center; }
.keys dd { margin: 0; color: var(--muted); }
kbd { display: inline-block; min-width: 28px; text-align: center; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--ink); border-bottom-width: 3px; font-family: inherit; font-weight: 700; font-size: .9rem; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; top: calc(var(--header-h) + 12px); transform: translateX(-50%); z-index: 130; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 30px); }
.toast {
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: toastIn .4s var(--ease-spring); text-align: center;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { transform: translateY(-14px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }

/* ---------- Effekter ---------- */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 140; }
.flashlight {
  position: fixed; inset: 0; pointer-events: none; z-index: 110; display: none;
  background: radial-gradient(circle 200px at var(--fx, 50%) var(--fy, 40%), transparent 0, transparent 55%, rgba(3, 3, 8, .82) 100%);
}
html.dark.has-flashlight .flashlight { display: block; }

/* Rystede tekster ved sprogskift */
@keyframes jiggle { 0%, 100% { transform: none; } 20% { transform: translateX(-3px) rotate(-1deg); } 40% { transform: translateX(3px) rotate(1deg); } 60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } }
html:not([data-level="0"]) .text-jiggle [data-t] { animation: jiggle .5s ease; }

/* Rolig nu! (svimmel) */
@keyframes dizzy { 0%, 100% { transform: none; } 25% { transform: rotate(-1.4deg) translateX(-4px); } 75% { transform: rotate(1.4deg) translateX(4px); } }
.dizzy main section h2, .dizzy .service, .dizzy .ms-card, .dizzy .steps li { animation: dizzy .5s ease-in-out 3; }

/* Siden falder i søvn */
.sleepy main section h2, .sleepy .hero h1 { transition: transform 2s ease, filter 2s ease; transform: rotate(-1.5deg) translateY(6px); filter: saturate(.4); }
.zzz { position: fixed; right: 80px; top: calc(var(--header-h) + 140px); z-index: 70; pointer-events: none; display: none; font-family: var(--hand); font-size: 2.4rem; color: var(--accent); }
.sleepy .zzz { display: block; }
.zzz span { position: absolute; animation: zzz 3s ease-in infinite; opacity: 0; }
.zzz span:nth-child(2) { animation-delay: 1s; font-size: 2.8rem; }
.zzz span:nth-child(3) { animation-delay: 2s; font-size: 3.4rem; }
@keyframes zzz { 0% { transform: translate(0, 0) rotate(-10deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(40px, -110px) rotate(15deg); opacity: 0; } }
@keyframes jolt { 0% { transform: none; } 20% { transform: translateY(-14px) scale(1.02); } 45% { transform: translateY(4px); } 70% { transform: translateY(-3px); } 100% { transform: none; } }
.waking main { animation: jolt .55s ease; }

/* Røde knap-effekter */
@keyframes pageShake { 0%, 100% { transform: none; } 10%, 50%, 90% { transform: translate(-6px, 2px) rotate(-.4deg); } 30%, 70% { transform: translate(6px, -2px) rotate(.4deg); } }
.page-shake main { animation: pageShake .5s ease; }
.page-tilt main { transform: rotate(2deg); transition: transform .5s var(--ease-spring); }
.page-flip main { transform: rotate(180deg); transition: transform .8s var(--ease-spring); }
main { transition: transform .6s var(--ease-spring); transform-origin: 50% 40vh; }

/* Regn (hemmelige ord) */
.rain-drop { position: fixed; top: -80px; z-index: 125; pointer-events: none; font-size: 40px; font-weight: 800; color: var(--accent); will-change: transform; }

/* Logo-æg: det flygtende s */
.runaway-s { position: fixed; z-index: 126; pointer-events: none; font-weight: 800; color: var(--accent); line-height: 1; }

/* Max Duus: lidt vrikkeri på overskrifterne */
@keyframes sway { 0%, 100% { rotate: -1deg; } 50% { rotate: 1deg; } }
html[data-level="2"] main section h2 { animation: sway 3s ease-in-out infinite; transform-origin: left center; }
html[data-level="2"] .step-n { animation: bob 2.4s ease-in-out infinite; }
html[data-level="2"] .why { background: var(--accent-3); color: #fff; border: var(--border); box-shadow: var(--shadow); }
html[data-level="2"] .hero h1 { text-shadow: 4px 4px 0 var(--accent-2); }
html.dark[data-level="2"] .hero h1 { text-shadow: 4px 4px 0 var(--accent-3); }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: none; place-items: center; }
html.loading .loader { display: grid; }
.loader.bye { animation: loaderOut .5s ease forwards; }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
.loader-stage { text-align: center; }
@keyframes loaderHop { from { transform: translateY(0) scaleY(.92) rotate(-6deg); } to { transform: translateY(-26px) scaleY(1.05) rotate(6deg); } }
.loader-line { width: 200px; margin: 6px auto 0; }
.loader-line path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s ease-in-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.loader p { font-family: var(--hand); font-size: 1.5rem; color: var(--muted); margin-top: 8px; }

/* ---------- Seriøs og reduceret bevægelse: ingen pynt-animationer ---------- */
html[data-level="0"] .blob,
html[data-level="0"] .zzz span { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ms-card { opacity: 1; transform: none; }
}

/* Swipe-stak: lodret scroll skal stadig virke */
.desk.stack .desk-item { touch-action: pan-y; }

/* Egen cursor (kun mus, niveau 1 og 2) */
@media (pointer: fine) {
  html:not([data-level="0"]) body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ccircle cx='14' cy='14' r='6' fill='%23ff5b2e' stroke='%2317161b' stroke-width='2.5'/%3E%3C/svg%3E") 14 14, auto; }
  html[data-level="2"] body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ccircle cx='16' cy='16' r='8' fill='%23ff2e88' stroke='%23120f1a' stroke-width='3'/%3E%3C/svg%3E") 16 16, auto; }
}
