/* Code Breaking Casino — Mastermind Tech Noir */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/assets/fonts/space-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/assets/fonts/space-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0A0A0F;
  --surface: #0D1A2E;
  --surface-2: #0B1422;
  --line: rgba(140, 170, 210, .14);
  --cyan: #00CCFF;
  --green: #00FF88;
  --purple: #A64DFF;
  --amber: #FFBB00;
  --red: #FF2244;
  --text: #F0F4FF;
  --muted: #93A4BC;
  --dim: #7A8BA2;
  --m-red: #FF3333;
  --m-blue: #3399FF;
  --m-green: #00FF88;
  --m-yellow: #FFDD00;
  --m-white: #FFFFFF;
  --m-black: #24242C;
  --agent-color: var(--cyan);
  --agent-soft: rgba(0, 204, 255, .12);
  --font-sans: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Consolas', monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-snap: cubic-bezier(.16, 1, .3, 1);
  --z-hud: 40;
  --z-header: 60;
  --z-banner: 70;
  --z-chat: 80;
  --z-modal: 90;
  --z-toast: 100;
  --r: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
}
main { flex: 1; position: relative; z-index: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a, p, li, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}
.mission-form__consent a,
.mission-form__disclaimer a,
.cookie-banner p a,
.site-footer__legal a,
.faq__body a,
.kontakt-card a,
.codedraw__about a,
.legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq__body a { color: var(--agent-color); }
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.16;
  text-wrap: balance;
  font-weight: 700;
}
ul, ol { list-style: none; }
button { font-family: inherit; }
::selection { background: var(--agent-color); color: #04060A; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#code-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  text-align: center;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-agent {
  background: var(--agent-color);
  color: #04060A;
  box-shadow: 0 0 0 rgba(0, 204, 255, 0);
}
.btn-agent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -6px var(--agent-color);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--agent-color);
  color: var(--agent-color);
}
.btn-amber {
  background: var(--amber);
  color: #14100A;
}
.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -6px var(--amber);
}

