/* V3.C1 — Artifact Authority
 * Owns artifact field, SVG/image treatment, role geometry and causal-motion styling.
 * It does not own page palette, section surfaces or chapter rhythm.
 */

.sne-v3 .pub-artifact,
.sne-v3 .deep-artifact,
.sne-v3 .depth-artifact {
  margin: 0;
  min-width: 0;
  position: relative;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  isolation: isolate;
}

.sne-v3 .pub-artifact::before,
.sne-v3 .deep-artifact::before,
.sne-v3 .depth-artifact::before {
  content: '';
  position: absolute;
  inset: -8% -7%;
  z-index: -1;
  background:
    radial-gradient(circle at 58% 46%, rgba(85,184,255,.105), transparent 44%),
    radial-gradient(circle at 74% 61%, rgba(255,132,40,.06), transparent 30%);
  filter: blur(8px);
  pointer-events: none;
}

.sne-v3 .pub-artifact img,
.sne-v3 .deep-artifact img,
.sne-v3 .depth-artifact img {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  opacity: 1;
  background: transparent;
}

.sne-v3 .pub-artifact img { filter: contrast(1.06) saturate(1.06) brightness(1.02); }

/* Home role geometry. */
.sne-v3 .pub-artifact--authority {
  width: 108%;
  justify-self: end;
  transform: translate(4%, -6px);
}
.sne-v3 .pub-artifact--authority::before { inset: -5% -4%; }
.sne-v3 .pub-artifact--causality {
  width: 114%;
  justify-self: start;
  transform: translate(-7%, -8px);
}
.sne-v3 .pub-artifact--causality img { filter: contrast(1.08) saturate(1.08) brightness(1.03); }
.sne-v3 .pub-artifact--web {
  width: 111%;
  justify-self: end;
  transform: translate(5%, -1px);
}
.sne-v3 .pub-artifact--web img {
  opacity: .98;
  filter: invert(1) hue-rotate(180deg) contrast(1.08) saturate(.9) brightness(.9);
  mix-blend-mode: multiply;
}
.sne-v3 .pub-artifact--production {
  width: 113%;
  justify-self: end;
  transform: translate(6%, -3px);
}
.sne-v3 .pub-artifact--production img { filter: contrast(1.08) saturate(1.08) brightness(1.03); }

