/* The front page as a "game world" (Per 2026-11-10): the CRM's own surfaces as
   3D scenes in pure CSS, on InfraCom's palette turned to night — night teal as
   the ground, teal and orange as light. Loaded only by index.html, after
   stil.css, and scoped to body.varld so no other page changes.

   Rules this file keeps:
   - The big moving things animate transform/opacity only. A few small ones
     are paint-bound on purpose (the headline shimmer, glows, the typing clip,
     the holo border); every scene pauses while it is off screen (.vilar, set
     by varld.js), so what is not visible costs nothing.
   - preserve-3d chains carry no opacity < 1, filter or overflow on the way
     down: any of those flattens the scene in Chromium. Fades happen on leaves.
   - prefers-reduced-motion gets a still, fully readable page (bottom of file).
   - Every name in the scenes is invented. */

@property --vinkel {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

body.varld {
  --natt: #000f0e;
  --natt-2: #002625;
  --glod: #2fd5c8;
  --glod-svag: rgba(47, 213, 200, 0.16);
  --orange-glod: #ff8a3d;
  --text-ljus: rgba(222, 242, 240, 0.8);
  --panel: linear-gradient(160deg, rgba(10, 64, 62, 0.94), rgba(2, 26, 25, 0.96));
  --kant: rgba(116, 230, 220, 0.24);
  background: var(--natt);
  color: var(--text-ljus);
  overflow-x: clip;
}

/* --- Header on the dark world ------------------------------------------ */

.varld header.topp {
  background: rgba(0, 15, 14, 0.55);
  border-bottom-color: rgba(116, 230, 220, 0.12);
}
.varld header.topp.is-scrolled {
  background: rgba(0, 15, 14, 0.82);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
/* The logo file is dark-on-light; on night teal it is drawn white. */
.varld .marke__logo {
  filter: brightness(0) invert(1);
}
.varld .marke__produkt {
  color: #fff;
  border-left-color: rgba(255, 255, 255, 0.22);
}
.varld nav.meny a:not(.knapp) {
  color: rgba(230, 246, 244, 0.86);
}
.varld nav.meny a:not(.knapp):hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.varld .meny__toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.varld .meny__toggle:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.4);
}
@media (max-width: 1040px) {
  .js .varld .meny__lankar {
    background: rgba(0, 24, 23, 0.97);
    border-color: rgba(116, 230, 220, 0.16);
  }
}

/* --- Type and buttons --------------------------------------------------- */

.varld h2,
.varld h3 {
  color: #fff;
}
.varld p {
  color: var(--text-ljus);
}
.varld .etikett {
  color: var(--orange-glod);
}
.varld .knapp.sekundar {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.varld .knapp.sekundar:hover {
  background: #fff;
  color: var(--natt-2);
  border-color: #fff;
}
.varld .knapp.primar {
  box-shadow: 0 0 0 0 rgba(234, 91, 12, 0.5), 0 8px 26px rgba(234, 91, 12, 0.35);
}
.varld .knapp.glod {
  animation: knappglod 2.8s ease-in-out infinite;
}
@keyframes knappglod {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 91, 12, 0.55), 0 8px 26px rgba(234, 91, 12, 0.35); }
  60% { box-shadow: 0 0 0 14px rgba(234, 91, 12, 0), 0 8px 34px rgba(234, 91, 12, 0.5); }
}

/* --- Hero: the start screen --------------------------------------------- */

.varld section.varld-hjalte {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 70px);
  min-height: calc(100svh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 0 0;
  background:
    radial-gradient(900px 520px at 78% 38%, rgba(47, 213, 200, 0.16), transparent 62%),
    radial-gradient(760px 420px at 12% 88%, rgba(234, 91, 12, 0.13), transparent 60%),
    linear-gradient(180deg, #001a18, var(--natt) 70%);
}

.stjarnfalt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The grid floor recedes to a horizon; its lines run toward the viewer. */
.golv {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  perspective: 520px;
  perspective-origin: 50% 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 96%);
  mask-image: linear-gradient(to top, #000 30%, transparent 96%);
}
.golv__rutnat {
  position: absolute;
  left: -120%;
  right: -120%;
  bottom: 0;
  height: 2200px;
  transform-origin: 50% 100%;
  transform: rotateX(80deg);
  background-image:
    linear-gradient(rgba(47, 213, 200, 0.42) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(47, 213, 200, 0.3) 1.5px, transparent 1.5px);
  background-size: 64px 64px;
  animation: golv 2.4s linear infinite;
}
/* The floor moves by transform, one cell (64px) per loop, so the 2200px layer
   is composited once instead of re-rasterised every frame. Origin is the near
   edge; the gap it opens at the far end lies under the horizon mask. */
@keyframes golv {
  from { transform: rotateX(80deg) translateY(0); }
  to { transform: rotateX(80deg) translateY(64px); }
}

/* Scrolled-away scenes hold still (varld.js toggles .vilar). */
.varld .vilar,
.varld .vilar *,
.varld .vilar *::before,
.varld .vilar *::after {
  animation-play-state: paused !important;
}
.horisont {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 38%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(47, 213, 200, 0.8), rgba(255, 138, 61, 0.8), transparent);
  box-shadow: 0 0 30px 6px rgba(47, 213, 200, 0.25);
  pointer-events: none;
}

.hjalte__rutnat {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: center;
}

.varld .varld-hjalte h1 {
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, #fff 18%, #a8fff5 38%, #ffc08f 52%, #fff 70%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: skimmer 9s linear infinite, upp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  /* No filter here: the shimmer repaints the text every frame, and a drop-shadow
     on top of that doubled the paint cost of the whole hero. */
}
@keyframes skimmer {
  from { background-position: 100% 0; }
  to { background-position: -160% 0; }
}
.varld-hjalte .etikett,
.varld-hjalte .ingress,
.varld-hjalte .knapprad {
  animation: upp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.varld-hjalte .etikett { animation-delay: 0.05s; }
.varld-hjalte .ingress { animation-delay: 0.25s; }
.varld-hjalte .knapprad { animation-delay: 0.4s; }
@keyframes upp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}
.varld-hjalte .ingress {
  color: rgba(222, 242, 240, 0.86);
}
.etikett .puls {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--glod);
  box-shadow: 0 0 0 0 rgba(47, 213, 200, 0.7);
  animation: puls 1.8s ease-out infinite;
  vertical-align: 1px;
}
@keyframes puls {
  to { box-shadow: 0 0 0 12px rgba(47, 213, 200, 0); }
}

/* --- The 3D stage ---------------------------------------------------------- */