/* Mastermind peg (pin: head + stem) */
.peg {
  position: relative;
  display: inline-block;
  width: 16px; height: 21px;
  flex-shrink: 0;
}
.peg::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 36%;
  height: 46%;
  border-radius: 0 0 2px 2px;
  background: var(--peg-c, var(--m-red));
  box-shadow: inset 0 -5px 6px rgba(0,0,0,.55), inset 2px 0 3px rgba(0,0,0,.28);
}
.peg::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 42%), var(--peg-c, var(--m-red));
  box-shadow: inset 0 -3px 5px rgba(0,0,0,.35), 0 0 10px -2px var(--peg-c, var(--m-red));
  z-index: 1;
}
.peg--red { --peg-c: var(--m-red); }
.peg--blue { --peg-c: var(--m-blue); }
.peg--green { --peg-c: var(--m-green); }
.peg--yellow { --peg-c: var(--m-yellow); }
.peg--white { --peg-c: var(--m-white); }
.peg--black { --peg-c: var(--m-black); }
.peg--black::before { box-shadow: inset 0 -3px 5px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.22), 0 0 10px -2px rgba(255,255,255,.25); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, .78);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.topline {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  text-align: center;
  padding: 6px 16px;
  text-transform: uppercase;
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.brand__pegs {
  display: flex;
  gap: 6px;
}
.brand__pegs .peg { width: 11px; height: 15px; }
html[data-agent="cryptographer"] .brand__pegs .peg:nth-child(1),
html[data-agent="cryptographer"] .gate-logo__pegs .peg:nth-child(1) { --peg-c: #00CCFF; }
html[data-agent="cryptographer"] .brand__pegs .peg:nth-child(2),
html[data-agent="cryptographer"] .gate-logo__pegs .peg:nth-child(2) { --peg-c: #33D9FF; }
html[data-agent="cryptographer"] .brand__pegs .peg:nth-child(3),
html[data-agent="cryptographer"] .gate-logo__pegs .peg:nth-child(3) { --peg-c: #0099CC; }
html[data-agent="cryptographer"] .brand__pegs .peg:nth-child(4),
html[data-agent="cryptographer"] .gate-logo__pegs .peg:nth-child(4) { --peg-c: #80EAFF; }
html[data-agent="hacker"] .brand__pegs .peg:nth-child(1),
html[data-agent="hacker"] .gate-logo__pegs .peg:nth-child(1) { --peg-c: #00FF88; }
html[data-agent="hacker"] .brand__pegs .peg:nth-child(2),
html[data-agent="hacker"] .gate-logo__pegs .peg:nth-child(2) { --peg-c: #33FFA3; }
html[data-agent="hacker"] .brand__pegs .peg:nth-child(3),
html[data-agent="hacker"] .gate-logo__pegs .peg:nth-child(3) { --peg-c: #00CC6D; }
html[data-agent="hacker"] .brand__pegs .peg:nth-child(4),
html[data-agent="hacker"] .gate-logo__pegs .peg:nth-child(4) { --peg-c: #80FFC4; }
html[data-agent="detective"] .brand__pegs .peg:nth-child(1),
html[data-agent="detective"] .gate-logo__pegs .peg:nth-child(1) { --peg-c: #A64DFF; }
html[data-agent="detective"] .brand__pegs .peg:nth-child(2),
html[data-agent="detective"] .gate-logo__pegs .peg:nth-child(2) { --peg-c: #BF80FF; }
html[data-agent="detective"] .brand__pegs .peg:nth-child(3),
html[data-agent="detective"] .gate-logo__pegs .peg:nth-child(3) { --peg-c: #8A2BE2; }
html[data-agent="detective"] .brand__pegs .peg:nth-child(4),
html[data-agent="detective"] .gate-logo__pegs .peg:nth-child(4) { --peg-c: #D9B3FF; }
.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__top {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .42em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 8px 14px;
  color: var(--muted);
  transition: color .25s var(--ease), text-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nav a::before,
.nav a::after {
  font-family: var(--font-mono);
  position: absolute;
  top: 50%;
  transform: translateY(-52%) scale(.6);
  opacity: 0;
  color: var(--agent-color);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  font-size: 14px;
}
.nav a::before { content: '['; left: 1px; }
.nav a::after { content: ']'; right: 1px; }
.nav a:hover, .nav a.is-active {
  color: var(--text);
  text-shadow: 0 0 14px var(--agent-soft);
}
.nav a:hover::before, .nav a:hover::after,
.nav a.is-active::before, .nav a.is-active::after {
  opacity: 1;
  transform: translateY(-52%) scale(1);
}
.header-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
}
.lang-switch a {
  padding: 4px 9px;
  border-radius: 3px;
  color: var(--muted);
  letter-spacing: .08em;
  transition: color .2s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-lang { background: var(--agent-color); color: #04060A; font-weight: 700; }
.btn--header { min-height: 42px; padding: 8px 18px; font-size: 13px; }
.nav-mobile-actions { display: none; }

/* Burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
.burger span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease), top .3s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 90px);
  background-image: url('/assets/img/hero/hero-bg.avif?v3');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(10,10,15,0), var(--bg));
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__status {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--agent-color);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.hero__status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--agent-color);
  box-shadow: 0 0 10px var(--agent-color);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.78); }
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.015em;
  color: var(--agent-color);
  text-shadow: 0 0 38px var(--agent-soft);
  margin-bottom: 20px;
}
.hero h1 .h1-line2 { color: var(--text); display: block; }
.hero__lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--muted);
  margin-bottom: 34px;
}
.first-reveal { animation: first-up .9s var(--ease) both; }
.first-reveal--d1 { animation-delay: .12s; }
.first-reveal--d2 { animation-delay: .24s; }
.first-reveal--d3 { animation-delay: .36s; }
@keyframes first-up {
  from { opacity: 0; transform: translateY(26px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Hero peg board */
.hero__board {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: clamp(24px, 3vw, 40px);
  background: rgba(13, 26, 46, .55);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero__board-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}
.code-slots {
  display: flex;
  gap: clamp(12px, 2vw, 22px);
}
.code-slot {
  width: clamp(56px, 7vw, 84px);
  height: clamp(56px, 7vw, 84px);
  border-radius: 50%;
  border: 2px dashed rgba(140, 170, 210, .3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.code-slot .peg {
  width: 52%;
  height: 74%;
  animation: peg-drop .55s var(--ease-snap) both;
}
@keyframes peg-drop {
  from { opacity: 0; transform: translateY(-26px) scale(.5); }
  60% { opacity: 1; transform: translateY(3px) scale(1.06); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.code-feedback {
  display: flex;
  gap: 10px;
  min-height: 14px;
}
.code-feedback .peg { width: 12px; height: 16px; }
.hero__board-log {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  min-height: 1.5em;
  letter-spacing: .04em;
}

/* Subscription form */
.mission-form {
  background: var(--surface);
  border: 2px solid var(--agent-color);
  border-radius: var(--r);
  box-shadow: 0 0 44px -16px var(--agent-color);
  padding: 26px 32px 28px;
}
.hero__grid .mission-form { grid-column: 1 / -1; }
.mission-form__layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px 48px;
  align-items: center;
}
.mission-form__cipher {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--agent-color);
  margin-bottom: 14px;
  min-height: 1.6em;
  letter-spacing: .02em;
}
.mission-form__title {
  font-size: 21px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.mission-form__sub {
  font-size: 13.5px;
  color: var(--muted);
}
.mission-form__row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.mission-form__row input[type="email"] {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 2px solid var(--agent-color);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: box-shadow .25s var(--ease);
}
.mission-form__row input[type="email"]::placeholder { color: var(--muted); }
.mission-form__row input[type="email"]:focus { box-shadow: 0 0 0 3px var(--agent-soft); }
button.sub-form {
  background: var(--agent-color);
  color: #04060A;
  border: none;
  border-radius: 4px;
  min-height: 50px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: normal;
}
button.sub-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px -8px var(--agent-color);
}
.mission-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.mission-form__consent a { color: var(--agent-color); }
.mission-form__consent input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid var(--agent-color);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: background-color .2s var(--ease);
}
.mission-form__consent input:checked { background: var(--agent-color); }
.mission-form__consent input:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 0px;
  width: 5px; height: 9px;
  border: solid #04060A;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.mission-form__disclaimer {
  font-size: 11px;
  color: var(--dim);
  margin-top: 12px;
}
.agent-indicator {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--agent-color);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}
.agent-indicator .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--agent-color);
  box-shadow: 0 0 8px var(--agent-color);
}

/* Sections shared */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.sec-head { margin-bottom: clamp(30px, 4vw, 50px); }
.sec-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -.01em;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.sec-title .tprefix {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--agent-color);
  font-size: .65em;
}
.sec-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
}

/* Scroll reveal (JS-gated) */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(4px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease);
  transition-delay: var(--rd, 0s);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Game cards */
.spil-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.spil-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.spil-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-glow, var(--cyan));
  box-shadow: 0 18px 44px -18px var(--card-glow, var(--cyan));
}
.spil-card__media { position: relative; overflow: hidden; }
.spil-card__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.spil-card:hover .spil-card__media img { transform: scale(1.05); }
.spil-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(10, 10, 15, .82);
  border: 1px solid var(--card-glow, var(--cyan));
  color: var(--card-glow, var(--cyan));
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.spil-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.spil-card__body h3,
.spil-card__body h2 {
  font-size: 19px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.spil-card__desc { font-size: 14px; color: var(--muted); flex: 1; }
.spil-card__cta { margin-top: 6px; }
.spil-card--cyan { --card-glow: var(--cyan); }
.spil-card--green { --card-glow: var(--green); }
.spil-card--purple { --card-glow: var(--purple); }
.spil-card--red { --card-glow: var(--red); }
.spil-card--amber { --card-glow: var(--amber); }

/* Locked card */
.spil-card--locked .spil-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(10,10,15,.5) 0 2px, rgba(10,10,15,.74) 2px 4px);
}
.spil-card__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 1;
  color: var(--text);
  font-size: 13px;
}
.spil-card__lock svg {
  width: 34px; height: 34px;
  color: var(--card-glow, var(--cyan));
  filter: drop-shadow(0 0 10px var(--card-glow, var(--cyan)));
}

/* Agent exclusive band */
.agent-spil { padding-top: 0; }
.agent-spil__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  background: var(--surface-2);
  border: 1px solid var(--agent-color);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 0 56px -24px var(--agent-color);
}
.agent-spil__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
}
.agent-spil__body {
  padding: clamp(24px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.agent-spil__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--agent-color);
  text-transform: uppercase;
}
.agent-spil__body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); text-transform: uppercase; }
.agent-spil__body p { color: var(--muted); font-size: 15px; }
.agent-spil__bonus {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
}
.agent-spil__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* Koderum (locked section) */
.koderum {
  background-image: linear-gradient(rgba(10, 10, 15, .88), rgba(10, 10, 15, .94)), url('/assets/img/sections/koderum-bg.avif');
  background-size: cover;
  background-position: center;
}
.koderum__teaser {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 14px;
  color: var(--agent-color);
  text-align: center;
}

/* Code Draw */
.codedraw__layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 4vw, 60px);
  align-items: start;
}
.codedraw__about p { color: var(--muted); margin-bottom: 14px; font-size: 15.5px; }
.codedraw__rules { display: grid; gap: 12px; margin-top: 20px; }
.codedraw__rules li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  color: var(--muted);
}
.codedraw__rules li::before {
  content: '';
  position: absolute;
  left: 4px; top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--peg-c, var(--m-red));
  box-shadow: 0 0 8px -1px var(--peg-c, var(--m-red));
}
.codedraw__rules li:nth-child(1) { --peg-c: var(--m-red); }
.codedraw__rules li:nth-child(2) { --peg-c: var(--m-blue); }
.codedraw__rules li:nth-child(3) { --peg-c: var(--m-green); }
.codedraw__rules li:nth-child(4) { --peg-c: var(--m-yellow); }
.codedraw__board {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 3vw, 32px);
}
.codedraw__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.codedraw__current {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}
.cd-cell {
  width: clamp(44px, 6vw, 56px);
  height: clamp(50px, 7vw, 64px);
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-cell.is-next { border-color: var(--amber); box-shadow: 0 0 14px -4px var(--amber); }
.codedraw__numpad {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.codedraw__numpad button {
  min-height: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.codedraw__numpad button:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
}
.codedraw__numpad button:disabled { opacity: .28; cursor: default; }
.codedraw__actions { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.codedraw__actions .btn { flex: 1; min-width: 130px; }
.codedraw__history { display: grid; gap: 10px; }
.cd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 14px;
}
.cd-row__guess {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .34em;
}
.cd-row__pegs { display: flex; gap: 6px; }
.cd-row__pegs .peg { width: 11px; height: 15px; }
.codedraw__msg {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  min-height: 1.6em;
}

/* Cryptonight */
.cryptonight {
  background-image: linear-gradient(rgba(10, 10, 15, .82), rgba(10, 10, 15, .9)), url('/assets/img/sections/cryptonight-bg.avif');
  background-size: cover;
  background-position: center;
  text-align: center;
}
.cryptonight__inner { max-width: none; }
.cryptonight h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--cyan);
  text-transform: uppercase;
  text-shadow: 0 0 36px rgba(0, 204, 255, .4);
  margin-bottom: 14px;
}
.cryptonight__sub { color: var(--muted); font-size: 16.5px; margin-bottom: 30px; }
.cryptonight__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 3px;
  padding: 6px 14px;
  margin-bottom: 26px;
  text-transform: uppercase;
}
.cryptonight__badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 9px var(--red);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 26px);
  margin-bottom: 32px;
}
.countdown__unit {
  min-width: clamp(64px, 9vw, 92px);
  background: rgba(13, 26, 46, .7);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 8px 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.countdown__num {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  display: block;
}
.countdown__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}

