/* Chakra-reisen på poengsiden: figur sett bakfra, sju chakraer, skala og DNA-spiral.
   Lyst tema som standard, mørkt via html[data-tema="mork"]. Respekterer prefers-reduced-motion. */
.ck-reise {
  --ck-kropp: #ece6f6; --ck-kropp-kant: #d7cde9; --ck-lukket: #c9c3d4; --ck-ryggrad: rgba(74, 42, 122, .18);
  --ck-flate: #fff; --ck-spor: #f1ecf7;
}
html[data-tema="mork"] .ck-reise {
  --ck-kropp: #221d3d; --ck-kropp-kant: #352d5c; --ck-lukket: #3a3655; --ck-ryggrad: rgba(255, 255, 255, .14);
  --ck-flate: var(--hvit); --ck-spor: rgba(255, 255, 255, .08);
}
.ck-reise h2, .ck-reise h3 { font-family: var(--serif); }
.ck-ingress { color: var(--dempet); max-width: 60ch; }
.ck-status { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }

/* ---------- Scene: DNA – figur – DNA ---------- */
.ck-scene { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(8px, 3vw, 28px); max-width: 520px; margin: 18px auto 8px; padding: 16px 4px; border-radius: 28px; isolation: isolate; }
.ck-figur { position: relative; margin: 0; width: 100%; max-width: 280px; justify-self: center; }
.ck-figur svg { display: block; width: 100%; height: auto; overflow: visible; }
.ck-kropp path, .ck-kropp ellipse, .ck-kropp circle { fill: var(--ck-kropp); stroke: var(--ck-kropp-kant); stroke-width: 1.5; stroke-linejoin: round; }
.ck-ryggrad { stroke: var(--ck-ryggrad); stroke-width: 2; stroke-dasharray: 3 5; stroke-linecap: round; fill: none; }

/* Chakrapunkter: grå og dempet til de åpnes, deretter glød og puls i egen farge */
.ck-punkt circle { transform-box: fill-box; transform-origin: center; transition: fill .6s, opacity .6s; }
.ck-punkt .ck-kjerne { fill: var(--ck-lukket); opacity: .75; }
.ck-punkt .ck-halo { fill: var(--ck-lukket); opacity: 0; }
.ck-punkt.apen .ck-kjerne { fill: var(--ck); opacity: 1; filter: drop-shadow(0 0 4px var(--ck)); }
.ck-punkt.apen .ck-halo { fill: var(--ck); opacity: .3; animation: ck-puls 3.6s ease-in-out infinite; }
.ck-punkt.apen:nth-of-type(2n) .ck-halo { animation-delay: -1.2s; }
.ck-punkt.apen:nth-of-type(3n) .ck-halo { animation-delay: -2.4s; }
@keyframes ck-puls { 0%, 100% { transform: scale(.8); opacity: .22; } 50% { transform: scale(1.35); opacity: .45; } }