.scen {
  position: relative;
  height: 560px;
  perspective: 1500px;
  perspective-origin: 50% 40%;
}
/* Intro: the world swings in from the side. Transform only — an opacity here
   would flatten everything below it. */
.scen__intro {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: scen-in 1.8s cubic-bezier(0.16, 1, 0.3, 1) both 0.2s;
}
@keyframes scen-in {
  from { transform: translateZ(-900px) rotateY(-60deg) rotateX(20deg); }
  to { transform: none; }
}
/* The mouse tilt: varld.js writes --tx/--ty (degrees). */
.scen__varld {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(calc(12deg + var(--ty, 0deg))) rotateY(calc(-20deg + var(--tx, 0deg)));
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.lager {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}
.lager--kund { transform: translate(-50%, -50%) translate3d(0, 0, 60px); }
.lager--pipe { transform: translate(-50%, -50%) translate3d(-150px, -190px, -140px) rotateY(10deg); }
.lager--samtal { transform: translate(-50%, -50%) translate3d(170px, 150px, 170px) rotateY(-8deg); }
.lager--mejl { transform: translate(-50%, -50%) translate3d(200px, -120px, -60px) rotateY(-14deg); }
.lager--ai { transform: translate(-50%, -50%) translate3d(-30px, 240px, 130px) rotateY(8deg); }
.lager--hud { transform: translate(-50%, -50%) translate3d(-30px, -250px, 140px); }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--kant);
  border-radius: 16px;
  padding: 14px 16px;
  color: #dff6f3;
  font-size: 12px;
  line-height: 1.4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 44px rgba(47, 213, 200, 0.12);
  animation: svava 7s ease-in-out infinite, tona-in 1s ease both;
}
.lager--pipe .panel { animation-delay: -1.2s, 0.7s; }
.lager--samtal .panel { animation-delay: -3s, 1s; }
.lager--mejl .panel { animation-delay: -4.6s, 0.85s; }
.lager--ai .panel { animation-delay: -2.2s, 1.15s; }
.lager--kund .panel { animation-delay: 0s, 0.5s; }
@keyframes svava {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes tona-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel__topp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(222, 246, 243, 0.7);
  margin-bottom: 10px;
}
.prick {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.prick--teal { background: var(--glod); box-shadow: 0 0 10px var(--glod); }
.prick--orange { background: var(--orange-glod); box-shadow: 0 0 10px var(--orange-glod); }

/* The holo border: a conic gradient that turns around the card. */
.panel--holo {
  width: 290px;
  padding: 18px 18px 16px;
  border-color: transparent;
  background:
    var(--panel) padding-box,
    conic-gradient(from var(--vinkel), rgba(47, 213, 200, 0.15), #2fd5c8, rgba(255, 138, 61, 0.9), rgba(47, 213, 200, 0.15) 60%, rgba(47, 213, 200, 0.15)) border-box;
  border: 1.5px solid transparent;
  animation: svava 7s ease-in-out infinite, tona-in 1s ease both 0.5s, holo 5s linear infinite;
}
@keyframes holo {
  to { --vinkel: 360deg; }
}
.kundkort__huvud {
  display: flex;
  gap: 12px;
  align-items: center;
}
.kundkort__huvud strong {
  display: block;
  font-size: 15px;
  color: #fff;
}
.kundkort__huvud small {
  color: rgba(222, 246, 243, 0.6);
}
.kundkort__logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f8a90, #055559);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 18px rgba(47, 213, 200, 0.35);
}
.chips {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.chips span {
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(47, 213, 200, 0.35);
  color: #9ff3ea;
  font-size: 11px;
}
.chips span:first-child {
  border-color: rgba(255, 138, 61, 0.5);
  color: #ffc08f;
}
.nyckeltal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}
.nyckeltal div {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 7px 8px;
}
.nyckeltal dt {
  font-size: 10px;
  color: rgba(222, 246, 243, 0.55);
}
.nyckeltal dd {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.stapel {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 38px;
}
.stapel i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--glod), rgba(47, 213, 200, 0.15));
  transform-origin: bottom;
  animation: stapel 3.2s ease-in-out infinite alternate;
}
.stapel i:nth-child(1) { height: 30%; animation-delay: -0.2s; }
.stapel i:nth-child(2) { height: 45%; animation-delay: -0.9s; }
.stapel i:nth-child(3) { height: 38%; animation-delay: -1.4s; }
.stapel i:nth-child(4) { height: 62%; animation-delay: -0.5s; }
.stapel i:nth-child(5) { height: 55%; animation-delay: -2.1s; }
.stapel i:nth-child(6) { height: 74%; animation-delay: -1.1s; }
.stapel i:nth-child(7) { height: 82%; animation-delay: -2.6s; }
.stapel i:nth-child(8) { height: 100%; animation-delay: -0.3s; background: linear-gradient(180deg, var(--orange-glod), rgba(255, 138, 61, 0.15)); }
@keyframes stapel {
  from { transform: scaleY(0.55); }
  to { transform: scaleY(1); }
}

