/* /emballage — en pakke i 3D og én kode, der finder den rigtige side pr. land og sprog.
   Bygger på variablerne i kvikqr.css (design-tokens). Alt med "emb-" hører til denne side. */
@property --ry{syntax:"<angle>";inherits:true;initial-value:-32deg}
.emb-hero{--kraft:#CFA46A;--kraft-lt:#DDB47C;--kraft-dk:#AD8148;--kraft-ink:#3B2A14;--phone:#0F1B1E;padding:56px 0 72px;overflow:hidden}
@media (prefers-color-scheme:dark){.emb-hero{--kraft:#B48A54;--kraft-lt:#C29760;--kraft-dk:#8C6838;--kraft-ink:#24180A;--phone:#2B3B3D}}
.emb-sr{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0}
.emb-hero-grid{display:flex;flex-direction:column;gap:40px}
.emb-intro{display:flex;flex-direction:column;gap:18px;max-width:780px}
.emb-cta{display:flex;flex-wrap:wrap;gap:10px}

/* Workbench: stage on one side, the person scanning and the rules on the other */
.emb-demo{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-areas:"stage pick" "stage rules" "foot rules";gap:20px 40px;align-items:start;background:var(--raised);border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--shadow);padding:clamp(16px,3vw,32px)}
.emb-stage{grid-area:stage;display:grid;grid-template-columns:minmax(0,1fr) 56px auto;align-items:center;min-height:440px;border-radius:var(--r-lg);background:radial-gradient(120% 90% at 30% 20%,var(--fjord-soft),transparent 70%),var(--paper);padding:16px}
.emb-foot{grid-area:foot;display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between}
.emb-pick{grid-area:pick;border:0;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.emb-pick legend{font-family:var(--display);font-weight:700;font-size:1.15rem;margin-bottom:10px;padding:0}
.emb-rules{grid-area:rules;display:flex;flex-direction:column;gap:8px}

/* The box */
.emb-scene{position:relative;height:340px;display:grid;place-items:center;perspective:900px;cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.emb-scene.is-drag{cursor:grabbing}
.emb-box{--w:150px;--h:200px;--d:100px;position:relative;width:var(--w);height:var(--h);transform-style:preserve-3d;transform:rotateX(-14deg) rotateY(var(--ry));animation:emb-spin 20s linear infinite}
.emb-box.is-turn{transition:--ry .6s cubic-bezier(.3,.7,.3,1)}
.emb-demo.is-manual .emb-box{animation:none}
@keyframes emb-spin{to{--ry:328deg}}
:where(.emb-box>div){position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:12px;background:linear-gradient(160deg,var(--kraft-lt),var(--kraft));box-shadow:inset 0 0 0 1px rgba(59,42,20,.18);color:var(--kraft-ink)}
:where(.emb-box>div)::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(115deg,rgba(255,255,255,.05) 0 2px,transparent 2px 7px);pointer-events:none}
.emb-front{transform:translateZ(calc(var(--d)/2))}
.emb-back{transform:rotateY(180deg) translateZ(calc(var(--d)/2));justify-content:center;gap:16px}
.emb-right,.emb-left{width:var(--d);left:calc((var(--w) - var(--d))/2);background:linear-gradient(160deg,var(--kraft),var(--kraft-dk));justify-content:center}
.emb-right{transform:rotateY(90deg) translateZ(calc(var(--w)/2))}
.emb-left{transform:rotateY(-90deg) translateZ(calc(var(--w)/2))}
.emb-top,.emb-bottom{height:var(--d);top:calc((var(--h) - var(--d))/2)}
.emb-top{transform:rotateX(90deg) translateZ(calc(var(--h)/2));background:linear-gradient(90deg,transparent 42%,color-mix(in srgb,var(--lyn) 85%,var(--kraft)) 42% 58%,transparent 58%),linear-gradient(var(--kraft-lt),var(--kraft-lt));}
.emb-bottom{transform:rotateX(-90deg) translateZ(calc(var(--h)/2));background:var(--kraft-dk)}
.emb-brand{font-family:var(--display);font-weight:700;font-size:1.35rem;letter-spacing:-.02em;line-height:1}
.emb-left .emb-brand{transform:rotate(-90deg);white-space:nowrap}
.emb-label{background:#fff;border-radius:8px;padding:6px 6px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;box-shadow:0 1px 0 rgba(59,42,20,.25)}
.emb-qr{width:96px;height:96px;display:block;pointer-events:none}
.emb-scan{font-size:7px;line-height:1.3;color:#0F1B1E;white-space:nowrap;letter-spacing:.02em}
.emb-bars{width:80%;height:70px;background:repeating-linear-gradient(var(--kraft-ink) 0 1px,transparent 1px 10px);opacity:.45;border:1px solid rgba(59,42,20,.45)}
.emb-barcode{width:70%;height:34px;background:#fff repeating-linear-gradient(90deg,#0F1B1E 0 2px,#fff 2px 3px,#0F1B1E 3px 4px,#fff 4px 7px,#0F1B1E 7px 10px,#fff 10px 11px);border:4px solid #fff;border-bottom-width:8px}
.emb-loop{width:54px;height:54px;border-radius:50%;border:4px dashed var(--kraft-ink);opacity:.5}
.emb-floor{position:absolute;bottom:28px;left:50%;width:220px;height:40px;margin-left:-110px;border-radius:50%;background:radial-gradient(closest-side,rgba(15,27,30,.28),transparent);transform:translateZ(-1px)}

/* Scan beam from the box to the phone */
.emb-beam{position:relative;height:2px;background:repeating-linear-gradient(90deg,var(--fjord) 0 5px,transparent 5px 10px);opacity:.7}
.emb-beam i{position:absolute;top:-4px;inset-inline-start:0;width:10px;height:10px;border-radius:50%;background:var(--fjord);box-shadow:0 0 0 4px color-mix(in srgb,var(--fjord) 25%,transparent);animation:emb-beam 1.8s ease-in-out infinite}
[dir="rtl"] .emb-beam i{animation-name:emb-beam-rtl}
@keyframes emb-beam{from{transform:translateX(0);opacity:0}20%,80%{opacity:1}to{transform:translateX(46px);opacity:0}}
@keyframes emb-beam-rtl{from{transform:translateX(0);opacity:0}20%,80%{opacity:1}to{transform:translateX(-46px);opacity:0}}
.emb-demo.is-ping .emb-beam{opacity:1}

/* The phone */
.emb-phone{position:relative;width:196px;height:392px;border:9px solid var(--phone);border-radius:34px;background:var(--raised);overflow:hidden;box-shadow:0 20px 40px rgba(15,27,30,.18)}
.emb-shot{display:block;width:100%;height:auto;max-width:none;transform:translateY(calc(var(--i,0) * -100% / 6));transition:transform .55s cubic-bezier(.2,.8,.2,1);pointer-events:none}
.emb-notch{position:absolute;top:6px;left:50%;width:62px;height:16px;margin-left:-31px;border-radius:10px;background:var(--phone);z-index:1}

/* Under the stage */
.emb-same{font-size:.95rem;color:var(--ink);font-weight:600;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.emb-tag{font-family:var(--mono);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;font-weight:500;background:var(--lyn);color:var(--on-lyn);padding:2px 8px;border-radius:999px}
.emb-tools{display:flex;gap:6px;align-items:center}
.emb-still-l{font-size:14px;font-weight:600;min-height:40px;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-md);cursor:pointer;color:var(--ink);background:var(--raised)}
.emb-still-l::before{content:"";width:10px;height:12px;border-inline:3px solid currentColor}
#emb-still:checked~.emb-foot .emb-still-l{background:var(--fjord-soft);border-color:var(--fjord)}
#emb-still:checked~.emb-foot .emb-still-l::before{border:0;width:0;height:0;border-block:6px solid transparent;border-inline-start:10px solid currentColor}
#emb-still:focus-visible~.emb-foot .emb-still-l{outline:3px solid var(--focus,var(--fjord));outline-offset:2px}
.emb-turn{min-height:40px;min-width:44px;padding:0 10px;font-size:18px}
#emb-still:checked~.emb-stage .emb-box,#emb-still:checked~.emb-stage .emb-beam i{animation-play-state:paused}

/* Who scans */
.emb-chip{position:relative;display:flex;gap:8px;align-items:center;min-height:52px;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--paper);cursor:pointer;transition:border-color .2s,background-color .2s}
.emb-chip:hover{border-color:var(--muted)}
.emb-chip input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.emb-chip:has(input:checked){border-color:var(--fjord);background:var(--fjord-soft);box-shadow:inset 0 0 0 1px var(--fjord)}
.emb-chip:has(input:focus-visible){outline:3px solid var(--focus,var(--fjord));outline-offset:2px}
.emb-chip i{flex:none;font:600 11px var(--mono);width:30px;height:22px;display:grid;place-items:center;border-radius:4px;background:var(--ink);color:var(--paper)}
.emb-chip span{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.emb-chip b{font-size:14px;overflow:hidden;text-overflow:ellipsis}
.emb-chip small{font-size:12px;color:var(--muted)}

/* The rules on the code */
.emb-rules-h{font-size:1.15rem;letter-spacing:-.01em;scroll-margin-top:90px}
.emb-note{font-size:.9rem;color:var(--muted)}
.emb-rules ol{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-direction:column;gap:6px;counter-reset:r}
.emb-rules li{counter-increment:r;display:grid;grid-template-columns:24px minmax(0,1fr) 18px;gap:2px 10px;align-items:center;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-md);font-size:14px;transition:opacity .25s,border-color .25s,background-color .25s}
.emb-rules li::before{content:counter(r);grid-row:span 2;font:12px var(--mono);color:var(--muted);text-align:center}
.emb-rules li.emb-else::before{content:"·"}
.emb-rules li::after{content:"";grid-row:1/span 2;grid-column:3;width:10px;height:5px;border-left:2px solid var(--success);border-bottom:2px solid var(--success);transform:rotate(-45deg);opacity:0}
.emb-rules code{font:11px var(--mono);color:var(--muted);unicode-bidi:isolate;direction:ltr;margin-inline-start:4px}
.emb-rules bdi{grid-column:2;justify-self:start;font:12px var(--mono);color:var(--fjord)}
.emb-rules li.emb-else{border-style:dashed}

@supports selector(:has(*)){
  .emb-demo:has(#emb-p2:checked){--i:1}.emb-demo:has(#emb-p3:checked){--i:2}.emb-demo:has(#emb-p4:checked){--i:3}
  .emb-demo:has(#emb-p5:checked){--i:4}.emb-demo:has(#emb-p6:checked){--i:5}
  /* The winning row is marked; the rows above it were checked and did not match. */
  .emb-demo:has(#emb-p1:checked) li[data-hit~="1"],.emb-demo:has(#emb-p2:checked) li[data-hit~="2"],.emb-demo:has(#emb-p3:checked) li[data-hit~="3"],
  .emb-demo:has(#emb-p4:checked) li[data-hit~="4"],.emb-demo:has(#emb-p5:checked) li[data-hit~="5"],.emb-demo:has(#emb-p6:checked) li[data-hit~="6"]{--hit:1;border-color:var(--fjord);border-inline-start-width:4px;background:var(--fjord-soft)}
  .emb-rules li[data-hit]::after{opacity:var(--hit,0)}
  .emb-demo:has(#emb-p1:checked) li:has(~ li[data-hit~="1"]),.emb-demo:has(#emb-p2:checked) li:has(~ li[data-hit~="2"]),.emb-demo:has(#emb-p3:checked) li:has(~ li[data-hit~="3"]),
  .emb-demo:has(#emb-p4:checked) li:has(~ li[data-hit~="4"]),.emb-demo:has(#emb-p5:checked) li:has(~ li[data-hit~="5"]),.emb-demo:has(#emb-p6:checked) li:has(~ li[data-hit~="6"]){opacity:.62}
}

/* Rest of the page (cards, steps and FAQ come from kvikqr.css) */
.emb-feats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.emb-steps{list-style:none;margin:0;padding:0}
.emb-steps .step{counter-increment:s}
.emb-steps .step::before{content:"0" counter(s);font:500 .75rem var(--mono);letter-spacing:.1em;color:var(--fjord)}

@media (max-width:1020px){
  .emb-demo{grid-template-columns:minmax(0,1fr);grid-template-areas:"stage" "foot" "pick" "rules"}
  .emb-feats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  .emb-stage{grid-template-columns:minmax(0,1fr) auto;min-height:0;padding:12px 6px}
  .emb-beam{display:none}
  .emb-scene{height:260px;perspective:700px}
  .emb-box{--w:104px;--h:140px;--d:70px}
  :where(.emb-box>div){padding:8px}
  .emb-qr{width:64px;height:64px}
  .emb-scan{display:none}
  .emb-brand{font-size:1rem}
  .emb-floor{width:150px;margin-left:-75px;bottom:30px}
  .emb-phone{width:150px;height:300px;border-width:7px;border-radius:26px}
  .emb-pick{grid-template-columns:repeat(2,minmax(0,1fr))}
  .emb-feats{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
  .emb-box{animation:none}
  .emb-box.is-turn,.emb-chip,.emb-rules li,.emb-shot{transition:none}
  .emb-beam i{animation:none;opacity:1;inset-inline-start:calc(50% - 5px)}
  .emb-still-l,#emb-still{display:none}
}
@media (forced-colors:active){
  .emb-chip:has(input:checked),.emb-rules li{border:2px solid CanvasText}
  .emb-chip i{border:1px solid CanvasText}
}