/* ---------- Opplyst: kronen er åpen ---------- */
.ck-aura { opacity: 0; transition: opacity 1.2s; }
.ck-lotus { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -60%) scale(.6); font-size: clamp(1.8rem, 7vw, 2.4rem); opacity: 0; transition: opacity .8s, transform .8s; pointer-events: none; filter: drop-shadow(0 0 10px rgba(186, 104, 255, .85)); }
.ck-scene::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(186, 104, 255, .34) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); transition: opacity 1.2s; }
.ck-scene.opplyst::before { opacity: .55; animation: ck-straler 40s linear infinite; }
.ck-scene.opplyst .ck-aura { opacity: 1; animation: ck-aura 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ck-scene.opplyst .ck-lotus { opacity: 1; transform: translate(-50%, -60%) scale(1); animation: ck-svev 5s ease-in-out infinite; }
.ck-scene.opplyst .ck-kropp path, .ck-scene.opplyst .ck-kropp ellipse, .ck-scene.opplyst .ck-kropp circle { stroke: #c58cff; }
.ck-scene.feirer::before { opacity: 1; animation: ck-straler 6s linear infinite, ck-blink 1.4s ease-in-out 3; }
@keyframes ck-straler { to { transform: rotate(360deg); } }
@keyframes ck-blink { 50% { opacity: .35; } }
@keyframes ck-aura { 0%, 100% { transform: scale(.96); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes ck-svev { 0%, 100% { transform: translate(-50%, -60%); } 50% { transform: translate(-50%, -75%); } }

.ck-opplyst { text-align: center; margin: 4px auto 12px; padding: 18px 20px; max-width: 520px; border-radius: 22px; color: #3b1a52;
  background: linear-gradient(135deg, #f6e8ff 0%, #ead2ff 55%, #dcbcff 100%); box-shadow: 0 0 0 2px rgba(142, 36, 170, .45), 0 18px 40px -20px rgba(142, 36, 170, .6); }
.ck-opplyst h3 { margin: 0 0 4px; font-weight: 700; font-size: clamp(1.15rem, 4.5vw, 1.45rem); }
.ck-opplyst p { margin: 0; }
html[data-tema="mork"] .ck-opplyst { color: #fbeeff; background: linear-gradient(135deg, #3a2a10 0%, #3a1650 55%, #24123a 100%); }

/* ---------- Chakra-skalaen: rød nederst, fiolett øverst ---------- */
.ck-skala-tittel { margin-top: 28px; }
.ck-skala { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column-reverse; gap: 10px; position: relative; }
.ck-rad { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; border-radius: 18px; background: var(--ck-flate); box-shadow: var(--skygge-liten); border-left: 4px solid var(--ck-lukket); transition: border-color .5s; }
.ck-rad.apen { border-left-color: var(--ck); }
.ck-prikk { width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--ck-lukket); justify-self: center; transition: background .5s, box-shadow .5s; }
.ck-rad.apen .ck-prikk { background: var(--ck); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ck) 20%, transparent), 0 0 14px var(--ck); }
.ck-tekst { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ck-tekst strong { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.ck-tekst em { font-style: normal; font-weight: 500; color: var(--dempet); font-size: .9rem; margin-left: 4px; }
.ck-symbol { font-size: .95rem; }
.ck-grense { font-size: .8rem; color: var(--dempet); }
.ck-bar { height: 8px; border-radius: 999px; background: var(--ck-spor); overflow: hidden; margin-top: 6px; }
.ck-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ck-lukket); transition: width .8s ease; }
.ck-rad .ck-bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--ck) 55%, #fff), var(--ck)); }
.ck-tall { font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-las { color: var(--dempet); font-size: .95rem; padding-top: 3px; }
.ck-las .fa-lock-open, .ck-rad.apen .ck-las .fa-lock { display: none; }
.ck-rad.apen .ck-las .fa-lock-open { display: inline-block; color: var(--ck); }
.ck-rad[data-ck="solar"].apen .ck-las .fa-lock-open { color: #c9a400; }

/* Kronens krav */
.ck-krav { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: .88rem; }
.ck-krav li > i { color: var(--ck-lukket); margin-right: 4px; }
.ck-krav li.ok > i { color: #43a047; }
.ck-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ck-chips span { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--ck-spor); color: var(--dempet); }
.ck-chips span.ok { background: color-mix(in srgb, #8e24aa 16%, transparent); color: var(--tekst); }
.ck-chips span.ok::before { content: "✓ "; }
.ck-kurs-tall { color: var(--dempet); font-variant-numeric: tabular-nums; }
.ck-trygg { margin-top: 14px; }

/* ---------- DNA-spiral (gjenbrukbar: <div class="pt-dna" aria-hidden="true"><i></i>×n</div>) ---------- */
.pt-dna { --dna-h: 220px; --dna-b: 34px; --dna-takt: 3.6s; display: flex; flex-direction: column; justify-content: space-between; height: var(--dna-h); width: var(--dna-b); flex: none; }
.pt-dna > i { position: relative; display: block; height: 2px; width: 100%; border-radius: 2px; color: #8e24aa;
  background: linear-gradient(90deg, currentColor, color-mix(in srgb, currentColor 30%, transparent) 50%, currentColor); animation: pt-dna-snu var(--dna-takt) ease-in-out infinite; }
.pt-dna > i::before, .pt-dna > i::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.pt-dna > i::before { left: -4px; animation: pt-dna-foran var(--dna-takt) ease-in-out infinite; animation-delay: inherit; }
.pt-dna > i::after { right: -4px; animation: pt-dna-bak var(--dna-takt) ease-in-out infinite; animation-delay: inherit; }
.pt-dna > i:nth-child(7n+1) { color: #e53935; }
.pt-dna > i:nth-child(7n+2) { color: #fb8c00; }
.pt-dna > i:nth-child(7n+3) { color: #fdd835; }
.pt-dna > i:nth-child(7n+4) { color: #43a047; }
.pt-dna > i:nth-child(7n+5) { color: #1e88e5; }
.pt-dna > i:nth-child(7n+6) { color: #3949ab; }
.pt-dna > i:nth-child(7n+7) { color: #8e24aa; }
.pt-dna > i:nth-child(1) { animation-delay: 0s; } .pt-dna > i:nth-child(2) { animation-delay: -.25s; }
.pt-dna > i:nth-child(3) { animation-delay: -.5s; } .pt-dna > i:nth-child(4) { animation-delay: -.75s; }
.pt-dna > i:nth-child(5) { animation-delay: -1s; } .pt-dna > i:nth-child(6) { animation-delay: -1.25s; }
.pt-dna > i:nth-child(7) { animation-delay: -1.5s; } .pt-dna > i:nth-child(8) { animation-delay: -1.75s; }
.pt-dna > i:nth-child(9) { animation-delay: -2s; } .pt-dna > i:nth-child(10) { animation-delay: -2.25s; }
.pt-dna > i:nth-child(11) { animation-delay: -2.5s; } .pt-dna > i:nth-child(12) { animation-delay: -2.75s; }
.pt-dna > i:nth-child(13) { animation-delay: -3s; } .pt-dna > i:nth-child(14) { animation-delay: -3.25s; }
/* Speilvendt spiral på andre siden av figuren */
.pt-dna-motsatt > i { animation-direction: reverse; }
.pt-dna-motsatt > i::before, .pt-dna-motsatt > i::after { animation-direction: reverse; }
@keyframes pt-dna-snu { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }
@keyframes pt-dna-foran { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .5; } }
@keyframes pt-dna-bak { 0%, 100% { transform: scale(.55); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

@media (max-width: 420px) {
  .ck-scene { gap: 6px; padding: 12px 0; }
  .pt-dna { --dna-h: 180px; --dna-b: 22px; }
  .pt-dna > i::before, .pt-dna > i::after { width: 6px; height: 6px; margin-top: -3px; }
  .pt-dna > i::before { left: -3px; } .pt-dna > i::after { right: -3px; }
  .ck-rad { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .ck-prikk { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-punkt.apen .ck-halo, .ck-scene.opplyst .ck-aura, .ck-scene.opplyst .ck-lotus, .ck-scene.opplyst::before, .ck-scene.feirer::before { animation: none; }
  /* DNA-en fryses i ulike faser, så den fortsatt ser ut som en spiral */
  .pt-dna > i, .pt-dna > i::before, .pt-dna > i::after { animation-play-state: paused; }
  .ck-bar i { transition: none; }
}