/* Mini pipeline: one deal travels the three columns and bursts at Vunnen. */
.minipipe {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 8px;
}
.minipipe__kol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 112px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}
.minipipe__kol b {
  font-size: 10px;
  font-weight: 600;
  color: rgba(222, 246, 243, 0.6);
}
.minipipe__kol i {
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}
.minipipe__kol--vunnen {
  background: rgba(47, 213, 200, 0.08);
  box-shadow: inset 0 0 0 1px rgba(47, 213, 200, 0.25);
}
.minipipe__affar {
  position: absolute;
  left: 6px;
  top: 52px;
  width: 80px;
  padding: 5px 7px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ea5b0c, #ff8a3d);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 6px 18px rgba(234, 91, 12, 0.5);
  animation: affar 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.minipipe__affar small {
  display: block;
  font-weight: 500;
  opacity: 0.9;
}
@keyframes affar {
  0%, 18% { transform: translateX(0); }
  32%, 50% { transform: translateX(100px) translateY(-4px); }
  64%, 88% { transform: translateX(200px); background: linear-gradient(135deg, #12a99d, #2fd5c8); box-shadow: 0 6px 22px rgba(47, 213, 200, 0.6); }
  100% { transform: translateX(200px); }
}
.gnistor {
  position: absolute;
  left: 246px;
  top: 66px;
  width: 0;
  height: 0;
}
.gnistor s {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd2a8;
  box-shadow: 0 0 10px #ff8a3d;
  opacity: 0;
  animation: gnista 6s ease-out infinite;
}
.gnistor s:nth-child(1) { --gx: 34px; --gy: 0; }
.gnistor s:nth-child(2) { --gx: 24px; --gy: 24px; }
.gnistor s:nth-child(3) { --gx: 0; --gy: 34px; }
.gnistor s:nth-child(4) { --gx: -24px; --gy: 24px; }
.gnistor s:nth-child(5) { --gx: -34px; --gy: 0; }
.gnistor s:nth-child(6) { --gx: -24px; --gy: -24px; }
.gnistor s:nth-child(7) { --gx: 0; --gy: -34px; }
.gnistor s:nth-child(8) { --gx: 24px; --gy: -24px; }
@keyframes gnista {
  0%, 63% { opacity: 0; transform: translate(0, 0) scale(1); }
  65% { opacity: 1; }
  80% { opacity: 0; transform: translate(var(--gx), var(--gy)) scale(0.3); }
  100% { opacity: 0; }
}

/* Incoming call: rings pulse around the avatar. */
.panel--samtal {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 290px;
}
.ringer {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
}
.ringer span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a3d, #ea5b0c);
  color: #fff;
  font-weight: 700;
  animation: skaka 1.6s ease-in-out infinite;
}
.ringer::before,
.ringer::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 138, 61, 0.7);
  animation: ring 1.6s ease-out infinite;
}
.ringer::after {
  animation-delay: 0.8s;
}
@keyframes ring {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(2.1); opacity: 0; }
}
@keyframes skaka {
  0%, 60%, 100% { transform: rotate(0); }
  65% { transform: rotate(-12deg); }
  72% { transform: rotate(12deg); }
  79% { transform: rotate(-8deg); }
  86% { transform: rotate(6deg); }
}
.samtal__text {
  flex: 1;
  min-width: 0;
}
.samtal__text small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(222, 246, 243, 0.55);
}
.samtal__text strong {
  display: block;
  font-size: 14px;
  color: #fff;
}
.samtal__text em {
  font-style: normal;
  font-size: 11px;
  color: #9ff3ea;
}
.svara {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #19b38a;
  color: #fff;
  font-size: 11px;
  box-shadow: 0 0 16px rgba(25, 179, 138, 0.6);
}

/* Inbox: the top row drops in, pauses, and leaves for the next one. */
.lager--mejl .panel {
  width: 220px;
}
.inkorg {
  list-style: none;
  margin: 0;
  padding: 0;
}
.inkorg li {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.04);
}
.inkorg b {
  font-size: 11.5px;
  color: #fff;
}
.inkorg span {
  font-size: 10.5px;
  color: rgba(222, 246, 243, 0.6);
}
.inkorg__ny {
  position: relative;
  background: rgba(255, 138, 61, 0.14) !important;
  box-shadow: inset 3px 0 0 var(--orange-glod);
  animation: nymejl 5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes nymejl {
  0% { transform: translateY(-30px) scale(0.92); opacity: 0; }
  12%, 82% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* AI suggestion that types itself (clip-path, so any font works). */
.panel--ai {
  display: flex;
  align-items: center;
  gap: 10px;
}
.miniorb {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #2fd5c8 35%, #055559 75%);
  box-shadow: 0 0 22px rgba(47, 213, 200, 0.8);
  animation: andas 2.4s ease-in-out infinite;
}
@keyframes andas {
  50% { transform: scale(1.15); box-shadow: 0 0 34px rgba(47, 213, 200, 1); }
}
.forslag {
  font-size: 12px;
  color: #fff;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  animation: skriv 6s steps(42) infinite;
}
@keyframes skriv {
  0% { clip-path: inset(0 100% 0 0); }
  45%, 90% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* HUD: goal ring and forecast counter. */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(0, 20, 19, 0.85);
  border: 1px solid rgba(255, 138, 61, 0.4);
  box-shadow: 0 0 30px rgba(255, 138, 61, 0.2);
  color: #fff;
  animation: svava 6s ease-in-out infinite -1s, tona-in 1s ease both 1.3s;
}
.hud small {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 192, 143, 0.85);
}
.hud strong {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.malring {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}
.malring circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 4;
}
.malring .malring__fyll {
  stroke: var(--orange-glod);
  stroke-linecap: round;
  stroke-dasharray: 113;
  stroke-dashoffset: 113;
  animation: malring 3s cubic-bezier(0.22, 1, 0.36, 1) forwards 1.4s;
}
@keyframes malring {
  to { stroke-dashoffset: 20; }
}

/* Event ticker along the bottom of the hero. */
.flode {
  position: relative;
  z-index: 2;
  margin-top: 56px;
  border-top: 1px solid rgba(47, 213, 200, 0.18);
  background: rgba(0, 15, 14, 0.6);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.flode__spar {
  display: flex;
  width: max-content;
  gap: 44px;
  padding: 14px 0;
  animation: flode 42s linear infinite;
}
.flode span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(222, 246, 243, 0.78);
}
.flode i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--glod);
  box-shadow: 0 0 8px var(--glod);
}
.flode i.ok { background: #19d39b; box-shadow: 0 0 8px #19d39b; }
.flode i.orange { background: var(--orange-glod); box-shadow: 0 0 8px var(--orange-glod); }
@keyframes flode {
  to { transform: translateX(-50%); }
}

/* --- Levels -------------------------------------------------------------- */

.varld section.intro {
  padding: 110px 0 20px;
  text-align: center;
}
.varld section.intro h2 {
  margin-inline: auto;
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 50px);
  letter-spacing: -0.03em;
}
.varld section.intro p {
  margin-inline: auto;
  font-size: 18px;
}

.varld section.niva,
.varld section.niva-ai {
  position: relative;
  padding: 90px 0;
  overflow: clip;
}
.varld section.niva-ai {
  background:
    radial-gradient(700px 420px at 75% 50%, rgba(47, 213, 200, 0.12), transparent 65%),
    linear-gradient(180deg, transparent, rgba(0, 38, 37, 0.5), transparent);
}
.niva__rutnat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}
.niva--spegel .niva__text {
  order: 2;
}
.niva__nr {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-glod);
  margin-bottom: 14px;
}
.niva__nr::before {
  content: '';
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--orange-glod), transparent);
}
.varld .niva__text h3 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.varld .niva__text p {
  font-size: 17px;
}
/* XP bar: fills when the level scrolls in (.syns comes from sajt.js). */
.xp {
  height: 6px;
  max-width: 280px;
  margin-top: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.xp i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--glod), var(--orange-glod));
  box-shadow: 0 0 14px rgba(47, 213, 200, 0.7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
}
.syns .xp i {
  transform: scaleX(1);
}