/* CIPHER about */
.cipher-om__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 64px);
  align-items: center;
}
.cipher-om__text p { color: var(--muted); font-size: 16px; margin-bottom: 16px; }
.cipher-om__text p em { color: var(--text); font-style: italic; }
.cipher-om__feats { display: grid; gap: 14px; margin-top: 22px; }
.cipher-om__feats li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--muted);
}
.cipher-om__feats svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--agent-color);
}
.terminal-win {
  background: rgba(0, 0, 0, .85);
  border: 1px solid var(--agent-color);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 0 44px -18px var(--agent-color);
}
.terminal-win__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(13, 26, 46, .8);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
  text-transform: uppercase;
}
.terminal-win__bar .peg { width: 9px; height: 12px; }
.terminal-win__body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
  color: var(--green);
  min-height: 200px;
}
.terminal-win__body .t-line { display: block; }
.terminal-win__body .t-dim { color: var(--dim); }
.terminal-win__body .t-cyan { color: var(--cyan); }
.terminal-win__body .t-amber { color: var(--amber); }
.caret {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: currentColor;
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* Reviews */
.anmeldelser__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.anmeldelse {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.anmeldelse:hover { transform: translateY(-5px); border-color: var(--agent-color); }
.anmeldelse__stars { display: flex; gap: 4px; color: var(--amber); }
.anmeldelse__stars svg { width: 16px; height: 16px; }
.anmeldelse__text { font-size: 14.5px; color: var(--muted); flex: 1; }
.anmeldelse__who { display: flex; align-items: center; gap: 12px; }
.anmeldelse__who img {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--agent-color);
  object-fit: cover;
}
.anmeldelse__name { font-weight: 700; font-size: 14.5px; }
.anmeldelse__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--dim);
  display: block;
}