/* Deep pages: dissolve the finite SVG viewport and allow the visual to use its cell. */
.sne-v3.pub-deep .deep-artifact img,
.sne-v3.pub-deep .depth-artifact img {
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 2.5%, #000 97.5%, transparent 100%),
    linear-gradient(0deg, transparent 0%, #000 2.5%, #000 97.5%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 2.5%, #000 97.5%, transparent 100%),
    linear-gradient(0deg, transparent 0%, #000 2.5%, #000 97.5%, transparent 100%);
  mask-composite: intersect;
}
.sne-v3.pub-deep .deep-problem--media .deep-artifact,
.sne-v3.pub-deep .deep-work .deep-artifact,
.sne-v3.pub-deep .depth-research .depth-artifact {
  width: 118%;
  margin-left: -9%;
}
.sne-v3.pub-deep .depth-evidence .depth-artifact {
  width: 110%;
  margin-left: -5%;
}
.sne-v3.pub-deep .depth-capability-hero .depth-artifact,
.sne-v3.pub-deep .depth-company-media .depth-artifact {
  width: 106%;
  margin-left: -3%;
}
.sne-v3.pub-deep .deep-artifact::before,
.sne-v3.pub-deep .depth-artifact::before {
  inset: -14% -12%;
  background:
    radial-gradient(circle at 54% 48%, rgba(85,184,255,.12), transparent 48%),
    radial-gradient(circle at 72% 62%, rgba(255,132,40,.065), transparent 34%);
  filter: blur(12px);
}

/* Causal motion belongs to the artifact system. */
.sne-v3 .pub-artifact--motion {
  --motion-bg: var(--sne-black);
  --motion-text: var(--sne-white);
  --motion-muted: #91a4b3;
  --motion-line: #2d485b;
  --motion-accent: var(--sne-blue-vivid);
  --motion-denied: var(--sne-orange-vivid);
  --sne-motion-step: 150ms;
  --sne-motion-transition: 240ms;
  --sne-motion-causal: 400ms;
  opacity: 1;
}
.sne-v3 .sne-causal-motion { margin: 0; }
.sne-v3 .sne-causal-motion svg { display: block; width: 100%; height: auto; overflow: visible; }
.sne-v3 .sne-causal-motion figcaption { display: none; }
.sne-v3 .sne-causal-baseline { stroke: var(--motion-line); stroke-width: 1; opacity: .48; }
.sne-v3 .sne-causal-edge,
.sne-v3 .sne-causal-fork-edge {
  stroke: var(--motion-line);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: .68;
}
.sne-v3 .sne-causal-edge.is-admitted { stroke: var(--motion-accent); }
.sne-v3 .sne-causal-stage { opacity: .18; transform-box: fill-box; transform-origin: center; }
.sne-v3 .sne-causal-stage .sne-causal-node { fill: var(--motion-bg); stroke: var(--motion-muted); stroke-width: 2; }
.sne-v3 .sne-causal-stage.is-key .sne-causal-node { stroke: var(--motion-accent); }
.sne-v3 .sne-causal-index { fill: var(--motion-muted); font-size: 10px; font-weight: 560; letter-spacing: 1.1px; font-family: var(--sne-font-mono); }
.sne-v3 .sne-causal-label { fill: var(--sne-white); font-size: 13px; font-weight: 500; font-family: var(--sne-font-text); }
.sne-v3 .sne-causal-note { fill: #91a4b3; }
.sne-v3 .sne-causal-fork { opacity: 0; }
.sne-v3 .sne-causal-fork-edge { stroke: var(--motion-denied); stroke-dasharray: .035 .04; }
.sne-v3 .sne-causal-fork-node { fill: var(--motion-bg); stroke: var(--motion-denied); stroke-width: 2; }
.sne-v3 .sne-causal-fork-label { fill: var(--sne-orange-soft); font: 500 11px/1 var(--sne-font-text); letter-spacing: 1.1px; }
.sne-v3 .sne-causal-fork-note { fill: #b6967f; font: 400 10px/1 var(--sne-font-text); }
.sne-v3 .sne-causal-motion.is-playing .sne-causal-stage { animation: v3-causal-stage var(--sne-motion-step) ease-out var(--causal-delay) forwards; }
.sne-v3 .sne-causal-motion.is-playing .sne-causal-edge { animation: v3-causal-edge var(--sne-motion-causal) cubic-bezier(.2,0,.38,.9) var(--causal-delay) forwards; }
.sne-v3 .sne-causal-motion.is-playing .sne-causal-fork { animation: v3-causal-fork var(--sne-motion-transition) ease-out var(--causal-delay) forwards; }
.sne-v3 .sne-causal-motion.is-playing .sne-causal-fork-edge { animation: v3-causal-edge var(--sne-motion-transition) cubic-bezier(.2,0,.38,.9) var(--causal-delay) forwards; }
.sne-v3 .sne-causal-motion.is-settled .sne-causal-stage { opacity: 1; }
.sne-v3 .sne-causal-motion.is-settled .sne-causal-stage.is-key .sne-causal-node { fill: var(--motion-accent); stroke: var(--motion-accent); }
.sne-v3 .sne-causal-motion.is-settled .sne-causal-edge,
.sne-v3 .sne-causal-motion.is-settled .sne-causal-fork-edge { stroke-dashoffset: 0; }
.sne-v3 .sne-causal-motion.is-settled .sne-causal-fork { opacity: .7; }
/* The generic .pub-artifact img rule is more specific than .pub-motion-fallback;
 * keep the desktop fallback hidden with equal-or-greater specificity. */
.sne-v3 .pub-artifact .pub-motion-fallback { display: none; width: 100%; height: auto; }

@keyframes v3-causal-stage { from { opacity: .18; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes v3-causal-edge { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes v3-causal-fork { from { opacity: 0; } to { opacity: .7; } }

@media (max-width: 980px) {
  .sne-v3 .pub-artifact--authority,
  .sne-v3 .pub-artifact--causality,
  .sne-v3 .pub-artifact--web,
  .sne-v3 .pub-artifact--production,
  .sne-v3.pub-deep .deep-problem--media .deep-artifact,
  .sne-v3.pub-deep .deep-work .deep-artifact,
  .sne-v3.pub-deep .depth-research .depth-artifact,
  .sne-v3.pub-deep .depth-evidence .depth-artifact,
  .sne-v3.pub-deep .depth-capability-hero .depth-artifact,
  .sne-v3.pub-deep .depth-company-media .depth-artifact {
    width: 100%;
    margin-left: 0;
    transform: none;
    justify-self: stretch;
  }
}

@media (max-width: 700px) {
  .sne-v3 .pub-artifact--motion .sne-causal-motion { display: none; }
  .sne-v3 .pub-artifact--motion .pub-motion-fallback { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .sne-v3 .pub-artifact--authority,
  .sne-v3 .pub-artifact--causality,
  .sne-v3 .pub-artifact--web,
  .sne-v3 .pub-artifact--production { transition: none; }
  .sne-v3 .sne-causal-motion .sne-causal-stage { opacity: 1; animation: none; transform: none; }
  .sne-v3 .sne-causal-motion .sne-causal-edge,
  .sne-v3 .sne-causal-motion .sne-causal-fork-edge { stroke-dashoffset: 0; animation: none; }
  .sne-v3 .sne-causal-motion .sne-causal-fork { opacity: .7; animation: none; }
}