.niva__scen {
  position: relative;
  height: 440px;
  perspective: 1200px;
}
.niva__scen::before {
  content: "";
  position: absolute;
  inset: -12% -18%;
  background:
    radial-gradient(closest-side, rgba(47, 213, 200, 0.16), transparent 70%),
    radial-gradient(40% 30% at 70% 80%, rgba(255, 138, 61, 0.1), transparent 70%);
  pointer-events: none;
}
.niva__scen::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -6%;
  height: 46%;
  background-image:
    linear-gradient(rgba(47, 213, 200, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 213, 200, 0.16) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: rotateX(72deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent);
  pointer-events: none;
}

/* Level 01: an isometric stack of the card's layers that pulls apart. */
.explod {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300px;
  height: 190px;
  margin: -95px 0 0 -150px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-38deg);
  animation: snurra-lugnt 18s ease-in-out infinite alternate;
}
@keyframes snurra-lugnt {
  from { transform: rotateX(58deg) rotateZ(-38deg); }
  to { transform: rotateX(52deg) rotateZ(-22deg); }
}
.platta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--kant);
  box-shadow: 0 0 40px rgba(47, 213, 200, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateZ(0);
}
.platta b {
  font-size: 17px;
}
.platta span {
  font-size: 12.5px;
  color: rgba(222, 246, 243, 0.65);
}
.platta--4 {
  background: linear-gradient(160deg, rgba(12, 90, 86, 0.96), rgba(3, 34, 33, 0.97));
  border-color: rgba(47, 213, 200, 0.55);
}
.platta--3 { border-color: rgba(255, 138, 61, 0.45); }
.avatarer {
  display: flex;
  gap: 4px;
}
.avatarer i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d, #ea5b0c);
}
.avatarer i:nth-child(2) { background: linear-gradient(135deg, #2fd5c8, #0e6b70); }
.avatarer i:nth-child(3) { background: linear-gradient(135deg, #74a5a8, #055559); }
.avatarer i:nth-child(4) { background: rgba(255, 255, 255, 0.12); }
.syns .platta--1 { animation: lyft1 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.syns .platta--2 { animation: lyft2 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.syns .platta--3 { animation: lyft3 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.syns .platta--4 { animation: lyft4 7s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes lyft1 { 0%, 8%, 92%, 100% { transform: translateZ(0); } 30%, 70% { transform: translateZ(0); } }
@keyframes lyft2 { 0%, 8%, 92%, 100% { transform: translateZ(2px); } 30%, 70% { transform: translateZ(70px); } }
@keyframes lyft3 { 0%, 8%, 92%, 100% { transform: translateZ(4px); } 30%, 70% { transform: translateZ(140px); } }
@keyframes lyft4 { 0%, 8%, 92%, 100% { transform: translateZ(6px); } 30%, 70% { transform: translateZ(210px); } }
/* A scan line sweeps through the stack while it is open. */
.skanner {
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  background: linear-gradient(90deg, transparent, rgba(47, 213, 200, 0.5), transparent);
  background-size: 30% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  transform: translateZ(105px);
  pointer-events: none;
}
.syns .skanner {
  animation: skanna 7s linear infinite;
}
@keyframes skanna {
  0%, 30% { opacity: 0; background-position: -40% 0; }
  35% { opacity: 1; }
  65% { opacity: 1; background-position: 140% 0; }
  70%, 100% { opacity: 0; background-position: 140% 0; }
}

/* Level 02: a tilted board; three deals hop between lanes like game pieces. */
.bord {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 330px;
  margin: -165px 0 0 -250px;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-8deg);
}
.bord__yta {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(2, 30, 29, 0.92);
  border: 1px solid var(--kant);
  box-shadow: 0 0 80px rgba(47, 213, 200, 0.18), 0 40px 80px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
}
.bana {
  border-radius: 12px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 18px, transparent 18px 36px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px;
}
.bana b {
  font-size: 11px;
  font-weight: 600;
  color: rgba(222, 246, 243, 0.7);
}
.bana--mal {
  background: rgba(47, 213, 200, 0.1);
  border-color: rgba(47, 213, 200, 0.45);
  box-shadow: inset 0 0 30px rgba(47, 213, 200, 0.2);
}
.pjas {
  position: absolute;
  left: 18px;
  width: 100px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ea5b0c, #ff8a3d);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 91, 12, 0.45);
  transform: translateZ(8px);
}
.pjas small {
  display: block;
  font-weight: 500;
  opacity: 0.9;
}
.pjas--1 { top: 56px; }
.pjas--2 { top: 142px; }
.pjas--3 { top: 228px; }
.syns .pjas { animation: hopp 9s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
.syns .pjas--2 { animation-delay: 1.4s; }
.syns .pjas--3 { animation-delay: 2.8s; }
/* Lanes are 122px apart: (500 − 2×10 padding − 3×8 gaps) / 4 = 114, + 8 gap. */
@keyframes hopp {
  0%, 10% { transform: translate3d(0, 0, 8px); }
  15% { transform: translate3d(61px, 0, 70px); }
  20%, 32% { transform: translate3d(122px, 0, 8px); }
  37% { transform: translate3d(183px, 0, 70px); }
  42%, 54% { transform: translate3d(244px, 0, 8px); }
  59% { transform: translate3d(305px, 0, 80px); }
  64%, 90% { transform: translate3d(366px, 0, 8px); background: linear-gradient(135deg, #12a99d, #2fd5c8); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5), 0 0 28px rgba(47, 213, 200, 0.8); }
  96% { transform: translate3d(366px, 0, 8px) scale(0.6); opacity: 0; }
  100% { transform: translate3d(0, 0, 8px); opacity: 0; }
}
.vinstring {
  position: absolute;
  right: 46px;
  top: 50%;
  width: 90px;
  height: 90px;
  margin-top: -45px;
  border-radius: 50%;
  border: 3px solid rgba(47, 213, 200, 0.9);
  box-shadow: 0 0 30px rgba(47, 213, 200, 0.8);
  opacity: 0;
  transform: translateZ(2px) scale(0.3);
}
.syns .vinstring {
  animation: vinst 3s ease-out infinite 1.8s;
}
@keyframes vinst {
  0% { opacity: 0.9; transform: translateZ(2px) scale(0.3); }
  60%, 100% { opacity: 0; transform: translateZ(2px) scale(2.4); }
}
.poang {
  display: inline-flex;
  flex-direction: column;
  margin-top: 22px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 138, 61, 0.4);
  background: rgba(255, 138, 61, 0.07);
  box-shadow: 0 0 30px rgba(255, 138, 61, 0.15);
}
.poang small {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 192, 143, 0.85);
}
.poang strong {
  font-size: 28px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Level 03: eight day cards on a ring, turning. */
.karusell-scen {
  position: absolute;
  inset: 0;
  perspective: 1100px;
  perspective-origin: 50% 30%;
}
.karusell {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  height: 120px;
  margin: -60px 0 0 -95px;
  transform-style: preserve-3d;
  animation: karusell 32s linear infinite;
}
@keyframes karusell {
  from { transform: rotateX(-8deg) rotateY(0); }
  to { transform: rotateX(-8deg) rotateY(-360deg); }
}
.dagkort {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--kant);
  box-shadow: 0 0 30px rgba(47, 213, 200, 0.14);
  color: #fff;
}
.dagkort:nth-child(1) { transform: rotateY(0deg) translateZ(270px); }
.dagkort:nth-child(2) { transform: rotateY(45deg) translateZ(270px); }
.dagkort:nth-child(3) { transform: rotateY(90deg) translateZ(270px); }
.dagkort:nth-child(4) { transform: rotateY(135deg) translateZ(270px); }
.dagkort:nth-child(5) { transform: rotateY(180deg) translateZ(270px); }
.dagkort:nth-child(6) { transform: rotateY(225deg) translateZ(270px); }
.dagkort:nth-child(7) { transform: rotateY(270deg) translateZ(270px); }
.dagkort:nth-child(8) { transform: rotateY(315deg) translateZ(270px); }
.dagkort time {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--orange-glod);
}
.dagkort b {
  font-size: 14px;
}
.dagkort span {
  font-size: 11.5px;
  color: rgba(222, 246, 243, 0.6);
}
/* The check: a ring that fills and gets a tick, each card at its own time. */
.dagkort i {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
}
.dagkort i::after {
  content: '✓';
  position: absolute;
  inset: -2px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #19c08f;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(25, 192, 143, 0.8);
  transform: scale(0);
  animation: bock 8s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
.dagkort:nth-child(2) i::after { animation-delay: 1s; }
.dagkort:nth-child(3) i::after { animation-delay: 2s; }
.dagkort:nth-child(4) i::after { animation-delay: 3s; }
.dagkort:nth-child(5) i::after { animation-delay: 4s; }
.dagkort:nth-child(6) i::after { animation-delay: 5s; }
.dagkort:nth-child(7) i::after { animation-delay: 6s; }
.dagkort:nth-child(8) i::after { animation-delay: 7s; }
@keyframes bock {
  0%, 5% { transform: scale(0); }
  12%, 88% { transform: scale(1); }
  100% { transform: scale(0); }
}
/* A glowing floor disc under the ring. */
.karusell-scen::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 72%;
  width: 520px;
  height: 120px;
  margin-left: -260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(47, 213, 200, 0.28), transparent);
  pointer-events: none;
}

/* Level 04: the quote is signed; envelopes fly out of the outbox. */
.komm {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.offert {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 270px;
  margin: -170px 0 0 -190px;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(170deg, #f5f3f2, #dfe9e7);
  color: #0b2b2a;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(47, 213, 200, 0.2);
  transform: rotateY(18deg) rotateX(8deg) rotateZ(-3deg);
  animation: offert-svava 8s ease-in-out infinite;
}
@keyframes offert-svava {
  50% { transform: rotateY(10deg) rotateX(4deg) rotateZ(-1deg) translateY(-10px); }
}
.offert__topp {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 2px solid #ea5b0c;
}
.offert__topp b {
  font-size: 18px;
}
.offert__topp small {
  font-size: 11px;
  color: #3d5b5a;
}
.offert__rad,
.offert__summa {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(5, 85, 89, 0.2);
}
.offert__summa {
  font-weight: 700;
  border-bottom: 0;
  padding-top: 8px;
}
.signatur {
  display: block;
  width: 170px;
  height: 44px;
  margin-top: 6px;
}
.signatur path {
  fill: none;
  stroke: #055559;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
}
.syns .signatur path {
  animation: signera 6s ease-in-out infinite;
}
@keyframes signera {
  0%, 10% { stroke-dashoffset: 360; }
  40%, 92% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
.stampel {
  position: absolute;
  right: 14px;
  bottom: 26px;
  padding: 5px 12px;
  border: 3px solid #19a874;
  border-radius: 8px;
  color: #19a874;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-12deg) scale(0);
  opacity: 0;
}
.syns .stampel {
  animation: stampla 6s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}
@keyframes stampla {
  0%, 42% { transform: rotate(-12deg) scale(2.6); opacity: 0; }
  50%, 92% { transform: rotate(-12deg) scale(1); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 0; }
}
.utkorg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: translate3d(70px, 90px, 0);
}
.kuvert {
  position: absolute;
  width: 46px;
  height: 30px;
  margin: -15px 0 0 -23px;
  border-radius: 5px;
  background:
    linear-gradient(155deg, transparent 49%, rgba(5, 85, 89, 0.35) 50%, transparent 52%),
    linear-gradient(25deg, transparent 49%, rgba(5, 85, 89, 0.35) 50%, transparent 52%),
    linear-gradient(170deg, #fff, #d8ece9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(47, 213, 200, 0.4);
  opacity: 0;
}
.syns .kuvert {
  animation: flyg 4s cubic-bezier(0.3, 0, 0.4, 1) infinite;
}
.kuvert.k1 { --fx: -160px; --fy: -200px; --fz: 120px; }
.kuvert.k2 { --fx: -220px; --fy: -80px; --fz: -60px; animation-delay: 0.8s !important; }
.kuvert.k3 { --fx: -120px; --fy: -260px; --fz: -140px; animation-delay: 1.6s !important; }
.kuvert.k4 { --fx: -240px; --fy: -170px; --fz: 60px; animation-delay: 2.4s !important; }
.kuvert.k5 { --fx: -60px; --fy: -230px; --fz: 200px; animation-delay: 3.2s !important; }
@keyframes flyg {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0) scale(0.6); }
  10% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--fx), var(--fy), var(--fz)) rotate(24deg) scale(0.9); }
}
.statistik {
  display: grid;
  gap: 12px;
  max-width: 320px;
  margin-top: 24px;
}
.statistik div {
  display: grid;
  grid-template-columns: 70px 1fr 48px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.statistik small {
  color: rgba(222, 246, 243, 0.65);
}
.statistik b {
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.matare {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.matare i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--glod), var(--orange-glod));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.5s;
}
.syns .matare i.m64 { transform: scaleX(0.64); }
.syns .matare i.m18 { transform: scaleX(0.18); }

/* AI: a gyroscope orb with suggestion cards rising out of it. */
.orb-scen {
  position: absolute;
  inset: 0;
  perspective: 900px;
}
.orb {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  transform-style: preserve-3d;
  animation: orb-snurr 20s linear infinite;
}
@keyframes orb-snurr {
  from { transform: rotateX(14deg) rotateY(0); }
  to { transform: rotateX(14deg) rotateY(360deg); }
}
.orb__karna {
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #a8fff5 18%, #2fd5c8 42%, #055559 78%, #002625);
  box-shadow: 0 0 60px rgba(47, 213, 200, 0.9), 0 0 140px rgba(47, 213, 200, 0.45);
  animation: andas 3s ease-in-out infinite;
}
.orb__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(47, 213, 200, 0.75);
  box-shadow: 0 0 18px rgba(47, 213, 200, 0.5), inset 0 0 18px rgba(47, 213, 200, 0.3);
}
.orb__ring--1 { animation: ring-x 6s linear infinite; }
.orb__ring--2 { inset: -18px; border-color: rgba(255, 138, 61, 0.75); box-shadow: 0 0 18px rgba(255, 138, 61, 0.5); animation: ring-y 9s linear infinite; }
.orb__ring--3 { inset: 14px; animation: ring-xy 7s linear infinite; }
@keyframes ring-x { from { transform: rotateX(0); } to { transform: rotateX(360deg); } }
@keyframes ring-y { from { transform: rotateY(0) rotateX(70deg); } to { transform: rotateY(360deg) rotateX(70deg); } }
@keyframes ring-xy { from { transform: rotateX(60deg) rotateZ(0); } to { transform: rotateX(60deg) rotateZ(360deg); } }
.idekort {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: 230px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid rgba(47, 213, 200, 0.4);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 0 30px rgba(47, 213, 200, 0.25);
  opacity: 0;
  /* #331: nowrap under a max-width pushed the longer labels out of their box.
     max-content keeps a short label on one line; a long one wraps inside it. */
  width: max-content;
  white-space: normal;
}
.syns .idekort {
  animation: ide 7.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.idekort--1 { --ix: -250px; --iy: -150px; }
.idekort--2 { --ix: 30px; --iy: -190px; }
.idekort--3 { --ix: -120px; --iy: 120px; }
.syns .idekort--2 { animation-delay: 2.5s; }
.syns .idekort--3 { animation-delay: 5s; }
@keyframes ide {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  12% { opacity: 1; }
  28%, 70% { opacity: 1; transform: translate(var(--ix), var(--iy)) scale(1); }
  85%, 100% { opacity: 0; transform: translate(var(--ix), calc(var(--iy) - 30px)) scale(1); }
}

/* Ticket queue: four tickets rotate through the front, where one is solved. */
.ko {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 330px;
  height: 104px;
  margin: -52px 0 0 -165px;
  transform-style: preserve-3d;
  transform: rotateY(-24deg) rotateX(10deg);
}
.biljett {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-content: center;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--kant);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(47, 213, 200, 0.12);
  color: #fff;
  animation: biljett 8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.biljett:nth-child(2) { animation-delay: -2s; }
.biljett:nth-child(3) { animation-delay: -4s; }
.biljett:nth-child(4) { animation-delay: -6s; }
.biljett b {
  grid-row: span 2;
  align-self: center;
  font-size: 15px;
  color: var(--orange-glod);
}
.biljett span {
  font-size: 14px;
}
.biljett em {
  font-style: normal;
  font-size: 11.5px;
  color: #9ff3ea;
}
@keyframes biljett {
  0% { transform: translate3d(0, -150px, -330px); opacity: 0; }
  6% { opacity: 1; }
  25% { transform: translate3d(0, -100px, -220px); }
  50% { transform: translate3d(0, -50px, -110px); }
  75%, 85% { transform: translate3d(0, 0, 0); opacity: 1; }
  95% { transform: translate3d(260px, 30px, 120px) rotateZ(14deg); opacity: 0; }
  100% { transform: translate3d(0, -150px, -330px); opacity: 0; }
}

/* --- Footer ----------------------------------------------------------------- */

.varld footer {
  background: #000a09;
  border-top: 1px solid rgba(47, 213, 200, 0.14);
}

/* --- Reveal tweak: the levels slide in a little further than plain sections. */

.js .varld section.niva > .omslag,
.js .varld section.niva-ai > .omslag {
  transform: translateY(46px);
}
.js .varld section.niva.syns > .omslag,
.js .varld section.niva-ai.syns > .omslag {
  transform: none;
}

/* --- Subpages: the same world, the ordinary building blocks re-lit -------
   Every subpage (Per 2026-11-10: "kör vidare med det på alla undersidor")
   uses the hero shell above with its own scene, and the plain components from
   stil.css -- cards, tables, screenshots, the AI colleague's demo -- get the
   night palette here, so the pages themselves keep their markup. */

.varld section.varld-hjalte--under {
  min-height: min(80vh, 780px);
  padding: 64px 0 76px;
}
.varld .varld-hjalte--under h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  max-width: 18ch;
}
.varld-hjalte .hjalte__text > p:not(.ingress) {
  color: rgba(222, 242, 240, 0.7);
  animation: upp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both 0.32s;
}
.scen--under {
  height: 470px;
}
/* Subpage scenes carry their own angles; the stage only adds the mouse tilt. */
.scen--under .scen__varld {
  transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
}
.hjalte-bild-omslag {
  position: relative;
  z-index: 2;
  width: 100%;
}

.varld h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
}
.varld p strong,
.varld td strong {
  color: #fff;
}
.varld section.gra {
  background: linear-gradient(180deg, rgba(0, 38, 37, 0.32), rgba(0, 38, 37, 0.6));
  border-block: 1px solid rgba(116, 230, 220, 0.08);
}
.varld .notis {
  color: rgba(222, 242, 240, 0.55);
}

/* Cards: glass game cards that tilt toward the pointer and catch the light. */
.varld .kort {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(10, 64, 62, 0.55), rgba(2, 26, 25, 0.78));
  border: 1px solid rgba(116, 230, 220, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: perspective(900px) rotateX(var(--ky, 0deg)) rotateY(var(--kx, 0deg));
  transition: transform 0.25s ease-out, border-color 0.25s, box-shadow 0.25s;
}
.varld .kort::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(47, 213, 200, 0.16), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.varld .kort:hover {
  border-color: rgba(47, 213, 200, 0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(47, 213, 200, 0.16);
  transform: perspective(900px) rotateX(var(--ky, 0deg)) rotateY(var(--kx, 0deg)) translateY(-6px);
}
.varld .kort:hover::before {
  opacity: 1;
}
.varld .kort h3 {
  color: #fff;
}
.varld .kort p {
  color: var(--text-ljus);
}
.varld .kort .nr {
  background: linear-gradient(135deg, #ff8a3d, #ea5b0c);
  box-shadow: 0 0 22px rgba(234, 91, 12, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
/* Cards deal themselves in when their section arrives. Fill mode backwards
   only: once the animation ends it lets go, so the hover tilt still works. */
.js .varld section:not(.syns) .kort {
  opacity: 0;
}
.js .varld section.syns .kort {
  animation: kort-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 90ms + 150ms);
}
@keyframes kort-in {
  from { opacity: 0; transform: perspective(900px) rotateX(-28deg) translateY(40px) scale(0.96); }
}

/* Tables. The last row is always Infinity's own, so it gets the glow. */
.varld .tabell-omslag {
  background: rgba(2, 26, 25, 0.78);
  border-color: rgba(116, 230, 220, 0.16);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}
.varld th {
  background: rgba(47, 213, 200, 0.08);
  color: #9ff3ea;
  border-bottom-color: rgba(116, 230, 220, 0.14);
}
.varld td {
  color: var(--text-ljus);
  border-bottom-color: rgba(116, 230, 220, 0.09);
}
.varld tbody tr:last-child td {
  background: rgba(255, 138, 61, 0.09);
}
.varld tbody tr:last-child td:first-child {
  box-shadow: inset 3px 0 0 var(--orange-glod);
}
.varld tbody tr:hover td {
  background: rgba(47, 213, 200, 0.05);
}

/* Screenshots: a dark frame; the hero shot lies back and rises as you scroll
   (varld.js writes --p from 1 to 0). */
.varld .produktbild {
  background: #0b1f1e;
  border-color: rgba(116, 230, 220, 0.22);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(47, 213, 200, 0.14);
}
.varld .produktbild figcaption {
  background: rgba(0, 38, 37, 0.92);
  border-top-color: rgba(116, 230, 220, 0.14);
  color: rgba(222, 242, 240, 0.65);
}
.varld .hjalte-bild {
  margin-bottom: 0;
  transform: perspective(1400px) rotateX(calc(var(--p, 0) * 24deg)) scale(calc(1 - var(--p, 0) * 0.06));
  transform-origin: 50% 0;
}
.varld .efter-hjaltebild {
  padding-top: 84px;
}

/* Gallery tabs and the proposal demo (ai-kollegan). */
.js .varld .galleri__flik {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(116, 230, 220, 0.22);
  color: #dff6f3;
}
.js .varld .galleri__flik:hover {
  border-color: var(--glod);
}
.js .varld .galleri__flik[aria-selected='true'] {
  background: linear-gradient(135deg, #12a99d, #0e6b70);
  border-color: var(--glod);
  color: #fff;
  box-shadow: 0 0 22px rgba(47, 213, 200, 0.35);
}
.varld .demo {
  background: rgba(2, 26, 25, 0.85);
  border-color: rgba(116, 230, 220, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 50px rgba(47, 213, 200, 0.1);
}
.varld .demo__topp,
.varld .demo__fot {
  background: rgba(47, 213, 200, 0.05);
  border-color: rgba(116, 230, 220, 0.12);
}
.varld .demo__rad {
  border-top-color: rgba(116, 230, 220, 0.1);
}
.varld .demo__etikett,
.varld .demo__forklaring,
.varld .demo__meta,
.varld .demo__logg {
  color: rgba(222, 242, 240, 0.62);
}
.varld .demo__titel,
.varld .demo__logg b {
  color: #fff;
}
.varld .demo__valj {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(116, 230, 220, 0.2);
}
.varld .demo__valj button {
  color: #dff6f3;
}
.varld .demo__valj button[aria-pressed='true'] {
  background: linear-gradient(135deg, #12a99d, #0e6b70);
  color: #fff;
}
.varld .knapp.stillsam,
.varld .demo__aterstall {
  background: transparent;
  color: rgba(222, 242, 240, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
}
.varld .knapp.stillsam:hover,
.varld .demo__aterstall:hover {
  color: #fff;
  border-color: #fff;
}
.varld .demo__justera {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(116, 230, 220, 0.18);
}
.varld .demo__justera label {
  color: var(--text-ljus);
}
.varld .demo__justera select {
  background: #062b29;
  color: #fff;
  border-color: rgba(116, 230, 220, 0.3);
}
.varld .demo__utfall {
  background: rgba(47, 213, 200, 0.1);
  color: #9ff3ea;
}
.varld .demo__utfall.ar-avvisad {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(222, 242, 240, 0.55);
}

/* Scene: the six questions on a ring around the customer (varfor-crm). */
.karusell--sex .dagkort:nth-child(1) { transform: rotateY(0deg) translateZ(235px); }
.karusell--sex .dagkort:nth-child(2) { transform: rotateY(60deg) translateZ(235px); }
.karusell--sex .dagkort:nth-child(3) { transform: rotateY(120deg) translateZ(235px); }
.karusell--sex .dagkort:nth-child(4) { transform: rotateY(180deg) translateZ(235px); }
.karusell--sex .dagkort:nth-child(5) { transform: rotateY(240deg) translateZ(235px); }
.karusell--sex .dagkort:nth-child(6) { transform: rotateY(300deg) translateZ(235px); }
.karusell--sex .dagkort b {
  font-size: 15px;
  line-height: 1.3;
}
.karusell-karna {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffc08f 20%, #ea5b0c 55%, #5a1f02);
  box-shadow: 0 0 60px rgba(234, 91, 12, 0.7), 0 0 120px rgba(234, 91, 12, 0.3);
  animation: andas 3s ease-in-out infinite;
}

/* The gyroscope's labels play in the hero too, where there is no .syns. */
.varld-hjalte .idekort {
  animation: ide 7.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.varld-hjalte .idekort--2 { animation-delay: 2.5s; }
.varld-hjalte .idekort--3 { animation-delay: 5s; }

/* Scene: three spinning cubes, one per question to ask (jamforelse). */
.kuber {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 74px;
  transform-style: preserve-3d;
}
.kub {
  position: relative;
  width: 110px;
  height: 110px;
  transform-style: preserve-3d;
  animation: kub 14s linear infinite;
}
.kub:nth-child(2) {
  animation-delay: -4.6s;
  margin-top: -90px;
}
.kub:nth-child(3) {
  animation-delay: -9.2s;
}
@keyframes kub {
  from { transform: rotateX(-20deg) rotateY(0); }
  to { transform: rotateX(-20deg) rotateY(360deg); }
}
.kub i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(10, 64, 62, 0.95), rgba(2, 26, 25, 0.97));
  border: 1px solid rgba(47, 213, 200, 0.55);
  box-shadow: inset 0 0 30px rgba(47, 213, 200, 0.22), 0 0 24px rgba(47, 213, 200, 0.18);
  color: #fff;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
}
.kub i:nth-child(1) { transform: translateZ(55px); }
.kub i:nth-child(2) { transform: rotateY(90deg) translateZ(55px); }
.kub i:nth-child(3) { transform: rotateY(180deg) translateZ(55px); }
.kub i:nth-child(4) { transform: rotateY(-90deg) translateZ(55px); }
.kub i:nth-child(5) {
  transform: rotateX(90deg) translateZ(55px);
  background: linear-gradient(135deg, #ff8a3d, #ea5b0c);
  border-color: #ffc08f;
  font-size: 22px;
}
.kub i:nth-child(6) { transform: rotateX(-90deg) translateZ(55px); }

/* Scene: mail lands in three queues and slides down to solved (arendehantering). */
.bord--koer {
  width: 420px;
  height: 330px;
  margin: -165px 0 0 -210px;
  transform: rotateX(54deg) rotateZ(10deg);
}
.bord--koer .bord__yta {
  grid-template-columns: repeat(3, 1fr);
}
.droppe {
  position: absolute;
  top: 40px;
  width: 92px;
  padding: 6px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ea5b0c, #ff8a3d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(234, 91, 12, 0.5);
  opacity: 0;
  animation: droppe 6s cubic-bezier(0.3, 0, 0.3, 1) infinite;
}
/* Lanes are (420 − 20 − 16) / 3 = 128px wide and 136px apart; a ticket is 92. */
.droppe.d1 { left: 28px; }
.droppe.d2 { left: 164px; animation-delay: 1s; }
.droppe.d3 { left: 300px; animation-delay: 2s; }
.droppe.d4 { left: 28px; animation-delay: 3s; }
.droppe.d5 { left: 164px; animation-delay: 4s; }
.droppe.d6 { left: 300px; animation-delay: 5s; }
@keyframes droppe {
  0% { opacity: 0; transform: translate3d(0, 0, 260px) rotateX(-50deg); }
  8% { opacity: 1; }
  24% { transform: translate3d(0, 0, 8px); }
  80% { opacity: 1; transform: translate3d(0, 200px, 8px); background: linear-gradient(135deg, #12a99d, #2fd5c8); }
  100% { opacity: 0; transform: translate3d(0, 236px, 8px); background: linear-gradient(135deg, #12a99d, #2fd5c8); }
}

/* Scene: the proposal queue -- the ticket queue's mechanics in the AI's colours. */
.ko--forslag .biljett b {
  color: var(--glod);
  text-shadow: 0 0 12px rgba(47, 213, 200, 0.8);
}
.ko--forslag .biljett em {
  color: #ffc08f;
}

/* --- Responsive ------------------------------------------------------------- */

@media (max-width: 980px) {
  .hjalte__rutnat,
  .niva__rutnat {
    grid-template-columns: minmax(0, 1fr);
  }
  .niva--spegel .niva__text {
    order: 0;
  }
  .scen {
    height: 470px;
  }
  .scen__varld {
    transform: scale(0.78) rotateX(calc(12deg + var(--ty, 0deg))) rotateY(calc(-14deg + var(--tx, 0deg)));
  }
  .varld section.varld-hjalte {
    padding-top: 56px;
  }
  .flode {
    margin-top: 10px;
  }
  .scen--under {
    height: 400px;
  }
}

@media (max-width: 640px) {
  .scen {
    height: 400px;
    margin-inline: calc(var(--omslag-pad) * -1);
  }
  .scen__varld {
    transform: scale(0.6) rotateX(calc(10deg + var(--ty, 0deg))) rotateY(calc(-10deg + var(--tx, 0deg)));
  }
  .niva__scen {
    height: 360px;
  }
  .explod,
  .bord,
  .komm,
  .orb-scen,
  .ko {
    scale: 0.74;
  }
  .karusell {
    scale: 0.7;
  }
  .kuber,
  .bord--koer {
    scale: 0.7;
  }
  .varld section.varld-hjalte--under {
    padding-bottom: 40px;
  }
  .varld section.niva,
  .varld section.niva-ai {
    padding: 56px 0;
  }
  .idekort {
    white-space: normal;
    width: 190px;
  }
}

/* --- Reduced motion: a still, complete page ------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .varld *,
  .varld *::before,
  .varld *::after {
    animation: none !important;
    transition: none !important;
  }
  .varld .varld-hjalte h1 {
    background-position: 30% 0;
  }
  .scen__varld {
    transform: rotateX(12deg) rotateY(-20deg);
  }
  .scen--under .scen__varld,
  .varld .hjalte-bild,
  .varld .kort,
  .varld .kort:hover {
    transform: none;
  }
  .js .varld section:not(.syns) .kort {
    opacity: 1;
  }
  .droppe.d1,
  .droppe.d2,
  .droppe.d3 {
    opacity: 1;
    transform: translate3d(0, 60px, 8px);
  }
  .platta--2 { transform: translateZ(70px); }
  .platta--3 { transform: translateZ(140px); }
  .platta--4 { transform: translateZ(210px); }
  .forslag { clip-path: none; }
  .malring .malring__fyll { stroke-dashoffset: 20; }
  .xp i,
  .matare i.m64 { transform: scaleX(0.64); }
  .xp i { transform: scaleX(1); }
  .matare i.m18 { transform: scaleX(0.18); }
  .signatur path { stroke-dashoffset: 0; }
  .stampel { opacity: 1; transform: rotate(-12deg); }
  .pjas--2 { transform: translate3d(244px, 0, 8px); }
  .pjas--3 { transform: translate3d(366px, 0, 8px); }
  .idekort { opacity: 1; transform: translate(var(--ix), var(--iy)); }
  .biljett:nth-child(1) { transform: none; }
  .biljett:nth-child(2) { transform: translate3d(0, -50px, -110px); }
  .biljett:nth-child(3) { transform: translate3d(0, -100px, -220px); }
  .biljett:nth-child(4) { opacity: 0; }
}