/* FAQ */
.faq__list { display: grid; gap: 14px; }
.faq__item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .3s var(--ease);
}
.faq__item.is-open { border-color: var(--agent-color); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 16px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__arrow {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--agent-color);
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1), background-color 360ms cubic-bezier(.22, 1, .36, 1);
}
.faq__item.is-open .faq__arrow { transform: rotate(45deg); background: var(--agent-soft); }
.faq__body {
  overflow: hidden;
  color: var(--muted);
  font-size: 14.5px;
}
.faq__body > * { padding: 0 22px; }
.faq__body > *:first-child { padding-top: 2px; }
.faq__body > *:last-child { padding-bottom: 20px; }

/* Footer */
.site-footer {
  margin-top: auto;
  position: relative;
  z-index: 1;
  background: #07070C;
  border-top: 1px solid var(--line);
  padding: clamp(44px, 6vw, 70px) 0 30px;
  font-size: 14px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}
.site-footer__brandcol p { color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.site-footer h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 700;
}
.site-footer__col ul { display: grid; gap: 10px; }
.site-footer__col a {
  color: var(--muted);
  font-size: 14px;
  transition: color .2s, padding-left .25s var(--ease);
  position: relative;
}
.site-footer__col a:hover { color: var(--agent-color); padding-left: 12px; }
.site-footer__col a::before {
  content: '>';
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--agent-color);
  opacity: 0;
  transition: opacity .25s;
}
.site-footer__col a:hover::before { opacity: 1; }
.rg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.rg-row a {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  opacity: .85;
  transition: opacity .25s, color .25s;
  -webkit-tap-highlight-color: transparent;
}
.rg-row a:hover { opacity: 1; color: var(--text); }
.rg-row img { height: 30px; width: auto; }
.rg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.rg-row img[src*="ludomani"] { height: 34px; }
.rg-row img[src*="stopspillet"] { height: 34px; }
.site-footer__legal {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.8;
}
.site-footer__legal a { color: var(--muted); }
.site-footer__legal a:hover { color: var(--agent-color); }

