/* Websjekk editorial motion v1
   Shared visual motion for the four-step editorial method and reusable editorial exits.
   CSS-only, decorative motion; content and decision logic remain unchanged. */

/* --------------------------------------------------------------------------
   Norsk Tech: balanced four-step method surface
   -------------------------------------------------------------------------- */
.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(32rem, 1.22fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(1.7rem, 4vw, 3.25rem);
  overflow: hidden;
  border-radius: 1.45rem;
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion::before {
  position: absolute;
  width: 34rem;
  height: 22rem;
  top: -8rem;
  right: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 158, 96, 0.09), rgba(197, 158, 96, 0) 68%);
  pointer-events: none;
  content: "";
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__copy {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  margin: 0;
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__sequence {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__flow {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.4vw, 1.15rem);
  margin-top: clamp(0.35rem, 1.2vw, 1rem);
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__step {
  display: flex;
  min-width: 0;
  min-height: 14.5rem;
  flex-direction: column;
  padding: clamp(1.15rem, 1.7vw, 1.45rem);
  border: 1px solid rgba(109, 117, 101, 0.18);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0.65rem 1.8rem rgba(45, 48, 40, 0.035);
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__step strong {
  margin-top: 0.95rem;
  font-size: clamp(1.02rem, 1.25vw, 1.18rem);
  line-height: 1.25;
}

.source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__step > p {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  line-height: 1.62;
}

.ws-method-process {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.55rem, 1.2vw, 1rem);
  align-items: start;
  padding: 1.2rem 0 0.35rem;
}

.ws-method-process::before,
.ws-method-process::after {
  position: absolute;
  top: 3.62rem;
  right: 11.5%;
  left: 11.5%;
  height: 1px;
  content: "";
  pointer-events: none;
}

.ws-method-process::before {
  background: rgba(137, 120, 83, 0.24);
}

.ws-method-process::after {
  background: linear-gradient(90deg, rgba(176, 123, 64, 0.25), rgba(166, 121, 67, 0.85), rgba(63, 91, 78, 0.72));
  transform: scaleX(0);
  transform-origin: left center;
  animation: ws-method-progress 8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.ws-method-process__signal {
  position: absolute;
  z-index: 5;
  top: 3.34rem;
  left: 11.5%;
  width: 0.58rem;
  height: 0.58rem;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #b88954;
  box-shadow: 0 0 0 0.35rem rgba(184, 137, 84, 0.1), 0 0 1.2rem rgba(184, 137, 84, 0.28);
  transform: translateX(-50%);
  animation: ws-method-signal 8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.ws-method-process__step {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.ws-method-process__node {
  display: grid;
  width: clamp(4.5rem, 6vw, 5.4rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(132, 115, 81, 0.24);
  border-radius: 50%;
  color: #61705c;
  background: rgba(252, 250, 244, 0.92);
  box-shadow: 0 0.6rem 1.7rem rgba(55, 48, 35, 0.045);
  animation: ws-method-node 8s ease-in-out infinite;
}

.ws-method-process__node svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-method-process__step[data-ws-step="1"] .ws-method-process__node {
  animation-delay: 0s;
}

.ws-method-process__step[data-ws-step="2"] .ws-method-process__node {
  animation-delay: 2s;
}

.ws-method-process__step[data-ws-step="3"] .ws-method-process__node {
  animation-delay: 4s;
}

.ws-method-process__step[data-ws-step="4"] .ws-method-process__node {
  animation-delay: 6s;
}

.ws-method-process__step strong {
  margin-top: 0.85rem;
  color: #5b6247;
  font-size: 0.9rem;
  line-height: 1.2;
}

.ws-method-process__step small {
  max-width: 14ch;
  margin-top: 0.4rem;
  color: #72756d;
  font-size: 0.76rem;
  line-height: 1.45;
}

@keyframes ws-method-progress {
  0%, 8% { transform: scaleX(0); opacity: 0.45; }
  88%, 100% { transform: scaleX(1); opacity: 0.9; }
}

@keyframes ws-method-signal {
  0%, 8% { left: 11.5%; }
  28% { left: 37%; }
  53% { left: 62.5%; }
  78%, 100% { left: 88.5%; }
}

@keyframes ws-method-node {
  0%, 16%, 100% {
    border-color: rgba(132, 115, 81, 0.24);
    color: #61705c;
    box-shadow: 0 0.6rem 1.7rem rgba(55, 48, 35, 0.045);
    transform: scale(1);
  }
  5%, 10% {
    border-color: rgba(184, 137, 84, 0.58);
    color: #657148;
    box-shadow: 0 0 0 0.55rem rgba(205, 163, 98, 0.09), 0 0.8rem 2.2rem rgba(164, 118, 62, 0.12);
    transform: scale(1.045);
  }
}

/* --------------------------------------------------------------------------
   Shared editorial exit: living Websjekk mark
   -------------------------------------------------------------------------- */
.insight-editorial-exit.ws-exit-motion {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(20rem, 0.92fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  min-height: 28rem;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.insight-editorial-exit.ws-exit-motion::before {
  position: absolute;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  top: 50%;
  right: -10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(71, 105, 89, 0.075), rgba(200, 163, 103, 0.045) 42%, rgba(255, 255, 255, 0) 70%);
  content: "";
  transform: translateY(-50%);
}

.insight-editorial-exit.ws-exit-motion .insight-editorial-exit__inner {
  position: relative;
  z-index: 3;
  max-width: 52rem;
}

.ws-exit-brand {
  position: relative;
  z-index: 2;
  width: min(100%, 28rem);
  min-height: 22rem;
  justify-self: center;
  isolation: isolate;
}

.ws-exit-brand__halo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(88%, 23rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 25%, rgba(232, 236, 226, 0.72) 43%, rgba(213, 185, 137, 0.15) 60%, rgba(255, 255, 255, 0) 72%);
  box-shadow: inset 0 0 3rem rgba(255, 255, 255, 0.9), 0 1.8rem 4rem rgba(60, 62, 50, 0.05);
  transform: translate(-50%, -50%);
}

.ws-exit-brand__orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  aspect-ratio: 1;
  border: 1px solid rgba(57, 91, 76, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ws-exit-brand__orbit::before,
.ws-exit-brand__orbit::after {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  content: "";
}

.ws-exit-brand__orbit--outer {
  width: 96%;
  border-color: rgba(52, 91, 77, 0.2);
  animation: ws-exit-orbit 22s linear infinite;
}

.ws-exit-brand__orbit--outer::before {
  width: 0.78rem;
  height: 0.78rem;
  top: 7%;
  right: 22%;
  background: #d2aa67;
  box-shadow: 0 0 1rem rgba(210, 170, 103, 0.34);
}

.ws-exit-brand__orbit--outer::after {
  width: 0.72rem;
  height: 0.72rem;
  right: 2%;
  bottom: 28%;
  background: #1f6758;
  box-shadow: 0 0 1rem rgba(31, 103, 88, 0.3);
}

.ws-exit-brand__orbit--middle {
  width: 76%;
  border-style: dashed;
  border-color: rgba(174, 139, 82, 0.22);
  animation: ws-exit-orbit-reverse 16s linear infinite;
}

.ws-exit-brand__orbit--middle::before {
  width: 0.62rem;
  height: 0.62rem;
  top: 44%;
  left: -0.31rem;
  background: #356f61;
  box-shadow: 0 0 0.9rem rgba(53, 111, 97, 0.28);
}

.ws-exit-brand__orbit--middle::after {
  width: 0.58rem;
  height: 0.58rem;
  right: 13%;
  bottom: 9%;
  background: #c59f64;
}

.ws-exit-brand__orbit--inner {
  width: 56%;
  border-color: rgba(91, 109, 88, 0.15);
  animation: ws-exit-orbit 29s linear infinite;
}

.ws-exit-brand__orbit--inner::before {
  width: 0.5rem;
  height: 0.5rem;
  top: 20%;
  left: 5%;
  background: #8da295;
}

.ws-exit-brand__orbit--inner::after {
  display: none;
}

.ws-exit-brand__pulse {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44%;
  aspect-ratio: 1;
  border: 1px solid rgba(202, 164, 103, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ws-exit-pulse 4.8s ease-out infinite;
}

.ws-exit-brand__core {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: clamp(7.6rem, 10vw, 9.4rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(80, 99, 86, 0.12);
  border-radius: 50%;
  background: rgba(249, 249, 244, 0.86);
  box-shadow: 0 0 0 0.8rem rgba(255, 255, 255, 0.38), 0 1.4rem 3.6rem rgba(35, 51, 43, 0.1);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: ws-exit-breathe 5.6s ease-in-out infinite;
}

.ws-exit-brand__core img {
  width: 62%;
  height: auto;
  filter: drop-shadow(0 0.45rem 0.9rem rgba(24, 70, 59, 0.12));
}

@keyframes ws-exit-orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ws-exit-orbit-reverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

@keyframes ws-exit-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.035); }
}

@keyframes ws-exit-pulse {
  0% { opacity: 0.56; transform: translate(-50%, -50%) scale(0.82); }
  72%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.52); }
}

@media (max-width: 64rem) {
  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion {
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }

  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.2rem;
  }

  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__step {
    min-height: 13rem;
  }

  .insight-editorial-exit.ws-exit-motion {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.65fr);
    gap: 1.25rem;
  }

  .ws-exit-brand {
    min-height: 19rem;
  }
}

@media (max-width: 48rem) {
  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion {
    padding: 1.2rem;
    border-radius: 1rem;
  }

  .ws-method-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem 0.8rem;
    padding-top: 0.4rem;
  }

  .ws-method-process::before,
  .ws-method-process::after,
  .ws-method-process__signal {
    display: none;
  }

  .ws-method-process__node {
    width: 4.4rem;
  }

  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__flow {
    grid-template-columns: 1fr;
  }

  .source-graph-page[data-source-territory="norsk-puls"] .source-graph-method.ws-method-motion .source-graph-method__step {
    min-height: 0;
  }

  .insight-editorial-exit.ws-exit-motion {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
  }

  .ws-exit-brand {
    width: min(100%, 21rem);
    min-height: 15.5rem;
    margin: 0 auto -0.2rem;
  }

  .ws-exit-brand__core {
    width: 7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-method-process::after,
  .ws-method-process__signal,
  .ws-method-process__node,
  .ws-exit-brand__orbit,
  .ws-exit-brand__pulse,
  .ws-exit-brand__core {
    animation: none !important;
  }

  .ws-method-process::after {
    transform: scaleX(1);
    opacity: 0.5;
  }
}