/* Popups (gate + agent) */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 9, .8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
}
.gate-overlay.is-open { display: flex; }
.gate-box {
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(28px, 5vw, 46px);
  text-align: center;
  animation: pop-in .35s var(--ease-snap) both;
  margin: auto;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}
.gate-box--agents { max-width: 1060px; }
.gate-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.gate-logo__pegs { display: flex; gap: 9px; }
.gate-logo__pegs .peg { width: 15px; height: 20px; }
.gate-logo__text {
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 15px;
  text-transform: uppercase;
}
.gate-box h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.gate-box--agents h2 { color: var(--text); }
.gate-box__sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.gate-actions { display: grid; gap: 12px; }
.gate-actions .btn { width: 100%; }
.gate-box__disclaimer { font-size: 11px; color: var(--dim); margin-top: 18px; }
.agent-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
  text-align: left;
}
.agent-card {
  border: 3px solid var(--ac, var(--cyan));
  border-radius: var(--r);
  background: var(--acbg, #001830);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.agent-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px -16px var(--ac, var(--cyan));
}
.agent-card--krypto { --ac: var(--cyan); --acbg: #001830; }
.agent-card--hacker { --ac: var(--green); --acbg: #001808; }
.agent-card--detektiv { --ac: var(--purple); --acbg: #180030; }
.agent-card img {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ac);
  margin-bottom: 4px;
}
.agent-card h3 {
  font-size: 21px;
  color: var(--ac);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.agent-card__tag { font-size: 13.5px; color: var(--muted); }
.agent-card__bonus {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}
.agent-card__game { font-size: 12.5px; color: var(--ac); }
.agent-card .btn { margin-top: auto; width: 100%; background: var(--ac); color: #04060A; border: none; }
.agent-card--detektiv .btn { color: #fff; }
.gate-terminal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  text-align: left;
  background: rgba(0, 0, 0, .6);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
}

/* Slot modal */
.slot-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(5, 5, 9, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.slot-overlay.is-open { display: flex; }
.slot-machine {
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--agent-color);
  border-radius: var(--r);
  box-shadow: 0 0 70px -20px var(--agent-color);
  display: flex;
  flex-direction: column;
  animation: pop-in .35s var(--ease-snap) both;
}
.slot-machine__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, .4);
}
.slot-machine__name {
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  min-width: 0;
}
.slot-machine__close {
  width: 38px; height: 38px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s, transform .2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.slot-machine__close:hover { border-color: var(--red); color: var(--red); transform: rotate(90deg); }
.slot-machine__close svg { width: 18px; height: 18px; }
.slot-machine__stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.slot-machine__stats b { color: var(--amber); font-weight: 700; }
.slot-window {
  --cell: 96px;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  position: relative;
}
.slot-window::before, .slot-window::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 34px;
  z-index: 2;
  pointer-events: none;
}
.slot-window::before { top: 18px; background: linear-gradient(to bottom, var(--surface-2), transparent); }
.slot-window::after { bottom: 18px; background: linear-gradient(to top, var(--surface-2), transparent); }
.slot-reel {
  width: var(--cell);
  height: calc(var(--cell) * 3);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  position: relative;
}
.slot-reel__strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.slot-cell {
  width: var(--cell);
  height: var(--cell);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-cell svg { width: 58%; height: 58%; }
.slot-cell img {
  width: 86%;
  height: 86%;
  object-fit: cover;
  border-radius: 8px;
  user-select: none;
  pointer-events: none;
}
.slot-payline {
  position: absolute;
  left: 8px; right: 8px;
  top: 50%;
  height: calc(var(--cell) + 8px);
  transform: translateY(-50%);
  border: 1px dashed var(--agent-soft);
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}
.slot-machine__cipher {
  min-height: 2.2em;
  padding: 4px 16px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--agent-color);
}
.slot-machine__controls {
  display: flex;
  gap: 12px;
  padding: 0 16px 18px;
}
.slot-machine__controls .btn { flex: 1; }
.slot-machine__controls .btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
body.modal-open { overflow: hidden; scrollbar-gutter: stable; }

/* CIPHER HUD */
.cipher-hud {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: var(--z-hud);
  width: 300px;
  min-height: 80px;
  background: rgba(0, 0, 0, .85);
  border: 1px solid var(--agent-color);
  border-radius: 4px;
  padding: 10px 14px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: hud-in .6s var(--ease) both;
  animation-delay: 1.4s;
}
@keyframes hud-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.cipher-hud__pegs {
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 4px;
  margin-top: 5px;
  flex-shrink: 0;
}
.cipher-hud__pegs .peg { width: 8px; height: 11px; }
.cipher-hud__text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--agent-color);
  min-width: 0;
}
.cipher-hud__close {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: transparent;
  border: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.cipher-hud__close:hover { color: var(--red); }

/* Chat */
.chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--z-chat);
  width: 60px; height: 60px;
  border-radius: 50%;
  border: 1px solid var(--agent-color);
  background: var(--surface);
  color: var(--agent-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 30px -8px var(--agent-color);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.chat-toggle:hover { transform: translateY(-3px) scale(1.05); }
.chat-toggle svg { width: 27px; height: 27px; }
.chat-toggle__ping {
  position: absolute;
  top: 2px; right: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.chat-panel {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: var(--z-chat);
  width: 360px;
  max-width: calc(100vw - 28px);
  height: 460px;
  max-height: calc(100dvh - 110px);
  background: var(--surface-2);
  border: 1px solid var(--agent-color);
  border-radius: var(--r);
  box-shadow: 0 18px 60px -18px var(--agent-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(.97);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.chat-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear 0s;
}
.chat-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .45);
  border-bottom: 1px solid var(--line);
}
.chat-panel__head img {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--agent-color);
}
.chat-panel__who { min-width: 0; flex: 1; }
.chat-panel__name { font-weight: 700; font-size: 14px; display: block; }
.chat-panel__status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-panel__status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.chat-panel__close {
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.chat-panel__close:hover { color: var(--red); }
.chat-panel__close svg { width: 17px; height: 17px; }
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.chat-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.55;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 2px;
  color: var(--text);
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--agent-color);
  color: #04060A;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}
.chat-msg--typing {
  font-family: var(--font-mono);
  color: var(--agent-color);
  background: transparent;
  border: none;
  padding: 2px 13px;
  font-size: 12px;
}
.chat-form {
  display: flex;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .3);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 13px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s;
}
.chat-form input:focus { border-color: var(--agent-color); }
.chat-form button {
  width: 42px; height: 42px;
  flex-shrink: 0;
  background: var(--agent-color);
  border: none;
  border-radius: 4px;
  color: #04060A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.chat-form button:hover { transform: translateY(-2px); }
.chat-form button svg { width: 18px; height: 18px; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--z-banner);
  width: 380px;
  max-width: calc(100vw - 28px);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
  display: none;
}
.cookie-banner.is-visible { display: block; animation: hud-in .5s var(--ease) both; }
.cookie-banner p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.cookie-banner p a { color: var(--agent-color); }
.cookie-banner__actions { display: flex; gap: 10px; }
.cookie-banner__actions .btn { flex: 1; min-height: 42px; padding: 8px 12px; font-size: 12px; }

/* Toast */
.toast-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 9, .7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.toast-overlay.is-visible { display: flex; }
.toast {
  width: 100%;
  max-width: 420px;
  background: var(--surface-2);
  border: 1px solid var(--green);
  border-radius: var(--r);
  padding: 30px 26px;
  text-align: center;
  animation: pop-in .3s var(--ease-snap) both;
}
.toast.is-error { border-color: var(--red); }
.toast__icon {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px solid var(--green);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast.is-error .toast__icon { border-color: var(--red); color: var(--red); }
.toast__icon svg { width: 26px; height: 26px; }
.toast__title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.toast__text { font-size: 13.5px; color: var(--muted); font-family: var(--font-mono); }

/* Legal pages */
.legal-strip { height: 3px; background: var(--cyan); }
.legal-main { background: #F5F5F5; color: #181C24; }
.legal-hero { padding: clamp(40px, 6vw, 70px) 0 8px; }
.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  color: #10141C;
}
.legal-hero .legal-date {
  font-family: var(--font-mono);
  color: #5A6678;
  font-size: 13px;
  margin-top: 10px;
}
.legal-content { padding: 30px 0 clamp(50px, 7vw, 90px); }
.legal-content h2 {
  font-size: 19px;
  text-transform: uppercase;
  margin: 34px 0 12px;
  color: #10141C;
}
.legal-content p, .legal-content li { font-size: 15px; color: #2A3140; margin-bottom: 10px; }
.legal-content ul { padding-left: 0; display: grid; gap: 8px; margin-bottom: 14px; }
.legal-content ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 0;
}
.legal-content ul li::before {
  content: '';
  position: absolute;
  left: 4px; top: 9px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
}
.legal-content a { color: #0077AA; }
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
.legal-content th, .legal-content td {
  border: 1px solid #D5DAE2;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  color: #2A3140;
}
.legal-content th { background: #E8ECF2; font-weight: 700; color: #10141C; }

/* Kontakt */
.kontakt-hero { padding: clamp(50px, 7vw, 90px) 0 0; }
.kontakt-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  text-transform: uppercase;
  color: var(--agent-color);
}
.kontakt-hero p { color: var(--muted); margin-top: 14px; font-size: 16px; }
.kontakt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.kontakt-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.kontakt-card:hover { transform: translateY(-5px); border-color: var(--agent-color); }
.kontakt-card svg {
  width: 30px; height: 30px;
  color: var(--agent-color);
  margin-bottom: 6px;
}
.kontakt-card h3 { font-size: 17px; text-transform: uppercase; }
.kontakt-card p { font-size: 14.5px; color: var(--muted); }
.kontakt-card a { color: var(--agent-color); }
.kontakt-map { padding-top: 0; }
.kontakt-map__frame {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  filter: grayscale(.4) contrast(1.05);
}
.kontakt-map__frame iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* Games page */
.spil-hero { padding: clamp(50px, 7vw, 90px) 0 0; }
.spil-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  text-transform: uppercase;
  color: var(--agent-color);
}
.spil-hero p { color: var(--muted); margin-top: 14px; font-size: 16px; }
.spil-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .05em;
  padding: 9px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
  text-transform: uppercase;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.filter-chip:hover { color: var(--text); border-color: var(--agent-color); }
.filter-chip.is-active {
  background: var(--agent-color);
  border-color: var(--agent-color);
  color: #04060A;
  font-weight: 700;
}
.katalog-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.katalog-grid .spil-card.is-hidden { display: none; }

/* Coderoom note */
.coderoom-note__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.coderoom-note__card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.coderoom-note__card:hover { transform: translateY(-5px); border-color: var(--agent-color); }
.coderoom-note__card svg {
  width: 30px; height: 30px;
  color: var(--agent-color);
  margin-bottom: 6px;
}
.coderoom-note__card h3 { font-size: 17px; text-transform: uppercase; }
.coderoom-note__card p { font-size: 14.5px; color: var(--muted); }

.table-wrap { overflow-x: auto; }

/* Denied + 404 */
.denied-main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(60px, 10vw, 140px) 0;
}
.denied-box { max-width: 560px; margin-inline: auto; }
.denied-box .gate-logo { margin-bottom: 30px; }
.denied-box h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.denied-box p { color: var(--muted); margin-bottom: 28px; }
.denied-box .terminal-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  margin-bottom: 30px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  #code-rain { display: none; }
}

/* ===== 1220 tablet ===== */
@media (max-width: 1220px) {
  .burger { display: block; }
  .header-cta .lang-switch { display: none; }
  .header-cta .btn--header { display: none; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    max-height: calc(100dvh - var(--header-offset, 64px));
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 24px 30px;
    background: linear-gradient(160deg, #0A0A0F 0%, #0D1A2E 100%);
    border-top: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear .3s;
  }
  .nav[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s linear 0s;
  }
  .nav a {
    width: 100%;
    padding: 15px 4px;
    font-size: 19px;
    border-bottom: 1px solid var(--line);
  }
  .nav a::before, .nav a::after { display: none; }
  .nav-mobile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
  }
  .nav-mobile-actions .lang-switch { display: flex; }

  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brandcol { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__board { order: -1; max-width: 560px; margin-inline: auto; width: 100%; }
  .mission-form__layout { grid-template-columns: 1fr; gap: 16px; }
  .agent-cards { grid-template-columns: 1fr; }
  .gate-box--agents { max-width: 560px; }
  .agent-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .agent-card img { margin-bottom: 0; }
  .agent-card h3 { width: calc(100% - 100px); }
  .katalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 820 mobile ===== */
@media (max-width: 820px) {
  .spil-grid { grid-template-columns: 1fr; }
  .katalog-grid { grid-template-columns: 1fr; }
  .anmeldelser__grid { grid-template-columns: 1fr; }
  .coderoom-note__grid { grid-template-columns: 1fr; }
  .kontakt-grid { grid-template-columns: 1fr; }
  .codedraw__layout { grid-template-columns: 1fr; }
  .cipher-om__layout { grid-template-columns: 1fr; }
  .agent-spil__box { grid-template-columns: 1fr; }
  .agent-spil__media img { min-height: 200px; max-height: 280px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .cipher-hud { display: none; }
  .mission-form__row { flex-direction: column; }
  .countdown__unit { min-width: 64px; }
  .kontakt-map__frame iframe { height: 320px; }
  .topline { font-size: 9.5px; }
}

@media (max-width: 520px) {
  .container { padding-inline: 16px; }
  .gate-box { padding: 24px 18px; }
  .agent-card { padding: 16px; }
  .agent-card img { width: 64px; height: 64px; }
  .agent-card h3 { width: calc(100% - 80px); font-size: 18px; }
  .slot-window { --cell: 78px; gap: 8px; }
  .codedraw__numpad { gap: 6px; }
  .codedraw__numpad button { min-height: 40px; font-size: 15px; }
  .cd-row__guess { letter-spacing: .22em; font-size: 15px; }
  .chat-panel { right: 14px; }
  .chat-toggle { right: 14px; bottom: 14px; }
  .cookie-banner { right: 14px; bottom: 14px; }
}

@media (max-width: 430px) {
  .slot-window { --cell: 66px; }
  .brand__sub { display: none; }
  .brand__top { font-size: 15px; }
  .code-slot { width: 52px; height: 52px; }
  .countdown { gap: 8px; }
  .countdown__unit { min-width: 58px; padding: 10px 6px 8px; }
  .codedraw__current { gap: 6px; }
  .cd-cell { width: 40px; height: 48px; font-size: 19px; }
}

@media (max-width: 360px) {
  .slot-window { --cell: 56px; }
  .codedraw__numpad { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cd-cell { width: 36px; height: 44px; }
  .rg-row { gap: 16px; }
}
